thirdp

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PgcCat

func PgcCat(cat int) (category string)

PgcCat transforms the pgc category to string

func PickSids

func PickSids(resps []*RespSid) (sids []int64)

PickSids picks sids from resp slices

Types

type DBeiPage

type DBeiPage struct {
	List  []*DBeiSeason   `json:"list"`
	Pager *model.IdxPager `json:"pager"`
}

DBeiPage is the dangbei page struct

type DBeiSeason

type DBeiSeason struct {
	SeasonID    *int64 `json:"cid,omitempty"`
	Cover       string `json:"cover"`
	Desc        string `json:"desc"`
	Title       string `json:"title"`
	UpInfo      string `json:"upinfo"`
	Category    string `json:"category"` // - cn, jp, movie, tv, documentary
	Area        string `json:"area"`     // - cn, jp, others
	Playtime    string `json:"play_time"`
	Role        string `json:"role"`
	Staff       string `json:"staff"`
	NewestOrder int    `json:"newest_order"` // the newest passed ep's order
	NewestNB    int    `json:"newest_nb"`
	TotalNum    int    `json:"total_num"`
	Style       string `json:"style"`
	Paystatus   string `json:"pay_status"` // paid or not
	Official    string `json:"official"`   // is official or preview
}

DBeiSeason is the dangbei season struct

func DBeiSn

func DBeiSn(s *model.SeasonCMS) (dbei *DBeiSeason)

DBeiSn transform the object

func DbeiArc

func DbeiArc(s *model.ArcCMS, first, second string) (dbei *DBeiSeason)

DbeiArc transforms an arc cms to dangbei season structure

type MangoArc

type MangoArc struct {
	AVID      int64     `json:"avid"`
	Cover     string    `json:"cover"`
	Desc      string    `json:"desc"`
	Title     string    `json:"title"`
	PlayTime  string    `json:"play_time"`
	Category1 string    `json:"category_1"`
	Category2 string    `json:"category_2"`
	Autorised bool      `json:"autorised"`
	Mtime     time.Time `json:"mtime"`
}

MangoArc is mango archive structure

func ToMangoArc

func ToMangoArc(a *model.ArcCMS, mtime time.Time, cat1, cat2 string) *MangoArc

ToMangoArc transforms an ArcCMS to MangoArc

type MangoArcPage

type MangoArcPage struct {
	List  []*MangoArc     `json:"list"`
	Pager *model.IdxPager `json:"pager"`
}

MangoArcPage is mango arc page structure

type MangoEP

type MangoEP struct {
	model.EpCMS
	SeasonID  int64     `json:"sid"`
	Autorised bool      `json:"autorised"`
	Mtime     time.Time `json:"mtime"`
}

MangoEP is mango ep structure

type MangoEpPage

type MangoEpPage struct {
	SeasonID int64           `json:"sid"`
	List     []*MangoEP      `json:"list"`
	Pager    *model.IdxPager `json:"pager"`
}

MangoEpPage is mango ep page structure

type MangoOrder

type MangoOrder struct {
	RIDs []int64
}

MangoOrder struct

type MangoParams

type MangoParams struct {
	JumpParam string `json:"jump_param"` // combine
	Title     string `json:"title"`
	Cover     string `json:"cover"`
	Playcount int64  `json:"play_count"`
	Category  string `json:"category"` // transform to CN
	Desc      string `json:"desc"`
	Staff     string `json:"staff"`
	Role      string `json:"role"`      // from DB
	PlayTime  string `json:"play_time"` // from DB
}

MangoParams is the output structure for mango recom api

type MangoRecom

type MangoRecom struct {
	ID        int64     `json:"id"`
	RID       int64     `json:"rid"`
	Rtype     int       `json:"rtype"`
	Title     string    `json:"title"`
	Cover     string    `json:"cover"`
	Category  int       `json:"category"`
	Playcount int64     `json:"playcount"`
	JID       int64     `json:"jid"`
	Content   string    `json:"content"`
	Staff     string    `json:"staff"`
	Rorder    int       `json:"rorder"`
	Mtime     time.Time `json:"-"`
}

MangoRecom is mango recom table structure

func (*MangoRecom) ToParam

func (m *MangoRecom) ToParam() *MangoParams

ToParam transforms an MangoRecom from DB to MangoParam for mango OS

type MangoSn

type MangoSn struct {
	SID int64 `json:"sid"`
	DBeiSeason
	OriginName string    `json:"origin_name"`
	Alias      string    `json:"alias"`
	Autorised  bool      `json:"autorised"`
	Mtime      time.Time `json:"mtime"`
	EpCover    string    `json:"ep_cover"`
}

MangoSn is the plus version of Dangbei Season

func ToMangoSn

func ToMangoSn(s *model.SeasonCMS, mtime time.Time, autorised bool) *MangoSn

ToMangoSn transforms an seasonCMS to mangoSn

type MangoSnPage

type MangoSnPage struct {
	List  []*MangoSn      `json:"list"`
	Pager *model.IdxPager `json:"pager"`
}

MangoSnPage is mango sn page structure

type MangoVideo

type MangoVideo struct {
	CID       int64     `json:"cid"`
	Page      int       `json:"page"`
	Desc      string    `json:"desc"`
	Title     string    `json:"title"`
	Duration  int64     `json:"duration"`
	Autorised bool      `json:"autorised"`
	Mtime     time.Time `json:"mtime"`
}

MangoVideo is mango video structure

type MangoVideoPage

type MangoVideoPage struct {
	AVID  int64           `json:"avid"`
	List  []*MangoVideo   `json:"list"`
	Pager *model.IdxPager `json:"pager"`
}

MangoVideoPage is mango video page structure

type ReqDBeiPages

type ReqDBeiPages struct {
	Page   int64
	LastID int64
	Ps     int64
	TypeC  string
}

ReqDBeiPages is request for dangbei pages

type ReqPageID

type ReqPageID struct {
	Page  int64
	ID    int64
	TypeC string
}

ReqPageID is request for page ID

type RespSid

type RespSid struct {
	Sid   int64
	Mtime time.Time
}

RespSid is response structure for sid

type VideoCMS

type VideoCMS struct {
	// Media Info
	CID        int
	Title      string
	AID        int
	IndexOrder int
	// Auth Info
	Valid   int
	Deleted int
	Result  int
}

VideoCMS def.

Jump to

Keyboard shortcuts

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