archive

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

Documentation

Index

Constants

View Source
const (
	// open state
	StateOpen   = int8(0)
	StateOrange = int8(1)
	// forbit state
	StateForbidWait     = int8(-1)
	StateForbidRecicle  = int8(-2)
	StateForbidPolice   = int8(-3)
	StateForbidLock     = int8(-4)
	StateForbidFackLock = int8(-5)
	StateForbidFixed    = int8(-6)
	StateForbidLater    = int8(-7)
	// StateForbidPatched   = int8(-8)
	StateForbidWaitXcode  = int8(-9)
	StateForbidAdminDelay = int8(-10)
	StateForbidFixing     = int8(-11)
	// StateForbidStorageFail = int8(-12)
	StateForbidOnlyComment = int8(-13)
	// StateForbidTmpRecicle  = int8(-14)
	StateForbidDispatch  = int8(-15)
	StateForbidXcodeFail = int8(-16)
	StateForbitUpLoad    = int8(-20) // NOTE:spell body can judge to change state
	StateForbidSubmit    = int8(-30)
	StateForbidUserDelay = int8(-40)
	StateForbidUpDelete  = int8(-100)
	// attribute yes and no
	AttrYes = int32(1)
	AttrNo  = int32(0)
	// attribute bit
	AttrBitNoRank       = uint(0)
	AttrBitNoDynamic    = uint(1)
	AttrBitNoWeb        = uint(2)
	AttrBitNoMobile     = uint(3)
	AttrBitNoSearch     = uint(4)
	AttrBitOverseaLock  = uint(5)
	AttrBitNoRecommend  = uint(6)
	AttrBitNoReprint    = uint(7)
	AttrBitHasHD5       = uint(8)
	AttrBitIsPGC        = uint(9)
	AttrBitAllowBp      = uint(10)
	AttrBitIsBangumi    = uint(11)
	AttrBitIsPorder     = uint(12)
	AttrBitLimitArea    = uint(13)
	AttrBitAllowTag     = uint(14)
	AttrBitIsFromArcAPI = uint(15) // TODO: delete
	AttrBitJumpURL      = uint(16)
	AttrBitIsMovie      = uint(17)
	AttrBitBadgepay     = uint(18)
	AttrBitIsJapan      = uint(19) //日文稿件
	AttrBitNoPushBplus  = uint(20) //是否动态禁止
	AttrBitParentMode   = uint(21) //家长模式
	AttrBitUGCPay       = uint(22) //UGC付费
	AttrBitHasBGM       = uint(23) //稿件带有BGM
	AttrBitSTAFF        = uint(24) //联合投稿

	// copyright state
	CopyrightUnknow   = int8(0)
	CopyrightOriginal = int8(1)
	CopyrightCopy     = int8(2)
	// up_from
	UpFromWeb       = int8(0)
	UpFromPGC       = int8(1)
	UpFromWindows   = int8(2)
	UpFromAPP       = int8(3)
	UpFromMAC       = int8(4)
	UpFromSecretPGC = int8(5)
	UpFromCoopera   = int8(6)
	UpFromCreator   = int8(7) // 创作姬
	// delay
	DelayTypeForAdmin = int8(1)
	DelayTypeForUser  = int8(2)
	// flow type
	FlowNotLimit  = int8(1)
	FlowBudgeting = int8(2)
	FlowCapping   = int8(3)
	FlowForbid    = int8(4)
	// flow design type
	FlowDesignAppFeed = int8(0)
	FlowDesignUp      = int8(1)
	FlowDesignPrivate = int8(2)
	// oper uid
	AutoOperUID = int64(399)
	CMOperUID   = int64(518)
	// archive list type for up
	UpArcAllIn    = int8(0)
	UpArcOpenIn   = int8(1)
	UpArcUnOpenIn = int8(2)

	VideoFilenameTimeout = int64(48 * 60 * 60)
)

Const State

