Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Shared/common options (currently used by multiple components)
AllowedNamespaces []string `mapstructure:"allowed-namespaces"`
KubeconfigPath string `mapstructure:"kubeconfig"`
Addr string `mapstructure:"addr" validate:"omitempty,hostname_port"`
AuthMode AuthMode `mapstructure:"auth-mode"`
BasePath string `mapstructure:"base-path"`
ClusterAPIEndpoint string `mapstructure:"cluster-api-endpoint"`
GinMode string `mapstructure:"gin-mode" validate:"omitempty,oneof=debug release"`
Environment sharedcfg.Environment
// csrf options
CSRF struct {
Enabled bool
}
// logging options
Logging struct {
Enabled bool
Level string `validate:"oneof=debug info warn error disabled"`
Format string `validate:"oneof=json pretty"`
// access-log options
AccessLog struct {
Enabled bool
HideHealthChecks bool `mapstructure:"hide-health-checks"`
} `mapstructure:"access-log"`
}
// session options
Session struct {
Secret string
// cookie options
Cookie struct {
Name string
Path string
Domain string
MaxAge int `mapstructure:"max-age"`
Secure bool
HttpOnly bool `mapstructure:"http-only"`
SameSite http.SameSite `mapstructure:"same-site"`
}
}
// TLS options
TLS struct {
Enabled bool
CertFile string `mapstructure:"cert-file" validate:"omitempty,file"`
KeyFile string `mapstructure:"key-file" validate:"omitempty,file"`
}
// UI options
UI struct {
ClusterAPIEnabled bool `mapstructure:"cluster-api-enabled"`
}
}
Represents the Dashboard configuration
func DefaultConfig ¶
func DefaultConfig() *Config
Click to show internal directories.
Click to hide internal directories.