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,69 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/AppIndex.proto
/*
Package v1 is a generated liverpc stub package.
This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
It is generated from these files:
v1/AppIndex.proto
v1/Area.proto
v1/Room.proto
v1/RoomEx.proto
v1/RoomMng.proto
v1/RoomPendant.proto
v1/RoomRecommend.proto
v1/Skin.proto
*/
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// Imports only used by utility functions:
// ==================
// AppIndex Interface
// ==================
type AppIndexRPCClient interface {
// * 根据moduleId查common房间列表
//
GetListByIds(ctx context.Context, req *AppIndexGetListByIdsReq, opts ...liverpc.CallOption) (resp *AppIndexGetListByIdsResp, err error)
}
// ========================
// AppIndex Live Rpc Client
// ========================
type appIndexRPCClient struct {
client *liverpc.Client
}
// NewAppIndexRPCClient creates a client that implements the AppIndexRPCClient interface.
func NewAppIndexRPCClient(client *liverpc.Client) AppIndexRPCClient {
return &appIndexRPCClient{
client: client,
}
}
func (c *appIndexRPCClient) GetListByIds(ctx context.Context, in *AppIndexGetListByIdsReq, opts ...liverpc.CallOption) (*AppIndexGetListByIdsResp, error) {
out := new(AppIndexGetListByIdsResp)
err := doRPCRequest(ctx, c.client, 1, "AppIndex.getListByIds", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
// =====
// Utils
// =====
func doRPCRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message, opts []liverpc.CallOption) (err error) {
err = client.Call(ctx, version, method, in, out, opts...)
return
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,81 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service AppIndex {
/** 根据moduleId查common房间列表
*
*/
rpc getListByIds (AppIndexGetListByIdsReq) returns (AppIndexGetListByIdsResp);
}
message AppIndexGetListByIdsReq {
//
repeated int64 ids = 1 [(gogoproto.jsontag) = "ids"];
}
message AppIndexGetListByIdsResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
map<int64, RoomList> data = 3 [(gogoproto.jsontag) = "data"];
message RoomInfo {
// 房间id
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 房间标题
string title = 2 [(gogoproto.jsontag) = "title"];
// 用户名
string uname = 3 [(gogoproto.jsontag) = "uname"];
// 在线人数
int64 online = 4 [(gogoproto.jsontag) = "online"];
// 封面封面现在有3种关键帧、封面图、秀场封面正方形的返回哪个由后端决定
string cover = 5 [(gogoproto.jsontag) = "cover"];
// 链接
string link = 6 [(gogoproto.jsontag) = "link"];
// 主播头像
string face = 7 [(gogoproto.jsontag) = "face"];
// 父分区id
int64 area_v2_parent_id = 8 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 父分区名称
string area_v2_parent_name = 9 [(gogoproto.jsontag) = "area_v2_parent_name"];
// 二级分区id
int64 area_v2_id = 10 [(gogoproto.jsontag) = "area_v2_id"];
// 二级分区名
string area_v2_name = 11 [(gogoproto.jsontag) = "area_v2_name"];
// 秒开播放串 h264
string play_url = 12 [(gogoproto.jsontag) = "play_url"];
// 秒开播放串 h265
string play_url_h265 = 13 [(gogoproto.jsontag) = "play_url_h265"];
// 当前清晰度,清晰度 0:默认码率, 2:800 3:1500 4:原画
int64 current_quality = 14 [(gogoproto.jsontag) = "current_quality"];
// 当前拥有清晰度列表
repeated int64 accept_quality = 15 [(gogoproto.jsontag) = "accept_quality"];
// 横竖屏 0:横屏 1:竖屏 -1:异常情况
int64 broadcast_type = 16 [(gogoproto.jsontag) = "broadcast_type"];
// 新版角标-右上 默认为空 只能是文字!!!@古月 【5.29显示更新】服务端还是吐右上兼容老版5.29显示在左上
string pendent_ru = 17 [(gogoproto.jsontag) = "pendent_ru"];
// 【5.29显示更新】服务端还是吐右上5.29客户端显示在左上,对应的背景图片
string pendent_ru_pic = 18 [(gogoproto.jsontag) = "pendent_ru_pic"];
// 新版移动端角标色值-右上
string pendent_ru_color = 19 [(gogoproto.jsontag) = "pendent_ru_color"];
// 推荐类型 1人气 2营收 3运营强推 4天马推荐暂定用于客户端打点
int64 rec_type = 20 [(gogoproto.jsontag) = "rec_type"];
// 当前房间pk_id默认0 用于客户端打点
int64 pk_id = 21 [(gogoproto.jsontag) = "pk_id"];
}
message RoomList {
//
repeated RoomInfo list = 1 [(gogoproto.jsontag) = "list"];
}
}

View File

@@ -0,0 +1,58 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/Area.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// ==============
// Area Interface
// ==============
type AreaRPCClient interface {
// * 获取父分区列表
//
GetParentList(ctx context.Context, req *AreaGetParentListReq, opts ...liverpc.CallOption) (resp *AreaGetParentListResp, err error)
// * 获取分区详情
//
GetDetail(ctx context.Context, req *AreaGetDetailReq, opts ...liverpc.CallOption) (resp *AreaGetDetailResp, err error)
}
// ====================
// Area Live Rpc Client
// ====================
type areaRPCClient struct {
client *liverpc.Client
}
// NewAreaRPCClient creates a client that implements the AreaRPCClient interface.
func NewAreaRPCClient(client *liverpc.Client) AreaRPCClient {
return &areaRPCClient{
client: client,
}
}
func (c *areaRPCClient) GetParentList(ctx context.Context, in *AreaGetParentListReq, opts ...liverpc.CallOption) (*AreaGetParentListResp, error) {
out := new(AreaGetParentListResp)
err := doRPCRequest(ctx, c.client, 1, "Area.getParentList", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *areaRPCClient) GetDetail(ctx context.Context, in *AreaGetDetailReq, opts ...liverpc.CallOption) (*AreaGetDetailResp, error) {
out := new(AreaGetDetailResp)
err := doRPCRequest(ctx, c.client, 1, "Area.getDetail", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,78 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service Area {
/** 获取父分区列表
*
*/
rpc getParentList (AreaGetParentListReq) returns (AreaGetParentListResp);
/** 获取分区详情
*
*/
rpc getDetail (AreaGetDetailReq) returns (AreaGetDetailResp);
}
message AreaGetParentListReq {
// 1播端 2看端
int64 source_id = 1 [(gogoproto.jsontag) = "source_id"];
}
message AreaGetParentListResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
repeated Info data = 3 [(gogoproto.jsontag) = "data"];
message Info {
// 父分区id
int64 id = 1 [(gogoproto.jsontag) = "id"];
// 父分区名字
string name = 2 [(gogoproto.jsontag) = "name"];
}
}
message AreaGetDetailReq {
// id表示二级分区id
int64 id = 1 [(gogoproto.jsontag) = "id"];
}
message AreaGetDetailResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
// 分区详情信息
AreaInfo data = 3 [(gogoproto.jsontag) = "data"];
message AreaInfo {
// 分区id
string id = 1 [(gogoproto.jsontag) = "id"];
// 父分区id
string parent_id = 2 [(gogoproto.jsontag) = "parent_id"];
// 对应的老分区id
string old_area_id = 3 [(gogoproto.jsontag) = "old_area_id"];
// 分区名称
string name = 4 [(gogoproto.jsontag) = "name"];
// 父分区名称
string parent_name = 5 [(gogoproto.jsontag) = "parent_name"];
// 绑定的活动id
string act_id = 6 [(gogoproto.jsontag) = "act_id"];
// 0 默认 1 最热
string hot_status = 7 [(gogoproto.jsontag) = "hot_status"];
// 分区图标
string pic = 8 [(gogoproto.jsontag) = "pic"];
}
}

View File

@@ -0,0 +1,74 @@
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 = "v1_proto",
srcs = [
"AppIndex.proto",
"Area.proto",
"Room.proto",
"RoomEx.proto",
"RoomMng.proto",
"RoomPendant.proto",
"RoomRecommend.proto",
"Skin.proto",
],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "v1_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
importpath = "go-common/app/service/live/room/api/liverpc/v1",
proto = ":v1_proto",
tags = ["automanaged"],
deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = [
"AppIndex.liverpc.go",
"Area.liverpc.go",
"Room.liverpc.go",
"RoomEx.liverpc.go",
"RoomMng.liverpc.go",
"RoomPendant.liverpc.go",
"RoomRecommend.liverpc.go",
"Skin.liverpc.go",
],
embed = [":v1_go_proto"],
importpath = "go-common/app/service/live/room/api/liverpc/v1",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//library/net/rpc/liverpc:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@com_github_golang_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"],
)

View File

@@ -0,0 +1,97 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/Room.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// ==============
// Room Interface
// ==============
type RoomRPCClient interface {
// * 给大数据用的全量接口
//
AllLiveForBigdata(ctx context.Context, req *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (resp *RoomAllLiveForBigdataResp, err error)
// * 根据房间id获取房间信息
//
GetInfoById(ctx context.Context, req *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (resp *RoomGetInfoByIdResp, err error)
// * uid获取房间信息
//
GetStatusInfoByUids(ctx context.Context, req *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (resp *RoomGetStatusInfoByUidsResp, err error)
// * 获取移动端房间页初始化信息
//
MobileRoomInit(ctx context.Context, req *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (resp *RoomMobileRoomInitResp, err error)
// * 房间发送弹幕数累加
//
IncrDanmuSendNum(ctx context.Context, req *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (resp *RoomIncrDanmuSendNumResp, err error)
}
// ====================
// Room Live Rpc Client
// ====================
type roomRPCClient struct {
client *liverpc.Client
}
// NewRoomRPCClient creates a client that implements the RoomRPCClient interface.
func NewRoomRPCClient(client *liverpc.Client) RoomRPCClient {
return &roomRPCClient{
client: client,
}
}
func (c *roomRPCClient) AllLiveForBigdata(ctx context.Context, in *RoomAllLiveForBigdataReq, opts ...liverpc.CallOption) (*RoomAllLiveForBigdataResp, error) {
out := new(RoomAllLiveForBigdataResp)
err := doRPCRequest(ctx, c.client, 1, "Room.all_live_for_bigdata", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) GetInfoById(ctx context.Context, in *RoomGetInfoByIdReq, opts ...liverpc.CallOption) (*RoomGetInfoByIdResp, error) {
out := new(RoomGetInfoByIdResp)
err := doRPCRequest(ctx, c.client, 1, "Room.get_info_by_id", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) GetStatusInfoByUids(ctx context.Context, in *RoomGetStatusInfoByUidsReq, opts ...liverpc.CallOption) (*RoomGetStatusInfoByUidsResp, error) {
out := new(RoomGetStatusInfoByUidsResp)
err := doRPCRequest(ctx, c.client, 1, "Room.get_status_info_by_uids", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) MobileRoomInit(ctx context.Context, in *RoomMobileRoomInitReq, opts ...liverpc.CallOption) (*RoomMobileRoomInitResp, error) {
out := new(RoomMobileRoomInitResp)
err := doRPCRequest(ctx, c.client, 1, "Room.mobileRoomInit", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRPCClient) IncrDanmuSendNum(ctx context.Context, in *RoomIncrDanmuSendNumReq, opts ...liverpc.CallOption) (*RoomIncrDanmuSendNumResp, error) {
out := new(RoomIncrDanmuSendNumResp)
err := doRPCRequest(ctx, c.client, 1, "Room.incrDanmuSendNum", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,272 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service Room {
/** 给大数据用的全量接口
*
*/
rpc all_live_for_bigdata (RoomAllLiveForBigdataReq) returns (RoomAllLiveForBigdataResp);
/** 根据房间id获取房间信息
*
*/
rpc get_info_by_id (RoomGetInfoByIdReq) returns (RoomGetInfoByIdResp);
/** uid获取房间信息
*
*/
rpc get_status_info_by_uids (RoomGetStatusInfoByUidsReq) returns (RoomGetStatusInfoByUidsResp);
/** 获取移动端房间页初始化信息
*
*/
rpc mobileRoomInit (RoomMobileRoomInitReq) returns (RoomMobileRoomInitResp);
/** 房间发送弹幕数累加
*
*/
rpc incrDanmuSendNum (RoomIncrDanmuSendNumReq) returns (RoomIncrDanmuSendNumResp);
}
message RoomAllLiveForBigdataReq {
}
message RoomAllLiveForBigdataResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
// 房间信息map
repeated RoomInfo data = 3 [(gogoproto.jsontag) = "data"];
message RoomInfo {
// 房间id
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 用户id
int64 uid = 2 [(gogoproto.jsontag) = "uid"];
// 创建时间
int64 create_time = 3 [(gogoproto.jsontag) = "create_time"];
// 短位号
int64 short_id = 4 [(gogoproto.jsontag) = "short_id"];
// 在线人数
int64 online = 5 [(gogoproto.jsontag) = "online"];
// 分区id
int64 area = 6 [(gogoproto.jsontag) = "area"];
// 分区v2 id
int64 area_v2_id = 7 [(gogoproto.jsontag) = "area_v2_id"];
// 分区v2 父分区id
int64 area_v2_parent_id = 8 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 关注人数
int64 attentions = 9 [(gogoproto.jsontag) = "attentions"];
}
}
message RoomGetInfoByIdReq {
// 房间id, 可以为短号
repeated int64 ids = 1 [(gogoproto.jsontag) = "ids"];
// 需要哪些字段, 不传默认所有
repeated string fields = 2 [(gogoproto.jsontag) = "fields"];
}
message RoomGetInfoByIdResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
// 房间信息map
map<int64, RoomInfo> data = 3 [(gogoproto.jsontag) = "data"];
message RoomInfo {
// 房间id
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 用户名, 不可靠.
string uname = 2 [(gogoproto.jsontag) = "uname"];
// 封面
string cover = 3 [(gogoproto.jsontag) = "cover"];
// 用户id
int64 uid = 4 [(gogoproto.jsontag) = "uid"];
// 开播时间
string live_time = 5 [(gogoproto.jsontag) = "live_time"];
// 轮播状态
int64 round_status = 6 [(gogoproto.jsontag) = "round_status"];
// 是否开播
int64 on_flag = 7 [(gogoproto.jsontag) = "on_flag"];
// 直播间标题
string title = 8 [(gogoproto.jsontag) = "title"];
// 锁定到时间
string lock_status = 9 [(gogoproto.jsontag) = "lock_status"];
// 隐藏到时间
string hidden_status = 10 [(gogoproto.jsontag) = "hidden_status"];
// 也是封面...
string user_cover = 11 [(gogoproto.jsontag) = "user_cover"];
// 短号
int64 short_id = 12 [(gogoproto.jsontag) = "short_id"];
// 在线人数
int64 online = 13 [(gogoproto.jsontag) = "online"];
// 分区id
int64 area = 14 [(gogoproto.jsontag) = "area"];
// 分区v2 id
int64 area_v2_id = 15 [(gogoproto.jsontag) = "area_v2_id"];
// 分区v2 父分区id
int64 area_v2_parent_id = 16 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 分区v2名字 fields加了该字段才会给
string area_v2_name = 17 [(gogoproto.jsontag) = "area_v2_name"];
// 分区v2父分区名字 fields加了该字段才会给
string area_v2_parent_name = 18 [(gogoproto.jsontag) = "area_v2_parent_name"];
// 关注人数
int64 attentions = 19 [(gogoproto.jsontag) = "attentions"];
}
}
message RoomGetStatusInfoByUidsReq {
// 用户id
repeated int64 uids = 1 [(gogoproto.jsontag) = "uids"];
// 是否只获取在播的用户信息 默认0
int64 filter_offline = 2 [(gogoproto.jsontag) = "filter_offline"];
// 是否显示隐藏的房间 默认0
int64 show_hidden = 3 [(gogoproto.jsontag) = "show_hidden"];
// 是否过滤首页黑名单的房间 默认0
int64 filter_index_black = 4 [(gogoproto.jsontag) = "filter_index_black"];
// 是否过滤放映厅 默认0
int64 filter_video = 5 [(gogoproto.jsontag) = "filter_video"];
// 是否需要横竖屏信息 默认0
int64 need_broadcast_type = 6 [(gogoproto.jsontag) = "need_broadcast_type"];
}
message RoomGetStatusInfoByUidsResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
map<int64, RoomInfo> data = 3 [(gogoproto.jsontag) = "data"];
message RoomInfo {
// 直播间标题
string title = 1 [(gogoproto.jsontag) = "title"];
// 房间id
int64 room_id = 2 [(gogoproto.jsontag) = "room_id"];
// 用户id
int64 uid = 3 [(gogoproto.jsontag) = "uid"];
// 人气值
int64 online = 4 [(gogoproto.jsontag) = "online"];
// 开播时间
int64 live_time = 5 [(gogoproto.jsontag) = "live_time"];
// 1开播 2 轮播 0 未开播
int64 live_status = 6 [(gogoproto.jsontag) = "live_status"];
// 短号
int64 short_id = 7 [(gogoproto.jsontag) = "short_id"];
// 老的分区id (2,3)
int64 area = 8 [(gogoproto.jsontag) = "area"];
// 老的分区名字
string area_name = 9 [(gogoproto.jsontag) = "area_name"];
// 子分区id (172,189)
int64 area_v2_id = 10 [(gogoproto.jsontag) = "area_v2_id"];
// 子分区名字
string area_v2_name = 11 [(gogoproto.jsontag) = "area_v2_name"];
// 父分区名字
string area_v2_parent_name = 12 [(gogoproto.jsontag) = "area_v2_parent_name"];
// 父分区id (1,2)
int64 area_v2_parent_id = 13 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 老分区标签
string tag_name = 14 [(gogoproto.jsontag) = "tag_name"];
// 房间标签
string tags = 15 [(gogoproto.jsontag) = "tags"];
// 用户昵称
string uname = 16 [(gogoproto.jsontag) = "uname"];
// 用户设定的封面
string cover_from_user = 17 [(gogoproto.jsontag) = "cover_from_user"];
// 关键帧
string keyframe = 18 [(gogoproto.jsontag) = "keyframe"];
// 锁定到的时间
string lock_till = 19 [(gogoproto.jsontag) = "lock_till"];
// 隐藏到的时间
string hidden_till = 20 [(gogoproto.jsontag) = "hidden_till"];
// 横竖屏只有传了need_broadcast_type才会返回 0:横屏 1:竖屏 -1:异常情况
int64 broadcast_type = 21 [(gogoproto.jsontag) = "broadcast_type"];
}
}
message RoomMobileRoomInitReq {
// 房间号或者短位号
int64 id = 1 [(gogoproto.jsontag) = "id"];
// 语言 hant: 国际版繁体中文 hans: 国际版简体中文
string lang = 2 [(gogoproto.jsontag) = "lang"];
}
message RoomMobileRoomInitResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
// 房间号
int64 room_id = 1 [(gogoproto.jsontag) = "room_id"];
// 短号
int64 short_id = 2 [(gogoproto.jsontag) = "short_id"];
// 主播uid
int64 uid = 3 [(gogoproto.jsontag) = "uid"];
// 是否p2p
int64 need_p2p = 4 [(gogoproto.jsontag) = "need_p2p"];
// 是否锁定
bool is_locked = 5 [(gogoproto.jsontag) = "is_locked"];
// 是否隐藏
bool is_hidden = 6 [(gogoproto.jsontag) = "is_hidden"];
// 锁定时间戳
int64 lock_till = 7 [(gogoproto.jsontag) = "lock_till"];
// 隐藏时间戳
int64 hidden_till = 8 [(gogoproto.jsontag) = "hidden_till"];
// 是否加密
bool encrypted = 9 [(gogoproto.jsontag) = "encrypted"];
// 加密房间是否通过密码验证, encrypted=true时才有意义
bool pwd_verified = 10 [(gogoproto.jsontag) = "pwd_verified"];
// 是否竖屏
bool is_portrait = 11 [(gogoproto.jsontag) = "is_portrait"];
// 开播状态 0关播 1直播 2轮播
int64 live_status = 12 [(gogoproto.jsontag) = "live_status"];
// 特殊直播间值 0 为普通直播间 1为付费直播间
int64 is_sp = 13 [(gogoproto.jsontag) = "is_sp"];
// 特殊直播间标志 0 为普通直播间1为付费直播间, 2为拜年祭直播间
int64 special_type = 14 [(gogoproto.jsontag) = "special_type"];
}
}
message RoomIncrDanmuSendNumReq {
// 房间号
int64 room_id = 1 [(gogoproto.jsontag) = "room_id"];
// 弹幕类型0普通1抽奖
int64 mode = 2 [(gogoproto.jsontag) = "mode"];
}
message RoomIncrDanmuSendNumResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
}
}

View File

@@ -0,0 +1,45 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/RoomEx.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// ================
// RoomEx Interface
// ================
type RoomExRPCClient interface {
// * 轮播接口
//
GetRoundPlayVideo(ctx context.Context, req *RoomExGetRoundPlayVideoReq, opts ...liverpc.CallOption) (resp *RoomExGetRoundPlayVideoResp, err error)
}
// ======================
// RoomEx Live Rpc Client
// ======================
type roomExRPCClient struct {
client *liverpc.Client
}
// NewRoomExRPCClient creates a client that implements the RoomExRPCClient interface.
func NewRoomExRPCClient(client *liverpc.Client) RoomExRPCClient {
return &roomExRPCClient{
client: client,
}
}
func (c *roomExRPCClient) GetRoundPlayVideo(ctx context.Context, in *RoomExGetRoundPlayVideoReq, opts ...liverpc.CallOption) (*RoomExGetRoundPlayVideoResp, error) {
out := new(RoomExGetRoundPlayVideoResp)
err := doRPCRequest(ctx, c.client, 1, "RoomEx.getRoundPlayVideo", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service RoomEx {
/** 轮播接口
*
*/
rpc getRoundPlayVideo (RoomExGetRoundPlayVideoReq) returns (RoomExGetRoundPlayVideoResp);
}
message RoomExGetRoundPlayVideoReq {
// 房间id
int64 room_id = 1 [(gogoproto.jsontag) = "room_id"];
// 播放类型 flv
string type = 2 [(gogoproto.jsontag) = "type"];
}
message RoomExGetRoundPlayVideoResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
// 分p id
int64 cid = 1 [(gogoproto.jsontag) = "cid"];
// 播放时间
int64 play_time = 2 [(gogoproto.jsontag) = "play_time"];
// 轮播序号
int64 sequence = 3 [(gogoproto.jsontag) = "sequence"];
// av号
int64 aid = 4 [(gogoproto.jsontag) = "aid"];
// 标题
string title = 5 [(gogoproto.jsontag) = "title"];
// 稿件序号
int64 pid = 6 [(gogoproto.jsontag) = "pid"];
// 播放地址
string play_url = 7 [(gogoproto.jsontag) = "play_url"];
}
}

View File

@@ -0,0 +1,97 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/RoomMng.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// =================
// RoomMng Interface
// =================
type RoomMngRPCClient interface {
// * 开通直播间
//
CreateRoom(ctx context.Context, req *RoomMngCreateRoomReq, opts ...liverpc.CallOption) (resp *RoomMngCreateRoomResp, err error)
// * 获取监控列表
//
GetSecondVerifyList(ctx context.Context, req *RoomMngGetSecondVerifyListReq, opts ...liverpc.CallOption) (resp *RoomMngGetSecondVerifyListResp, err error)
// * 查询是否是黑名单没有roomid参数时返回全部黑名单map
//
IsBlack(ctx context.Context, req *RoomMngIsBlackReq, opts ...liverpc.CallOption) (resp *RoomMngIsBlackResp, err error)
// * 主播填写公告命中审核词生成审核记录写入db
//
SaveHistory(ctx context.Context, req *RoomMngSaveHistoryReq, opts ...liverpc.CallOption) (resp *RoomMngSaveHistoryResp, err error)
// * 是否全网封禁
//
IsAllNetBanned(ctx context.Context, req *RoomMngIsAllNetBannedReq, opts ...liverpc.CallOption) (resp *RoomMngIsAllNetBannedResp, err error)
}
// =======================
// RoomMng Live Rpc Client
// =======================
type roomMngRPCClient struct {
client *liverpc.Client
}
// NewRoomMngRPCClient creates a client that implements the RoomMngRPCClient interface.
func NewRoomMngRPCClient(client *liverpc.Client) RoomMngRPCClient {
return &roomMngRPCClient{
client: client,
}
}
func (c *roomMngRPCClient) CreateRoom(ctx context.Context, in *RoomMngCreateRoomReq, opts ...liverpc.CallOption) (*RoomMngCreateRoomResp, error) {
out := new(RoomMngCreateRoomResp)
err := doRPCRequest(ctx, c.client, 1, "RoomMng.createRoom", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomMngRPCClient) GetSecondVerifyList(ctx context.Context, in *RoomMngGetSecondVerifyListReq, opts ...liverpc.CallOption) (*RoomMngGetSecondVerifyListResp, error) {
out := new(RoomMngGetSecondVerifyListResp)
err := doRPCRequest(ctx, c.client, 1, "RoomMng.getSecondVerifyList", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomMngRPCClient) IsBlack(ctx context.Context, in *RoomMngIsBlackReq, opts ...liverpc.CallOption) (*RoomMngIsBlackResp, error) {
out := new(RoomMngIsBlackResp)
err := doRPCRequest(ctx, c.client, 1, "RoomMng.isBlack", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomMngRPCClient) SaveHistory(ctx context.Context, in *RoomMngSaveHistoryReq, opts ...liverpc.CallOption) (*RoomMngSaveHistoryResp, error) {
out := new(RoomMngSaveHistoryResp)
err := doRPCRequest(ctx, c.client, 1, "RoomMng.saveHistory", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomMngRPCClient) IsAllNetBanned(ctx context.Context, in *RoomMngIsAllNetBannedReq, opts ...liverpc.CallOption) (*RoomMngIsAllNetBannedResp, error) {
out := new(RoomMngIsAllNetBannedResp)
err := doRPCRequest(ctx, c.client, 1, "RoomMng.isAllNetBanned", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,188 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service RoomMng {
/** 开通直播间
*
*/
rpc createRoom (RoomMngCreateRoomReq) returns (RoomMngCreateRoomResp);
/** 获取监控列表
*
*/
rpc getSecondVerifyList (RoomMngGetSecondVerifyListReq) returns (RoomMngGetSecondVerifyListResp);
/** 查询是否是黑名单没有roomid参数时返回全部黑名单map
*
*/
rpc isBlack (RoomMngIsBlackReq) returns (RoomMngIsBlackResp);
/** 主播填写公告命中审核词生成审核记录写入db
*
*/
rpc saveHistory (RoomMngSaveHistoryReq) returns (RoomMngSaveHistoryResp);
/** 是否全网封禁
*
*/
rpc isAllNetBanned (RoomMngIsAllNetBannedReq) returns (RoomMngIsAllNetBannedResp);
}
message RoomMngCreateRoomReq {
// 用户uid
int64 uid = 1 [(gogoproto.jsontag) = "uid"];
// 是否开通轮播
int64 virtual = 2 [(gogoproto.jsontag) = "virtual"];
}
message RoomMngCreateRoomResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
//
string roomid = 1 [(gogoproto.jsontag) = "roomid"];
}
}
message RoomMngGetSecondVerifyListReq {
// 房间id
int64 room_id = 1 [(gogoproto.jsontag) = "room_id"];
// 分区id多个
string area = 2 [(gogoproto.jsontag) = "area"];
// 页数
int64 page = 3 [(gogoproto.jsontag) = "page"];
// 页码
int64 pagesize = 4 [(gogoproto.jsontag) = "pagesize"];
// 业务0直播监控1直播鉴黄2房间举报
string biz = 5 [(gogoproto.jsontag) = "biz"];
}
message RoomMngGetSecondVerifyListResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Result {
// 日志id
int64 id = 1 [(gogoproto.jsontag) = "id"];
// 当天切断记录
int64 recent_cut_times = 2 [(gogoproto.jsontag) = "recent_cut_times"];
// 当天警告记录
int64 recent_warn_times = 3 [(gogoproto.jsontag) = "recent_warn_times"];
// 总计警告
int64 warn_times = 4 [(gogoproto.jsontag) = "warn_times"];
// 用户名
string uname = 5 [(gogoproto.jsontag) = "uname"];
// 房间号
int64 room_id = 6 [(gogoproto.jsontag) = "room_id"];
// 主播id
int64 uid = 7 [(gogoproto.jsontag) = "uid"];
// 房间标题
string title = 8 [(gogoproto.jsontag) = "title"];
// 分区名
string area_v2_name = 9 [(gogoproto.jsontag) = "area_v2_name"];
// 粉丝数
int64 fc = 10 [(gogoproto.jsontag) = "fc"];
// 警告理由
string warn_reason = 11 [(gogoproto.jsontag) = "warn_reason"];
// 警告时间
string break_time = 12 [(gogoproto.jsontag) = "break_time"];
// 证据图片
string proof_img = 13 [(gogoproto.jsontag) = "proof_img"];
}
message Data {
//
repeated Result result = 1 [(gogoproto.jsontag) = "result"];
// 总数
int64 count = 2 [(gogoproto.jsontag) = "count"];
// 页码
int64 page = 3 [(gogoproto.jsontag) = "page"];
// 分页大小
int64 pagesize = 4 [(gogoproto.jsontag) = "pagesize"];
}
}
message RoomMngIsBlackReq {
// 房间号
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
}
message RoomMngIsBlackResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
map<int64, int64> data = 3 [(gogoproto.jsontag) = "data"];
}
message RoomMngSaveHistoryReq {
//
repeated List list = 1 [(gogoproto.jsontag) = "list"];
message List {
// 用户名
int64 uid = 1 [(gogoproto.jsontag) = "uid"];
// 房间号
int64 roomid = 2 [(gogoproto.jsontag) = "roomid"];
// 描述
string content = 3 [(gogoproto.jsontag) = "content"];
// 类型
int64 area = 4 [(gogoproto.jsontag) = "area"];
// 审核标志
int64 status = 5 [(gogoproto.jsontag) = "status"];
// 操作人
string oname = 6 [(gogoproto.jsontag) = "oname"];
}
}
message RoomMngSaveHistoryResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
}
message RoomMngIsAllNetBannedReq {
// 用户uid
int64 uid = 1 [(gogoproto.jsontag) = "uid"];
}
message RoomMngIsAllNetBannedResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
//
bool is_net_banned = 1 [(gogoproto.jsontag) = "is_net_banned"];
}
}

View File

@@ -0,0 +1,45 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/RoomPendant.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// =====================
// RoomPendant Interface
// =====================
type RoomPendantRPCClient interface {
// * 根据roomids批量获取角标
//
GetPendantByIds(ctx context.Context, req *RoomPendantGetPendantByIdsReq, opts ...liverpc.CallOption) (resp *RoomPendantGetPendantByIdsResp, err error)
}
// ===========================
// RoomPendant Live Rpc Client
// ===========================
type roomPendantRPCClient struct {
client *liverpc.Client
}
// NewRoomPendantRPCClient creates a client that implements the RoomPendantRPCClient interface.
func NewRoomPendantRPCClient(client *liverpc.Client) RoomPendantRPCClient {
return &roomPendantRPCClient{
client: client,
}
}
func (c *roomPendantRPCClient) GetPendantByIds(ctx context.Context, in *RoomPendantGetPendantByIdsReq, opts ...liverpc.CallOption) (*RoomPendantGetPendantByIdsResp, error) {
out := new(RoomPendantGetPendantByIdsResp)
err := doRPCRequest(ctx, c.client, 1, "RoomPendant.getPendantByIds", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,55 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service RoomPendant {
/** 根据roomids批量获取角标
*
*/
rpc getPendantByIds (RoomPendantGetPendantByIdsReq) returns (RoomPendantGetPendantByIdsResp);
}
message RoomPendantGetPendantByIdsReq {
//
repeated int64 ids = 1 [(gogoproto.jsontag) = "ids"];
// 类型 "frame"房间页边框 , "badge"房间页角标 "index_badge"首页角标 "mobile_frame"移动端房间页边框 , "mobile_badge"移动端房间页角标 "mobile_index_badge"移动端首页角标
string type = 2 [(gogoproto.jsontag) = "type"];
// 位置0无1左上2右上3右下4左下 【5.29显示更新】服务端还是吐右上5.29客户端显示在左上,对应的背景图片
int64 position = 3 [(gogoproto.jsontag) = "position"];
}
message RoomPendantGetPendantByIdsResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
PendantInfo data = 3 [(gogoproto.jsontag) = "data"];
message Result {
//
string type = 1 [(gogoproto.jsontag) = "type"];
//
int64 expire_time = 2 [(gogoproto.jsontag) = "expire_time"];
//
string name = 3 [(gogoproto.jsontag) = "name"];
//
string value = 4 [(gogoproto.jsontag) = "value"];
//
string bg_color = 5 [(gogoproto.jsontag) = "bg_color"];
//
string bg_pic = 6 [(gogoproto.jsontag) = "bg_pic"];
}
message PendantInfo {
//
map<int64, Result> result = 1 [(gogoproto.jsontag) = "result"];
}
}

View File

@@ -0,0 +1,58 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/RoomRecommend.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// =======================
// RoomRecommend Interface
// =======================
type RoomRecommendRPCClient interface {
// * app关播播放器推荐
//
GetPlayerList(ctx context.Context, req *RoomRecommendGetPlayerListReq, opts ...liverpc.CallOption) (resp *RoomRecommendGetPlayerListResp, err error)
// * 获取首页推荐主播数据,可强推可刷新
//
ClientRecStrong(ctx context.Context, req *RoomRecommendClientRecStrongReq, opts ...liverpc.CallOption) (resp *RoomRecommendClientRecStrongResp, err error)
}
// =============================
// RoomRecommend Live Rpc Client
// =============================
type roomRecommendRPCClient struct {
client *liverpc.Client
}
// NewRoomRecommendRPCClient creates a client that implements the RoomRecommendRPCClient interface.
func NewRoomRecommendRPCClient(client *liverpc.Client) RoomRecommendRPCClient {
return &roomRecommendRPCClient{
client: client,
}
}
func (c *roomRecommendRPCClient) GetPlayerList(ctx context.Context, in *RoomRecommendGetPlayerListReq, opts ...liverpc.CallOption) (*RoomRecommendGetPlayerListResp, error) {
out := new(RoomRecommendGetPlayerListResp)
err := doRPCRequest(ctx, c.client, 1, "RoomRecommend.getPlayerList", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roomRecommendRPCClient) ClientRecStrong(ctx context.Context, in *RoomRecommendClientRecStrongReq, opts ...liverpc.CallOption) (*RoomRecommendClientRecStrongResp, error) {
out := new(RoomRecommendClientRecStrongResp)
err := doRPCRequest(ctx, c.client, 1, "RoomRecommend.clientRecStrong", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,150 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service RoomRecommend {
/** app关播播放器推荐
*
*/
rpc getPlayerList (RoomRecommendGetPlayerListReq) returns (RoomRecommendGetPlayerListResp);
/** 获取首页推荐主播数据,可强推可刷新
*
*/
rpc clientRecStrong (RoomRecommendClientRecStrongReq) returns (RoomRecommendClientRecStrongResp);
}
message RoomRecommendGetPlayerListReq {
// 二级分区
int64 area_v2_id = 1 [(gogoproto.jsontag) = "area_v2_id"];
// roomid
int64 roomid = 2 [(gogoproto.jsontag) = "roomid"];
// 0.默认old 1.新文本
int64 is_new = 3 [(gogoproto.jsontag) = "is_new"];
}
message RoomRecommendGetPlayerListResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message RoomInfo {
// 房间id
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 房间标题
string title = 2 [(gogoproto.jsontag) = "title"];
// 用户名
string uname = 3 [(gogoproto.jsontag) = "uname"];
// 在线人数
int64 online = 4 [(gogoproto.jsontag) = "online"];
// 封面封面现在有3种关键帧、封面图、秀场封面正方形的返回哪个由后端决定
string cover = 5 [(gogoproto.jsontag) = "cover"];
// 链接
string link = 6 [(gogoproto.jsontag) = "link"];
// 主播头像
string face = 7 [(gogoproto.jsontag) = "face"];
// 父分区id
int64 area_v2_parent_id = 8 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 父分区名称
string area_v2_parent_name = 9 [(gogoproto.jsontag) = "area_v2_parent_name"];
// 二级分区id
int64 area_v2_id = 10 [(gogoproto.jsontag) = "area_v2_id"];
// 二级分区名
string area_v2_name = 11 [(gogoproto.jsontag) = "area_v2_name"];
// 秒开播放串
string play_url = 12 [(gogoproto.jsontag) = "play_url"];
// 当前清晰度,清晰度 0:默认码率, 2:800 3:1500 4:原画
int64 current_quality = 13 [(gogoproto.jsontag) = "current_quality"];
// 当前拥有清晰度列表
repeated int64 accept_quality = 14 [(gogoproto.jsontag) = "accept_quality"];
// 横竖屏 0:横屏 1:竖屏 -1:异常情况
int64 broadcast_type = 15 [(gogoproto.jsontag) = "broadcast_type"];
// 是否关注 0未关注 1已关注
int64 is_focus = 16 [(gogoproto.jsontag) = "is_focus"];
}
message Data {
// 播放器文本
string title = 1 [(gogoproto.jsontag) = "title"];
// 关播推荐房间列表
repeated RoomInfo list = 2 [(gogoproto.jsontag) = "list"];
}
}
message RoomRecommendClientRecStrongReq {
// 强推第几刷
int64 rec_page = 1 [(gogoproto.jsontag) = "rec_page"];
}
message RoomRecommendClientRecStrongResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Result {
// 房间id
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 房间标题
string title = 2 [(gogoproto.jsontag) = "title"];
// 用户名
string uname = 3 [(gogoproto.jsontag) = "uname"];
// 在线人数
int64 online = 4 [(gogoproto.jsontag) = "online"];
// 封面封面现在有3种关键帧、封面图、秀场封面正方形的返回哪个由后端决定
string cover = 5 [(gogoproto.jsontag) = "cover"];
// 封面图
string user_cover = 6 [(gogoproto.jsontag) = "user_cover"];
// 关键帧
string system_cover = 7 [(gogoproto.jsontag) = "system_cover"];
// 链接
string link = 8 [(gogoproto.jsontag) = "link"];
// 主播头像
string face = 9 [(gogoproto.jsontag) = "face"];
// 父分区id
int64 area_v2_parent_id = 10 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 父分区名称
string area_v2_parent_name = 11 [(gogoproto.jsontag) = "area_v2_parent_name"];
// 二级分区id
int64 area_v2_id = 12 [(gogoproto.jsontag) = "area_v2_id"];
// 二级分区名
string area_v2_name = 13 [(gogoproto.jsontag) = "area_v2_name"];
// 秒开播放串
string play_url = 14 [(gogoproto.jsontag) = "play_url"];
// 当前清晰度,清晰度 0:默认码率, 2:800 3:1500 4:原画
int64 current_quality = 15 [(gogoproto.jsontag) = "current_quality"];
// 当前拥有清晰度列表
repeated int64 accept_quality = 16 [(gogoproto.jsontag) = "accept_quality"];
// 横竖屏 0:横屏 1:竖屏 -1:异常情况
int64 broadcast_type = 17 [(gogoproto.jsontag) = "broadcast_type"];
// 新版角标-右上 默认为空 只能是文字!!!@古月 【5.29显示更新】服务端还是吐右上兼容老版5.29显示在左上
string pendent_ru = 18 [(gogoproto.jsontag) = "pendent_ru"];
// 【5.29显示更新】服务端还是吐右上5.29客户端显示在左上,对应的背景图片
string pendent_ru_pic = 19 [(gogoproto.jsontag) = "pendent_ru_pic"];
// 新版移动端角标色值-右上
string pendent_ru_color = 20 [(gogoproto.jsontag) = "pendent_ru_color"];
// 推荐类型 1人气 2营收 3运营强推 4天马推荐暂定用于客户端打点
int64 rec_type = 21 [(gogoproto.jsontag) = "rec_type"];
// 当前房间pk_id默认0 用于客户端打点
int64 pk_id = 22 [(gogoproto.jsontag) = "pk_id"];
}
message Data {
//
map<int64, Result> result = 1 [(gogoproto.jsontag) = "result"];
}
}

View File

@@ -0,0 +1,45 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/Skin.proto
package v1
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// ==============
// Skin Interface
// ==============
type SkinRPCClient interface {
// * 房间当前皮肤
//
Current(ctx context.Context, req *SkinCurrentReq, opts ...liverpc.CallOption) (resp *SkinCurrentResp, err error)
}
// ====================
// Skin Live Rpc Client
// ====================
type skinRPCClient struct {
client *liverpc.Client
}
// NewSkinRPCClient creates a client that implements the SkinRPCClient interface.
func NewSkinRPCClient(client *liverpc.Client) SkinRPCClient {
return &skinRPCClient{
client: client,
}
}
func (c *skinRPCClient) Current(ctx context.Context, in *SkinCurrentReq, opts ...liverpc.CallOption) (*SkinCurrentResp, error) {
out := new(SkinCurrentResp)
err := doRPCRequest(ctx, c.client, 1, "Skin.current", in, out, opts)
if err != nil {
return nil, err
}
return out, nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
syntax = "proto3";
package room.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service Skin {
/** 房间当前皮肤
*
*/
rpc current (SkinCurrentReq) returns (SkinCurrentResp);
}
message SkinCurrentReq {
// 平台web、ios、android、ipad
string skin_platform = 1 [(gogoproto.jsontag) = "skin_platform"];
// 客户端支持的皮肤版本如“1.0”
string skin_version = 2 [(gogoproto.jsontag) = "skin_version"];
// 房间id支持长短号
int64 roomid = 3 [(gogoproto.jsontag) = "roomid"];
// 一级分区id
int64 area_v2_parent_id = 4 [(gogoproto.jsontag) = "area_v2_parent_id"];
// 二级分区id
int64 area_v2_id = 5 [(gogoproto.jsontag) = "area_v2_id"];
}
message SkinCurrentResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
// 皮肤id
int64 id = 1 [(gogoproto.jsontag) = "id"];
// 皮肤配置,字符串类型
string skin_config = 2 [(gogoproto.jsontag) = "skin_config"];
// 失效时间
int64 end_time = 3 [(gogoproto.jsontag) = "end_time"];
// 当前时间
int64 current_time = 4 [(gogoproto.jsontag) = "current_time"];
}
}