model

package
v0.0.0-...-80d2d60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package model SDK models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONMarshal

func JSONMarshal(i interface{}) []byte

Types

type BaseResponse

type BaseResponse struct {
	Message   string          `json:"message,omitempty"`   // 返回信息
	RequestId string          `json:"requestId,omitempty"` // 请求id
	Data      json.RawMessage `json:"data,omitempty"`      // JSON返回值
	Code      int             `json:"status,omitempty"`    // 返回码
}

BaseResponse shared response data struct

func (BaseResponse) Error

func (r BaseResponse) Error() string

Error implement error interface

func (BaseResponse) IsError

func (r BaseResponse) IsError() bool

IsError detect if the response is an error

type Float64

type Float64 float64

Float64 support string quoted number in json

func (Float64) String

func (f64 Float64) String(prec int) string

func (*Float64) UnmarshalJSON

func (f64 *Float64) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

func (Float64) Value

func (f64 Float64) Value() float64

type GetRequest

type GetRequest interface {
	Url() string
	Encode() string
}

GetRequest request interface for get

type Int

type Int int

Int support string quoted number in json

func (Int) String

func (i Int) String() string

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

func (Int) Value

func (i Int) Value() int

type Int64

type Int64 int64

Int64 support string quoted number in json

func (Int64) String

func (i64 Int64) String() string

func (*Int64) UnmarshalJSON

func (i64 *Int64) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

func (Int64) Value

func (i64 Int64) Value() int64

type MatchType

type MatchType int

func (*MatchType) UnmarshalCSV

func (m *MatchType) UnmarshalCSV(b string) (err error)

UnmarshalCSV implement json Unmarshal interface

func (*MatchType) UnmarshalJSON

func (m *MatchType) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

func (MatchType) Value

func (m MatchType) Value() int

type PageInfo

type PageInfo struct {
	// PageSize 页大小
	PageSize int `json:"page_size,omitempty"`
	// CurrentPage 当前页码
	CurrentPage int `json:"current_page,omitempty"`
	// TotalCount 总记录数
	TotalCount int `json:"total_count,omitempty"`
}

PageInfo 分页信息

type PostRequest

type PostRequest interface {
	Url() string
	Encode() []byte
}

PostRequest request interface for post

type Response

type Response interface {
	IsError() bool
	Error() string
}

Response api response interface

type TemporalGranularityType

type TemporalGranularityType string

TemporalGranularityType 时间粒度

const (
	// TemporalGranularityType_DAILY 天粒度
	TemporalGranularityType_DAILY TemporalGranularityType = "DAILY"
	// TemporalGranularityType_HOURLY 小时粒度
	TemporalGranularityType_HOURLY TemporalGranularityType = "HOURLY"
)

type Uint64

type Uint64 uint64

Uint64 support string quoted number in json

func (Uint64) String

func (u64 Uint64) String() string

func (*Uint64) UnmarshalJSON

func (u64 *Uint64) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

func (Uint64) Value

func (u64 Uint64) Value() uint64

type UploadField

type UploadField struct {
	// Reader upload file reader
	Reader io.Reader
	// Key field key
	Key string
	// Value field value
	Value string
}

UploadField multipart/form-data post request field struct

type UploadRequest

type UploadRequest interface {
	Url() string
	// Encode encode request to UploadFields
	Encode() []UploadField
}

UploadRequest multipart/form-data reqeust interface

Directories

Path Synopsis
Package adcompass 账户罗盘
Package adcompass 账户罗盘
Package advertiser 广告主相关API结构体
Package advertiser 广告主相关API结构体
api
Package appcenter 应用管理
Package appcenter 应用管理
appcenter
Package appcenter 应用管理
Package appcenter 应用管理
Package asset 高级创意相关API models
Package asset 高级创意相关API models
Package comment 评论管理
Package comment 评论管理
Package creative广告创意相关API models
Package creative广告创意相关API models
Package dmp DMP人群管理相关API models
Package dmp DMP人群管理相关API models
dsp
Package dsp 智能化创编
Package dsp 智能化创编
campaign
Package campaign 广告计划
Package campaign 广告计划
creative
Package creative 广告创意
Package creative 广告创意
dpa
jingbell
Package jingbell 直播推广相关
Package jingbell 直播推广相关
native
Package native 原生广告投放工具
Package native 原生广告投放工具
target
Package target 定向模板
Package target 定向模板
unit
Package unit 广告组
Package unit 广告组
video
Package video 视频库相关接口
Package video 视频库相关接口
Package file 素材相关API models
Package file 素材相关API models
Package lp 咨询组件相关
Package lp 咨询组件相关
Package appcenter 应用管理
Package appcenter 应用管理
app
dmp
Package oauth Oauth2授权相关结构体
Package oauth Oauth2授权相关结构体
package Page 魔力建站落地页相关 API Model
package Page 魔力建站落地页相关 API Model
Package report 数据报表相关API结构体
Package report 数据报表相关API结构体
Package target 定向相关API models
Package target 定向相关API models
Package tool 工具类models
Package tool 工具类models
preput
Package preput 提前预估
Package preput 提前预估
unit
Package unit 出价建议
Package unit 出价建议
Package track 包含数据上报相关API结构体
Package track 包含数据上报相关API结构体
Package unit 广告组相关API models
Package unit 广告组相关API models
v2.2
Package wordinfo 关键词管理
Package wordinfo 关键词管理

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL