256 lines
9.2 KiB
Go
256 lines
9.2 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 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{0}
|
|
}
|
|
|
|
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((*NameCodeReply)(nil), "main.NameCodeReply")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("province.proto", fileDescriptor_e183bc545e5b5a19)
|
|
}
|
|
|
|
var fileDescriptor_e183bc545e5b5a19 = []byte{
|
|
// 238 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, 0xe2, 0x4a, 0x4a, 0x2c, 0x86, 0x8a, 0x48, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea,
|
|
0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43,
|
|
0x64, 0x95, 0xcc, 0xb9, 0x78, 0xfd, 0x12, 0x73, 0x53, 0x9d, 0xf3, 0x53, 0x52, 0x83, 0x52, 0x0b,
|
|
0x72, 0x2a, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38,
|
|
0x83, 0xc0, 0x6c, 0x90, 0x58, 0x72, 0x7e, 0x4a, 0xaa, 0x04, 0x13, 0x44, 0x0c, 0xc4, 0x36, 0xfa,
|
|
0xc1, 0xc8, 0x25, 0x10, 0x00, 0xb5, 0xdb, 0xb1, 0x28, 0x35, 0xd1, 0x39, 0xb3, 0xa4, 0x52, 0x28,
|
|
0x80, 0x8b, 0x03, 0x26, 0x26, 0xc4, 0xab, 0x07, 0x72, 0x8a, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a,
|
|
0x71, 0x89, 0x94, 0x30, 0x84, 0x8b, 0x62, 0x99, 0x92, 0x42, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0xa4,
|
|
0x94, 0x44, 0xf5, 0xcb, 0x0c, 0xf5, 0x61, 0x3e, 0xd1, 0x07, 0xd9, 0x09, 0xb2, 0xc3, 0x8a, 0x51,
|
|
0x4b, 0xc8, 0x83, 0x8b, 0x05, 0x64, 0x3a, 0x51, 0xa6, 0xc9, 0x80, 0x4d, 0x13, 0x53, 0x12, 0x04,
|
|
0x99, 0x96, 0x58, 0x94, 0x9a, 0x88, 0x6e, 0x12, 0xd8, 0x8d, 0x24, 0x9b, 0x94, 0x9c, 0x59, 0x52,
|
|
0x89, 0x6c, 0x92, 0x13, 0x47, 0x14, 0x9b, 0x9e, 0x35, 0x48, 0x57, 0x12, 0x1b, 0x38, 0x10, 0x8d,
|
|
0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xf8, 0xff, 0xa1, 0x86, 0x01, 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)
|
|
City(ctx context.Context, in *Request, opts ...grpc.CallOption) (*NameCodeReply, 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) 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
|
|
}
|
|
|
|
// 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)
|
|
City(context.Context, *Request) (*NameCodeReply, 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) City(ctx context.Context, req *Request) (*NameCodeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method City 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_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)
|
|
}
|
|
|
|
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: "City",
|
|
Handler: _ProvinceAreaCity_City_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "province.proto",
|
|
}
|