Documentation
¶
Index ¶
- Constants
- func GetBytesBuffer() *bytes.Buffer
- func GetStringsBuilder() *strings.Builder
- func JSONMarshal(req interface{}) string
- func PutBytesBuffer(buf *bytes.Buffer)
- func PutStringsBuilder(builder *strings.Builder)
- type BaseRequest
- type BaseResponse
- type Bool
- type Client
- type FinalRequest
- type FinalUploadRequest
- type JsonTime
- type Request
- type RequestData
- type Response
- type UploadRequest
- type UploadRequestData
Constants ¶
View Source
const ( GATEWAY = "http://gw.open.1688.com/openapi" PROTOCOL = "param2" VERSION = "1" )
View Source
const JSONTIME_FORMAT = "20060102150405.000Z0700"
Variables ¶
This section is empty.
Functions ¶
func GetBytesBuffer ¶
func GetStringsBuilder ¶
func JSONMarshal ¶
func JSONMarshal(req interface{}) string
JSONMarshal encode json without html escape
func PutBytesBuffer ¶
func PutStringsBuilder ¶
Types ¶
type BaseRequest ¶
type BaseRequest struct {
// contains filtered or unexported fields
}
func NewBaseRequest ¶
func NewBaseRequest(namespace string, name string) BaseRequest
func (*BaseRequest) Name ¶
func (r *BaseRequest) Name() string
func (*BaseRequest) Namespace ¶
func (r *BaseRequest) Namespace() string
func (*BaseRequest) Path ¶
func (r *BaseRequest) Path() string
func (*BaseRequest) SetVersion ¶
func (r *BaseRequest) SetVersion(version string)
func (*BaseRequest) Version ¶
func (r *BaseRequest) Version() string
type BaseResponse ¶
type BaseResponse struct { ErrorCode string `json:"error_code,omitempty"` ErrorMessage string `json:"error_message,omitempty"` RequestId string `json:"request_id,omitempty"` Success Bool `json:"success,omitempty"` InnerErrorCode string `json:"errorCode,omitempty"` InnerErrorMsg string `json:"errorMsg,omitempty"` ErrorInfo string `json:"errorInfo,omitempty"` ExtErrorMessage string `json:"extErrorMessage,omitempty"` }
func (BaseResponse) Error ¶
func (r BaseResponse) Error() string
func (BaseResponse) IsError ¶
func (r BaseResponse) IsError() bool
type Bool ¶ added in v1.0.5
type Bool bool
Bool support string or bool for umarshal json
func (*Bool) UnmarshalJSON ¶ added in v1.0.5
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client api client
type FinalRequest ¶
type FinalRequest struct { BaseRequest // contains filtered or unexported fields }
func NewRequest ¶
func NewRequest(namespace string, data RequestData) *FinalRequest
func (*FinalRequest) Params ¶
func (r *FinalRequest) Params() map[string]string
type FinalUploadRequest ¶ added in v1.0.4
type FinalUploadRequest struct { BaseRequest // contains filtered or unexported fields }
func NewUploadRequest ¶ added in v1.0.4
func NewUploadRequest(namespace string, data UploadRequestData) *FinalUploadRequest
func (*FinalUploadRequest) Files ¶ added in v1.0.4
func (r *FinalUploadRequest) Files() map[string]io.Reader
func (*FinalUploadRequest) Params ¶ added in v1.0.4
func (r *FinalUploadRequest) Params() map[string]string
type RequestData ¶
type UploadRequest ¶ added in v1.0.4
type UploadRequestData ¶ added in v1.0.4
type UploadRequestData interface { RequestData Files() map[string]io.Reader }
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
Package message 订阅消息相关
|
Package message 订阅消息相关 |
requests
|
|
alibaba/logistics
Package logistics 物流相关API
|
Package logistics 物流相关API |
alibaba/p4p
Package p4p 营销活动相关API
|
Package p4p 营销活动相关API |
alibaba/product
Package product 商品相关API
|
Package product 商品相关API |
alibaba/trade
Package trade 交易相关API
|
Package trade 交易相关API |
Click to show internal directories.
Click to hide internal directories.