Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
proto_library(
name = "api_proto",
srcs = ["api.proto"],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "api_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/interface/bbq/bullet/api",
proto = ":api_proto",
tags = ["automanaged"],
deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = [],
embed = [":api_go_proto"],
importpath = "go-common/app/interface/bbq/bullet/api",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
syntax = "proto3";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
package bbq.interface.bullet.v1;
option go_package = "api";
option (gogoproto.goproto_getters_all) = false;
message DataReport {
string app = 1 [(gogoproto.jsontag) = "mobi_app", (gogoproto.moretags)='form:"mobi_app"'];
string client = 2 [(gogoproto.jsontag) = "platform", (gogoproto.moretags)='form:"platform"'];
string version = 3 [(gogoproto.jsontag) = "version", (gogoproto.moretags)='form:"version"'];
string channel = 4 [(gogoproto.jsontag) = "channel", (gogoproto.moretags)='form:"channel"'];
string location = 5 [(gogoproto.jsontag) = "location", (gogoproto.moretags)='form:"location"'];
string query_id = 6 [(gogoproto.jsontag) = "query_id", (gogoproto.moretags)='form:"query_id"'];
string buvid = 7 [(gogoproto.jsontag) = "buvid", (gogoproto.moretags)='form:"buvid"'];
int64 svid = 8 [(gogoproto.jsontag) = "svid", (gogoproto.moretags)='form:"oid"'];
int32 total_duration = 9 [(gogoproto.jsontag) = "total_duration", (gogoproto.moretags)='form:"total_duration"'];
int32 play_duration = 10 [(gogoproto.jsontag) = "duration", (gogoproto.moretags)='form:"duration"'];
int32 data_type = 11 [(gogoproto.jsontag) = "data_type", (gogoproto.moretags)='form:"data_type"'];
int32 page = 12 [(gogoproto.jsontag) = "page_id", (gogoproto.moretags)='form:"page_id"'];
int32 module = 13 [(gogoproto.jsontag) = "module_id", (gogoproto.moretags)='form:"module_id"'];
}
message ListBulletReq {
int64 oid = 1 [(gogoproto.moretags)='form:"oid"'];
int32 start_ms = 2 [(gogoproto.moretags)='form:"start_ms"'];
int32 end_ms = 3 [(gogoproto.moretags)='form:"end_ms"'];
string cursor_next = 4 [(gogoproto.moretags)='form:"cursor_next"'];
int64 mid = 5;
}
message Bullet {
int64 id = 1;
int64 oid = 2[(gogoproto.moretags)='form:"oid"'];
int64 mid = 3[(gogoproto.jsontag) = "mid", (gogoproto.moretags)='form:"mid"'];
int32 offset_ms = 4[(gogoproto.jsontag) = "offset_ms", (gogoproto.moretags)='form:"offset_ms"'];
int32 offset = 5;
string content = 6[(gogoproto.jsontag) = "content", (gogoproto.moretags)='form:"content"'];
string cursor_value = 7[(gogoproto.jsontag) = "cursor_value,omitempty"];
}
message ListBulletReply {
bool has_more = 1 [(gogoproto.jsontag) = "has_more"];
repeated Bullet list = 2 [(gogoproto.jsontag) = "list,omitempty"];
}