Documentation ¶
Index ¶
- type AccessTokenInfo
- type ChatInsert
- type ChatOutgoing
- type Comment
- type CommentBody
- type CommentInsert
- type Like
- type LikeBody
- type NotificationOutgoing
- type Response
- type SubscribeBody
- type Subscription
- type Token
- type User
- type UserDetail
- type UserItem
- type UserRegister
- type Video
- type VideoEdit
- type VideoEditForm
- type VideoInsert
- type VideoUpload
- type VideoUploadForm
- type WebSocketMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenInfo ¶
type ChatInsert ¶
type ChatOutgoing ¶
type ChatOutgoing struct { Author string `json:"author"` Chat string `json:"chat"` CreatedAt time.Time `json:"created_at"` }
WS chat message
type CommentBody ¶
type CommentInsert ¶
type NotificationOutgoing ¶
type NotificationOutgoing struct { Message string `json:"message"` Name string `json:"name"` Username string `json:"username"` Hash string `json:"hash"` CreatedAt time.Time `json:"created_at"` }
WS notification message
type Response ¶
type Response struct { Data interface{} `json:"data"` Error string `json:"error,omitempty"` Code int `json:"code"` }
API response wrapper
type SubscribeBody ¶
type Subscription ¶
type UserDetail ¶
type UserRegister ¶
type UserRegister struct {
IDToken string `json:"id_token"`
}
type Video ¶
type Video struct { ID primitive.ObjectID `json:"-" bson:"_id"` Hash string `json:"hash" bson:"hash"` // used for querying Type string `json:"type" bson:"type"` // "live" or "vod" Title string `json:"title" bson:"title"` Author UserItem `json:"author" bson:"author"` Description string `json:"description" bson:"description"` Tags []string `json:"tags" bson:"tags"` Views int `json:"views" bson:"views"` Duration int64 `json:"duration,omitempty" bson:"duration"` // only for VODs IsLive bool `json:"is_live" bson:"is_live"` // only for Live Unlisted bool `json:"unlisted" bson:"unlisted"` Pending bool `json:"pending" bson:"pending"` Resolutions int `json:"resolutions" bson:"resolutions"` // 0:None, 1:180p, 2:360p, 3:480p, 4:720p, 5:1080p, only for VODs Likes int `json:"likes" bson:"likes"` Liked bool `json:"liked" bson:"-"` Subscribed bool `json:"subscribed" bson:"-"` Comments []Comment `json:"comments" bson:"-"` CreatedAt time.Time `json:"created_at" bson:"created_at"` }
type VideoEditForm ¶
type VideoInsert ¶
type VideoInsert struct { ID primitive.ObjectID `bson:"_id"` Hash string `bson:"hash"` // used for querying Type string `bson:"type"` // "live" or "vod" Title string `bson:"title"` Author string `bson:"author"` Description string `bson:"description"` Tags []string `bson:"tags"` Views int `json:"views" bson:"views"` IsLive bool `bson:"is_live"` // only for Live, always set to true for VODs Unlisted bool `bson:"unlisted"` Resolutions int `bson:"resolutions"` // 0:None, 1:180p, 2:360p, 3:480p, 4:720p, 5:1080p, only for VODs CreatedAt time.Time `bson:"created_at"` }
type VideoUpload ¶
type VideoUploadForm ¶
type WebSocketMessage ¶
type WebSocketMessage struct { Type string `json:"type"` Data interface{} `json:"data"` Code int `json:"code"` }
WS message wrapper
Source Files ¶
Click to show internal directories.
Click to hide internal directories.