ad

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ad struct {
	RequestID  string                       `json:"request_id,omitempty"`
	AdsControl json.RawMessage              `json:"ads_control,omitempty"`
	AdsInfo    map[int64]map[int64]*AdsInfo `json:"ads_info,omitempty"`
	ClientIP   string                       `json:"-"`
}

func (*Ad) Convert

func (ad *Ad) Convert(resource int64) (ads []*AdInfo, aids []int64)

type AdInfo

type AdInfo struct {
	CreativeID      int64 `json:"creative_id,omitempty"`
	CreativeType    int64 `json:"creative_type,omitempty"`
	CreativeContent *struct {
		Title       string `json:"title,omitempty"`
		Desc        string `json:"description,omitempty"`
		ButtonTitle string `json:"button_title,omitempty"`
		VideoID     int64  `json:"video_id,omitempty"`
		UserName    string `json:"username,omitempty"`
		ImageURL    string `json:"image_url,omitempty"`
		ImageMD5    string `json:"image_md5,omitempty"`
		LogURL      string `json:"log_url,omitempty"`
		LogMD5      string `json:"log_md5,omitempty"`
		URL         string `json:"url,omitempty"`
		ClickURL    string `json:"click_url,omitempty"`
		ShowURL     string `json:"show_url,omitempty"`
	} `json:"creative_content,omitempty"`
	AdCb      string          `json:"ad_cb,omitempty"`
	CardType  int             `json:"card_type,omitempty"`
	Extra     json.RawMessage `json:"extra,omitempty"`
	Resource  int64           `json:"-"`
	Source    int64           `json:"-"`
	RequestID string          `json:"-"`
	IsAd      bool            `json:"-"`
	CmMark    int             `json:"-"`
	Index     int             `json:"-"`
	IsAdLoc   bool            `json:"-"`
	CardIndex int             `json:"-"`
	ClientIP  string          `json:"-"`
	// ad
	URI     string `json:"-"`
	Param   string `json:"-"`
	Goto    string `json:"-"`
	View    int    `json:"-"`
	Danmaku int    `json:"-"`
}

type AdInfos

type AdInfos []*AdInfo

func (AdInfos) Len

func (a AdInfos) Len() int

func (AdInfos) Less

func (a AdInfos) Less(i, j int) bool

func (AdInfos) Swap

func (a AdInfos) Swap(i, j int)

type AdsInfo

type AdsInfo struct {
	Index     int     `json:"index,omitempty"`
	AdInfo    *AdInfo `json:"ad_info,omitempty"`
	IsAd      bool    `json:"is_ad,omitempty"`
	CmMark    int     `json:"cm_mark,omitempty"`
	CardIndex int     `json:"card_index,omitempty"`
}

Jump to

Keyboard shortcuts

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