base.proto 615 B

1234567891011121314151617181920212223242526272829303132333435
  1. syntax = "proto3";
  2. option go_package =".;base";
  3. package base;
  4. enum ErrorCode{
  5. OK = 0;
  6. }
  7. // metadata 中需要字段 tokefrgen n 用作登录验证
  8. service Api {
  9. rpc SignUp (SignUpRequest) returns (DefaultReply) {}
  10. rpc SignIn (SignInRequest) returns (SignInReply) {}
  11. rpc SignOut (DefaultRequest) returns (DefaultReply) {}
  12. }
  13. message DefaultRequest{
  14. }
  15. message DefaultReply{}
  16. message SignUpRequest {
  17. string name = 1;
  18. string password = 2;
  19. }
  20. message SignInReply {
  21. string token = 1;
  22. }
  23. message SignInRequest {
  24. string name = 1;
  25. string password = 2;
  26. string codeId = 3;
  27. string verifyCode = 4;
  28. }