Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToInt(data []byte) int
- func BytesToInt32(data []byte) int32
- func BytesToInt64(data []byte) int64
- func ToBool(i interface{}) bool
- func ToFloat32(value interface{}) float32
- func ToFloat64(value interface{}) float64
- func ToInt(value interface{}) int
- func ToInt32(value interface{}) int32
- func ToInt64(value interface{}) int64
- func ToString(value interface{}) string
- func ToUint(value interface{}) uint
- func ToUint32(value interface{}) uint32
- func ToUint64(value interface{}) uint64
- type Client
- type Error
- type ErrorResult
- type Parameter
- type Requester
Constants ¶
View Source
const ( HTTP_GATEWAY = "http://gw.api.taobao.com/router/rest" HTTPS_GATEWAY = "https://eco.taobao.com/router/rest" HTTP_TEST_GATEWAY = "http://gw.api.tbsandbox.com/router/rest" HTTPS_TEST_GATEWAY = "https://gw.api.tbsandbox.com/router/rest" HTTP_OVERSEAS_GATEWAY = "http://api.taobao.com/router/rest" HTTPS_OVERSEAS_GATEWAY = "https://api.taobao.com/router/rest" MD5 = "md5" HMAC = "hmac" XML = "xml" JSON = "json" )
Variables ¶
View Source
var ( NIL_TYPE_ERROR = errors.New("数据类型为nil") UNKONWN_TYPE_ERROR = errors.New("未知的数据类型") API_RESPONSE_ERROR = errors.New("接口返回错误") )
View Source
var ( AppKey = "2814415" AppSecret = "181f90dee3bf06f1c9553f776b52dd9" )
Functions ¶
Types ¶
type Client ¶
type Client struct { Gateway string AppKey string // TOP分配给应用的AppKey AppSecret string // TOP分配给应用的AppSecret TargetAppKey string // 被调用的目标AppKey,仅当被调用的API为第三方ISV提供时有效 SignMethod string // 签名的摘要算法,可选值为:hmac,md5 Format string // 响应格式。默认为xml格式,可选值:xml,json。 V string // API协议版本,可选值:2.0 Session string // 用户登录授权成功后,TOP颁发给应用的授权信息,详细介绍请点击这里。当此API的标签上注明:“需要授权”,则此参数必传;“不需要授权”,则此参数不需要传;“可选授权”,则此参数为可选 PartnerId string // 合作伙伴身份标识 Timeout int64 // 请求超时时间 // contains filtered or unexported fields }
type ErrorResult ¶
type ErrorResult struct {
ErrorResponse Error `json:"error_response"`
}
Click to show internal directories.
Click to hide internal directories.