json

package
v0.0.0-...-385762f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2021 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildWithJson

func BuildWithJson()

func BuildWithJsoniter

func BuildWithJsoniter()

func ElapseTimeMs

func ElapseTimeMs(start time.Time) float32

Types

type PlaybackAuthorInfo

type PlaybackAuthorInfo struct {
	UserId       int64  `json:"user_id" bson:"user_id"`
	LoginName    string `json:"login_name" bson:"loginname"`
	Avatar       string `json:"pic" bson:"avatar"`
	Fans         int    `json:"fans" bson:"fans"`
	FollowStatus int    `json:"follow_status" bson:"-"`
}

回放视频的作者信息

type PlaybackThumbnail

type PlaybackThumbnail struct {
	Url    string `json:"url" bson:"url"`
	Row    int    `json:"row" bson:"row"`
	Width  int    `json:"width" bson:"width"`
	Height int    `json:"height" bson:"height"`
	Col    int    `json:"col" bson:"col"`
}

type PlaybackVideoDefinitionUrl

type PlaybackVideoDefinitionUrl struct {
	Definition string `json:"definition" bson:"definition"` // 视频清晰度
	Url        string `json:"url" bson:"url"`               // 视频清晰度对应播放地址
}

@Title @Description @Author xiaokunliu 2021/1/7 下午11:35 @Update xiaokunliu 2021/1/7 下午11:35

type PlaybackVideoModel

type PlaybackVideoModel struct {
	VId           string                       `json:"v_id" bson:"_id"`                                  // 视频ID,作为视频的唯一标识
	UserId        int64                        `json:"user_id" bson:"user_id"`                           // 视频发布者ID
	Country       string                       `json:"country" bson:"country"`                           // 视频发布者的国家
	LiveId        string                       `json:"-" bson:"live_id"`                                 // 直播ID
	PublishTime   int64                        `json:"publish_time" bson:"publish_time"`                 // 回放视频的直播开播时间
	SourceUrl     string                       `json:"source_url" bson:"source_url"`                     // 原始视频地址
	VideoLink     []PlaybackVideoDefinitionUrl `json:"video_link" bson:"video_link"`                     // 视频播放地址
	SourcePartUrl []PlaybackVideoSourcePart    `json:"source_part_url,omitempty" bson:"source_part_url"` // 原视频切割多分地址
	VideoPic      string                       `json:"video_pic" bson:"video_pic"`                       // 视频封面地址
	Title         string                       `json:"title" bson:"title"`                               // 视频标题
	ViewNum       int                          `json:"view_num" bson:"view_num"`                         // 视频观看量
	RealViewNum   int                          `json:"-" bson:"real_view_num"`                           // 视频真实播放量
	Status        int                          `json:"status" bson:"status"`                             // 视频状态
	AuthorInfo    *PlaybackAuthorInfo          `json:"author_info" bson:"author_info"`                   // 视频作者信息
	VideoLength   int                          `json:"video_length" bson:"video_length"`                 // 视频长度
	DeleteDate    *time.Time                   `json:"-" bson:"delete_date"`                             // 视频删除日期
	Bucket        string                       `json:"-" bson:"bucket"`                                  // 资源储存分桶
	Like          int64                        `json:"like" bson:"like"`                                 // 点赞数
	Thumbnail     *PlaybackThumbnail           `json:"thumbnail,omitempty" bson:"thumbnail"`             // 保存视频回放缩略图信息
	CommentNums   int64                        `json:"comment_nums" bson:"comment_nums,omitempty"`
	ShareUrl      string                       `json:"share_url"`
}

func BuildPlaybackVideoModel

func BuildPlaybackVideoModel(num int) (models []PlaybackVideoModel)

type PlaybackVideoSourcePart

type PlaybackVideoSourcePart struct {
	Part     int64  `json:"part" bson:"part"`
	FileSize int64  `json:"file_size" bson:"file_size"`
	Url      string `json:"url" bson:"url"`
}

Jump to

Keyboard shortcuts

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