-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.go
55 lines (52 loc) · 1.79 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
package main
import (
"sysmanage/plugins/foo"
"sysmanage/plugins/updprod"
"github.com/infinitybotlist/sysmanage-web/plugins/actions"
"github.com/infinitybotlist/sysmanage-web/plugins/frontend"
"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{
Plugins: map[string]types.Plugin{
"nginx": {
Init: nginx.InitPlugin,
Frontend: "@core",
},
"systemd": {
Init: systemd.InitPlugin,
Frontend: "@core",
},
// Persist has no frotend, it is a backend plugin
"persist": {
Init: persist.InitPlugin,
},
"actions": {
Init: actions.InitPlugin,
Frontend: "@core",
},
// Frontend has no frontend, it is a backend plugin
"frontend": {
Init: frontend.InitPlugin,
},
// Example of a custom plugin
"foo": {
Init: foo.InitPlugin,
Frontend: "frontend/extplugins/foo", // This is the path to the plugin's frontend
},
"updprod": {
Init: updprod.InitPlugin,
},
},
Frontend: types.FrontendConfig{
FrontendPath: "frontend", // Use @core here if you want to bootstrap builds from sysmanage itself
ComponentProvider: "@core", // Use a custom component provider if you want to modify the components
CorelibProvider: "@core", // Use a custom corelib provider if you want to modify the corelib
ExtraFiles: map[string]string{
"frontend/src/lib/images": "$lib/images", // The FrontendPath is irrelevant here, all src's are relative to the root of the project
"file://frontend/src/lib/images/logo.png": "static/favicon.png", // Since this is specifically a file-file copy, we need to specify this with file://
},
},
}