Documentation ¶
Index ¶
- Constants
- Variables
- func CheckPublic(state int8) bool
- func IsDefault(state int8) bool
- type Archive
- type CanelMessage
- type Cover
- type Favorite
- type Favorites
- type Music
- type MusicResult
- type NewCount
- type NewFolder
- type NewFolderSort
- type NewRelation
- type OldCount
- type OldFolder
- type OldFolderSort
- type OldVideo
- type PlayReport
- type StatCount
- type StatMsg
- type Stime
- type VideoFolder
Constants ¶
View Source
const ( // CacheNotFound . CacheNotFound = -1 // SyncInsert binlog action. SyncInsert = "insert" // SyncUpdate binlog action. SyncUpdate = "update" // SyncDelete binlog action. SyncDelete = "delete" )
View Source
const ( // type FieldFav = "folder" FieldArc = "video" FieldResource = "resource" // action ActionAdd = "add" ActionDel = "del" ActionMove = "move" ActionCopy = "copy" ActionMdel = "mdel" ActionIndef = "indef" ActionIncol = "incol" ActionClean = "clean" ActionInitRelationFids = "initRelationFids" ActionInitFolderRelations = "initFolderRelations" )
View Source
const ( // StateDefaultPublic default public folder. StateDefaultPublic = int8(0) // binary 00 / int 0 // StateDefaultNoPublic default private folder. StateDefaultNoPublic = int8(0) | bit1 // binary 01 / int 1 // StateNormalPublic nomal public folder. StateNormalPublic = bit2 | int8(0) // binary 10 / int 2 // StateNormalNoPublic nomal private folder. StateNormalNoPublic = bit2 | bit1 // binary 11 / int 3 // DefaultFolderName name of favorite folder. DefaultFolderName = "默认收藏夹" )
Variables ¶
View Source
var ( // ErrFavResourceExist error this has been favoured. ErrFavResourceExist = errors.New("error this has been favoured") // ErrFavResourceAlreadyDel error this has been unfavoured. ErrFavResourceAlreadyDel = errors.New("error this has been unfavoured") )
View Source
var ( // ErrFavVideoExist error video has been favoured. ErrFavVideoExist = errors.New("error video has been favoured") // ErrFavVideoAlreadyDel error video has been unfavoured. ErrFavVideoAlreadyDel = errors.New("error video has been unfavoured") )
Functions ¶
func CheckPublic ¶
CheckPublic check user update public value in [0, 1].
Types ¶
type Archive ¶
type Archive struct { ID int64 `json:"id"` Mid int64 `json:"mid"` Fid int64 `json:"fid"` Aid int64 `json:"aid"` CTime time.Time `json:"-"` MTime time.Time `json:"-"` }
Archive .
type CanelMessage ¶
type CanelMessage struct { Action string `json:"action"` Table string `json:"table"` New json.RawMessage `json:"new"` Old json.RawMessage `json:"old"` }
CanelMessage binlog message.
type Favorite ¶
type Favorite struct { Fid int64 `json:"fid"` Mid int64 `json:"mid"` Name string `json:"name"` MaxCount int `json:"max_count"` CurCount int `json:"cur_count"` AttenCount int `json:"atten_count"` State int8 `json:"state"` CTime time.Time `json:"ctime"` MTime time.Time `json:"-"` Cover []*Cover `json:"cover,omitempty"` }
Favorite .
type MusicResult ¶
type NewCount ¶
type NewCount struct { ID int64 `json:"id"` Type int8 `json:"type"` Oid int64 `json:"oid"` Count int64 `json:"count"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
NewCount .
type NewFolder ¶
type NewFolder struct { ID int64 `json:"id"` Type int8 `json:"type"` Mid int64 `json:"mid"` Name string `json:"name"` Count int `json:"count"` Attr int8 `json:"attr"` State int8 `json:"state"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
NewFolder .
type NewFolderSort ¶
type NewFolderSort struct { ID int64 `json:"id"` Type int8 `json:"type"` Mid int64 `json:"mid"` Sort []byte `json:"sort"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
NewFolderSort .
type NewRelation ¶
type NewRelation struct { ID int64 `json:"id"` Type int8 `json:"type"` Mid int64 `json:"mid"` Fid int64 `json:"fid"` Oid int64 `json:"oid"` State int8 `json:"state"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
NewRelation .
type OldCount ¶
type OldCount struct { ID int64 `json:"id"` Aid int64 `json:"aid"` Count int64 `json:"count"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
OldCount .
type OldFolder ¶
type OldFolder struct { ID int64 `json:"id"` Mid int64 `json:"mid"` Name string `json:"name"` CurCount int `json:"cur_count"` State int8 `json:"state"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
OldFolder .
type OldFolderSort ¶
type OldFolderSort struct { ID int64 `json:"id"` Mid int64 `json:"mid"` Sort string `json:"sort"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
OldFolderSort .
type OldVideo ¶
type OldVideo struct { ID int64 `json:"id"` Mid int64 `json:"mid"` Fid int64 `json:"fid"` Aid int64 `json:"aid"` CTime Stime `json:"ctime"` MTime Stime `json:"mtime"` }
OldVideo .
type PlayReport ¶
type PlayReport struct { ID int64 `json:"id"` Mid int64 `json:"mid"` LV string `json:"lv"` IP string `json:"ip"` Buvid string `json:"buvid"` DeviceID string `json:"device_id"` UA string `json:"ua"` Refer string `json:"refer"` TS int64 `json:"ts"` }
PlayReport .
type StatCount ¶
type StatCount struct { Type string `json:"type"` ID int64 `json:"id"` Count int64 `json:"count"` DisLike int64 `json:"dislike_count"` TimeStamp int64 `json:"timestamp"` }
StatCount .
type Stime ¶
type Stime int64
Stime .
func (*Stime) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.