38 lines
1.2 KiB
Protocol Buffer
38 lines
1.2 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
package live.webroom.v1;
|
||
|
option go_package = "v1";
|
||
|
|
||
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||
|
|
||
|
message SendDMReq {
|
||
|
int64 roomid = 1 [(gogoproto.moretags) = 'form:"roomid" validate:"required"'];
|
||
|
string msg = 2 [(gogoproto.moretags) = 'form:"msg" validate:"required"'];
|
||
|
string rnd = 3 [(gogoproto.moretags) = 'form:"rnd" validate:"required"'];
|
||
|
int64 fontsize = 4 [(gogoproto.moretags) = 'form:"fontsize" validate:"required"'];
|
||
|
int64 mode = 5 [(gogoproto.moretags) = 'form:"mode" validate:"gte=0"'];
|
||
|
int64 color = 6 [(gogoproto.moretags) = 'form:"color" validate:"required"'];
|
||
|
int64 bubble = 7 [(gogoproto.moretags) = 'form:"bubble"'];
|
||
|
string anti = 9 [(gogoproto.moretags) = 'form:"_anti"'];
|
||
|
}
|
||
|
|
||
|
message SendMsgResp {
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
message HistoryReq {
|
||
|
int64 roomid = 1 [(gogoproto.moretags) = 'form:"roomid" validate:"required"'];
|
||
|
}
|
||
|
|
||
|
message HistoryResp {
|
||
|
repeated string Room = 1;
|
||
|
repeated string Admin = 2;
|
||
|
}
|
||
|
|
||
|
service DM{
|
||
|
// `method:"POST"`
|
||
|
rpc SendMsg(SendDMReq) returns (SendMsgResp);
|
||
|
// `method:"POST"`
|
||
|
rpc GetHistory(HistoryReq) returns (HistoryResp);
|
||
|
}
|