model

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

Documentation

Index

Constants

View Source
const (
	SearchTypeAll      = "all"
	SearchTypeVideo    = "video"
	SearchTypeBangumi  = "media_bangumi"
	SearchTypePGC      = "media_ft"
	SearchTypeLive     = "live"
	SearchTypeLiveRoom = "live_room"
	SearchTypeLiveUser = "live_user"
	SearchTypeArticle  = "article"
	SearchTypeSpecial  = "special"
	SearchTypeTopic    = "topic"
	SearchTypeUser     = "bili_user"
	SearchTypePhoto    = "photo"
	WxSearchTypeAll    = "wx_all"
)

SearchType search types

View Source
const (
	// TagStateOK means normal state
	TagStateOK = 0
	// TagStateDeleted means tag was deleted
	TagStateDeleted = 1
	// TagStateBlocked means tag was blocked
	TagStateBlocked = 2
)
View Source
const (
	CoinAddArcType  = 1
	CoinAddArtType  = 2
	CoinArcBusiness = "archive"
	CoinArtBusiness = "article"
)

Coin add type.

View Source
const WxSearchType = "wechat"

WxSearchType .

Variables

View Source
var (
	// RankType rank type params
	RankType = map[int]string{
		1: "all",
		2: "origin",
		3: "rookie",
	}
	// DayType day params
	DayType = map[int]int{
		1:  1,
		3:  3,
		7:  7,
		30: 30,
	}
	// ArcType arc params type all:0 and recent:1
	ArcType = map[int]int{
		0: 0,
		1: 1,
	}
	// IndexDayType rank index day type
	IndexDayType = []int{
		1,
		3,
		7,
	}
	// OriType original or not
	OriType = []string{
		0: "",
		1: "_origin",
	}
	// AllType all or origin type
	AllType = []string{
		0: "all",
		1: "origin",
	}
	// TagIDs feedback tag ids
	TagIDs = []int64{
		300,
		301,
		302,
		303,
		304,
		305,
		306,
		307,
		354,
	}
	// LimitTypeIDs view limit type id
	LimitTypeIDs = []int16{13, 32, 33, 94, 120}
	// RecSpecTypeName recommend data special type name
	RecSpecTypeName = map[int32]string{
		28: "原创",
		30: "V家",
		31: "翻唱",
		59: "演奏",
	}
	// LikeType thumbup like type
	LikeType = map[int8]string{
		1: "like",
		2: "like_cancel",
		3: "dislike",
		4: "dislike_cancel",
	}
	// NewListRid new list need more rids
	NewListRid = map[int32]int32{
		177: 37,
		23:  147,
		11:  185,
	}
	// DefaultServer  broadcst servers default value.
	DefaultServer = &bcmdl.ServerListReply{
		Domain:    "broadcast.chat.bilibili.com",
		TcpPort:   7821,
		WsPort:    7822,
		WssPort:   7823,
		Heartbeat: 30,
		Nodes:     []string{"broadcast.chat.bilibili.com"},
		Backoff: &bcmdl.Backoff{
			MaxDelay:  300,
			BaseDelay: 3,
			Factor:    1.8,
			Jitter:    0.3,
		},
		HeartbeatMax: 3,
	}
)
View Source
var DefaultProfile = &accmdl.ProfileStatReply{
	Profile: &account.Profile{
		Sex:  "保密",
		Rank: 10000,
		Face: "https://static.hdslb.com/images/member/noface.gif",
		Sign: "没签名",
	},
	LevelInfo: accmdl.LevelInfo{},
}

DefaultProfile .

