Files
opencloud/glauth/pkg/config/config.go
A.Unger 05b1e15464 Add 'glauth/' from commit '0735ec933777cb5fd1427c5311dcb6712def476d'
git-subtree-dir: glauth
git-subtree-mainline: d6733b47cc
git-subtree-split: 0735ec9337
2020-09-18 12:45:18 +02:00

72 lines
1.2 KiB
Go

package config
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
}
// Debug defines the available debug configuration.
type Debug struct {
Addr string
Token string
Pprof bool
Zpages bool
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
}
// Ldap defined the available LDAP configuration.
type Ldap struct {
Address string
Enabled bool
}
// Ldaps defined the available LDAPS configuration.
type Ldaps struct {
Ldap
Cert string
Key string
}
// Backend defined the available backend configuration.
type Backend struct {
BaseDN string
Insecure bool
NameFormat string
GroupFormat string
SSHKeyAttr string
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Tracing Tracing
Ldap Ldap
Ldaps Ldaps
Backend Backend
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}