View Source
const (
	PoolArc       = int8(0)
	PoolUp        = int8(1)
	PoolPorder    = int8(2)
	PoolArticle   = int8(3)
	PoolArcForbid = int8(4)
	PoolArcPGC    = int8(5)

	FlowOpen   = int8(0)
	FlowDelete = int8(1)

	FlowLogAdd    = int8(1)
	FlowLogUpdate = int8(2)
	FlowLogDel    = int8(3)

	FlowGroupNoChannel   = int64(23)
	FlowGroupNoHot       = int64(24)
	FlowGroupNoTimeline  = int64(25)
	FlowGroupNoOtt       = int64(26)
	FlowGroupNoRecommend = int64(27)
	FlowGroupNoRank      = int64(28)
)

pool .

View Source
const (
	// Forbid style
	ForbidRank      = "rank"
	ForbidDynamic   = "dynamic"
	ForbidRecommend = "recommend"
	ForbidShow      = "show"
	// ForbidRank style
	ForbidRankMain      = 0
	ForbidRankRecentArc = 1
	ForbidRankAllArc    = 2
	// ForbidDynamic style
	ForbidDynamicMain = 0
	// ForbidRecommend style
	ForbidRecommendMain = 0
	// ForbidShow style
	ForbidShowMain    = 0
	ForbidShowMobile  = 1
	ForbidShowWeb     = 2
	ForbidShowOversea = 3
	ForbidShowOnline  = 4
)

const Forbid Enum Values

View Source
const (
	MSG_1  = int(1)
	MSG_2  = int(2)
	MSG_3  = int(3)
	MSG_4  = int(4)
	MSG_5  = int(5)
	MSG_6  = int(6)
	MSG_7  = int(7)
	MSG_8  = int(8)
	MSG_9  = int(9)
	MSG_10 = int(10)
	MSG_11 = int(11)
	MSG_12 = int(12)
	MSG_13 = int(13)
)

const .

View Source
const (
	ArcReportNew    = int8(0)
	ArcReportReject = int8(1)
	ArcReportAccept = int8(2)
)

const ArcReport

View Source
const (
	APPLYSTATEOPEN   = int8(0)
	APPLYSTATEACCEPT = int8(1)
	APPLYSTATEREFUSE = int8(2)
	//场景是 staff未上线前 up直接删除
	APPLYSTATEDEL    = int8(3)
	APPLYSTATEIGNORE = int8(4)

	DEALSTATEOPEN   = int8(1)
	DEALSTATEDONE   = int8(2)
	DEALSTATEIGNORE = int8(3)

	STATEON  = int8(1)
	STATEOFF = int8(2)

	TYPEUPADD    = int8(1)
	TYPEUPDEL    = int8(2)
	TYPEUPMODIFY = int8(3)
	TYPESTAFFDEL = int8(4)
	TYPEADMINDEL = int8(5)

	STAFFLogBizID = int(84)

	STAFFLogBizType1 = int(1)
	STAFFLogBizType2 = int(2)
	STAFFLogBizType3 = int(3)
	STAFFLogBizType4 = int(4)

	UPRELATIONBLACK = int64(128)
)

staff state .

View Source
const (
	// video xcode and dispatch state.
	VideoUploadInfo      = int8(0)
	VideoXcodeSDFail     = int8(1)
	VideoXcodeSDFinish   = int8(2)
	VideoXcodeHDFail     = int8(3)
	VideoXcodeHDFinish   = int8(4)
	VideoDispatchRunning = int8(5)
	VideoDispatchFinish  = int8(6)
	// video status.
	VideoStatusOpen         = int16(0)
	VideoStatusAccess       = int16(10000)
	VideoStatusWait         = int16(-1)
	VideoStatusRecicle      = int16(-2)
	VideoStatusLock         = int16(-4)
	VideoStatusXcodeFail    = int16(-16)
	VideoStatusSubmit       = int16(-30)
	VideoStatusUploadSubmit = int16(-50)
	VideoStatusDelete       = int16(-100)
	// xcode fail
	XcodeFailZero = 0
)