View Source
var SearchDefaultArg = map[string]map[string]int{
	SearchTypeAll: {
		"highlight":         1,
		"video_num":         20,
		"media_bangumi_num": 3,
		"media_ft_num":      3,
		"is_new_pgc":        1,
		"live_room_num":     1,
		"card_num":          1,
		"activity":          1,
		"bili_user_num":     1,
		"bili_user_vl":      3,
		"user_num":          1,
		"user_video_limit":  3,
		"is_star":           1,
	},
	SearchTypeVideo: {
		"highlight":  1,
		"pagesize":   20,
		"is_new_pgc": 1,
	},
	SearchTypeBangumi: {
		"highlight": 1,
		"pagesize":  20,
	},
	SearchTypePGC: {
		"highlight": 1,
		"pagesize":  20,
	},
	SearchTypeLive: {
		"highlight":     1,
		"live_user_num": 6,
		"live_room_num": 40,
	},
	SearchTypeLiveRoom: {
		"highlight": 1,
		"pagesize":  40,
	},
	SearchTypeLiveUser: {
		"highlight": 1,
		"pagesize":  30,
	},
	SearchTypeArticle: {
		"highlight": 1,
		"pagesize":  20,
	},
	SearchTypeSpecial: {
		"pagesize": 20,
	},
	SearchTypeTopic: {
		"pagesize": 20,
	},
	SearchTypeUser: {
		"highlight": 1,
		"pagesize":  20,
	},
	SearchTypePhoto: {
		"pagesize": 20,
	},
	WxSearchTypeAll: {
		"video_num":         20,
		"media_bangumi_num": 3,
		"media_ft_num":      3,
		"is_new_pgc":        1,
	},
}

SearchDefaultArg search default params.

Functions

func CheckAllowState

func CheckAllowState(arc *arcmdl.Arc) bool

CheckAllowState check archive stat allow state

func CheckFeedTag

func CheckFeedTag(tagID int64) bool

CheckFeedTag check if tagID in TagIDs

func FmtArc

func FmtArc(arc *arcmdl.Arc) (data *arcmdl.Arc)

FmtArc fmt grpc arc to archive3

Types

type AbServer

type AbServer struct {
	Hit    json.RawMessage `json:"hit"`
	Expire int             `json:"expire"`
	Vars   json.RawMessage `json:"vars"`
}

AbServer .

type AccountCard

type AccountCard struct {
	Mid         string  `json:"mid"`
	Name        string  `json:"name"`
	Approve     bool    `json:"approve"`
	Sex         string  `json:"sex"`
	Rank        string  `json:"rank"`
	Face        string  `json:"face"`
	DisplayRank string  `json:"DisplayRank"`
	Regtime     int64   `json:"regtime"`
	Spacesta    int     `json:"spacesta"`
	Birthday    string  `json:"birthday"`
	Place       string  `json:"place"`
	Description string  `json:"description"`
	Article     int     `json:"article"`
	Attentions  []int64 `json:"attentions"`
	Fans        int     `json:"fans"`
	Friend      int     `json:"friend"`
	Attention   int     `json:"attention"`
	Sign        string  `json:"sign"`
	LevelInfo   struct {
		Cur     int         `json:"current_level"`
		Min     int         `json:"current_min"`
		NowExp  int         `json:"current_exp"`
		NextExp interface{} `json:"next_exp"`
	} `json:"level_info"`
	Pendant        account.PendantInfo   `json:"pendant"`
	Nameplate      account.NameplateInfo `json:"nameplate"`
	Official       accmdl.OfficialInfo
	OfficialVerify struct {
		Type int    `json:"type"`
		Desc string `json:"desc"`
	} `json:"official_verify"`
	Vip struct {
		Type          int    `json:"vipType"`
		DueRemark     string `json:"dueRemark"`
		AccessStatus  int    `json:"accessStatus"`
		VipStatus     int    `json:"vipStatus"`
		VipStatusWarn string `json:"vipStatusWarn"`
	} `json:"vip"`
}

AccountCard struct.

func (*AccountCard) FromCard

func (ac *AccountCard) FromCard(c *account.Card)

FromCard from account catd.

type ArchiveUserCoins

type ArchiveUserCoins struct {
	Multiply int64 `json:"multiply"`
}

ArchiveUserCoins .

type ArticleUpInfo

type ArticleUpInfo struct {
	ArtCount    int   `json:"art_count"`
	Follower    int64 `json:"follower"`
	IsFollowing bool  `json:"is_following"`
}

ArticleUpInfo struct.

type AssetRelation

type AssetRelation struct {
	State int `json:"state"`
}

AssetRelation .

type Bnj2019

type Bnj2019 struct {
	*Bnj2019View
	Elec    *ElecShow         `json:"elec"`
	Related []*Bnj2019Related `json:"related"`
	ReqUser *ReqUser          `json:"req_user"`
}

Bnj2019 .

type Bnj2019Related

type Bnj2019Related struct {
	*arcmdl.Arc
	Pages []*arcmdl.Page `json:"pages"`
}

