Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"api.go",
"play.go",
],
importpath = "go-common/app/service/bbq/video/api/http/v1",
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,12 @@
package v1
// ViewsAddRequest .
type ViewsAddRequest struct {
Svid int64 `json:"svid" form:"svid" validate:"required"`
Views int `json:"views" form:"views"`
}
// ViewsAddResponse .
type ViewsAddResponse struct {
Affected int64 `json:"affected"`
}

View File

@@ -0,0 +1,28 @@
package v1
// VideoPlay playinfo
type VideoPlay struct {
SVID int64 `json:"svid"`
ExpireTime int64 `json:"expire_time"` //过期时间
FileInfo []*FileInfo `json:"file_info"` //分片信息
Quality int64 `json:"quality"` //清晰度
SupportQuality []int64 `json:"support_quality"` //支持清晰度
URL string `json:"url"` //基础url
CurrentTime int64 `json:"current_time"` //当前时间戳
}
// FileInfo bvc fileinfo
type FileInfo struct {
Ahead string `json:"ahead"`
FileSize int64 `json:"filesize"`
TimeLength int64 `json:"timelength"`
Vhead string `json:"vhead"`
Path string `json:"path"`
URL string `json:"url"`
URLBc string `json:"url_bc"`
}
//VideoPlayRequest ..
type VideoPlayRequest struct {
SIVD []int64 `json:"svid" form:"svid" validate:"required"`
}