const Video Status

View Source
const (
	BIZPOI = int64(1)
)

BIZPOI 1

View Source
const (
	// BIZVote Business Type Vote
	BIZVote = int64(2)
)

Variables

View Source
var (
	//FlowAttrMap archive submit with flow attr
	FlowAttrMap = map[string]int64{
		"nochannel":   FlowGroupNoChannel,
		"nohot":       FlowGroupNoHot,
		"notimeline":  FlowGroupNoTimeline,
		"noott":       FlowGroupNoOtt,
		"norecommend": FlowGroupNoRecommend,
		"norank":      FlowGroupNoRank,
	}
)

Functions

func BitDesc

func BitDesc(bit uint) (desc string)

BitDesc return bit desc.

func InAttr

func InAttr(attr int32) (ok bool)

InAttr in correct attrs.

func InCopyrights

func InCopyrights(cp int8) (ok bool)

InCopyrights in correct copyrights.

func InOverseaType

func InOverseaType(typeID int16) (ok bool)

InOverseaType check in oversea forbid type.

Types

type AdInfo

type AdInfo struct {
	Nation string `json:"nation"`
	Provin string `json:"province"`
	Distri string `json:"district"`
	City   string `json:"city"`
}

AdInfo str

type Addit

type Addit struct {
	Aid           int64  `json:"aid"`
	MissionID     int64  `json:"mission_id"`
	UpFrom        int8   `json:"up_from"`
	FromIP        int64  `json:"from_ip"`
	IPv6          []byte `json:"ipv6"`
	Source        string `json:"source"`
	OrderID       int64  `json:"order_id"`
	RecheckReason string `json:"recheck_reason"`
	RedirectURL   string `json:"redirect_url"`
	FlowID        int64  `json:"flow_id"`
	Advertiser    string `json:"advertiser"`
	FlowRemark    string `json:"flow_remark"`
	DescFormatID  int64  `json:"desc_format_id"`
	Desc          string `json:"desc"`
	Dynamic       string `json:"dynamic"`
}

Addit str

type Alert

type Alert struct {
	Key   string
	Value int64
	Limit int64
}

Alert str

type Ancestor

type Ancestor struct {
	POI  string `json:"poi"`
	Type int32  `json:"type"`
}

Ancestor str

type ApplyParam

type ApplyParam struct {
	ID            int64    `form:"id"`
	Type          int8     `form:"type"`
	ASID          int64    `form:"as_id"`
	ApplyAID      int64    `form:"apply_aid"`
	ApplyStaffMID int64    `form:"apply_staff_mid" validate:"required"`
	ApplyUpMID    int64    `form:"apply_up_mid"`
	ApplyTitle    string   `form:"apply_title"`
	OldTitle      string   `form:"old_title"`
	ApplyTitleID  int64    `form:"apply_title_id"`
	State         int8     `form:"state"`
	DealState     int8     `form:"deal_state"`
	RefuseMid     int64    `form:"refuse_mid"`
	FlagRefuse    bool     `form:"flag_refuse"`
	FlagAddBlack  bool     `form:"flag_add_black"`
	NoNotify      bool     `form:"no_notify"`
	SyncStaff     bool     `form:"sync_staff"`
	CleanCache    bool     `form:"clean_cache"`
	SyncDynamic   bool     `form:"sync_dynamic"`
	MsgId         int      `form:"msg_id"`
	StaffState    int8     `json:"staff_state"`
	StaffTitle    string   `json:"staff_title"`
	Archive       *Archive `json:"archive"`
	UpName        string   `json:"up_name"`
	StaffName     string   `json:"staff_name"`
	StaffsName    string   `json:"staffs_name"`
	NotifyUp      bool     `json:"notify_up"`
}

ApplyParam 提交申请单参数

func (*ApplyParam) Copy