Bnj2019Related .

type Bnj2019View

type Bnj2019View struct {
	*arcmdl.Arc
	Pages []*arcmdl.Page `json:"pages"`
}

Bnj2019View .

type Card

type Card struct {
	Card         *AccountCard `json:"card"`
	Space        *Space       `json:"space,omitempty"`
	Following    bool         `json:"following"`
	ArchiveCount int          `json:"archive_count"`
	ArticleCount int          `json:"article_count"`
	Follower     int64        `json:"follower"`
}

Card Card and Space and Relation and Archive Count.

type CoinArc

type CoinArc struct {
	*v1.Arc
	Coins int64  `json:"coins"`
	Time  int64  `json:"time"`
	IP    string `json:"ip"`
}

CoinArc coin archive.

type Content

type Content struct {
	Reason string `json:"reason"`
	URL    string `json:"url"`
}

Content Content struct.

type Custom

type Custom struct {
	Aid   int64  `json:"aid"`
	Title string `json:"title"`
	Pic   string `json:"pic"`
	Note  string `json:"note"`
	Pos   int    `json:"-"`
	URL   string `json:"url"`
	Type  string `json:"type"`
}

Custom game custom struct

type Detail

type Detail struct {
	View    *View
	Card    *Card
	Tags    []*tagmdl.Tag
	Reply   *ReplyHot
	Related []*arcmdl.Arc
}

Detail detail data

type ElecShow

type ElecShow struct {
	ShowInfo   *ShowInfo       `json:"show_info"`
	AvCount    int             `json:"av_count"`
	Count      int             `json:"count"`
	TotalCount int64           `json:"total_count"`
	SpecialDay int             `json:"special_day"`
	DisplayNum int             `json:"display_num"`
	AvList     json.RawMessage `json:"av_list,omitempty"`
	AvUser     json.RawMessage `json:"av_user,omitempty"`
	List       json.RawMessage `json:"list,omitempty"`
	User       json.RawMessage `json:"user,omitempty"`
}

ElecShow elec show

type FailedNavResp

type FailedNavResp struct {
	IsLogin bool `json:"isLogin"`
}

FailedNavResp struct of failed nav response

type Feedback

type Feedback struct {
	Aid     int64
	Mid     int64
	TagID   int64
	Buvid   string
	Content *Content
	Browser string
	Version string
	Email   string
	QQ      string
	Other   string
}

Feedback feedback param struct.

type HelpDeatil

type HelpDeatil struct {
	AllTypeName      string    `json:"allTypeName"`
	AnswerDesc       string    `json:"answerDesc"`
	AnswerFlag       int       `json:"answerFlag"`
	AnswerID         string    `json:"answerId"`
	AnswerImg        string    `json:"answerImg"`
	AnswerTxt        string    `json:"answerTxt"`
	AuditStatus      int       `json:"auditStatus"`
	CompanyID        string    `json:"companyId"`
	CreateID         string    `json:"createId"`
	CreateTime       time.Time `json:"createTime"`
	DocID            string    `json:"docId"`
	LinkFlag         int       `json:"linkFlag"`
	MatchFlag        int       `json:"matchFlag"`
	QuestionID       string    `json:"questionId"`
	QuestionTitle    string    `json:"questionTitle"`
	QuestionTypeID   string    `json:"questionTypeId"`
	QuestionTypeName string    `json:"questionTypeName"`
	UpdateID         string    `json:"updateId"`
	UpdateTime       time.Time `json:"updateTime"`
	UsedFlag         int       `json:"usedFlag"`
}

HelpDeatil help deatil and search

type HelpList

type HelpList struct {
	Last               bool   `json:"last"`
	ParentTypeID       string `json:"parentTypeId"`
	QuestionTypeDesc   string `json:"questionTypeDesc"`
	QuestionTypeID     string `json:"questionTypeId"`
	QuestionTypeName   string `json:"questionTypeName"`
	QuestionTypeStatus int    `json:"questionTypeStatus"`
	SortNo             int    `json:"sortNo"`
	TypeLevel          int    `json:"typeLevel"`
}

HelpList help list

type IndexArchive

