make Huawei configs compatible with HMS Core 4.0 (#561)

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
kerem
2021-03-28 17:13:02 +03:00
committed by GitHub
parent d030d1ef6a
commit 9c51cbc989
7 changed files with 50 additions and 49 deletions

View File

@@ -58,7 +58,7 @@ android:
huawei:
enabled: true
apikey: "YOUR_API_KEY"
appsecret: "YOUR_APP_SECRET"
appid: "YOUR_APP_ID"
max_retry: 0 # resend fail notification, default value zero is disabled
@@ -161,10 +161,10 @@ type SectionAndroid struct {
// SectionHuawei is sub section of config.
type SectionHuawei struct {
Enabled bool `yaml:"enabled"`
APIKey string `yaml:"apikey"`
APPId string `yaml:"appid"`
MaxRetry int `yaml:"max_retry"`
Enabled bool `yaml:"enabled"`
AppSecret string `yaml:"appsecret"`
AppID string `yaml:"appid"`
MaxRetry int `yaml:"max_retry"`
}
// SectionIos is sub section of config.
@@ -317,8 +317,8 @@ func LoadConf(confPath string) (ConfYaml, error) {
// Huawei
conf.Huawei.Enabled = viper.GetBool("huawei.enabled")
conf.Huawei.APIKey = viper.GetString("huawei.apikey")
conf.Huawei.APPId = viper.GetString("huawei.appid")
conf.Huawei.AppSecret = viper.GetString("huawei.appsecret")
conf.Huawei.AppID = viper.GetString("huawei.appid")
conf.Huawei.MaxRetry = viper.GetInt("huawei.max_retry")
// iOS

View File

@@ -45,7 +45,7 @@ android:
huawei:
enabled: true
apikey: "YOUR_API_KEY"
appsecret: "YOUR_APP_SECRET"
appid: "YOUR_APP_ID"
max_retry: 0 # resend fail notification, default value zero is disabled