Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRequest ¶
type BaseResponse ¶
type BaseResponse struct { // Success 是否成功 Success bool `json:"success,omitempty"` // Code 返回码 Code int `json:"code,omitempty"` // Message 返回信息 Message string `json:"message,omitempty"` // ErrorCode 返回码 ErrorCode int `json:"errorCode"` // ErrorMsg 返回信息 ErrorMsg string `json:"errorMsg"` // RequestID 请求的日志id,唯一标识一个请求 RequestID string `json:"request_id,omitempty"` }
BaseResponse shared api response data fields
func (BaseResponse) IsError ¶
func (r BaseResponse) IsError() bool
IsError implement Response interface
type Bool ¶ added in v1.0.2
type Bool bool
Bool support number/string in json
func (*Bool) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type CodeNamePair ¶ added in v1.0.2
type CodeNamePair struct { // Code code Code string `json:"code,omitempty"` // Name 名称 Name string `json:"name,omitempty"` // Children 子节点 Children []CodeNamePair `json:"children,omitempty"` }
type CommonRequest ¶ added in v1.0.2
type CommonRequest struct { // AdvertiserID 广告主ID AdvertiserID uint64 `json:"advertiser_id,omitempty"` // Method 请求方法 Method string `json:"method,omitempty"` }
CommonRequest 通用 API Request
func (CommonRequest) Encode ¶ added in v1.0.2
func (r CommonRequest) Encode() []byte
Encode implement PostRequest interface
type Float64 ¶ added in v1.0.2
type Float64 float64
Float64 support string quoted number in json
func (*Float64) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type GetRequest ¶
GetRequest get request interface
type Int ¶ added in v1.0.2
type Int int
Int support string quoted number in json
func (*Int) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type Int64 ¶ added in v1.0.2
type Int64 int64
Int64 support string quoted number in json
func (*Int64) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type JSONInt ¶ added in v1.0.2
type JSONInt int
JSONInt support string quoted number in json and marshal to string
func JSONIntFromInt ¶ added in v1.0.2
func (JSONInt) MarshalJSON ¶ added in v1.0.2
func (*JSONInt) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type JSONInt64 ¶ added in v1.0.2
type JSONInt64 int64
JSONInt64 support string quoted number in json and marshal to string
func JSONInt64FromInt64 ¶ added in v1.0.2
func (JSONInt64) MarshalJSON ¶ added in v1.0.2
func (*JSONInt64) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type JSONUint64 ¶ added in v1.0.2
type JSONUint64 uint64
JSONUint64 support string quoted number in json and marshal to string
func JSONUint64FromUint64 ¶ added in v1.0.2
func JSONUint64FromUint64(v uint64) JSONUint64
func (JSONUint64) MarshalJSON ¶ added in v1.0.2
func (u64 JSONUint64) MarshalJSON() ([]byte, error)
func (JSONUint64) String ¶ added in v1.0.2
func (u64 JSONUint64) String() string
func (*JSONUint64) UnmarshalJSON ¶ added in v1.0.2
func (u64 *JSONUint64) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implement json Unmarshal interface
func (JSONUint64) Value ¶ added in v1.0.2
func (u64 JSONUint64) Value() uint64
type PageRespDTO ¶ added in v1.0.2
type PageRespDTO struct { // PageIndex 页码 PageIndex int64 `json:"page_index,omitempty"` // TotalCount 总数量 TotalCount int64 `json:"total_count,omitempty"` }
PageRespDTO 分页信息
type PostRequest ¶
PostRequest post request interface
type Response ¶
type Response interface { // IsError 是否返回错误 IsError() bool // Error implement error interface Error() string }
Response api response interface
type Uint64 ¶ added in v1.0.2
type Uint64 uint64
Uint64 support string quoted number in json
func (*Uint64) UnmarshalJSON ¶ added in v1.0.2
UnmarshalJSON implement json Unmarshal interface
type UploadField ¶
type UploadField struct { // Key field key Key string // Value field value Value string // Reader upload file reader Reader io.Reader }
UploadField multipart/form-data post request field struct
type UploadRequest ¶
type UploadRequest interface { Request // Encode encode request to UploadFields Encode() []UploadField }
UploadRequest multipart/form-data reqeust interface
Directories ¶
Path | Synopsis |
---|---|
Package advertiser 广告主相关
|
Package advertiser 广告主相关 |
Package conversion 转化追踪相关
|
Package conversion 转化追踪相关 |
Package oauth 授权相关
|
Package oauth 授权相关 |
Package report 报表相关
|
Package report 报表相关 |
offline
Package offline 离线报表
|
Package offline 离线报表 |
realtime
Package realtime 实时报表
|
Package realtime 实时报表 |
Package unit 广告单元相关
|
Package unit 广告单元相关 |