type IndexArchive struct {
	Aid         string        `json:"aid"`
	Typename    string        `json:"typename"`
	Title       string        `json:"title"`
	Subtitle    string        `json:"subtitle"`
	Play        interface{}   `json:"play"`
	Review      int32         `json:"review"`
	VideoReview int32         `json:"video_review"`
	Favorites   int32         `json:"favorites"`
	Mid         int64         `json:"mid"`
	Author      string        `json:"author"`
	Description string        `json:"description"`
	Create      string        `json:"create"`
	Pic         string        `json:"pic"`
	Coins       int32         `json:"coins"`
	Duration    string        `json:"duration"`
	Badgepay    bool          `json:"badgepay"`
	Rights      arcmdl.Rights `json:"rights"`
}

IndexArchive rank index archive struct.

type IndexIcon

type IndexIcon struct {
	ID     int64    `json:"id"`
	Title  string   `json:"title"`
	Links  []string `json:"links"`
	Icon   string   `json:"icon"`
	Weight int      `json:"weight"`
}

IndexIcon index icon struct.

type Info

type Info struct {
	Mid         string `json:"mid"`
	Name        string `json:"uname"`
	Sex         string `json:"sex"`
	Sign        string `json:"sign"`
	Avatar      string `json:"avatar"`
	Rank        string `json:"rank"`
	DisplayRank string `json:"DisplayRank"`
	LevelInfo   struct {
		Cur     int         `json:"current_level"`
		Min     int         `json:"current_min"`
		NowExp  int         `json:"current_exp"`
		NextExp interface{} `json:"next_exp"`
	} `json:"level_info"`
	Pendant        accmdl.PendantInfo   `json:"pendant"`
	Nameplate      accmdl.NameplateInfo `json:"nameplate"`
	OfficialVerify struct {
		Type int    `json:"type"`
		Desc string `json:"desc"`
	} `json:"official_verify"`
	Vip struct {
		Type          int    `json:"vipType"`
		DueDate       int64  `json:"vipDueDate"`
		DueRemark     string `json:"dueRemark"`
		AccessStatus  int    `json:"accessStatus"`
		VipStatus     int    `json:"vipStatus"`
		VipStatusWarn string `json:"vipStatusWarn"`
	} `json:"vip"`
	// article
	ID          int64     `json:"id"`
	Title       string    `json:"title"`
	PublishTime time.Time `json:"publish_time"`
	Following   bool      `json:"following"`
}

Info struct.

func (*Info) FromCard

func (i *Info) FromCard(c *accmdl.Card)

FromCard from card.

type Kv

type Kv struct {
	ID    int        `json:"id"`
	Name  string     `json:"name"`
	Pic   string     `json:"pic"`
	URL   string     `json:"url"`
	ResID int        `json:"resource_id"`
	STime xtime.Time `json:"stime"`
	ETime xtime.Time `json:"etime"`
}

Kv baidu kv struct.

type LiveOnlineCount

type LiveOnlineCount struct {
	IPConnect   int64 `json:"ip_connect"`
	TotalOnline int64 `json:"total_online"`
}

LiveOnlineCount struct of live online count api data

type Meta

type Meta struct {
	*artmdl.Meta
	Like int `json:"like"`
}

Meta struct.

type NavResp struct {
	IsLogin bool `json:"isLogin"`
	//AccessStatus  int    `json:"accessStatus"`
	//DueRemark     string `json:"dueRemark"`
	EmailVerified int    `json:"email_verified"`
	Face          string `json:"face"`
	LevelInfo     struct {
		Cur     int         `json:"current_level"`
		Min     int         `json:"current_min"`
		NowExp  int         `json:"current_exp"`
		NextExp interface{} `json:"next_exp"`
	} `json:"level_info"`
	Mid            int64   `json:"mid"`
	MobileVerified int     `json:"mobile_verified"`
	Coins          float64 `json:"money"`
	Moral          float32 `json:"moral"`
	OfficialVerify struct {
		Type int    `json:"type"`
		Desc string `json:"desc"`
	} `json:"officialVerify"`
	Pendant        account.PendantInfo `json:"pendant"`
	Scores         int                 `json:"scores"`
	Uname          string              `json:"uname"`
	VipDueDate     int64               `json:"vipDueDate"`
	VipStatus      int                 `json:"vipStatus"`
	VipType        int                 `json:"vipType"`
	VipPayType     int32               `json:"vip_pay_type"`
	Wallet         *Wallet             `json:"wallet"`
	HasShop        bool                `json:"has_shop"`
	ShopURL        string              `json:"shop_url"`
	AllowanceCount int                 `json:"allowance_count"`
}

