390 lines
14 KiB
Go
390 lines
14 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: province.proto
|
|
|
|
package main
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// The response message containing the greetings
|
|
type NameCodeParentReply struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
|
|
Parent *NameCodeParentReply `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NameCodeParentReply) Reset() { *m = NameCodeParentReply{} }
|
|
func (m *NameCodeParentReply) String() string { return proto.CompactTextString(m) }
|
|
func (*NameCodeParentReply) ProtoMessage() {}
|
|
func (*NameCodeParentReply) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e183bc545e5b5a19, []int{0}
|
|
}
|
|
|
|
func (m *NameCodeParentReply) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NameCodeParentReply.Unmarshal(m, b)
|
|
}
|
|
func (m *NameCodeParentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NameCodeParentReply.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NameCodeParentReply) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NameCodeParentReply.Merge(m, src)
|
|
}
|
|
func (m *NameCodeParentReply) XXX_Size() int {
|
|
return xxx_messageInfo_NameCodeParentReply.Size(m)
|
|
}
|
|
func (m *NameCodeParentReply) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NameCodeParentReply.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NameCodeParentReply proto.InternalMessageInfo
|
|
|
|
func (m *NameCodeParentReply) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *NameCodeParentReply) GetCode() string {
|
|
if m != nil {
|
|
return m.Code
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *NameCodeParentReply) GetParent() *NameCodeParentReply {
|
|
if m != nil {
|
|
return m.Parent
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// The response message containing the greetings
|
|
type NameCodeReply struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NameCodeReply) Reset() { *m = NameCodeReply{} }
|
|
func (m *NameCodeReply) String() string { return proto.CompactTextString(m) }
|
|
func (*NameCodeReply) ProtoMessage() {}
|
|
func (*NameCodeReply) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e183bc545e5b5a19, []int{1}
|
|
}
|
|
|
|
func (m *NameCodeReply) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NameCodeReply.Unmarshal(m, b)
|
|
}
|
|
func (m *NameCodeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NameCodeReply.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NameCodeReply) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NameCodeReply.Merge(m, src)
|
|
}
|
|
func (m *NameCodeReply) XXX_Size() int {
|
|
return xxx_messageInfo_NameCodeReply.Size(m)
|
|
}
|
|
func (m *NameCodeReply) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NameCodeReply.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NameCodeReply proto.InternalMessageInfo
|
|
|
|
func (m *NameCodeReply) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *NameCodeReply) GetCode() string {
|
|
if m != nil {
|
|
return m.Code
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*NameCodeParentReply)(nil), "main.NameCodeParentReply")
|
|
proto.RegisterType((*NameCodeReply)(nil), "main.NameCodeReply")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("province.proto", fileDescriptor_e183bc545e5b5a19)
|
|
}
|
|
|
|
var fileDescriptor_e183bc545e5b5a19 = []byte{
|
|
// 313 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x28, 0xca, 0x2f,
|
|
0xcb, 0xcc, 0x4b, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc,
|
|
0x93, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb,
|
|
0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0xa8, 0x91, 0xe2, 0x4a, 0x4a, 0x2c, 0x86,
|
|
0xaa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, 0x08, 0xe8, 0xe6, 0xe1, 0x0e, 0x29, 0x25, 0x65, 0xb0, 0xa9, 0xb2, 0x4a,
|
|
0x12, 0x18, 0xa6, 0xea, 0x43, 0xc2, 0x10, 0xea, 0x4c, 0x70, 0x00, 0x90, 0xec, 0xcc, 0xe4, 0xcc,
|
|
0x92, 0x4a, 0x74, 0x67, 0x82, 0x4c, 0xa2, 0xcc, 0x99, 0x28, 0xa6, 0x22, 0x9c, 0xe9, 0xc4, 0x11,
|
|
0xc5, 0xa6, 0x67, 0x0d, 0x32, 0x22, 0x89, 0x0d, 0x9c, 0xe0, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff,
|
|
0xff, 0x13, 0xfb, 0x70, 0x4d, 0xb2, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConnInterface
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion6
|
|
|
|
// ProvinceAreaCityClient is the client API for ProvinceAreaCity service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type ProvinceAreaCityClient interface {
|
|
// Sends a greeting
|
|
Province(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error)
|
|
Area(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error)
|
|
AreaParent(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeParentReply, error)
|
|
City(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error)
|
|
CityParent(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeParentReply, error)
|
|
}
|
|
|
|
type provinceAreaCityClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewProvinceAreaCityClient(cc grpc.ClientConnInterface) ProvinceAreaCityClient {
|
|
return &provinceAreaCityClient{cc}
|
|
}
|
|
|
|
func (c *provinceAreaCityClient) Province(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error) {
|
|
out := new(NameCodeReply)
|
|
err := c.cc.Invoke(ctx, "/main.ProvinceAreaCity/Province", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *provinceAreaCityClient) Area(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error) {
|
|
out := new(NameCodeReply)
|
|
err := c.cc.Invoke(ctx, "/main.ProvinceAreaCity/Area", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *provinceAreaCityClient) AreaParent(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeParentReply, error) {
|
|
out := new(NameCodeParentReply)
|
|
err := c.cc.Invoke(ctx, "/main.ProvinceAreaCity/AreaParent", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *provinceAreaCityClient) City(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, error) {
|
|
out := new(NameCodeReply)
|
|
err := c.cc.Invoke(ctx, "/main.ProvinceAreaCity/City", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *provinceAreaCityClient) CityParent(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeParentReply, error) {
|
|
out := new(NameCodeParentReply)
|
|
err := c.cc.Invoke(ctx, "/main.ProvinceAreaCity/CityParent", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ProvinceAreaCityServer is the server API for ProvinceAreaCity service.
|
|
type ProvinceAreaCityServer interface {
|
|
// Sends a greeting
|
|
Province(context.Context, *Request) (*NameCodeReply, error)
|
|
Area(context.Context, *Request) (*NameCodeReply, error)
|
|
AreaParent(context.Context, *Request) (*NameCodeParentReply, error)
|
|
City(context.Context, *Request) (*NameCodeReply, error)
|
|
CityParent(context.Context, *Request) (*NameCodeParentReply, error)
|
|
}
|
|
|
|
// UnimplementedProvinceAreaCityServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedProvinceAreaCityServer struct {
|
|
}
|
|
|
|
func (*UnimplementedProvinceAreaCityServer) Province(ctx context.Context, req *Request) (*NameCodeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Province not implemented")
|
|
}
|
|
func (*UnimplementedProvinceAreaCityServer) Area(ctx context.Context, req *Request) (*NameCodeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Area not implemented")
|
|
}
|
|
func (*UnimplementedProvinceAreaCityServer) AreaParent(ctx context.Context, req *Request) (*NameCodeParentReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AreaParent not implemented")
|
|
}
|
|
func (*UnimplementedProvinceAreaCityServer) City(ctx context.Context, req *Request) (*NameCodeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method City not implemented")
|
|
}
|
|
func (*UnimplementedProvinceAreaCityServer) CityParent(ctx context.Context, req *Request) (*NameCodeParentReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CityParent not implemented")
|
|
}
|
|
|
|
func RegisterProvinceAreaCityServer(s *grpc.Server, srv ProvinceAreaCityServer) {
|
|
s.RegisterService(&_ProvinceAreaCity_serviceDesc, srv)
|
|
}
|
|
|
|
func _ProvinceAreaCity_Province_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProvinceAreaCityServer).Province(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/main.ProvinceAreaCity/Province",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProvinceAreaCityServer).Province(ctx, req.(*Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ProvinceAreaCity_Area_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProvinceAreaCityServer).Area(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/main.ProvinceAreaCity/Area",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProvinceAreaCityServer).Area(ctx, req.(*Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ProvinceAreaCity_AreaParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProvinceAreaCityServer).AreaParent(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/main.ProvinceAreaCity/AreaParent",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProvinceAreaCityServer).AreaParent(ctx, req.(*Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ProvinceAreaCity_City_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProvinceAreaCityServer).City(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/main.ProvinceAreaCity/City",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProvinceAreaCityServer).City(ctx, req.(*Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ProvinceAreaCity_CityParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ProvinceAreaCityServer).CityParent(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/main.ProvinceAreaCity/CityParent",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ProvinceAreaCityServer).CityParent(ctx, req.(*Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _ProvinceAreaCity_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "main.ProvinceAreaCity",
|
|
HandlerType: (*ProvinceAreaCityServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Province",
|
|
Handler: _ProvinceAreaCity_Province_Handler,
|
|
},
|
|
{
|
|
MethodName: "Area",
|
|
Handler: _ProvinceAreaCity_Area_Handler,
|
|
},
|
|
{
|
|
MethodName: "AreaParent",
|
|
Handler: _ProvinceAreaCity_AreaParent_Handler,
|
|
},
|
|
{
|
|
MethodName: "City",
|
|
Handler: _ProvinceAreaCity_City_Handler,
|
|
},
|
|
{
|
|
MethodName: "CityParent",
|
|
Handler: _ProvinceAreaCity_CityParent_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "province.proto",
|
|
}
|