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

Documentation

Index

Constants

View Source
const (
	// TpWithUinfo tpl with user info.
	TpWithUinfo = `` /* 1755-byte string literal not displayed */

	// TpWithNoUinfo tpl without user info.
	TpWithNoUinfo = `` /* 1333-byte string literal not displayed */

)
View Source
const (
	OtypeJSON = "json"
	OtypeXML  = "xml"
)

Otype playurl data type.

Variables

View Source
var Catalog = map[int8]string{
	1: "system",
	2: "bangumi",
	3: "news",
}

Catalog catalog map

Functions

This section is empty.

Types

type BlockTime

type BlockTime struct {
	BlockStatus    int   `json:"block_status"`
	BlockedForever bool  `json:"blocked_forever"`
	BlockedEnd     int64 `json:"blocked_end"`
}

BlockTime block time struct

type Carousel struct {
	Backcolor string
	Fontcolor string
	Hint      string
	Link      string
	Content   string
	Category  string
}

Carousel carousel struct.

type DashItem

type DashItem struct {
	ID           int64    `json:"id" xml:"id"`
	BaseURL      string   `json:"baseUrl" xml:"baseUrl"`
	BackupURL    []string `json:"backupUrl" xml:"backupUrl"`
	Bandwidth    int64    `json:"bandwidth" xml:"bandwidth"`
	MimeType     string   `json:"mimeType" xml:"mimeType"`
	Codecs       string   `json:"codecs" xml:"codecs"`
	Width        int64    `json:"width" xml:"width"`
	Height       int64    `json:"height" xml:"height"`
	FrameRate    string   `json:"frameRate" xml:"frameRate"`
	Sar          string   `json:"sar" xml:"sar"`
	StartWithSAP int64    `json:"startWithSap" xml:"startWithSap"`
	SegmentBase  *struct {
		Initialization string `json:"Initialization" xml:"Initialization"`
		IndexRange     string `json:"indexRange" xml:"indexRange"`
	} `json:"SegmentBase" xml:"SegmentBase"`
	Codecid int64 `json:"codecid" xml:"codecid"`
}

DashItem .

type Item

type Item struct {
	Content    string `xml:",cdata"`
	Tooltip    string `xml:"tooltip,attr"`
	Bgcolor    string `xml:"bgcolor,attr"`
	Catalog    string `xml:"catalog,attr"`
	ResourceID string `xml:"resourceid,attr"`
	SrcID      string `xml:"srcid,attr"`
	ID         string `xml:"id,attr"`
}

Item item struct.

type Official

type Official struct {
	Type int8   `json:"type"`
	Desc string `json:"desc"`
}

Official official.

type Param

type Param struct {
	Name  string
	Value string
}

Param param struct.

type Pitem

type Pitem struct {
	ID      int64  `json:"item_id"`
	Data    string `json:"data"`
	Comment string `json:"comment"`
	ExtData string `json:"ext_data"`
	Ver     int64  `json:"ver"`
}

Pitem pitem struct

type PlayURLToken

type PlayURLToken struct {
	From  string `json:"from"`
	Ts    int64  `json:"ts"`
	Aid   int64  `json:"aid"`
	Cid   int64  `json:"cid"`
	Mid   int64  `json:"mid"`
	VIP   int    `json:"vip"`
	SVIP  int    `json:"svip"`
	Owner int    `json:"owner"`
	Fcs   string `json:"fcs"`
	Token string `json:"token"`
}

PlayURLToken playurl token.

type Player

type Player struct {
	IP      string
	Zoneid  int64
	Country string
	Isp     string // 运营商暂时不需要
	Login   bool
	Time    int64
	ZoneIP  string
	// user info
	Name           string
	User           int64
	UserHash       string
	Money          string
	Face           string
	IsAdmin        bool
	Upermission    string
	Level          string
	LevelInfo      template.HTML
	Vip            template.HTML
	OfficialVerify template.HTML
	BlockTime      int64
	// archive info
	Aid            int64
	Typeid         int32
	Maxlimit       int
	Click          int
	FwClick        int32
	Duration       string
	Arctype        string
	APermission    bool
	SuggestComment bool
	Chatid         int64
	Vtype          string
	Oriurl         string
	Pid            int64
	AllowBp        bool
	Bottom         int8
	Acceptguest    bool
	Acceptaccel    bool
	Cache          bool
	CacheDispatch  bool
	BrTCP          string
	BrWs           string
	BrWss          string
	DefaultDm      int8
	//progress
	LastPlayTime int64
	LastCid      int64
	Role         string
	// has next page
	HasNext     int8
	OnlineCount int64
	// dm mask
	MaskNew template.HTML
	// subtitle
	Subtitle template.HTML
	// player icon
	PlayerIcon template.HTML
	// view points
	ViewPoints template.HTML
}

