github.com/yandex/pandora@v0.5.32/examples/grpc/server/proto/target.proto (about)

     1  syntax = "proto3";
     2  
     3  package target;
     4  
     5  option go_package = "server.v1;server";
     6  
     7  service TargetService {
     8    rpc Hello(HelloRequest) returns (HelloResponse);
     9    rpc Auth(AuthRequest) returns (AuthResponse);
    10    rpc List(ListRequest) returns (ListResponse);
    11    rpc Order(OrderRequest) returns (OrderResponse);
    12    rpc Stats(StatsRequest) returns (StatsResponse);
    13    rpc Reset(ResetRequest) returns (ResetResponse);
    14  }
    15  
    16  message HelloRequest {
    17    string name = 1;
    18  }
    19  
    20  message HelloResponse {
    21    string hello = 1;
    22  }
    23  message AuthRequest {
    24    string login = 1;
    25    string pass = 2;
    26  }
    27  
    28  message AuthResponse {
    29    int64 user_id = 1;
    30    string token = 2;
    31  }
    32  
    33  message ListRequest {
    34    string token = 1;
    35    int64 user_id = 2;
    36  }
    37  
    38  message ListResponse {
    39    repeated ListItem result = 1;
    40  }
    41  
    42  message ListItem {
    43    int64 item_id = 1;
    44  }
    45  
    46  message OrderRequest {
    47    string token = 1;
    48    int64 user_id = 2;
    49    int64 item_id = 3;
    50  }
    51  
    52  message OrderResponse {
    53    int64 order_id = 1;
    54  }
    55  
    56  message StatsRequest {}
    57  
    58  message StatsResponse {
    59    StatisticBodyResponse Auth = 1;
    60    StatisticBodyResponse List = 2;
    61    StatisticBodyResponse Order = 3;
    62    int64 Hello = 4;
    63  }
    64  
    65  message StatisticBodyResponse  {
    66    map<int64, uint64> Code200 = 1;
    67    uint64 Code400 = 2;
    68    uint64 Code500 = 3;
    69  }
    70  
    71  message ResetRequest {}
    72  
    73  message ResetResponse {
    74    StatisticBodyResponse Auth = 1;
    75    StatisticBodyResponse List = 2;
    76    StatisticBodyResponse Order = 3;
    77  }
    78