NavResp struct of nav api response

type NewArchive

type NewArchive struct {
	Aid   int64 `json:"aid"`
	Score int   `json:"score"`
}

NewArchive new rank archive struct

type Online

type Online struct {
	RegionCount map[int16]int `json:"region_count"`
	AllCount    int64         `json:"all_count"`
	WebOnline   int64         `json:"web_online"`
	PlayOnline  int64         `json:"play_online"`
}

Online struct of online api response

type OnlineAid

type OnlineAid struct {
	Aid   int64 `json:"aid"`
	Count int64 `json:"count"`
}

OnlineAid online aids and count

type OnlineArc

type OnlineArc struct {
	*v1.Arc
	OnlineCount int64 `json:"online_count"`
}

OnlineArc archive whit online count

type OnlineCount

type OnlineCount struct {
	ConnCount int64 `json:"conn_count"`
	IPCount   int64 `json:"ip_count"`
}

OnlineCount struct of online count api data

type Other

type Other struct {
	Aid         interface{}   `json:"aid"`
	Play        interface{}   `json:"play"`
	VideoReview int32         `json:"video_review"`
	Coins       int32         `json:"coins"`
	Pts         int           `json:"pts"`
	Title       string        `json:"title"`
	Pic         string        `json:"pic"`
	Duration    string        `json:"duration"`
	Rights      arcmdl.Rights `json:"rights"`
}

Other bigdata other rank struct

type Rank

type Rank struct {
	Note string         `json:"note"`
	Code int            `json:"code"`
	Page int            `json:"page"`
	Num  int            `json:"num"`
	List []*RankArchive `json:"list"`
}

Rank bigdata rank struct

type RankArchive

type RankArchive struct {
	Aid         interface{}   `json:"aid"`
	Author      string        `json:"author"`
	Coins       int32         `json:"coins"`
	Duration    string        `json:"duration"`
	Mid         int64         `json:"mid"`
	Pic         string        `json:"pic"`
	Play        interface{}   `json:"play"`
	Pts         int           `json:"pts"`
	Title       string        `json:"title"`
	Trend       *int          `json:"trend"`
	VideoReview int32         `json:"video_review"`
	Rights      arcmdl.Rights `json:"rights"`
	Others      []*Other      `json:"others,omitempty"`
}

RankArchive bigdata rank archive struct

type RankData

type RankData struct {
	Note string         `json:"note"`
	List []*RankArchive `json:"list"`
}

RankData rank service return data

type RankDetail

type RankDetail struct {
	Note string           `json:"note"`
	Code int              `json:"code"`
	Page int              `json:"page"`
	Num  int              `json:"num"`
	List []*RegionArchive `json:"list"`
}

RankDetail rank region detail struct

type RankIndex

type RankIndex struct {
	Code  int                      `json:"code"`
	Pages int                      `json:"pages"`
	Num   int                      `json:"num"`
	List  map[string]*IndexArchive `json:"list"`
}

RankIndex rank index struct.

type RankNew

type RankNew struct {
	Note string            `json:"note"`
	List []*RankNewArchive `json:"list"`
}

RankNew rank new struct.

type RankNewArchive

type RankNewArchive struct {
	*NewArchive
	*RankStat
	Others []*NewArchive `json:"others,omitempty"`
}

RankNewArchive rank archive new struct

type RankRecommend

type RankRecommend struct {
	Code  int             `json:"code"`
	Pages int             `json:"pages"`
	Num   int             `json:"num"`
	List  []*IndexArchive `json:"list"`
}

RankRecommend rank recommend data struct

type RankRegion

type RankRegion struct {
	Hot         *RankDetail `json:"hot"`
	HotOriginal *RankDetail `json:"hot_original"`
}

RankRegion rank region data struct

type RankStat

type RankStat struct {
	Play  int32 `json:"play"`
	Coin  int32 `json:"coin"`
	Danmu int32 `json:"danmu"`
}

RankStat rank archive stat.

type RegionArchive

