github.com/songzhibin97/gkit@v1.2.13/parser/demo/test.proto (about)

     1  syntax = "proto3";
     2  package api;
     3  
     4  // message2
     5  // message
     6  message Request{
     7    map<string, string> MapField = 1;
     8    fixed32 SliceField = 2;
     9    repeated string StringField = 3;
    10    uint32 Uint32Field = 4;
    11  }
    12  
    13  // notes
    14  
    15  // notessss
    16  
    17  message Response{
    18    string Message = 1;
    19    string Username = 2;
    20    string Password = 3;
    21  }
    22  
    23  
    24  // server
    25  service User{
    26    rpc Register ( Request) returns (Response) {
    27      option (google.api.http) = {
    28        post: "/register"
    29      };
    30    }
    31    rpc Register2 (Request) returns (Response) {
    32      option (google.api.http) = {
    33        get: "/register2"
    34      };
    35    }
    36  }
    37