sane common configurations
This commit is contained in:
@@ -70,6 +70,8 @@ type Runtime struct {
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
*shared.Commons `mapstructure:"shared"`
|
||||
|
||||
Mode Mode // DEPRECATED
|
||||
File string
|
||||
OcisURL string `mapstructure:"ocis_url"`
|
||||
@@ -119,9 +121,6 @@ func New() *Config {
|
||||
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Log: shared.Log{
|
||||
Level: "info",
|
||||
},
|
||||
Debug: Debug{
|
||||
Addr: "127.0.0.1:9010",
|
||||
Token: "",
|
||||
|
||||
@@ -15,3 +15,10 @@ type Log struct {
|
||||
Color bool `mapstructure:"color"`
|
||||
File string `mapstructure:"file"`
|
||||
}
|
||||
|
||||
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
||||
// to overwrite its values.
|
||||
type Commons struct {
|
||||
*Log `mapstructure:"log"`
|
||||
OcisURL string `mapstructure:"ocis_url"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user