github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/greeter/api/rpc/proto/hello/hello.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: github.com/micro/go-micro/examples/greeter/api/rpc/proto/hello/hello.proto 3 4 /* 5 Package go_micro_api_greeter is a generated protocol buffer package. 6 7 It is generated from these files: 8 github.com/micro/go-micro/examples/greeter/api/rpc/proto/hello/hello.proto 9 10 It has these top-level messages: 11 Request 12 Response 13 */ 14 package go_micro_api_greeter 15 16 import proto "github.com/golang/protobuf/proto" 17 import fmt "fmt" 18 import math "math" 19 20 import ( 21 context "golang.org/x/net/context" 22 grpc "google.golang.org/grpc" 23 ) 24 25 // Reference imports to suppress errors if they are not otherwise used. 26 var _ = proto.Marshal 27 var _ = fmt.Errorf 28 var _ = math.Inf 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the proto package it is being compiled against. 32 // A compilation error at this line likely means your copy of the 33 // proto package needs to be updated. 34 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 35 36 type Request struct { 37 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 38 } 39 40 func (m *Request) Reset() { *m = Request{} } 41 func (m *Request) String() string { return proto.CompactTextString(m) } 42 func (*Request) ProtoMessage() {} 43 func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 44 45 func (m *Request) GetName() string { 46 if m != nil { 47 return m.Name 48 } 49 return "" 50 } 51 52 type Response struct { 53 Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` 54 } 55 56 func (m *Response) Reset() { *m = Response{} } 57 func (m *Response) String() string { return proto.CompactTextString(m) } 58 func (*Response) ProtoMessage() {} 59 func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 60 61 func (m *Response) GetMsg() string { 62 if m != nil { 63 return m.Msg 64 } 65 return "" 66 } 67 68 func init() { 69 proto.RegisterType((*Request)(nil), "go.micro.api.greeter.Request") 70 proto.RegisterType((*Response)(nil), "go.micro.api.greeter.Response") 71 } 72 73 // Reference imports to suppress errors if they are not otherwise used. 74 var _ context.Context 75 var _ grpc.ClientConn 76 77 // This is a compile-time assertion to ensure that this generated file 78 // is compatible with the grpc package it is being compiled against. 79 const _ = grpc.SupportPackageIsVersion4 80 81 // Client API for Greeter service 82 83 type GreeterClient interface { 84 Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 85 } 86 87 type greeterClient struct { 88 cc *grpc.ClientConn 89 } 90 91 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { 92 return &greeterClient{cc} 93 } 94 95 func (c *greeterClient) Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 96 out := new(Response) 97 err := grpc.Invoke(ctx, "/go.micro.api.greeter.Greeter/Hello", in, out, c.cc, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return out, nil 102 } 103 104 // Server API for Greeter service 105 106 type GreeterServer interface { 107 Hello(context.Context, *Request) (*Response, error) 108 } 109 110 func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) { 111 s.RegisterService(&_Greeter_serviceDesc, srv) 112 } 113 114 func _Greeter_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 115 in := new(Request) 116 if err := dec(in); err != nil { 117 return nil, err 118 } 119 if interceptor == nil { 120 return srv.(GreeterServer).Hello(ctx, in) 121 } 122 info := &grpc.UnaryServerInfo{ 123 Server: srv, 124 FullMethod: "/go.micro.api.greeter.Greeter/Hello", 125 } 126 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 127 return srv.(GreeterServer).Hello(ctx, req.(*Request)) 128 } 129 return interceptor(ctx, in, info, handler) 130 } 131 132 var _Greeter_serviceDesc = grpc.ServiceDesc{ 133 ServiceName: "go.micro.api.greeter.Greeter", 134 HandlerType: (*GreeterServer)(nil), 135 Methods: []grpc.MethodDesc{ 136 { 137 MethodName: "Hello", 138 Handler: _Greeter_Hello_Handler, 139 }, 140 }, 141 Streams: []grpc.StreamDesc{}, 142 Metadata: "github.com/micro/go-micro/examples/greeter/api/rpc/proto/hello/hello.proto", 143 } 144 145 func init() { 146 proto.RegisterFile("github.com/micro/go-micro/examples/greeter/api/rpc/proto/hello/hello.proto", fileDescriptor0) 147 } 148 149 var fileDescriptor0 = []byte{ 150 // 181 bytes of a gzipped FileDescriptorProto 151 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8e, 0xc1, 0xaa, 0xc2, 0x30, 152 0x10, 0x45, 0x5f, 0x79, 0x6a, 0x35, 0x2b, 0x09, 0x2e, 0x44, 0xac, 0x48, 0x57, 0xae, 0x66, 0x40, 153 0xbf, 0xc0, 0x95, 0x5d, 0xd7, 0x2f, 0x48, 0xcb, 0x90, 0x06, 0x9a, 0x26, 0x26, 0x29, 0xf8, 0xf9, 154 0xd2, 0x34, 0x4b, 0xdd, 0x0c, 0x97, 0xb9, 0x9c, 0x39, 0xc3, 0xee, 0x52, 0x85, 0x6e, 0x6c, 0xa0, 155 0x35, 0x1a, 0xb5, 0x6a, 0x9d, 0x41, 0x7a, 0x0b, 0x6d, 0x7b, 0xf2, 0x28, 0x1d, 0x51, 0x20, 0x87, 156 0xc2, 0x2a, 0x74, 0xb6, 0x45, 0xeb, 0x4c, 0x30, 0xd8, 0x51, 0xdf, 0xa7, 0x09, 0x71, 0xc3, 0x77, 157 0xd2, 0x40, 0x44, 0x41, 0x58, 0x05, 0x89, 0x2a, 0x0b, 0x96, 0xd7, 0xf4, 0x1a, 0xc9, 0x07, 0xce, 158 0xd9, 0x62, 0x10, 0x9a, 0xf6, 0xd9, 0x39, 0xbb, 0x6c, 0xea, 0x98, 0xcb, 0x23, 0x5b, 0xd7, 0xe4, 159 0xad, 0x19, 0x3c, 0xf1, 0x2d, 0xfb, 0xd7, 0x5e, 0xa6, 0x7a, 0x8a, 0xd7, 0x27, 0xcb, 0x1f, 0xf3, 160 0x1d, 0x5e, 0xb1, 0x65, 0x35, 0xc9, 0x78, 0x01, 0xdf, 0x3c, 0x90, 0x24, 0x87, 0xd3, 0xaf, 0x7a, 161 0x96, 0x94, 0x7f, 0xcd, 0x2a, 0xbe, 0x7b, 0xfb, 0x04, 0x00, 0x00, 0xff, 0xff, 0x04, 0xed, 0xc3, 162 0x67, 0xf3, 0x00, 0x00, 0x00, 163 }