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

Documentation

Index

Constants

View Source
const (
	// TypeUnknown unkown
	TypeUnknown = int8(-1)
	// TypeOffline offline
	TypeOffline = int8(0)
	// TypeBangumi bangumi
	TypeBangumi = int8(1)
	// TypeMovie movie
	TypeMovie = int8(2)
	// TypeUGC UGC
	TypeUGC = int8(3)
	// TypePGC PGC
	TypePGC = int8(4)
	// TypeArticle Article
	TypeArticle = int8(5)
	// TypeLive Live
	TypeLive = int8(6)
	// TypeCorpus corpus
	TypeCorpus = int8(7)
	// TypeComic comic
	TypeComic = int8(8)

	// SubTypeOffline archive subtype
	SubTypeOffline = int8(1)
	// SubTypeBangumi bangumi
	SubTypeBangumi = int8(1)
	// SubTypeFilm film
	SubTypeFilm = int8(2)
	// SubTypeDoc documentary
	SubTypeDoc = int8(3)
	// SubTypeNation nation
	SubTypeNation = int8(4)
	// SubTypeTV TV
	SubTypeTV = int8(5)

	// DeviceUnknown unknown
	DeviceUnknown = int8(0)
	// DeviceIphone iphoneTV
	DeviceIphone = int8(1)
	// DevicePC PC
	DevicePC = int8(2)
	// DeviceAndroid android
	DeviceAndroid = int8(3)
	// DeviceAndroidTV android TV
	DeviceAndroidTV = int8(33)
	// DeviceIpad ipad
	DeviceIpad = int8(4)
	// DeviceWP8 WP8
	DeviceWP8 = int8(5)
	// DeviceUWP UWP
	DeviceUWP = int8(6)

	// ShadowUnknown unknown
	ShadowUnknown = int64(-1)
	// ShadowOff off
	ShadowOff = int64(0)
	// ShadowOn on
	ShadowOn = int64(1)

	// ProComplete progress complete
	ProComplete = int64(-1)

	// PlatformAndroid platform android.
	PlatformAndroid string = "android"
	// PlatformIOS platform ios.
	PlatformIOS string = "ios"

	// DevicePad device pad.
	DevicePad string = "pad"
	// MobileAppAndroidTV mobile app android tv.
	MobileAppAndroidTV string = "android_tv_yst"

	HistoryLog      = 171
	HistoryClear    = "history_clear"
	HistoryClearTyp = "history_clear_%s"
	ToviewClear     = "toview_clear"
)

const .

Variables

This section is empty.

Functions

func BusinessByTP

func BusinessByTP(b int8) string

BusinessByTP .

func CheckBusiness

func CheckBusiness(bs string) (tp int8, err error)

CheckBusiness .

func MustCheckBusiness

func MustCheckBusiness(bs string) (tp int8, err error)

MustCheckBusiness .

Types

type ArcToView

type ArcToView struct {
	*archive.Archive3
	Page     *archive.Page3 `json:"page,omitempty"`
	Count    int            `json:"count"`
	Cid      int64          `json:"cid"`
	Progress int64          `json:"progress"`
	AddTime  int64          `json:"add_at"`
}

ArcToView toview video.

type ArgClear

type ArgClear struct {
	Mid        int64
	RealIP     string
	Businesses []string
}

ArgClear .

type ArgCursor

type ArgCursor struct {
	Mid int64
	Max int64
	TP  int8
	// history business
	Business string
	ViewAt   int64
	// filter business, blank means all business
	Businesses []string
	Ps         int
	RealIP     string
}

ArgCursor arg.

type ArgDelete

type ArgDelete struct {
	Mid       int64
	RealIP    string
	Resources []*Resource
}

ArgDelete arg.

type ArgHistories

type ArgHistories struct {
	Mid      int64
	TP       int8
	Business string
	Pn       int
	Ps       int
	RealIP   string
}

ArgHistories arg.

type ArgHistory

type ArgHistory struct {
	Mid      int64
	Realtime int64
	RealIP   string
	History  *History
}

ArgHistory arg.

type ArgPos

type ArgPos struct {
	Mid      int64
	Aid      int64
	Business string
	TP       int8
	RealIP   string
}

ArgPos arg.

type ArgPro

type ArgPro struct {
	Mid    int64
	RealIP string
	Aids   []int64
}

ArgPro arg.

type Bangumi