func (s *ApplyParam) Copy(v *StaffApply)

Copy . 稿件编辑时用

type ArcDynamicParam

type ArcDynamicParam struct {
	AID int64 `form:"aid" validate:"required"`
	MID int64 `form:"mid" validate:"required"`
}

ArcDynamicParam str

type ArcHistory

type ArcHistory struct {
	ID           int64           `json:"id,omitempty"`
	Aid          int64           `json:"aid,omitempty"`
	Title        string          `json:"title,omitempty"`
	Tag          string          `json:"tag,omitempty"`
	Content      string          `json:"content,omitempty"`
	Cover        string          `json:"cover,omitempty"`
	Mid          int64           `json:"mid,omitempty"`
	CTime        time.Time       `json:"ctime,omitempty"`
	VideoHistory []*VideoHistory `json:"videos,omitempty"`
}

ArcHistory archive edit history.

type ArcMissionParam

type ArcMissionParam struct {
	AID       int64  `form:"aid" validate:"required"`
	MID       int64  `form:"mid" validate:"required"`
	MissionID int64  `form:"mission_id" validate:"required"`
	Tag       string `form:"tag"`
}

ArcMissionParam str

type ArcParam

type ArcParam struct {
	Aid          int64         `json:"aid"`
	Mid          int64         `json:"mid"`
	Author       string        `json:"author"`
	TypeID       int16         `json:"tid"`
	Title        string        `json:"title"`
	Cover        string        `json:"cover"`
	Tag          string        `json:"tag"`
	Copyright    int8          `json:"copyright"`
	Desc         string        `json:"desc"`
	AllowTag     int32         `json:"allow_tag"`
	NoReprint    int32         `json:"no_reprint"`
	UGCPay       int32         `json:"ugcpay"`
	MissionID    int64         `json:"mission_id"`
	FromIP       int64         `json:"from_ip"`
	IPv6         []byte        `json:"ipv6"`
	UpFrom       int8          `json:"up_from"`
	Source       string        `json:"source"`
	DTime        time.Time     `json:"dtime"`
	Videos       []*VideoParam `json:"videos"`
	Staffs       []*StaffParam `json:"staffs"`
	HandleStaff  bool          `json:"handle_staff"`
	CodeMode     bool          `json:"code_mode"`
	OrderID      int64         `json:"order_id"`
	FlowRemark   string        `json:"flow_remark"`
	Dynamic      string        `json:"dynamic"`
	IsDRM        int8          `json:"is_drm"`
	DescFormatID int64         `json:"desc_format_id"`
	Porder       *Porder       `json:"porder"`
	POI          *PoiObj       `json:"poi_object"`
	Vote         *Vote         `json:"vote"`
	Lang         string        `json:"lang"`
}

ArcParam 提交的稿件参数

type ArcReport

type ArcReport struct {
	Mid    int64      `json:"mid"`
	Aid    int64      `json:"aid"`
	Type   int8       `json:"type"`
	Reason string     `json:"reason"`
	Pics   string     `json:"pics"`
	State  int8       `json:"state"`
	CTime  xtime.Time `json:"ctime"`
	MTime  xtime.Time `json:"-"`
}

ArcReport archive_report

type ArcVideos

type ArcVideos struct {
	Archive *Archive `json:"archive"`
	Videos  []*Video `json:"videos"`
}

ArcVideos 稿件及其所属视频

type Archive

