dm.proto 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. syntax = "proto3";
  2. package live.approom.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:"cid" 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. int64 build = 8 [(gogoproto.moretags) = 'form:"build"'];
  14. string anti = 9 [(gogoproto.moretags) = 'form:"_anti"'];
  15. string platform = 10 [(gogoproto.moretags) = 'form:"platform"'];
  16. }
  17. message SendMsgResp {
  18. }
  19. message HistoryReq {
  20. int64 roomid = 1 [(gogoproto.moretags) = 'form:"room_id" validate:"required"'];
  21. }
  22. message HistoryResp {
  23. repeated string Room = 1;
  24. repeated string Admin = 2;
  25. }
  26. service DM{
  27. // `method:"POST"`
  28. rpc SendMsg(SendDMReq) returns (SendMsgResp);
  29. // `method:"POST"`
  30. rpc GetHistory(HistoryReq) returns (HistoryResp);
  31. }