type RegionArchive struct {
	Aid         string        `json:"aid"`
	Typename    string        `json:"typename"`
	Title       string        `json:"title"`
	Subtitle    string        `json:"subtitle"`
	Play        interface{}   `json:"play"`
	Review      int32         `json:"review"`
	VideoReview int32         `json:"video_review"`
	Favorites   int32         `json:"favorites"`
	Mid         int64         `json:"mid"`
	Author      string        `json:"author"`
	Description string        `json:"description"`
	Create      string        `json:"create"`
	Pic         string        `json:"pic"`
	Coins       int32         `json:"coins"`
	Duration    string        `json:"duration"`
	Badgepay    bool          `json:"badgepay"`
	Pts         int           `json:"pts"`
	Rights      arcmdl.Rights `json:"rights"`
}

RegionArchive bigdata region rank archive struct

type ReplyHot

type ReplyHot struct {
	Page    json.RawMessage `json:"page"`
	Replies []*rplmdl.Reply `json:"replies"`
}

ReplyHot reply hot

type ReqUser

type ReqUser struct {
	Attention bool  `json:"attention"`
	Favorite  bool  `json:"favorite"`
	Like      bool  `json:"like"`
	Dislike   bool  `json:"dislike"`
	Coin      int64 `json:"coin"`
}

ReqUser req user.

type Search struct {
	Code           int             `json:"code,omitempty"`
	SeID           string          `json:"seid,omitempty"`
	Page           int             `json:"page,omitempty"`
	PageSize       int             `json:"pagesize,omitempty"`
	Total          int             `json:"total,omitempty"`
	NumResults     int             `json:"numResults"`
	NumPages       int             `json:"numPages"`
	SuggestKeyword string          `json:"suggest_keyword"`
	RqtType        string          `json:"rqt_type,omitempty"`
	CostTime       json.RawMessage `json:"cost_time,omitempty"`
	ExpList        json.RawMessage `json:"exp_list,omitempty"`
	EggHit         int             `json:"egg_hit"`
	PageInfo       json.RawMessage `json:"pageinfo,omitempty"`
	Result         json.RawMessage `json:"result,omitempty"`
	TopTList       json.RawMessage `json:"top_tlist,omitempty"`
	EggInfo        *struct {
		ID     int64 `json:"id,omitempty"`
		Source int64 `json:"source,omitempty"`
	} `json:"egg_info,omitempty"`
	ShowColumn int `json:"show_column"`
}

Search all search.

type SearchAllArg

type SearchAllArg struct {
	Pn           int    `form:"page"`
	Keyword      string `form:"keyword" validate:"required"`
	Rid          int    `form:"tids"`
	Duration     int    `form:"duration" validate:"gte=0,lte=4"`
	FromSource   string `form:"from_source"`
	Highlight    int    `form:"highlight"`
	SingleColumn int    `form:"-"`
}

SearchAllArg search all api arguments.

type SearchDefault

type SearchDefault struct {
	Trackid  string `json:"seid"`
	ID       int64  `json:"id"`
	ShowName string `json:"show_name"`
	Name     string `json:"name"`
	Type     int    `json:"type"`
}

SearchDefault search default

type SearchEgg

type SearchEgg struct {
	Plat map[int64][]*struct {
		EggID int64  `json:"egg_id"`
		Plat  int    `json:"plat"`
		URL   string `json:"url"`
		MD5   string `json:"md5"`
		Size  int64  `json:"size"`
	} `json:"plat"`
	ShowCount int `json:"show_count"`
}

SearchEgg .

type SearchEggRes

type SearchEggRes struct {
	EggID     int64              `json:"egg_id"`
	ShowCount int                `json:"show_count"`
	Source    []*SearchEggSource `json:"source"`
}

SearchEggRes .

type SearchEggSource

type SearchEggSource struct {
	URL  string `json:"url"`
	MD5  string `json:"md5"`
	Size int64  `json:"size"`
}

SearchEggSource .

type SearchRec

type SearchRec struct {
	Code           int             `json:"code,omitempty"`
	SeID           string          `json:"seid,omitempty"`
	Page           int             `json:"page,omitempty"`
	PageSize       int             `json:"pagesize,omitempty"`
	Total          int             `json:"total,omitempty"`
	NumResults     int             `json:"numResults"`
	NumPages       int             `json:"numPages"`
	SuggestKeyword string          `json:"suggest_keyword"`
	RqtType        string          `json:"rqt_type,omitempty"`
	CostTime       json.RawMessage `json:"cost_time,omitempty"`
	ExpList        json.RawMessage `json:"exp_list,omitempty"`
	EggHit         int             `json:"egg_hit"`
	Result         json.RawMessage `json:"result,omitempty"`
}

