Initial commit

This commit is contained in:
Thomas Boerger
2019-12-10 09:38:51 +01:00
commit 66337bb4da
56 changed files with 4168 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
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
Root string
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Tracing Tracing
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}