|
|
@ -13,18 +13,18 @@ var (
|
|
|
|
redisSetting *RedisSettingS
|
|
|
|
redisSetting *RedisSettingS
|
|
|
|
features *FeaturesSettingS
|
|
|
|
features *FeaturesSettingS
|
|
|
|
|
|
|
|
|
|
|
|
ServerSetting *ServerSettingS
|
|
|
|
ServerSetting *ServerSettingS
|
|
|
|
AppSetting *AppSettingS
|
|
|
|
AppSetting *AppSettingS
|
|
|
|
CacheIndexSetting *CacheIndexSettingS
|
|
|
|
SimpleCacheIndexSetting *SimpleCacheIndexSettingS
|
|
|
|
SmsJuheSetting *SmsJuheSettings
|
|
|
|
SmsJuheSetting *SmsJuheSettings
|
|
|
|
AlipaySetting *AlipaySettingS
|
|
|
|
AlipaySetting *AlipaySettingS
|
|
|
|
ZincSetting *ZincSettingS
|
|
|
|
ZincSetting *ZincSettingS
|
|
|
|
AliOSSSetting *AliOSSSettingS
|
|
|
|
AliOSSSetting *AliOSSSettingS
|
|
|
|
MinIOSetting *MinIOSettingS
|
|
|
|
MinIOSetting *MinIOSettingS
|
|
|
|
S3Setting *S3SettingS
|
|
|
|
S3Setting *S3SettingS
|
|
|
|
LocalOSSSetting *LocalOSSSettingS
|
|
|
|
LocalOSSSetting *LocalOSSSettingS
|
|
|
|
JWTSetting *JWTSettingS
|
|
|
|
JWTSetting *JWTSettingS
|
|
|
|
Mutex *sync.Mutex
|
|
|
|
Mutex *sync.Mutex
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func setupSetting(suite []string, noDefault bool) error {
|
|
|
|
func setupSetting(suite []string, noDefault bool) error {
|
|
|
@ -41,21 +41,21 @@ func setupSetting(suite []string, noDefault bool) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
objects := map[string]interface{}{
|
|
|
|
objects := map[string]interface{}{
|
|
|
|
"App": &AppSetting,
|
|
|
|
"App": &AppSetting,
|
|
|
|
"Server": &ServerSetting,
|
|
|
|
"Server": &ServerSetting,
|
|
|
|
"CacheIndex": &CacheIndexSetting,
|
|
|
|
"SimpleCacheIndex": &SimpleCacheIndexSetting,
|
|
|
|
"Alipay": &AlipaySetting,
|
|
|
|
"Alipay": &AlipaySetting,
|
|
|
|
"SmsJuhe": &SmsJuheSetting,
|
|
|
|
"SmsJuhe": &SmsJuheSetting,
|
|
|
|
"LoggerFile": &loggerFileSetting,
|
|
|
|
"LoggerFile": &loggerFileSetting,
|
|
|
|
"LoggerZinc": &loggerZincSetting,
|
|
|
|
"LoggerZinc": &loggerZincSetting,
|
|
|
|
"MySQL": &mySQLSetting,
|
|
|
|
"MySQL": &mySQLSetting,
|
|
|
|
"Zinc": &ZincSetting,
|
|
|
|
"Zinc": &ZincSetting,
|
|
|
|
"Redis": &redisSetting,
|
|
|
|
"Redis": &redisSetting,
|
|
|
|
"JWT": &JWTSetting,
|
|
|
|
"JWT": &JWTSetting,
|
|
|
|
"AliOSS": &AliOSSSetting,
|
|
|
|
"AliOSS": &AliOSSSetting,
|
|
|
|
"MinIO": &MinIOSetting,
|
|
|
|
"MinIO": &MinIOSetting,
|
|
|
|
"LocalOSS": &LocalOSSSetting,
|
|
|
|
"LocalOSS": &LocalOSSSetting,
|
|
|
|
"S3": &S3Setting,
|
|
|
|
"S3": &S3Setting,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err = setting.Unmarshal(objects); err != nil {
|
|
|
|
if err = setting.Unmarshal(objects); err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|