member.proto 881 Bytes
Newer Older
kzkzzzz's avatar
kzkzzzz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
syntax = "proto3";

import "google/protobuf/timestamp.proto";

option go_package = "./;member";


message MemberInfoReq {
  int64 userId = 1; // @gotags: validate:"required"
}

message MemberInfoResp {
  int64 userId = 1;
  int64 userNo = 2;
  string name = 3;
  string avatar = 4;
  int64 coins = 5;
  string coinIcon = 6;
  string roomId = 7;
}

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
message SetCredit1Req{
  int64 userId = 1; // @gotags: validate:"required"
  float goldNum = 2; // @gotags: validate:"required,gt=0"
}

message SetCredit1Resp{
}

message CheckLoginReq {
  int64 userId = 1; // @gotags: validate:"required"
  string token = 2; // @gotags: validate:"required"
}

message CheckLoginResp {

}


kzkzzzz's avatar
kzkzzzz committed
40
service Member {
41
  rpc CheckLoginStatus(CheckLoginReq) returns (CheckLoginResp){};
kzkzzzz's avatar
kzkzzzz committed
42
  rpc GetMemberInfo(MemberInfoReq) returns (MemberInfoResp){};
43
  rpc SetCredit1(SetCredit1Req) returns (SetCredit1Resp){};
kzkzzzz's avatar
kzkzzzz committed
44 45
}