type Archive struct {
	Aid          int64         `json:"aid"`
	Mid          int64         `json:"mid"`
	TypeID       int16         `json:"tid"`
	HumanRank    int           `json:"-"`
	Title        string        `json:"title"`
	Author       string        `json:"-"`
	Cover        string        `json:"cover"`
	RejectReason string        `json:"reject_reason"`
	Tag          string        `json:"tag"`
	Duration     int64         `json:"duration"`
	Copyright    int8          `json:"copyright"`
	Desc         string        `json:"desc"`
	MissionID    int64         `json:"mission_id"`
	Round        int8          `json:"-"`
	Forward      int64         `json:"-"`
	Attribute    int32         `json:"attribute"`
	Access       int16         `json:"-"`
	State        int8          `json:"state"`
	Source       string        `json:"source"`
	NoReprint    int32         `json:"no_reprint"`
	UGCPay       int32         `json:"ugcpay"`
	OrderID      int64         `json:"order_id"`
	UpFrom       int8          `json:"up_from"`
	Dynamic      string        `json:"dynamic"`
	DescFormatID int64         `json:"desc_format_id"`
	Porder       *Porder       `json:"porder"`
	Staffs       []*StaffApply `json:"staffs"`
	POI          *PoiObj       `json:"poi_object"`
	Vote         *Vote         `json:"vote"`
	DTime        time.Time     `json:"dtime"`
	PTime        time.Time     `json:"ptime"`
	CTime        time.Time     `json:"ctime"`
	MTime        time.Time     `json:"mtime"`
}

Archive is archive model.

func (*Archive) AttrSet

func (a *Archive) AttrSet(v int32, bit uint)

AttrSet set attribute.

func (*Archive) AttrVal

func (a *Archive) AttrVal(bit uint) int32

AttrVal get attribute.

func (*Archive) NotAllowUp

func (a *Archive) NotAllowUp() bool

NotAllowUp check archive is or not allow update state.

type ArgMsg

type ArgMsg struct {
	MSGID int
	Apply *ApplyParam
}

ArgMsg .

func (*ArgMsg) MsgInfo

func (arg *ArgMsg) MsgInfo(msg *MSG) (mids []int64, title, content, code string)

MsgInfo .

type Delay

type Delay struct {
	Aid   int64
	State int8
	DTime time.Time
}

Delay str

type DescFormat

type DescFormat struct {
	ID         int64  `json:"id"`
	TypeID     int16  `json:"typeid"`
	Copyright  int8   `json:"copyright"`
	Components string `json:"components"`
	Lang       int8   `json:"lang"`
	Platform   int8   `json:"platform"`
}

DescFormat is desc model.

type Dimension

type Dimension struct {
	Width  int64 `json:"width"`
	Height int64 `json:"height"`
	Rotate int64 `json:"rotate"`
}

Dimension Archive video dimension

type Editor

type Editor struct {
	CID    int64 `json:"cid"`
	UpFrom int8  `json:"upfrom"` // filled by backend
	// ids set
	Filters         interface{} `json:"filters"`          // 滤镜
	Fonts           interface{} `json:"fonts"`            //字体
	Subtitles       interface{} `json:"subtitles"`        //字幕
	Bgms            interface{} `json:"bgms"`             //bgm
	Stickers        interface{} `json:"stickers"`         //3d拍摄贴纸
	VideoupStickers interface{} `json:"videoup_stickers"` //2d投稿贴纸
	Transitions     interface{} `json:"trans"`            //视频转场特效
	// switch env 0/1
	Split        int8 `json:"split"`         //视频切片
	Cut          int8 `json:"cut"`           //拿时间窗口切子集
	VideoRotate  int8 `json:"rotate"`        //画面坐标轴变换
	AudioRecord  int8 `json:"audio_record"`  //录音
	Camera       int8 `json:"camera"`        //拍摄
	Speed        int8 `json:"speed"`         //变速
	Beauty       int8 `json:"beauty"`        //美颜特效
	Flashlight   int8 `json:"flashlight"`    //闪光灯
	CameraRotate int8 `json:"camera_rotate"` //摄像头翻转
	CountDown    int8 `json:"countdown"`     //拍摄倒计时
}

Editor str

type Flow

type Flow struct {
	ID     int64           `json:"id"`
	Remark string          `json:"remark"`
	Rank   int64           `json:"rank"`
	Type   int8            `json:"type"`
	Value  json.RawMessage `json:"value"`
	CTime  time.Time       `json:"ctime"`
}

Flow info

type FlowData

type FlowData struct {
	ID         int64     `json:"id"`
	Pool       int8      `json:"pool"`
	OID        int64     `json:"oid"`
	UID        int64     `json:"uid"`
	Parent     int8      `json:"parent"`
	State      int8      `json:"state"`
	GroupID    int64     `json:"group_id"`
	Remark     string    `json:"remark"`
	GroupValue []byte    `json:"group_value"`
	CTime      time.Time `json:"ctime"`
	MTime      time.Time `json:"mtime"`
}

FlowData Flow data

type FlowPagerData

type FlowPagerData struct {
	Items []*FlowData `json:"items"`
	Pager *Pager      `json:"pager,omitempty"`
}

FlowPagerData .

type ForbidAttr

type ForbidAttr struct {
	Aid        int64 `json:"aid"`
	RankV      int32 `json:"rank_attr"`
	DynamicV   int32 `json:"dynamic_attr"`
	RecommendV int32 `json:"recommend_attr"`
	ShowV      int32 `json:"show_attr"`
	SearchV    int32 `json:"search"`
	PushBlogV  int32 `json:"push_blog"`
	// specific
	Rank struct {
		Main      int32 `json:"main"`
		RecentArc int32 `json:"recent_arc"`
		AllArc    int32 `json:"all_arc"`
	} `json:"_"`
	Dynamic struct {
		Main int32 `json:"main"`
	} `json:"-"`
	Recommend struct {
		Main int32 `json:"main"`
	} `json:"-"`
	Show struct {
		Main    int32 `json:"main"`
		Mobile  int32 `json:"mobile"`
		Web     int32 `json:"web"`
		Oversea int32 `json:"oversea"`
		Online  int32 `json:"online"`
	} `json:"-"`
}

ForbidAttr forbid attribute

func (*ForbidAttr) Convert

func (f *ForbidAttr) Convert()

Convert convert db value into attr.

func (*ForbidAttr) Reverse

func (f *ForbidAttr) Reverse()

Reverse reverse attr into db value.

func (*ForbidAttr) SetAttr

func (f *ForbidAttr) SetAttr(name string, v int32, bit uint) (change bool)

SetAttr set forbid attr.

type Index

type Index struct {
	ID   int64        `json:"id"`
	Item []*IndexItem `json:"apply_staff"`
}

type IndexItem

type IndexItem struct {
	DealState     int8  `json:"deal_state"`
	ApplyStaffMID int64 `json:"apply_staff_mid"`
}

type Location

type Location struct {
	Lat float64 `json:"lat"`
	Lng float64 `json:"lng"`
}

Location str

type MSG

type MSG struct {
	To      string
	MSGID   int
	Code    string
	Title   string
	Content string
}

MSG .

type Pager

type Pager struct {
	Num   int64 `json:"num"`
	Size  int64 `json:"size"`
	Total int64 `json:"total"`
}

Pager .

type Pconfig

type Pconfig struct {
	ID   int64  `json:"id"`
	Tp   int8   `json:"type"`
	Name string `json:"name"`
}

Pconfig str

type PoiObj

type PoiObj struct {
	POI           string      `json:"poi"`
	Type          int32       `json:"type"`
	Addr          string      `json:"address"`
	Title         string      `json:"title"`
	ShowTitle     string      `json:"show_title"`
	AdInfo        *AdInfo     `json:"ad_info"`
	Ancestors     []*Ancestor `json:"ancestors"`
	Distance      float64     `json:"distance"`
	ShowDistrance string      `json:"show_distance"`
	Location      *Location   `json:"location"`
}

PoiObj str

type Porder

type Porder struct {
	// for user operation
	FlowID     int64  `json:"flow_id"`
	IndustryID int64  `json:"industry_id"`
	BrandID    int64  `json:"brand_id"`
	BrandName  string `json:"brand_name"`
	Official   int8   `json:"official"`
	ShowType   string `json:"show_type"`
	// for admin operation
	Advertiser string `json:"advertiser"`
	Agent      string `json:"agent"`
	//state 0 自首  1  审核添加
	State int8 `json:"state"`
}

Porder str

type PorderArc

type PorderArc struct {
	AID        int64      `json:"aid"`
	IndustryID int64      `json:"industry_id"`
	BrandID    int64      `json:"brand_id"`
	BrandName  string     `json:"brand_name"`
	Official   int8       `json:"official"`
	ShowType   string     `json:"show_type"`
	Advertiser string     `json:"advertiser"`
	Agent      string     `json:"agent"`
	State      int8       `json:"state"`
	ShowFront  int8       `json:"show_front"`
	Ctime      xtime.Time `json:"ctime"`
	Mtime      xtime.Time `json:"mtime"`
}

PorderArc str

type PubAgentParam

type PubAgentParam struct {
	Route       string `json:"route"`
	Timestamp   string `json:"timestamp"`
	Filename    string `json:"filename"`
	Xcode       int8   `json:"xcode"`
	VideoDesign string `json:"video_design"`
	Submit      int8   `json:"submit"`
}

PubAgentParam 提交的视频参数

type SearchApplyIndex

type SearchApplyIndex struct {
	Indexs []*Index `json:"creative_archive"`
}

type SimpleArchive

type SimpleArchive struct {
	Aid    int64    `json:"aid"`
	Title  string   `json:"title"`
	Mid    int64    `json:"mid"`
	Videos []*Video `json:"videos,omitempty"`
}

SimpleArchive str

type SimpleVideo

type SimpleVideo struct {
	Cid    int64     `json:"cid"`
	Index  int       `json:"part_id"`
	Title  string    `json:"part_name"`
	Status int16     `json:"status"`
	MTime  time.Time `json:"dm_modified"`
}

SimpleVideo for Archive History

type Staff

type Staff struct {
	ID           int64  `json:"id"`
	AID          int64  `json:"aid"`
	MID          int64  `json:"mid"`
	StaffMID     int64  `json:"staff_mid"`
	StaffTitle   string `json:"staff_title"`
	StaffName    string `json:"staff_name"`
	StaffTitleID int64  `json:"staff_title_id"`
	State        int8   `json:"state"`
}

Staff . 正式staff

func (*Staff) Copy

func (s *Staff) Copy(v *ApplyParam)

Copy . apply转化成staff

type StaffApply

type StaffApply struct {
	ID            int64  `json:"id"`
	Type          int8   `json:"apply_type"`
	ASID          int64  `json:"apply_as_id"`
	ApplyAID      int64  `json:"apply_aid"`
	ApplyUpMID    int64  `json:"apply_up_mid"`
	ApplyStaffMID int64  `json:"apply_staff_mid"`
	ApplyTitle    string `json:"apply_title"`
	ApplyTitleID  int64  `json:"apply_title_id"`
	State         int8   `json:"apply_state"`
	DealState     int8   `json:"deal_state"`
	StaffState    int8   `json:"staff_state"`
	StaffTitle    string `json:"staff_title"`
}

StaffApply 申请单

type StaffBatchParam

type StaffBatchParam struct {
	AID      int64         `json:"aid"`
	SyncAttr bool          `json:"sync_attr"`
	Staffs   []*StaffParam `json:"staffs"`
}

StaffBatchParam 批量提交的staff参数

type StaffParam

type StaffParam struct {
	//apply_id 建议前端传 为后面预留
	ApplyID int64  `json:"apply_id"`
	Title   string `json:"title"`
	MID     int64  `json:"mid"`
	TitleID int64  `json:"title_id"`
}

StaffParam 提交的staff参数

type Type

type Type struct {
	ID   int16  `json:"id"`
	PID  int16  `json:"pid"`
	Name string `json:"name"`
	Desc string `json:"description"`
}

