model

package
v0.0.0-...-4c075ac Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package model SDK models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResponse

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

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 GetRequest

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

GetRequest request interface for get

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 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 {
	Url() string
	// Encode encode request to UploadFields
	Encode() []UploadField
}

UploadRequest multipart/form-data reqeust interface

Directories

Path Synopsis
Package advertiser 广告主相关API结构体
Package advertiser 广告主相关API结构体
Package asset 高级创意相关API models
Package asset 高级创意相关API models
Package campaign 广告计划相关API
Package campaign 广告计划相关API
Package creative广告创意相关API models
Package creative广告创意相关API models
Package dmp DMP人群管理相关API models
Package dmp DMP人群管理相关API models
Package file 素材相关API models
Package file 素材相关API models
Package lp 咨询组件相关
Package lp 咨询组件相关
Package oauth Oauth2授权相关结构体
Package oauth Oauth2授权相关结构体
Package region 地域相关API models
Package region 地域相关API models
Package report 数据报表相关API结构体
Package report 数据报表相关API结构体
Package target 定向相关API models
Package target 定向相关API models
Package tool 工具类models
Package tool 工具类models
Package track 包含数据上报相关API结构体
Package track 包含数据上报相关API结构体
Package unit 广告组相关API models
Package unit 广告组相关API models

Jump to

Keyboard shortcuts

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