重构远程接口,替换为Baiyin SDK & 添加实名认证处理逻辑
This commit is contained in:
42
pkg/env/env.go
vendored
42
pkg/env/env.go
vendored
@@ -139,21 +139,45 @@ func loadLog() {
|
||||
// region remote
|
||||
|
||||
var (
|
||||
RemoteAddr = "http://103.139.212.110:9989"
|
||||
RemoteToken string
|
||||
BaiyinAddr = "http://103.139.212.110:9989"
|
||||
BaiyinTokenUrl string
|
||||
)
|
||||
|
||||
var (
|
||||
IdenCallbackUrl string
|
||||
IdenAccessKey string
|
||||
IdenSecretKey string
|
||||
)
|
||||
|
||||
func loadRemote() {
|
||||
_RemoteAddr := os.Getenv("REMOTE_ADDR")
|
||||
if _RemoteAddr != "" {
|
||||
RemoteAddr = _RemoteAddr
|
||||
_BaiyinAddr := os.Getenv("BAIYIN_ADDR")
|
||||
if _BaiyinAddr != "" {
|
||||
BaiyinAddr = _BaiyinAddr
|
||||
}
|
||||
|
||||
_RemoteToken := os.Getenv("REMOTE_TOKEN")
|
||||
if _RemoteToken == "" {
|
||||
panic("环境变量 REMOTE_TOKEN 的值不能为空")
|
||||
_BaiyinTokenUrl := os.Getenv("BAIYIN_TOKEN_URL")
|
||||
if _BaiyinTokenUrl == "" {
|
||||
panic("环境变量 BAIYIN_TOKEN_URL 的值不能为空")
|
||||
}
|
||||
RemoteToken = _RemoteToken
|
||||
BaiyinTokenUrl = _BaiyinTokenUrl
|
||||
|
||||
_IdenCallbackUrl := os.Getenv("IDEN_CALLBACK_URL")
|
||||
if _IdenCallbackUrl == "" {
|
||||
panic("环境变量 IDEN_CALLBACK_URL 的值不能为空")
|
||||
}
|
||||
IdenCallbackUrl = _IdenCallbackUrl
|
||||
|
||||
_IdenAccessKey := os.Getenv("IDEN_ACCESS_KEY")
|
||||
if _IdenAccessKey == "" {
|
||||
panic("环境变量 IDEN_ACCESS_KEY 的值不能为空")
|
||||
}
|
||||
IdenAccessKey = _IdenAccessKey
|
||||
|
||||
_IdenSecretKey := os.Getenv("IDEN_SECRET_KEY")
|
||||
if _IdenSecretKey == "" {
|
||||
panic("环境变量 IDEN_SECRET_KEY 的值不能为空")
|
||||
}
|
||||
IdenSecretKey = _IdenSecretKey
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
Reference in New Issue
Block a user