diff --git a/config/config.go b/config/config.go index 08f45e5..decfeca 100644 --- a/config/config.go +++ b/config/config.go @@ -16,21 +16,23 @@ obtenues simplement en utilisant la dot (.) notation type Config struct { Server struct { Admin struct { - Auth bool `json:"auth"` - Password string `json:"password"` - Username string `json:"username"` - } `json:"admin"` + Auth bool `mapstructure:"auth"` + Password string `mapstructure:"password"` + Username string `mapstructure:"username"` + } `mapstructure:"admin"` Api struct { - Auth bool `json:"auth"` - Key string `json:"key"` - } `json:"api"` + Auth bool `mapstructure:"auth"` + Key string `mapstructure:"key"` + } `mapstructure:"api"` Documents struct { - AccessKeyId string `json:"access_key_id"` - Buckets []string `json:"buckets"` - Endpoint string `json:"endpoint"` - SecretAccessKey string `json:"secret_access_key"` - UseSSL bool `json:"use_ssl"` - } `json:"documents"` - Port int `json:"port"` - } `json:"server"` + AccessKeyId string `mapstructure:"access_key_id"` + Buckets []string `mapstructure:"buckets"` + Endpoint string `mapstructure:"endpoint"` + SecretAccessKey string `mapstructure:"secret_access_key"` + UseSSL bool `mapstructure:"use_ssl"` + KeyId string `mapstructure:"keyid"` + KeyValue string `mapstructure:"keyvalue"` + } `mapstructure:"documents"` + Port int `mapstructure:"port"` + } `mapstructure:"server"` }