pgc

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	ProgramSetList *PSList `xml:"programSetList"`
}

Body Media list

type Content

type Content struct {
	ID        int64     `json:"id"`
	Title     string    `json:"title"`
	Subtitle  string    `json:"subtitle"`
	Desc      string    `json:"desc"`
	Cover     string    `json:"cover"`
	EPID      int       `json:"epid"`
	CID       int       `json:"cid"`
	MenuID    int       `json:"menu_id"`
	SeasonID  int       `json:"season_id"`
	State     int       `json:"state"`
	Valid     int       `json:"valid"`
	PayStatus int       `json:"pay_status"`
	IsDeleted int       `json:"is_deleted"`
	AuditTime int       `json:"audit_time"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
}

Content content def.

func (Content) TableName

func (c Content) TableName() string

TableName tv_content

type DatabusEP

type DatabusEP struct {
	New *MediaEP `json:"new"`
	Old *MediaEP `json:"old"`
}

DatabusEP is the struct of message for the modification of tv_content

type DatabusRes

type DatabusRes struct {
	Action string `json:"action"`
	Table  string `json:"table"`
}

DatabusRes is the result of databus message

type DatabusSeason

type DatabusSeason struct {
	Old *MediaSn `json:"old"`
	New *MediaSn `json:"new"`
}

DatabusSeason is the struct of message for the modification of tv_ep_season

type DelBody

type DelBody struct {
	ProgramList *ProgramList `xml:"programList"`
}

DelBody is the bodu message of deletion

type Document

type Document struct {
	Response *Response
}

Document is the result structure of license owner's response

type Durl

type Durl struct {
	Order  int    `json:"order"`
	Length int    `json:"length"`
	Size   int    `json:"size"`
	URL    string `json:"url"`
}

Durl def.

type EpCMS

type EpCMS struct {
	EPID     int    `json:"epid"`
	Cover    string `json:"cover"`
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
	// new fields
	PayStatus int `json:"pay_status"`
}

EpCMS defines the elements could be changed from TV CMS side

type Error

type Error struct {
	ID      string `xml:"Id"`
	Message string
}

Error one error body

type ErrorList

type ErrorList struct {
	Error *Error
}

ErrorList is the list of error returned by the license owner

type Head struct {
	TradeID string `xml:"TradeId"`
	Date    string
	Count   int
}

Head some header info

type LabelRes

type LabelRes struct {
	Name     string
	Value    int
	Category int
}

LabelRes .

type License

type License struct {
	TId       string
	InputTime string
	Sign      string
	XMLData   *XMLData
}

License Owner Request message License represents the data that we need to send to the license owner for auditing

type MediaEP

type MediaEP struct {
	ID        int64  `json:"id"`
	EPID      int    `json:"epid"`
	SeasonID  int    `json:"season_id"`
	State     int    `json:"state"`
	Valid     int    `json:"valid"`
	IsDeleted int    `json:"is_deleted"`
	Title     string `json:"title"`
	Subtitle  string `json:"subtitle"`
	Cover     string `json:"cover"`
	Mark      int    `json:"mark"`
	CID       int64  `json:"cid"`
	PayStatus int    `json:"pay_status"`
}

MediaEP is the new structure of ep in Databus Msg

func (*MediaEP) ToCMS

func (ep *MediaEP) ToCMS() *EpCMS

ToCMS returns EpCMS

func (*MediaEP) ToSimple

func (ep *MediaEP) ToSimple() *SimpleEP

ToSimple returns SimpleEP struct

type MediaSn

type MediaSn struct {
	ID          int64  `json:"id"`
	IsDeleted   int8   `json:"is_deleted"`
	Valid       int    `json:"valid"`
	Check       int8   `json:"check"`
	Title       string `json:"title"`
	Cover       string `json:"cover"`
	Desc        string `json:"desc"`
	UpInfo      string `json:"upinfo"`
	Ctime       string `json:"ctime"`
	Category    int    `json:"category"`
	Area        string `json:"area"`
	Playtime    string `json:"play_time"`
	Role        string `json:"role"`
	Staff       string `json:"staff"`
	TotalNum    int    `json:"total_num"`
	Style       string `json:"style"`
	Producer    string `json:"producer"`
	Version     string `json:"version"`
	AliasSearch string `json:"alias_search"`
	Brief       string `json:"brief"`
	Status      int    `json:"status"`
}

MediaSn is the new structure of season in Databus Msg

func (*MediaSn) ToSimple

func (m *MediaSn) ToSimple() *SimpleSeason

ToSimple returns SimpleSeason struct

type Offset

type Offset struct {
	Begin int
	End   int
}

Offset used for mysql offset

type PMList

type PMList struct {
	ProgramMedia []*PMedia `xml:"programMedia"`
}

PMList is short for programMediaList

type PMedia

type PMedia struct {
	MediaID    string `xml:"mediaId"`
	PlayURL    string `xml:"playUrl"`
	Definition string `xml:"definition"`
	HTMLURL    string `xml:"htmlUrl"`
}

PMedia is short for ProgramMedia

func CreatePMedia

func CreatePMedia(prefix string, epid int, url string) *PMedia

CreatePMedia creates PMedia struct

func MakePMedia

func MakePMedia(prefix, playurl string, cid int64) *PMedia

MakePMedia is used to construct PMedia structure

type PS

type PS struct {
	ProgramSetID     string       `xml:"programSetId"`
	ProgramSetName   string       `xml:"programSetName"`
	ProgramSetClass  string       `xml:"programSetClass"`
	ProgramSetType   string       `xml:"programSetType"`
	ProgramSetPoster string       `xml:"programSetPoster"`
	Portrait         string       `xml:"portrait"` // upper's portrait
	Producer         string       `xml:"producer"` // upper's name
	PublishDate      string       `xml:"publishDate"`
	Copyright        string       `xml:"copyright"`
	ProgramCount     int          `xml:"programCount"`
	CREndData        string       `xml:"cREndDate"`
	DefinitionType   string       `xml:"definitionType"`
	CpCode           string       `xml:"cpCode"`
	PayStatus        int          `xml:"payStatus"`
	PrimitiveName    string       `xml:"primitiveName"`
	Alias            string       `xml:"alias"`
	Zone             string       `xml:"zone"`
	LeadingRole      string       `xml:"leadingRole"`
	ProgramSetDesc   string       `xml:"programSetDesc"`
	Staff            string       `xml:"Staff"`
	SubGenre         string       `xml:"subGenre"`
	ProgramList      *ProgramList `xml:"programList,omitempty"`
}

PS is short for ProgramSet

type PSList

type PSList struct {
	ProgramSet []*PS `xml:"programSet"`
}

PSList is short for programSetList

type ParamStyle

type ParamStyle struct {
	Name    string `json:"name"`
	StyleID int    `json:"style_id"`
}

ParamStyle .

type PlayurlResp

type PlayurlResp struct {
	Code          int     `json:"code"`
	Message       string  `json:"message"`
	From          string  `json:"from"`
	Result        string  `json:"result"`
	Quality       int     `json:"quality"`
	Format        string  `json:"format"`
	Timelength    int     `json:"timelength"`
	AcceptFormat  string  `json:"accept_format"`
	AcceptQuality []int   `json:"accept_quality"`
	SeekParam     string  `json:"seek_param"`
	SeekType      string  `json:"seek_type"`
	Durl          []*Durl `json:"durl"`
}

PlayurlResp is the response struct from Playurl API

type Program

type Program struct {
	ProgramID        string  `xml:"programId"`
	ProgramName      string  `xml:"programName"`
	ProgramPoster    string  `xml:"programPoster"`
	ProgramLength    int     `xml:"programLength"`
	PublishDate      string  `xml:"publishDate"`
	IfPreview        int     `xml:"ifPreview"`
	Number           string  `xml:"number"`
	DefinitionType   string  `xml:"definitionType"`
	PlayCount        int     `xml:"playCount"`
	Drm              int     `xml:"drm"`
	ProgramMediaList *PMList `xml:"programMediaList"`
	ProgramDesc      string  `xml:"programDesc"`
}

Program represents one EP data

func CreateProgram

func CreateProgram(prefix string, ep *TVEpContent) *Program

CreateProgram creates program

type ProgramList

type ProgramList struct {
	Program []*Program `xml:"program"`
}

ProgramList contains different EP

type ReqEpLicCall

type ReqEpLicCall struct {
	EpLic *License
	SID   int64
	Conts []*Content
}

ReqEpLicCall is the request struct for epLicCall function

type Response

type Response struct {
	TradeID      string `xml:"TradeId"`
	ResponseCode string
	ResponseInfo string
	ResponseTime string `xml:"responseTime"`
	ErrorList    *ErrorList
}

Response is the main content of response

type SearPgcCon

type SearPgcCon struct {
	ID       int       `json:"id"`
	Category int       `json:"category"`
	Cover    string    `json:"cover"`
	Title    string    `json:"title"`
	PlayTime time.Time `json:"pubtime"`
	Role     string    `json:"cv"`
	Staff    string    `json:"staff"`
	Desc     string    `json:"description"`
}

SearPgcCon is used for setting search pgc content

type SearUgcCon

type SearUgcCon struct {
	AID     int       `json:"id"`
	Title   string    `json:"title"`
	Cover   string    `json:"cover"`
	Content string    `json:"description"`
	Pubtime time.Time `json:"pubtime"`
	Typeid  int       `json:"category"`
}

SearUgcCon is used for setting search ugc content

type SearchSug

type SearchSug struct {
	Term string `json:"term"`
	ID   int    `json:"id"`
	Type string `json:"type"`
}

SearchSug represents the search suggestion unit

type SeasonCMS

type SeasonCMS struct {
	SeasonID    int
	Cover       string
	Desc        string
	Title       string
	UpInfo      string // season update information
	Category    int    // - cn, jp, movie, tv, documentary
	Area        string // - cn, jp, others
	Playtime    time.Time
	Role        string
	Staff       string
	NewestOrder int // the newest passed ep's order
	NewestEPID  int // the newest passed ep's ID
	NewestNb    int // the newest ep's number ( after keyword filter )
	TotalNum    int
	Style       string
	OriginName  string // new fields
	Alias       string // new fields
	PayStatus   int    // season's pay status, 0||2 = free, others = pay, pass by conf
}

SeasonCMS defines the elements could be changed from TV CMS side

type Service

type Service struct {
	ID   string `xml:"id,attr"`
	Head *Head
	Body *Body
}

Service body+head

type SimpleEP

type SimpleEP struct {
	ID        int64 `json:"id"`
	EPID      int   `json:"epid"`
	SeasonID  int   `json:"season_id"`
	State     int   `json:"state"`
	Valid     int   `json:"valid"`
	IsDeleted int   `json:"is_deleted"`
	NoMark    int   `json:"no_mark"`
}

SimpleEP is the structure of ep in mc

type SimpleSeason

type SimpleSeason struct {
	ID        int64 `json:"id"`
	IsDeleted int8  `json:"is_deleted"`
	Valid     int   `json:"valid"`
	Check     int8  `json:"check"`
}

SimpleSeason is the structure of season in mc

type StyleRes

type StyleRes struct {
	ID       int
	Style    string
	Category int
}

StyleRes .

type TVEpContent

type TVEpContent struct {
	ID        int64
	SeasonID  int64
	CID       int64
	Title     string
	LongTitle string
	Cover     string
	Length    int32
	IsDeleted int8
	Order     int
	Ctime     time.Time
	Mtime     time.Time
	PayStatus int
}

TVEpContent reprensents the content table

func (*TVEpContent) TableName

func (*TVEpContent) TableName() string

TableName gives the table name of content

type TVEpSeason

type TVEpSeason struct {
	ID         int64
	OriginName string
	Title      string
	Alias      string
	Category   int8
	Desc       string
	Style      string
	Area       string
	PlayTime   time.Time
	Info       int8
	State      int8
	TotalNum   int32
	Upinfo     string
	Staff      string
	Role       string
	Copyright  string
	IsDeleted  int8
	Ctime      time.Time
	Mtime      time.Time
	Check      int8
	AuditTime  int
	Cover      string
	Valid      int    `json:"valid"`
	Producer   string `json:"producer"`
	Version    string `json:"version"`
	Status     int
}

TVEpSeason represents the season table

func (*TVEpSeason) TableName

func (*TVEpSeason) TableName() string

TableName gives the table name of season

type XMLData

type XMLData struct {
	Service *Service `xml:"Service"`
}

XMLData reprensents the main body of xml data sent to license owner

Jump to

Keyboard shortcuts

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