go-common/app/service/live/userext/api/liverpc/v1/DanmuConf.proto

116 lines
3.0 KiB
Protocol Buffer
Raw Normal View History

2019-04-22 10:49:16 +00:00
syntax = "proto3";
package userext.v1;
option go_package = "v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service DanmuConf {
/**
*
*/
rpc getAll (DanmuConfGetAllReq) returns (DanmuConfGetAllResp);
/**
*
*/
rpc addByType (DanmuConfAddByTypeReq) returns (DanmuConfAddByTypeResp);
/**
*
*/
rpc getAllPrivilege (DanmuConfGetAllPrivilegeReq) returns (DanmuConfGetAllPrivilegeResp);
}
message DanmuConfGetAllReq {
// 房间号
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
// 用户id(优先取登录态)
int64 uid = 2 [(gogoproto.jsontag) = "uid"];
}
message DanmuConfGetAllResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
// 模式
int64 mode = 1 [(gogoproto.jsontag) = "mode"];
// 颜色
int64 color = 2 [(gogoproto.jsontag) = "color"];
// 长度
int64 length = 3 [(gogoproto.jsontag) = "length"];
// roomid
int64 roomid = 4 [(gogoproto.jsontag) = "roomid"];
}
}
message DanmuConfAddByTypeReq {
// color:颜色, mode:弹幕模式, length:弹幕长度
string type = 1 [(gogoproto.jsontag) = "type"];
// uid
int64 uid = 2 [(gogoproto.jsontag) = "uid"];
// 房间号,传0为全局
int64 roomid = 3 [(gogoproto.jsontag) = "roomid"];
// 不填则为永久
int64 expire = 4 [(gogoproto.jsontag) = "expire"];
// 配置值
int64 value = 5 [(gogoproto.jsontag) = "value"];
}
message DanmuConfAddByTypeResp {
// code
int64 code = 1 [(gogoproto.jsontag) = "code"];
// msg
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
Data data = 3 [(gogoproto.jsontag) = "data"];
message Data {
// true:操作成功 false:操作失败
bool result = 1 [(gogoproto.jsontag) = "result"];
}
}
message DanmuConfGetAllPrivilegeReq {
// 用户id
int64 uid = 1 [(gogoproto.jsontag) = "uid"];
}
message DanmuConfGetAllPrivilegeResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
string message = 3 [(gogoproto.jsontag) = "message"];
//
repeated Data data = 4 [(gogoproto.jsontag) = "data"];
message Data {
// UID
string uid = 1 [(gogoproto.jsontag) = "uid"];
// roomID
string roomid = 2 [(gogoproto.jsontag) = "roomid"];
// 0color1mode2length
string type = 3 [(gogoproto.jsontag) = "type"];
//
string value = 4 [(gogoproto.jsontag) = "value"];
// 初始0佩戴中1
string status = 5 [(gogoproto.jsontag) = "status"];
//
string expired_at = 6 [(gogoproto.jsontag) = "expired_at"];
}
}