Created
This commit is contained in:
14
config/config.go
Normal file
14
config/config.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
type Config struct {
|
||||
Debug bool `json:"debug"` // 是否为调试模式
|
||||
URL string `json:"url"` // 店铺地址
|
||||
Version string `json:"version"` // API 版本
|
||||
ConsumerKey string `json:"consumer_key"` // Consumer Key
|
||||
ConsumerSecret string `json:"consumer_secret"` // Consumer Secret
|
||||
AddAuthenticationToURL bool `json:"add_authentication_to_url"` // 是否将认证信息附加到 URL 中
|
||||
Timeout time.Duration `json:"timeout"` // 超时时间(秒)
|
||||
VerifySSL bool `json:"verify_ssl"` // 是否验证 SSL
|
||||
}
|
||||
10
config/config_test.json
Normal file
10
config/config_test.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"debug": true,
|
||||
"url": "http://127.0.0.1/",
|
||||
"version": "v3",
|
||||
"consumer_key": "",
|
||||
"consumer_secret": "",
|
||||
"add_authentication_to_url": false,
|
||||
"timeout": 10,
|
||||
"verify_ssl": true
|
||||
}
|
||||
Reference in New Issue
Block a user