dm.proto 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. package live.webroom.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. message SendDMReq {
  6. int64 roomid = 1 [(gogoproto.moretags) = 'form:"roomid" validate:"required"'];
  7. string msg = 2 [(gogoproto.moretags) = 'form:"msg" validate:"required"'];
  8. string rnd = 3 [(gogoproto.moretags) = 'form:"rnd" validate:"required"'];
  9. int64 fontsize = 4 [(gogoproto.moretags) = 'form:"fontsize" validate:"required"'];
  10. int64 mode = 5 [(gogoproto.moretags) = 'form:"mode" validate:"gte=0"'];
  11. int64 color = 6 [(gogoproto.moretags) = 'form:"color" validate:"required"'];
  12. int64 bubble = 7 [(gogoproto.moretags) = 'form:"bubble"'];
  13. string anti = 9 [(gogoproto.moretags) = 'form:"_anti"'];
  14. }
  15. message SendMsgResp {
  16. }
  17. message HistoryReq {
  18. int64 roomid = 1 [(gogoproto.moretags) = 'form:"roomid" validate:"required"'];
  19. }
  20. message HistoryResp {
  21. repeated string Room = 1;
  22. repeated string Admin = 2;
  23. }
  24. service DM{
  25. // `method:"POST"`
  26. rpc SendMsg(SendDMReq) returns (SendMsgResp);
  27. // `method:"POST"`
  28. rpc GetHistory(HistoryReq) returns (HistoryResp);
  29. }