-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.go
86 lines (83 loc) · 2.02 KB
/
plugins.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package main
import (
"sysmanage-config/plugins/updprod"
"github.com/infinitybotlist/sysmanage-web/plugins/actions"
"github.com/infinitybotlist/sysmanage-web/plugins/authdp"
"github.com/infinitybotlist/sysmanage-web/plugins/frontend"
"github.com/infinitybotlist/sysmanage-web/plugins/logger"
"github.com/infinitybotlist/sysmanage-web/plugins/nginx"
"github.com/infinitybotlist/sysmanage-web/plugins/persist"
"github.com/infinitybotlist/sysmanage-web/plugins/systemd"
"github.com/infinitybotlist/sysmanage-web/types"
)
var meta = types.ServerMeta{
ConfigVersion: 1,
Plugins: []types.Plugin{
{
ID: authdp.ID,
Init: authdp.InitPlugin,
Preload: authdp.Preload,
},
/*{
ID: "authdummy",
Init: func(c *types.PluginConfig) error {
state.AuthPlugins = append(state.AuthPlugins, "authdummy")
return nil
},
},*/
{
ID: nginx.ID,
Init: nginx.InitPlugin,
Frontend: types.Provider{
Provider: "@core",
},
},
{
ID: systemd.ID,
Init: systemd.InitPlugin,
Frontend: types.Provider{
Provider: "@core",
},
},
// Persist has no frotend, it is a backend plugin
{
ID: persist.ID,
Init: persist.InitPlugin,
},
{
ID: actions.ID,
Init: actions.InitPlugin,
Frontend: types.Provider{
Provider: "@core",
},
},
// Frontend has no frontend, it is a backend plugin
{
ID: frontend.ID,
Init: frontend.InitPlugin,
},
{
ID: updprod.ID,
Init: updprod.InitPlugin,
},
{
ID: logger.ID,
Init: logger.InitPlugin,
},
},
Frontend: types.FrontendConfig{
FrontendProvider: types.Provider{
Provider: "frontend",
},
ComponentProvider: types.Provider{
Provider: "@core",
}, // Use a custom component provider if you want to modify the components
CorelibProvider: types.Provider{
Provider: "@core",
}, // Use a custom corelib provider if you want to modify the corelib
ExtraFiles: map[string]string{
"frontend/src/lib/images": "$lib/images",
"frontend/src/lib/images/logo.png": "static/favicon.png",
},
},
}