SearchRec search recommend.

type SearchTypeArg

type SearchTypeArg struct {
	Pn         int    `form:"page" validate:"min=1" default:"1"`
	SearchType string `form:"search_type" validate:"required"`
	Keyword    string `form:"keyword" validate:"required"`
	Order      string `form:"order"`
	Rid        int64  `form:"tids"`
	FromSource string `form:"from_source"`
	Platform   string `form:"platform" default:"web"`
	Duration   int    `form:"duration" validate:"min=0,max=4"`
	// article
	CategoryID int64 `form:"category_id"`
	// special
	VpNum int `form:"vp_num"`
	// bili user
	BiliUserVl   int `form:"bili_user_vl" default:"3"`
	UserType     int `form:"user_type" validate:"min=0,max=3"`
	OrderSort    int `form:"order_sort"`
	Highlight    int `form:"highlight"`
	SingleColumn int `form:"-"`
}

SearchTypeArg search type api arguments.

type SearchTypeRes

type SearchTypeRes struct {
	Code           int             `json:"code,omitempty"`
	SeID           string          `json:"seid,omitempty"`
	Page           int             `json:"page,omitempty"`
	PageSize       int             `json:"pagesize,omitempty"`
	Total          int             `json:"total,omitempty"`
	NumResults     int             `json:"numResults"`
	NumPages       int             `json:"numPages"`
	SuggestKeyword string          `json:"suggest_keyword"`
	RqtType        string          `json:"rqt_type,omitempty"`
	CostTime       json.RawMessage `json:"cost_time,omitempty"`
	ExpList        json.RawMessage `json:"exp_list,omitempty"`
	EggHit         int             `json:"egg_hit"`
	PageInfo       json.RawMessage `json:"pageinfo,omitempty"`
	Result         json.RawMessage `json:"result,omitempty"`
	ShowColumn     int             `json:"show_column"`
}

SearchTypeRes search type res.

type SearchUpRecArg

type SearchUpRecArg struct {
	ServiceArea string  `form:"service_area" validate:"required"`
	Platform    string  `form:"platform" validate:"required"`
	ContextID   int64   `form:"context_id"`
	MainTids    []int64 `form:"main_tids,split"`
	SubTids     []int64 `form:"sub_tids,split"`
	MobiApp     string  `form:"mobi_app"`
	Device      string  `form:"device"`
	Build       int64   `form:"build"`
	Ps          int     `form:"ps" default:"5" validate:"min=1,max=15"`
}

SearchUpRecArg search up rec arg.

type SearchUpRecRes

type SearchUpRecRes struct {
	UpID      int64  `json:"up_id"`
	RecReason string `json:"rec_reason"`
	Tid       int16  `json:"tid"`
	SecondTid int16  `json:"second_tid"`
}

SearchUpRecRes .

type ShopInfo

type ShopInfo struct {
	ShopID       int64  `json:"shopId"`
	VAppID       string `json:"vAppId"`
	AppID        string `json:"appId"`
	Name         string `json:"name"`
	JumpURL      string `json:"jumpUrl"`
	ShowItemsTab int    `json:"showItemsTab"`
}

ShopInfo shop info.

type ShowInfo

type ShowInfo struct {
	Show   bool   `json:"show"`
	State  int8   `json:"state"`
	Reason string `json:"reason,omitempty"`
}

ShowInfo show info

type Space

type Space struct {
	SImg string `json:"s_img"`
	LImg string `json:"l_img"`
}

Space space top photo

type Stat

type Stat struct {
	Aid       int64       `json:"aid"`
	View      interface{} `json:"view"`
	Danmaku   int32       `json:"danmaku"`
	Reply     int32       `json:"reply"`
	Fav       int32       `json:"favorite"`
	Coin      int32       `json:"coin"`
	Share     int32       `json:"share"`
	Like      int32       `json:"like"`
	NowRank   int32       `json:"now_rank"`
	HisRank   int32       `json:"his_rank"`
	NoReprint int32       `json:"no_reprint"`
	Copyright int32       `json:"copyright"`
}

Stat archive stat web struct

type Subtitle

