You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
kratos/example/protobuf/api.proto

35 lines
755 B

syntax = "proto3";
package user.api;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
option go_package = "api";
enum UserErrCode {
OK = 0;
UserNotExist = -404;
UserUpdateNameFailed = 10000;
}
message Info {
int64 mid = 1 [(gogoproto.jsontag) = "mid"];
string name = 2 [(gogoproto.jsontag) = "name"];
string sex = 3 [(gogoproto.jsontag) = "sex"];
string face = 4 [(gogoproto.jsontag) = "face"];
string sign = 5 [(gogoproto.jsontag) = "sign"];
}
message UserReq {
int64 mid = 1 [(gogoproto.moretags) = "validate:\"gt=0,required\""];
}
message InfoReply {
Info info = 1;
}
service User {
rpc Info(UserReq) returns (InfoReply);
rpc Card(UserReq) returns (google.protobuf.Empty);
}