type Bangumi struct {
	Epid          int64   `json:"ep_id"`
	Title         string  `json:"title"`
	LongTitle     string  `json:"long_title"`
	EpisodeStatus int     `json:"episode_status"`
	Follow        int     `json:"follow"`
	Cover         string  `json:"cover"`
	Season        *Season `json:"season"`
}

Bangumi bangumi.

type BangumiSeason

type BangumiSeason struct {
	ID       int64 `json:"season_id"`
	Epid     int64 `json:"episode_id"`
	EpidType int64 `json:"season_type"`
}

BangumiSeason season.

type Histories

type Histories []*History

Histories history sorted.

func (Histories) Len

func (h Histories) Len() int

func (Histories) Less

func (h Histories) Less(i, j int) bool

func (Histories) Swap

func (h Histories) Swap(i, j int)

type History

type History struct {
	Mid      int64  `json:"mid,omitempty"`
	Aid      int64  `json:"aid"`
	Sid      int64  `json:"sid,omitempty"`
	Epid     int64  `json:"epid,omitempty"`
	TP       int8   `json:"tp,omitempty"`
	Business string `json:"business"`
	STP      int8   `json:"stp,omitempty"` // sub_type
	Cid      int64  `json:"cid,omitempty"`
	DT       int8   `json:"dt,omitempty"`
	Pro      int64  `json:"pro,omitempty"`
	Unix     int64  `json:"view_at"`
}

History video hisotry info.

func (History) ConvertServiceType

func (h History) ConvertServiceType() (r *hismdl.History)

ConvertServiceType .

func (*History) ConvertType

func (h *History) ConvertType()

ConvertType convert old type

func (*History) FillBusiness

func (h *History) FillBusiness()

FillBusiness add history

type Merge

type Merge struct {
	Mid int64 `json:"mid"`
	Now int64 `json:"now"`
}

Merge report merge in history.

type Resource

type Resource struct {
	Mid      int64  `json:"mid,omitempty"`
	Oid      int64  `json:"oid"`
	Sid      int64  `json:"sid,omitempty"`
	Epid     int64  `json:"epid,omitempty"`
	TP       int8   `json:"tp,omitempty"`
	STP      int8   `json:"stp,omitempty"` // sub_type
	Cid      int64  `json:"cid,omitempty"`
	Business string `json:"business"`
	DT       int8   `json:"dt,omitempty"`
	Pro      int64  `json:"pro,omitempty"`
	Unix     int64  `json:"view_at"`
}

Resource video hisotry info .

type Season

type Season struct {
	ID            int64  `json:"season_id"`
	Title         string `json:"title"`
	SeasonStatus  int    `json:"season_status"`
	IsFinish      int    `json:"is_finish"`
	TotalCount    int32  `json:"total_count"`
	NewestEpid    int64  `json:"newest_ep_id"`
	NewestEpIndex string `json:"newest_ep_index"`
	SeasonType    int    `json:"season_type,omitempty"`
	Mode          int    `json:"mode,omitempty"`
}

Season season.

type ToView

type ToView struct {
	Aid  int64 `json:"aid,omitempty"`
	Unix int64 `json:"now,omitempty"`
}

ToView toview.

type ToViews

type ToViews []*ToView

ToViews toview sorted.

func (ToViews) Len

func (h ToViews) Len() int

func (ToViews) Less

func (h ToViews) Less(i, j int) bool

func (ToViews) Swap

func (h ToViews) Swap(i, j int)

type Video

type Video struct {
	*archive.Archive3
	Favorite    bool           `json:"favorite"` // video favorite
	TP          int8           `json:"type"`     // video type
	STP         int8           `json:"sub_type"` // video type
	DT          int8           `json:"device"`   // device type
	Page        *archive.Page3 `json:"page,omitempty"`
	Count       int            `json:"count,omitempty"`
	BangumiInfo *Bangumi       `json:"bangumi,omitempty"`
	Progress    int64          `json:"progress"`
	ViewAt      int64          `json:"view_at"`
}

Video video history.

type WebArcToView

type WebArcToView struct {
	*archive.View3
	BangumiInfo *Bangumi `json:"bangumi,omitempty"`
	Cid         int64    `json:"cid"`
	Progress    int64    `json:"progress"`
	AddTime     int64    `json:"add_at"`
}

WebArcToView toview video.

Jump to

Keyboard shortcuts

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