William Petit
56609ec316
Some checks reported errors
Cadoles/bouncer/pipeline/head Something is wrong with the build of this commit
30 lines
706 B
Go
30 lines
706 B
Go
package config
|
|
|
|
type AdminServerConfig struct {
|
|
HTTP HTTPConfig `yaml:"http"`
|
|
CORS CORSConfig `yaml:"cors"`
|
|
Auth AuthConfig `yaml:"auth"`
|
|
Metrics MetricsConfig `yaml:"metrics"`
|
|
}
|
|
|
|
func NewDefaultAdminServerConfig() AdminServerConfig {
|
|
return AdminServerConfig{
|
|
HTTP: NewHTTPConfig("127.0.0.1", 8081),
|
|
CORS: NewDefaultCORSConfig(),
|
|
Auth: NewDefaultAuthConfig(),
|
|
Metrics: NewDefaultMetricsConfig(),
|
|
}
|
|
}
|
|
|
|
type AuthConfig struct {
|
|
Issuer InterpolatedString `yaml:"issuer"`
|
|
PrivateKey InterpolatedString `yaml:"privateKey"`
|
|
}
|
|
|
|
func NewDefaultAuthConfig() AuthConfig {
|
|
return AuthConfig{
|
|
Issuer: "http://127.0.0.1:8081",
|
|
PrivateKey: "admin-key.json",
|
|
}
|
|
}
|