Files
opencloud/pkg/config/config.go
2020-04-21 22:43:22 +02:00

66 lines
1.1 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
}
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string
Namespace string
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
}
// Asset undocumented
type Asset struct {
Path string
}
// Storage defines the available storage configuration.
type Storage struct {
RootMountPath string
}
// Config combines all available configuration parts.
type Config struct {
File string
Storage Storage
Log Log
Debug Debug
HTTP HTTP
GRPC GRPC
Tracing Tracing
Asset Asset
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}