forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.go
56 lines (45 loc) · 1.72 KB
/
config.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
package config
import (
"github.com/grafana/grafana/pkg/setting"
)
// PluginManagementCfg is the configuration for the plugin management system.
// It includes settings which are used to configure different components of plugin management.
type PluginManagementCfg struct {
DevMode bool
PluginsPath string
PluginSettings setting.PluginSettings
PluginsAllowUnsigned []string
DisablePlugins []string
ForwardHostEnvVars []string
PluginsCDNURLTemplate string
GrafanaComAPIURL string
GrafanaAppURL string
Features Features
AngularSupportEnabled bool
HideAngularDeprecation []string
}
// Features contains the feature toggles used for the plugin management system.
type Features struct {
ExternalCorePluginsEnabled bool
SkipHostEnvVarsEnabled bool
}
// NewPluginManagementCfg returns a new PluginManagementCfg.
func NewPluginManagementCfg(devMode bool, pluginsPath string, pluginSettings setting.PluginSettings, pluginsAllowUnsigned []string,
pluginsCDNURLTemplate string, appURL string, features Features, angularSupportEnabled bool,
grafanaComAPIURL string, disablePlugins []string, hideAngularDeprecation []string, forwardHostEnvVars []string,
) *PluginManagementCfg {
return &PluginManagementCfg{
PluginsPath: pluginsPath,
DevMode: devMode,
PluginSettings: pluginSettings,
PluginsAllowUnsigned: pluginsAllowUnsigned,
DisablePlugins: disablePlugins,
PluginsCDNURLTemplate: pluginsCDNURLTemplate,
GrafanaComAPIURL: grafanaComAPIURL,
GrafanaAppURL: appURL,
Features: features,
AngularSupportEnabled: angularSupportEnabled,
HideAngularDeprecation: hideAngularDeprecation,
ForwardHostEnvVars: forwardHostEnvVars,
}
}