You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
package config
|
|
|
|
var SdkConfig = Config{}
|
|
|
|
// ConfigInit @Title 初始化配置
|
|
func ConfigInit(config Config) {
|
|
SdkConfig = config
|
|
}
|
|
|
|
type Config struct {
|
|
Url string // api地址
|
|
TokenUrl string // api
|
|
MqUrl string // mq地址
|
|
AppKey string // appKey
|
|
AppSecret string // appSecret
|
|
AccessToken string // accessToken
|
|
RefreshToken string // refreshToken
|
|
ChannelId uint // channelId
|
|
CustomerId uint // customerId
|
|
OpName string // 账号
|
|
Pin string // 下单账号
|
|
AccountId uint // 账号id
|
|
AccessKey string // accessKey
|
|
SecretKey string // secretKey
|
|
RefreshTokenCallback func(token *Bearer)
|
|
}
|
|
|
|
type Bearer struct {
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn uint `json:"expires_in"`
|
|
RefreshToken string `json:"refresh_token"`
|
|
Scope string `json:"scope"`
|
|
UID string `json:"uid"`
|
|
Time int64 `json:"time"`
|
|
TokenType string `json:"token_type"`
|
|
Code string `json:"code"`
|
|
Xid string `json:"xid"`
|
|
}
|