grafana/pkg/configuration/configuration.go

41 lines
752 B
Go
Raw Normal View History

2014-08-08 18:35:15 +08:00
package configuration
type Cfg struct {
2014-09-22 16:46:13 +08:00
Http HttpCfg
}
type HttpCfg struct {
Port string
2014-09-22 17:39:40 +08:00
GoogleOAuth OAuthCfg
GithubOAuth OAuthCfg
2014-09-22 16:46:13 +08:00
}
2014-09-22 17:39:40 +08:00
type OAuthCfg struct {
2014-09-22 16:46:13 +08:00
Enabled bool
ClientId string
ClientSecret string
2014-08-08 18:35:15 +08:00
}
type DashboardSourceCfg struct {
sourceType string
path string
}
2014-09-22 16:46:13 +08:00
func NewCfg(port string) *Cfg {
return &Cfg{
Http: HttpCfg{
Port: port,
2014-09-22 17:39:40 +08:00
GoogleOAuth: OAuthCfg{
2014-09-22 16:46:13 +08:00
Enabled: true,
ClientId: "106011922963-4pvl05e9urtrm8bbqr0vouosj3e8p8kb.apps.googleusercontent.com",
ClientSecret: "K2evIa4QhfbhhAm3SO72t2Zv",
},
2014-09-22 17:39:40 +08:00
GithubOAuth: OAuthCfg{
Enabled: true,
ClientId: "de054205006b9baa2e17",
ClientSecret: "72b7ea52d9f1096fdf36cea95e95362a307e0322",
},
2014-09-22 16:46:13 +08:00
},
}
}