Player player struct.

type PlayurlArg

type PlayurlArg struct {
	Cid           int64  `form:"cid" validate:"min=1"`
	Aid           int64  `form:"avid" validate:"min=1"`
	Qn            int    `form:"qn"`
	Type          string `form:"type"`
	MaxBackup     int    `form:"max_backup"`
	Npcybs        int    `form:"npcybs"`
	Platform      string `form:"platform"`
	Player        int    `form:"player"`
	Buvid         string `form:"buvid"`
	Resolution    string `form:"resolution"`
	Model         string `form:"model"`
	Build         int    `form:"build"`
	OType         string `form:"otype"`
	Fnver         int    `form:"fnver"`
	Fnval         int    `form:"fnval"`
	Session       string `form:"session"`
	HTML5         int    `form:"html5"`
	H5GoodQuality int    `form:"h5_good_quality"`
	HighQuality   int    `form:"high_quality"`
}

PlayurlArg playurl arg.

type PlayurlRes

type PlayurlRes struct {
	From              string   `json:"from" xml:"from"`
	Result            string   `json:"result" xml:"result"`
	Message           string   `json:"message" xml:"message"`
	Quality           int      `json:"quality" xml:"quality"`
	Format            string   `json:"format" xml:"format"`
	Timelength        int64    `json:"timelength" xml:"timelength"`
	AcceptFormat      string   `json:"accept_format" xml:"accept_format"`
	AcceptDescription []string `json:"accept_description" xml:"accept_description"`
	AcceptQuality     []int    `json:"accept_quality" xml:"accept_quality"`
	VideoCodeCid      int64    `json:"video_codecid" xml:"video_codecid"`
	SeekParam         string   `json:"seek_param" xml:"seek_param"`
	SeekType          string   `json:"seek_type" xml:"seek_type"`
	Abtid             int64    `json:"abtid,omitempty" xml:"abtid,omitempty"`
	Durl              []*struct {
		Order     int      `json:"order" xml:"order"`
		Length    int64    `json:"length" xml:"length"`
		Size      int64    `json:"size" xml:"size"`
		Ahead     string   `json:"ahead" xml:"ahead"`
		Vhead     string   `json:"vhead" xml:"vhead"`
		URL       string   `json:"url" xml:"url"`
		BackupURL []string `json:"backup_url" xml:"backup_url"`
	} `json:"durl,omitempty" xml:"durl,omitempty"`
	Dash *struct {
		Duration      int64       `json:"duration"`
		MinBufferTime float64     `json:"minBufferTime"`
		Video         []*DashItem `json:"video"`
		Audio         []*DashItem `json:"audio"`
	} `json:"dash,omitempty" xml:"dash,omitempty"`
}

PlayurlRes playurl res.

type Points

type Points struct {
	Type    int    `json:"type"`
	From    int64  `json:"from"`
	To      int64  `json:"to"`
	Content string `json:"content"`
}

Points is

type Policy

type Policy struct {
	ID        int64  `json:"id"`
	Des       string `json:"description"`
	Type      string `json:"type"`
	Start     string `json:"start"`
	End       string `json:"end"`
	Mtime     string `json:"mtime"`
	StartTime time.Time
	EndTime   time.Time
	MtimeTime time.Time
	Items     []*Pitem `json:"items"`
}

Policy policy struct.

type Progress

type Progress struct {
	Cid int64 `json:"cid"`
	Pro int64 `json:"pro"`
}

Progress progress struct.

type Sid

type Sid string

Sid sid string.

func (Sid) Create

func (sid Sid) Create() (re Sid)

Create create sid.

func (Sid) Valid

func (sid Sid) Valid() (b bool)

Valid valid sid.

type VIPInfo

type VIPInfo struct {
	Type          int32  `json:"vipType"`
	DueDate       int64  `json:"vipDueDate"`
	DueRemark     string `json:"dueRemark"`
	AccessStatus  int32  `json:"accessStatus"`
	VipStatus     int32  `json:"vipStatus"`
	VipStatusWarn string `json:"vipStatusWarn"`
}

VIPInfo vip info.

type Videoshot

type Videoshot struct {
	*archive.Videoshot
	Index []uint16 `json:"index,omitempty"`
}

Videoshot player video shot struct

type View

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

View .

Jump to

Keyboard shortcuts

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