Commit fac776fe authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Update config struct tags from YAML to JSON

- Changed struct tags in `cmd/app/config.go` from `yaml` to `json`
- Maintains existing configuration structure while switching serialization format
parent ea21cd21
...@@ -16,28 +16,28 @@ const ( ...@@ -16,28 +16,28 @@ const (
) )
type Config struct { type Config struct {
DBConfig *DBConfig `yaml:"db_config"` DBConfig *DBConfig `json:"db_config"`
RegionConfigs []RegionConfig `yaml:"region_configs"` RegionConfigs []RegionConfig `json:"region_configs"`
Debug bool `yaml:"debug"` Debug bool `json:"debug"`
GatewayUrl string `yaml:"gateway_url"` GatewayUrl string `json:"gateway_url"`
} }
type DBConfig struct { type DBConfig struct {
User string `yaml:"user"` User string `json:"user"`
Password string `yaml:"password"` Password string `json:"password"`
Host string `yaml:"host"` Host string `json:"host"`
Port string `yaml:"port"` Port string `json:"port"`
Database string `yaml:"database"` Database string `json:"database"`
} }
type RegionConfig struct { type RegionConfig struct {
RegionCode string `yaml:"region_code"` RegionCode string `json:"region_code"`
ApiServer string `yaml:"api_server"` ApiServer string `json:"api_server"`
CAData string `yaml:"ca_data"` CAData string `json:"ca_data"`
Token string `yaml:"token"` Token string `json:"token"`
ClientCertData string `yaml:"client_cert_data"` ClientCertData string `json:"client_cert_data"`
ClientKeyData string `yaml:"client_key_data"` ClientKeyData string `json:"client_key_data"`
Insecure bool `yaml:"insecure"` Insecure bool `json:"insecure"`
} }
func LoadConfig() *Config { func LoadConfig() *Config {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment