Documentation
¶
Index ¶
- Constants
- Variables
- func BitDesc(bit uint) (desc string)
- func InAttr(attr int32) (ok bool)
- func InCopyrights(cp int8) (ok bool)
- func InOverseaType(typeID int16) (ok bool)
- type AdInfo
- type Addit
- type Alert
- type Ancestor
- type ApplyParam
- type ArcDynamicParam
- type ArcHistory
- type ArcMissionParam
- type ArcParam
- type ArcReport
- type ArcVideos
- type Archive
- type ArgMsg
- type Delay
- type DescFormat
- type Dimension
- type Editor
- type Flow
- type FlowData
- type FlowPagerData
- type ForbidAttr
- type Index
- type IndexItem
- type Location
- type MSG
- type Pager
- type Pconfig
- type PoiObj
- type Porder
- type PorderArc
- type PubAgentParam
- type SearchApplyIndex
- type SimpleArchive
- type SimpleVideo
- type Staff
- type StaffApply
- type StaffBatchParam
- type StaffParam
- type Type
- type Up
- type UpArchives
- type Video
- type VideoFn
- type VideoHistory
- type VideoParam
- type VideosEditor
- type Vote
Constants ¶
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
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 .
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
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 .
const ( ArcReportNew = int8(0) ArcReportReject = int8(1) ArcReportAccept = int8(2) )
const ArcReport
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 .
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
const (
BIZPOI = int64(1)
)
BIZPOI 1
const ( // BIZVote Business Type Vote BIZVote = int64(2) )
Variables ¶
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 InOverseaType ¶
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 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 提交申请单参数
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 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) NotAllowUp ¶
NotAllowUp check archive is or not allow update state.
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
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
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 ¶
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 ¶
VideosEditor 处理超多分p的稿件编辑 * 0.对该稿件的编辑操作加锁 * 1.将所有视频分组分事务更新 * 2.全部更新成功后发送成功信号量 * 3.更新错误的分组多次尝试,超时或超过次数后失败 * 4.收到更新成功信号量进行回调-(1.同步信息给视频云 2.解锁该稿件编辑) * 5.收到更新失败信号量进行回调- (1.记录错误日志信息 2.推送错误消息 3.解锁该稿件编辑)