/
plugin.go
44 lines (38 loc) · 986 Bytes
/
plugin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package vpn
import (
"github.com/chonglou/arche/web"
"github.com/chonglou/arche/web/cache"
"github.com/chonglou/arche/web/i18n"
"github.com/chonglou/arche/web/queue"
"github.com/chonglou/arche/web/settings"
"github.com/chonglou/arche/web/storage"
"github.com/facebookgo/inject"
"github.com/go-pg/pg"
"github.com/urfave/cli"
)
// Plugin plugin
type Plugin struct {
I18n *i18n.I18n `inject:""`
Cache cache.Cache `inject:""`
Jwt *web.Jwt `inject:""`
Queue queue.Queue `inject:""`
Settings *settings.Settings `inject:""`
Security *web.Security `inject:""`
Storage storage.Storage `inject:""`
DB *pg.DB `inject:""`
}
// Init init beans
func (p *Plugin) Init(*inject.Graph) error {
return nil
}
// Shell console commands
func (p *Plugin) Shell() []cli.Command {
return []cli.Command{}
}
// Mount register
func (p *Plugin) Mount() error {
return nil
}
func init() {
web.Register(&Plugin{})
}