operate

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Active

type Active struct {
	ID         int64           `json:"id,omitempty"`
	ParentID   int64           `json:"parent_id,omitempty"`
	Name       string          `json:"name,omitempty"`
	Background string          `json:"background,omitempty"`
	Type       string          `json:"type,omitempty"`
	Content    json.RawMessage `json:"content,omitempty"`
	// Extra
	Pid      int64     `json:"pid,omitempty"`
	Title    string    `json:"title,omitempty"`
	Subtitle string    `json:"subtitle,omitempty"`
	Desc     string    `json:"desc,omitempty"`
	Param    string    `json:"param,omitempty"`
	Goto     model.Gt  `json:"goto,omitempty"`
	Cover    string    `json:"cover,omitempty"`
	Limit    int       `json:"limit,omitempty"`
	Items    []*Active `json:"items,omitempty"`
}

func (*Active) Change

func (a *Active) Change()

type Actives

type Actives []*Active

func (Actives) Len

func (is Actives) Len() int

func (Actives) Less

func (is Actives) Less(i, j int) bool

func (Actives) Swap

func (is Actives) Swap(i, j int)

type Button

type Button struct {
	Text  string `json:"text,omitempty"`
	Event string `json:"event,omitempty"`
}

type Card

type Card struct {
	Plat       int8                          `json:"plat,omitempty"`
	Build      int                           `json:"build,omitempty"`
	ID         int64                         `json:"id,omitempty"`
	Param      string                        `json:"param,omitempty"`
	CardGoto   model.CardGt                  `json:"card_goto,omitempty"`
	Goto       model.Gt                      `json:"goto,omitempty"`
	URI        string                        `json:"uri,omitempty"`
	Title      string                        `json:"title,omitempty"`
	Desc       string                        `json:"desc,omitempty"`
	Cover      string                        `json:"cover,omitempty"`
	Coverm     map[model.ColumnStatus]string `json:"coverm,omitempty"`
	Avatar     string                        `json:"avatar,omitempty"`
	Download   int32                         `json:"download,omitempty"`
	Badge      string                        `json:"badge,omitempty"`
	Ratio      int                           `json:"ratio,omitempty"`
	Score      int32                         `json:"score,omitempty"`
	Tid        int64                         `json:"tid,omitempty"`
	Subtitle   string                        `json:"subtitle,omitempty"`
	Limit      int                           `json:"limit,omitempty"`
	Items      []*Card                       `json:"items,omitempty"`
	AdInfo     *cm.AdInfo                    `json:"ad_info,omitempty"`
	Banner     []*banner.Banner              `json:"banner,omitempty"`
	Hash       string                        `json:"verson,omitempty"`
	TrackID    string                        `json:"trackid,omitempty"`
	FromType   string                        `json:"from_type,omitempty"`
	ShowUGCPay bool                          `json:"show_ucg_pay,omitempty"`
	Switch     model.Switch                  `json:"switch,omitempty"`
	SwitchLike model.Switch                  `json:"switch_like,omitempty"`
	Buttons    []*Button                     `json:"buttons,omitempty"`
}

func (*Card) From

func (c *Card) From(cardGoto model.CardGt, id int64, tid int64, plat int8, build int)

func (*Card) FromActive

func (c *Card) FromActive(o *Active)

func (*Card) FromActiveBanner

func (c *Card) FromActiveBanner(os []*Active, hash string)

func (*Card) FromAdAv

func (c *Card) FromAdAv(o *cm.AdInfo)

func (*Card) FromBanner

func (c *Card) FromBanner(os []*banner.Banner, hash string)

func (*Card) FromCardSet

func (c *Card) FromCardSet(o *CardSet)

func (*Card) FromConverge

func (c *Card) FromConverge(o *Converge)

func (*Card) FromDownload

func (c *Card) FromDownload(o *Download)

func (*Card) FromEventTopic

func (c *Card) FromEventTopic(o *EventTopic)

func (*Card) FromFollow

func (c *Card) FromFollow(o *Follow)

func (*Card) FromFollowMode

func (c *Card) FromFollowMode(title, desc string, button []string)

func (*Card) FromLogin

func (c *Card) FromLogin(o int64)

func (*Card) FromRank

func (c *Card) FromRank(os []*rank.Rank)

func (*Card) FromSpecial

func (c *Card) FromSpecial(o *Special)

func (*Card) FromSwitch

func (c *Card) FromSwitch(sw model.Switch)

func (*Card) FromTopstick

func (c *Card) FromTopstick(o *Special)

type CardItem

type CardItem struct {
	Title     string `json:"title,omitempty"`
	Cover     string `json:"cover,omitempty"`
	LinkType  string `json:"link_type,omitempty"`
	LinkValue string `json:"link_value,omitempty"`
	Weight    int    `json:"weight,omitempty"`
}

type CardItems

type CardItems []*CardItem

func (CardItems) Len

func (is CardItems) Len() int

func (CardItems) Less

func (is CardItems) Less(i, j int) bool

func (CardItems) Swap

func (is CardItems) Swap(i, j int)

type CardSet

type CardSet struct {
	ID        int64           `json:"id,omitempty"`
	Type      string          `json:"type,omitempty"`
	Value     int64           `json:"value,omitempty"`
	Title     string          `json:"title,omitempty"`
	LongTitle string          `json:"long_title,omitempty"`
	Content   json.RawMessage `json:"content,omitempty"`
}

type Converge

type Converge struct {
	ID      int64           `json:"id,omitempty"`
	ReType  int             `json:"re_type,omitempty"`
	ReValue string          `json:"re_value,omitempty"`
	Title   string          `json:"title,omitempty"`
	Cover   string          `json:"cover,omitempty"`
	Content json.RawMessage `json:"content,omitempty"`
	// extra
	Items []*Converge `json:"contents,omitempty"`
	Goto  model.Gt    `json:"goto,omitempty"`
	Pid   int64       `json:"pid,omitempty"`
	Param string      `json:"param,omitempty"`
	URI   string      `json:"uri,omitempty"`
}

func (*Converge) Change

func (c *Converge) Change()

type Download

type Download struct {
	ID          int64  `json:"id,omitempty"`
	Title       string `json:"title,omitempty"`
	Desc        string `json:"desc,omitempty"`
	Icon        string `json:"icon,omitempty"`
	Cover       string `json:"cover,omitempty"`
	URLType     int    `json:"url_type,omitempty"`
	URLValue    string `json:"url_value,omitempty"`
	BtnTxt      int    `json:"btn_txt,omitempty"`
	ReType      int    `json:"re_type,omitempty"`
	ReValue     string `json:"re_value,omitempty"`
	DoubleCover string `json:"double_cover,omitempty"`
	Number      int32  `json:"number,omitempty"`
	// extra
	ButtonText string   `json:"button_text,omitempty"`
	Goto       model.Gt `json:"goto,omitempty"`
	Param      string   `json:"param,omitempty"`
}

func (*Download) Change

func (c *Download) Change()

type EventTopic

type EventTopic struct {
	ID      int64  `json:"id,omitempty"`
	Title   string `json:"title,omitempty"`
	Desc    string `json:"desc,omitempty"`
	Cover   string `json:"cover,omitempty"`
	ReType  int8   `json:"re_type,omitempty"`
	ReValue string `json:"re_value,omitempty"`
	Corner  string `json:"corner,omitempty"`
}

type Follow

type Follow struct {
	ID      int64           `json:"id,omitempty"`
	Type    string          `json:"type,omitempty"`
	Title   string          `json:"title,omitempty"`
	Content json.RawMessage `json:"content,omitempty"`
	// extra
	Items []*Follow `json:"items,omitempty"`
	Goto  model.Gt  `json:"goto,omitempty"`
	Pid   int64     `json:"pid,omitempty"`
	Tid   int64     `json:"tid,omitempty"`
}

func (*Follow) Change

func (c *Follow) Change()
type Menu struct {
	TabID       int64               `json:"tab_id,omitempty"`
	Name        string              `json:"name,omitempty"`
	Img         string              `json:"img,omitempty"`
	Icon        string              `json:"icon,omitempty"`
	Color       string              `json:"color,omitempty"`
	ID          int64               `json:"id,omitempty"`
	Plat        int                 `json:"-"`
	CType       int                 `json:"-"`
	CValue      string              `json:"-"`
	PlatVersion json.RawMessage     `json:"-"`
	STime       xtime.Time          `json:"-"`
	ETime       xtime.Time          `json:"-"`
	Status      int                 `json:"-"`
	Badge       string              `json:"-"`
	Versions    map[int8][]*Version `json:"-"`
}
func (m *Menu) Change()

type Special

type Special struct {
	ID          int64  `json:"id,omitempty"`
	Title       string `json:"title,omitempty"`
	Desc        string `json:"desc,omitempty"`
	Cover       string `json:"cover,omitempty"`
	SingleCover string `json:"single_cover,omitempty"`
	ReType      int    `json:"re_type,omitempty"`
	ReValue     string `json:"re_value,omitempty"`
	Badge       string `json:"badge,omitempty"`
	Size        string `json:"size,omitempty"`
	// extra
	Ratio int      `json:"ratio,omitempty"`
	Goto  model.Gt `json:"goto,omitempty"`
	Param string   `json:"param,omitempty"`
	Pid   int64    `json:"pid,omitempty"`
}

func (*Special) Change

func (c *Special) Change()

type Version

type Version struct {
	PlatStr   string `json:"plat,omitempty"`
	BuildStr  string `json:"build,omitempty"`
	Condition string `json:"conditions,omitempty"`
	Plat      int8   `json:"-"`
	Build     int    `json:"-"`
}

Jump to

Keyboard shortcuts

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