Add 'ocs/' from commit '7ca52baa61c4370a1bad0e2f74e85073798bdde9'

git-subtree-dir: ocs
git-subtree-mainline: b274cac8c2
git-subtree-split: 7ca52baa61
This commit is contained in:
A.Unger
2020-09-18 12:53:21 +02:00
77 changed files with 7917 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
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
}
// TokenManager is the config for using the reva token manager
type TokenManager struct {
JWTSecret string
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Tracing Tracing
TokenManager TokenManager
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}