省区数据已经完整, 完成基本的接口

This commit is contained in:
huangsimin
2020-05-20 16:05:33 +08:00
parent 27c0277ba8
commit c95dbc8f33
15 changed files with 1122 additions and 398 deletions

57
proto/province.proto Normal file
View File

@@ -0,0 +1,57 @@
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: "*"
};
}
rpc City (Request) returns (NameCodeReply){
option (google.api.http) = {
post: "/v1/city/namecode"
body: "*"
};
}
// rpc CityParent (Request) returns (NameCodeReply){
// option (google.api.http) = {
// post: "/v1/city/namecode/parent"
// body: "*"
// };
// }
}
// The response message containing the greetings
message NameCodeReply {
string name = 1;
string code = 2;
}
// enum NameType {
// FullName = 0;
// FirstName = 1;
// LastName = 2 ;
// }