-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsupport.go
28 lines (25 loc) · 920 Bytes
/
support.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
package support
import (
"go.lumeweb.com/portal-plugin-support/build"
"go.lumeweb.com/portal-plugin-support/internal"
"go.lumeweb.com/portal-plugin-support/internal/api"
pluginConfig "go.lumeweb.com/portal-plugin-support/internal/config"
"go.lumeweb.com/portal/core"
)
func init() {
core.RegisterPlugin(core.PluginInfo{
ID: internal.PLUGIN_NAME,
Version: build.GetInfo(),
Meta: func(ctx core.Context, builder core.PortalMetaBuilder) error {
pluginCfg := ctx.Config().GetPlugin(internal.PLUGIN_NAME).API.(*pluginConfig.APIConfig)
builder.AddFeatureFlag("support", true)
builder.AddPluginMeta(internal.PLUGIN_NAME, "support_portal", pluginCfg.SupportPortalURL)
builder.AddPluginMeta(internal.PLUGIN_NAME, "mailbox_id", pluginCfg.MailboxID)
return nil
},
API: func() (core.API, []core.ContextBuilderOption, error) {
return api.NewAPI()
},
Depends: []string{"dashboard"},
})
}