Type info

type Up

type Up struct {
	ID        int64     `json:"id"`
	GroupID   int64     `json:"group_id"`
	GroupName string    `json:"group_name" `
	GroupTag  string    `json:"group_tag"`
	Mid       int64     `json:"mid"`
	Note      string    `json:"note"`
	CTime     time.Time `json:"ctime"`
}

Up str

type UpArchives

type UpArchives struct {
	Count int64   `json:"count"`
	Aids  []int64 `json:"aids"`
}

UpArchives upper主的稿件ID和个数

type Video

type Video struct {
	ID           int64      `json:"-"`
	Aid          int64      `json:"aid"`
	Title        string     `json:"title"`
	Desc         string     `json:"desc"`
	Filename     string     `json:"filename"`
	SrcType      string     `json:"src_type"`
	Cid          int64      `json:"cid"`
	Sid          int64      `json:"-"`
	Duration     int64      `json:"duration"`
	Filesize     int64      `json:"-"`
	Resolutions  string     `json:"-"`
	Index        int        `json:"index"`
	Playurl      string     `json:"-"`
	Status       int16      `json:"status"`
	FailCode     int8       `json:"fail_code"`
	XcodeState   int8       `json:"xcode_state"`
	Attribute    int32      `json:"-"`
	RejectReason string     `json:"reject_reason"`
	CTime        time.Time  `json:"ctime"`
	MTime        time.Time  `json:"-"`
	Dimension    *Dimension `json:"dimension"`
}

Video is archive_video model.

type VideoFn

type VideoFn struct {
	Cid      int64     `json:"cid"`
	Filename string    `json:"filename"`
	CTime    time.Time `json:"ctime"`
	MTime    time.Time `json:"mtime"`
}

VideoFn for Archive Video table filename check

type VideoHistory

type VideoHistory struct {
	ID       int64  `json:"-"`
	Aid      int64  `json:"-"`
	Cid      int64  `json:"cid"`
	Hid      int64  `json:"-"`
	Title    string `json:"title"`
	Desc     string `json:"desc"`
	Filename string `json:"filename"`
}

VideoHistory video edit history.

type VideoParam

type VideoParam struct {
	Title    string  `json:"title"`
	Desc     string  `json:"desc"`
	Filename string  `json:"filename"`
	Cid      int64   `json:"cid"`
	Sid      int64   `json:"sid"`
	SrcType  string  `json:"src_type"`
	IsDRM    int8    `json:"is_drm"`
	Editor   *Editor `json:"editor"`
}

VideoParam 提交的视频参数

func (*VideoParam) UnmarshalJSON

func (vp *VideoParam) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON fn

type VideosEditor

type VideosEditor struct {
	sync.Mutex
	// contains filtered or unexported fields
}

VideosEditor 处理超多分p的稿件编辑 * 0.对该稿件的编辑操作加锁 * 1.将所有视频分组分事务更新 * 2.全部更新成功后发送成功信号量 * 3.更新错误的分组多次尝试,超时或超过次数后失败 * 4.收到更新成功信号量进行回调-(1.同步信息给视频云 2.解锁该稿件编辑) * 5.收到更新失败信号量进行回调- (1.记录错误日志信息 2.推送错误消息 3.解锁该稿件编辑)

func NewEditor

func NewEditor(failTH int) *VideosEditor

NewEditor new VideosEditor

func (*VideosEditor) Add

func (m *VideosEditor) Add(aid int64, cbSuccess, cbFail func(), timeout xtime.Duration, retrys ...func() (int64, int, int, error))

Add add to editor

func (*VideosEditor) Close

func (m *VideosEditor) Close()

Close 等待所有消息消费完才退出

type Vote

type Vote struct {
	VoteID    int64  `json:"vote_id"`
	VoteTitle string `json:"vote_title"`
}

Vote .

Jump to

Keyboard shortcuts

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