type Subtitle struct {
	AllowSubmit bool            `json:"allow_submit"`
	List        []*SubtitleItem `json:"list"`
}

Subtitle dm subTitle.

type SubtitleItem

type SubtitleItem struct {
	*model.VideoSubtitle
	Author *accmdl.Info `json:"author"`
}

SubtitleItem dm subTitle.

type TagAids

type TagAids struct {
	Code  int     `json:"code"`
	Total int64   `json:"total"`
	Data  []int64 `json:"data"`
}

TagAids .

type TagArchive

type TagArchive struct {
	Title       string        `json:"title"`
	Author      string        `json:"author"`
	Description string        `json:"description"`
	Pic         string        `json:"pic"`
	Play        string        `json:"play"`
	Favorites   string        `json:"favorites"`
	Mid         string        `json:"mid"`
	Review      string        `json:"review"`
	CreatedAt   string        `json:"created_at"`
	VideoReview string        `json:"video_review"`
	Coins       string        `json:"coins"`
	Duration    string        `json:"duration"`
	Aid         int64         `json:"aid"`
	Pts         int           `json:"pts"`
	Trend       int           `json:"trend"`
	Rights      arcmdl.Rights `json:"rights"`
}

TagArchive bigdata region rank archive struct

type TagDetail

type TagDetail struct {
	Total int       `json:"total"`
	List  []*v1.Arc `json:"list"`
	*model.TagTop
}

TagDetail .

type Timeline

type Timeline struct {
	Name    string `json:"name"`
	Start   int64  `json:"start"`
	End     int64  `json:"end"`
	Cover   string `json:"cover"`
	H5Cover string `json:"h5_cover"`
}

Timeline bnj timeline.

type TripleRes

type TripleRes struct {
	Like      bool  `json:"like"`
	Coin      bool  `json:"coin"`
	Fav       bool  `json:"fav"`
	Multiply  int64 `json:"multiply"`
	UpID      int64 `json:"-"`
	Anticheat bool  `json:"-"`
}

TripleRes struct

type UpRecData

type UpRecData struct {
	TrackID string       `json:"track_id"`
	List    []*UpRecInfo `json:"list"`
}

UpRecData .

type UpRecInfo

type UpRecInfo struct {
	Mid      int64               `json:"mid"`
	Name     string              `json:"name"`
	Face     string              `json:"face"`
	Official accmdl.OfficialInfo `json:"official"`
	Follower int64               `json:"follower"`
	Vip      struct {
		Type   int32 `json:"type"`
		Status int32 `json:"status"`
	} `json:"vip"`
	RecReason   string `json:"rec_reason"`
	Tid         int16  `json:"tid"`
	Tname       string `json:"tname"`
	SecondTid   int16  `json:"second_tid"`
	SecondTname string `json:"second_tname"`
	Sign        string `json:"sign"`
}

UpRecInfo .

type View

type View struct {
	// archive data
	*arcmdl.Arc
	NoCache bool `json:"no_cache"`
	// video data pages
	Pages    []*arcmdl.Page         `json:"pages,omitempty"`
	Subtitle *Subtitle              `json:"subtitle"`
	Asset    *ugcmdl.AssetQueryResp `json:"asset,omitempty"`
}

View view data

type Wallet

type Wallet struct {
	Mid           int64   `json:"mid"`
	BcoinBalance  float32 `json:"bcoin_balance"`
	CouponBalance float32 `json:"coupon_balance"`
	CouponDueTime int64   `json:"coupon_due_time"`
}

Wallet struct.

type WxArcTag

type WxArcTag struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

WxArcTag .

type WxArchive

type WxArchive struct {
	Aid      int64       `json:"aid"`
	TypeID   int32       `json:"type_id"`
	TypeName string      `json:"tname"`
	Pic      string      `json:"pic"`
	Title    string      `json:"title"`
	PubDate  time.Time   `json:"pubdate"`
	Ctime    time.Time   `json:"ctime"`
	Tags     []*WxArcTag `json:"tags"`
	Duration int64       `json:"duration"`
	Author   v1.Author   `json:"author"`
	Stat     v1.Stat     `json:"stat"`
}

WxArchive .

func (*WxArchive) FromArchive

func (w *WxArchive) FromArchive(a *v1.Arc)

FromArchive .

Jump to

Keyboard shortcuts

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