data_workshop/country.pb.go

211 lines
7.2 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: country.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 CountryReply struct {
Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CountryReply) Reset() { *m = CountryReply{} }
func (m *CountryReply) String() string { return proto.CompactTextString(m) }
func (*CountryReply) ProtoMessage() {}
func (*CountryReply) Descriptor() ([]byte, []int) {
return fileDescriptor_43a73f5bdb29770c, []int{0}
}
func (m *CountryReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountryReply.Unmarshal(m, b)
}
func (m *CountryReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CountryReply.Marshal(b, m, deterministic)
}
func (m *CountryReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountryReply.Merge(m, src)
}
func (m *CountryReply) XXX_Size() int {
return xxx_messageInfo_CountryReply.Size(m)
}
func (m *CountryReply) XXX_DiscardUnknown() {
xxx_messageInfo_CountryReply.DiscardUnknown(m)
}
var xxx_messageInfo_CountryReply proto.InternalMessageInfo
func (m *CountryReply) GetImage() []byte {
if m != nil {
return m.Image
}
return nil
}
func init() {
proto.RegisterType((*CountryReply)(nil), "main.CountryReply")
}
func init() {
proto.RegisterFile("country.proto", fileDescriptor_43a73f5bdb29770c)
}
var fileDescriptor_43a73f5bdb29770c = []byte{
// 215 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x2f, 0xcd,
0x2b, 0x29, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, 0x93,
0xe2, 0x4a, 0x4a, 0x2c, 0x4e, 0x85, 0x88, 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, 0x54, 0xb8, 0x78, 0x9c, 0x21, 0x06, 0x04, 0xa5, 0x16, 0xe4, 0x54, 0x0a, 0x89, 0x70,
0xb1, 0x66, 0xe6, 0x26, 0xa6, 0xa7, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x41, 0x38, 0x46,
0x73, 0x19, 0xb9, 0xd8, 0xa1, 0xca, 0x84, 0xec, 0xb9, 0x58, 0xfc, 0x12, 0x73, 0x53, 0x85, 0x78,
0xf5, 0x40, 0x56, 0xe9, 0x05, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48, 0x71, 0xc3, 0xb8, 0x05,
0x39, 0x95, 0x4a, 0xd2, 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0x12, 0x55, 0x12, 0xd0, 0x2f, 0x33, 0xd4,
0x87, 0x3a, 0x50, 0x3f, 0x2f, 0x31, 0x37, 0xd5, 0x8a, 0x51, 0x4b, 0x28, 0x90, 0x8b, 0x3d, 0x20,
0x33, 0xb9, 0xa4, 0xb4, 0x08, 0xc3, 0x0c, 0x21, 0x08, 0x17, 0xd9, 0x41, 0x4a, 0xca, 0x60, 0xa3,
0x64, 0x95, 0x24, 0xd0, 0x8d, 0xd2, 0x2f, 0x80, 0x18, 0x62, 0xc5, 0xa8, 0xe5, 0xc4, 0x11, 0xc5,
0xa6, 0x67, 0x0d, 0xd2, 0x9b, 0xc4, 0x06, 0xf6, 0x96, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x58,
0x65, 0x9d, 0xf6, 0x17, 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
// CountryClient is the client API for Country service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CountryClient interface {
// Sends a greeting
Name(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
Picture(ctx context.Context, in *Request, opts ...grpc.CallOption) (*CountryReply, error)
}
type countryClient struct {
cc grpc.ClientConnInterface
}
func NewCountryClient(cc grpc.ClientConnInterface) CountryClient {
return &countryClient{cc}
}
func (c *countryClient) Name(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) {
out := new(Reply)
err := c.cc.Invoke(ctx, "/main.Country/Name", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *countryClient) Picture(ctx context.Context, in *Request, opts ...grpc.CallOption) (*CountryReply, error) {
out := new(CountryReply)
err := c.cc.Invoke(ctx, "/main.Country/Picture", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CountryServer is the server API for Country service.
type CountryServer interface {
// Sends a greeting
Name(context.Context, *Request) (*Reply, error)
Picture(context.Context, *Request) (*CountryReply, error)
}
// UnimplementedCountryServer can be embedded to have forward compatible implementations.
type UnimplementedCountryServer struct {
}
func (*UnimplementedCountryServer) Name(ctx context.Context, req *Request) (*Reply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Name not implemented")
}
func (*UnimplementedCountryServer) Picture(ctx context.Context, req *Request) (*CountryReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Picture not implemented")
}
func RegisterCountryServer(s *grpc.Server, srv CountryServer) {
s.RegisterService(&_Country_serviceDesc, srv)
}
func _Country_Name_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.(CountryServer).Name(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.Country/Name",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CountryServer).Name(ctx, req.(*Request))
}
return interceptor(ctx, in, info, handler)
}
func _Country_Picture_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.(CountryServer).Picture(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/main.Country/Picture",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CountryServer).Picture(ctx, req.(*Request))
}
return interceptor(ctx, in, info, handler)
}
var _Country_serviceDesc = grpc.ServiceDesc{
ServiceName: "main.Country",
HandlerType: (*CountryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Name",
Handler: _Country_Name_Handler,
},
{
MethodName: "Picture",
Handler: _Country_Picture_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "country.proto",
}