2020-05-20 08:05:33 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package main;
|
|
|
|
|
|
|
|
option go_package = ".;main";
|
|
|
|
|
|
|
|
|
|
|
|
import "base.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
|
|
|
|
// The greeting service definition.
|
|
|
|
service ProvinceAreaCity {
|
|
|
|
// Sends a greeting
|
|
|
|
rpc Province (Request) returns (NameCodeReply){
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/province/namecode"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc Area (Request) returns (NameCodeReply){
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/area/namecode"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-20 08:51:40 +00:00
|
|
|
rpc AreaParent (Request) returns (NameCodeParentReply){
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/area/namecode/parent"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-20 08:05:33 +00:00
|
|
|
rpc City (Request) returns (NameCodeReply){
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/city/namecode"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-20 08:51:40 +00:00
|
|
|
rpc CityParent (Request) returns (NameCodeParentReply){
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/city/namecode/parent"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-20 08:05:33 +00:00
|
|
|
// rpc CityParent (Request) returns (NameCodeReply){
|
|
|
|
// option (google.api.http) = {
|
|
|
|
// post: "/v1/city/namecode/parent"
|
|
|
|
// body: "*"
|
|
|
|
// };
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
2020-05-20 08:51:40 +00:00
|
|
|
// The response message containing the greetings
|
|
|
|
message NameCodeParentReply {
|
|
|
|
string name = 1;
|
|
|
|
string code = 2;
|
|
|
|
NameCodeParentReply parent = 3;
|
|
|
|
}
|
2020-05-20 08:05:33 +00:00
|
|
|
|
|
|
|
// The response message containing the greetings
|
|
|
|
message NameCodeReply {
|
|
|
|
string name = 1;
|
|
|
|
string code = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// enum NameType {
|
|
|
|
// FullName = 0;
|
|
|
|
// FirstName = 1;
|
|
|
|
// LastName = 2 ;
|
|
|
|
// }
|