demo.proto 662 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 22 23 24 25 26 27 28 29 30 31 32 33 34 35
syntax = "proto3";

import "google/protobuf/timestamp.proto";

option go_package = "./;demo";

message DemoReq {
  string id = 1; // @gotags: validate:"required"
}

message ListDemoReq {
  string id = 1; // @gotags: validate:"required"
  int32  limit = 2;
}

message DemoResp {
  string id = 1;
  string username = 2;
  string email = 3;
  string avatar = 4;
  int32 status = 5;
  google.protobuf.Timestamp created_at = 6;
  google.protobuf.Timestamp updated_at = 7;
}

message ListDemoResp {
  repeated DemoResp list = 1;
  int32 limit = 2;
}

service Demo {
  rpc GetDemo(DemoReq) returns (DemoResp){};
  rpc ListDemo(ListDemoReq) returns (ListDemoResp){};
}