Documentation
¶
Index ¶
- Variables
- func Init() (err error)
- type App
- type AuditSign
- type AuthMsg
- type Cfg
- type Config
- type Dangbei
- type EmptyArc
- type EsCfg
- type EsIdx
- type HisCfg
- type Host
- type IP
- type IPWhite
- type IndexLabel
- type Memcache
- type PageCfg
- type PageConf
- type Redis
- type Region
- type Search
- type Style
- type TVApp
- type TvVip
- type VipMark
- type Wild
- type WildSearch
- type YearVDur
- type ZonesInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Conf = &Config{}
)
Conf global variable.
Functions ¶
Types ¶
type AuthMsg ¶
type AuthMsg struct { PGCOffline string // offline pgc CMSInvalid string // cms not valid LicenseReject string // license owner rejected }
AuthMsg configures the auth error messages
type Cfg ¶
type Cfg struct { ZonePs int // Zone index page size AuthMsg *AuthMsg // auth error message config ZonesInfo *ZonesInfo // all the zones info Dangbei *Dangbei // dangbei configuration PageReload xtime.Duration // all page reload duration IndexShowReload xtime.Duration // index show reload duration EsIntervReload xtime.Duration // es intervention reload duration DefaultSplash string // default splash url FavPs int // favorite cfg PGCFilterBuild int // the build number, under which we export only pgc modules and data VipQns []string // the qualities dedicated for vips HisCfg *HisCfg // history related cfg EsIdx *EsIdx // elastic search index page cfg IndexLabel *IndexLabel // index label cfg EmptyArc *EmptyArc // chan size VipMark *VipMark // vip mark SnVipCorner *model.SnVipCorner // season vip corner mark cfg AuditSign *AuditSign }
Cfg def.
type Config ¶
type Config struct { // zone configure Newzone map[string]*PageCfg // log Log *log.Config // tracer Tracer *trace.Config // http server config HTTPServer *bm.ServerConfig // auth Auth *auth.Config // verify Verify *verify.Config // mysql Mysql *sql.Config // memcache Memcache *Memcache // app TVApp *TVApp // homepage settings Homepage *PageConf // HTTPClient . HTTPClient *bm.ClientConfig PlayurlClient *bm.ClientConfig SearchClient *bm.ClientConfig // Redis Redis *Redis // Cfg common configuration Cfg *Cfg // Search Config Search *Search // RPC config ArcClient *warden.ClientConfig AccClient *warden.ClientConfig HisRPC *rpc.ClientConfig FavoriteRPC *rpc.ClientConfig TvVipClient *warden.ClientConfig // Ip Whitelist IP *IP // ecode Ecode *ecode.Config // api url Host *Host Region *Region Style *Style Wild *Wild }
Config struct of conf.
type Dangbei ¶
type Dangbei struct { Pagesize int64 // dangbei api page size MangoPS int // mango page size Expire xtime.Duration // dangbei page ID expiration }
Dangbei cfg def.
type Host ¶
type Host struct { Data string // data.bilibili.co APIIndex string // homepage pgc data source APIZone string // zonepage pgc data source APIFollow string // pgc follow APIMedia string // pgc media detail APIMediaV2 string // pgc media detail v2 APIRecom string // pgc recom APINewindex string // pgc index_show UgcPlayURL string // ugc play url AIUgcType string // ai ugc type data APICo string FavAdd string // favorite add url FavDel string // favorite del url ReqURL string // version update request url ESHost string // manager url }
Host api urls
type IndexLabel ¶
type IndexLabel struct { Fre xtime.Duration PGCOrder []string // pgc order UGCOrder []string // ugc order YearV map[string]*YearVDur // year value pair YearParam []string // year params = pub_date, year }
IndexLabel def.
func (*IndexLabel) IsYear ¶
func (u *IndexLabel) IsYear(param string) bool
IsYear distinguishes whether the param is year type param
type Memcache ¶
type Memcache struct { *memcache.Config RelateExpire xtime.Duration ViewExpire xtime.Duration ArcExpire xtime.Duration CmsExpire xtime.Duration HisExpire xtime.Duration MangoExpire xtime.Duration }
Memcache config
type PageCfg ¶
type PageCfg struct { Name string // page name Top int // recom positions Middle int // last updated Bottom int // bottom list TopM int // top interv module id MiddleM int // middle interv module id }
PageCfg cfg
type PageConf ¶
type PageConf struct { FollowSize int HideIndexShow []string // the zones that we need to hide the index show part }
PageConf defines the configuration for the home page info
type Search ¶
type Search struct { URL string MainVer string SugNum int SugPGCBuild int SugType string Highlight string // use highlight or not HotwordFre xtime.Duration // hotword reload frequency ResultURL string UserSearch string }
Search related config def.
type VipMark ¶
type VipMark struct { V1HideChargeable bool // whether we hide chargeable episode in pgc view V1 EpFree int // ep's pay status which means free EP *model.CornerMark LoadepMsg *TvVip // tv vip cfg }
VipMark def.
type WildSearch ¶
type WildSearch struct { UserNum int UserVideoLimit int BiliUserNum int BiliUserVl int SeasonNum int MovieNum int SeasonMore int MovieMore int }
WildSearch wild search .
type ZonesInfo ¶
type ZonesInfo struct { PGCZonesID []int // all the zones' ID that need to be loaded UGCZonesID []int16 // all the ugc zones' ID PageIDs []int // all the page ID's ZonesName []string // all the zones' name that need to be loaded TargetTypes []int32 // ugc types that we could pick source data UgcTypes []int32 // ugc archive type order, for search types listing OldIdxJump int // when the module is UGC and we can't find the old index page corresponding, we tell the client to jump to this category's index page OldIdxMapping map[string]int // ugc idx ID old and new mapping }
ZonesInfo loads all the zones' ID and name
Click to show internal directories.
Click to hide internal directories.