github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/function/proto/greeter.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: github.com/micro/go-micro/examples/function/proto/greeter.proto 3 4 /* 5 Package greeter is a generated protocol buffer package. 6 7 It is generated from these files: 8 github.com/micro/go-micro/examples/function/proto/greeter.proto 9 10 It has these top-level messages: 11 HelloRequest 12 HelloResponse 13 */ 14 package 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 HelloRequest struct { 37 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 38 } 39 40 func (m *HelloRequest) Reset() { *m = HelloRequest{} } 41 func (m *HelloRequest) String() string { return proto.CompactTextString(m) } 42 func (*HelloRequest) ProtoMessage() {} 43 func (*HelloRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 44 45 func (m *HelloRequest) GetName() string { 46 if m != nil { 47 return m.Name 48 } 49 return "" 50 } 51 52 type HelloResponse struct { 53 Greeting string `protobuf:"bytes,2,opt,name=greeting" json:"greeting,omitempty"` 54 } 55 56 func (m *HelloResponse) Reset() { *m = HelloResponse{} } 57 func (m *HelloResponse) String() string { return proto.CompactTextString(m) } 58 func (*HelloResponse) ProtoMessage() {} 59 func (*HelloResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } 60 61 func (m *HelloResponse) GetGreeting() string { 62 if m != nil { 63 return m.Greeting 64 } 65 return "" 66 } 67 68 func init() { 69 proto.RegisterType((*HelloRequest)(nil), "HelloRequest") 70 proto.RegisterType((*HelloResponse)(nil), "HelloResponse") 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 *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, 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 *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { 96 out := new(HelloResponse) 97 err := grpc.Invoke(ctx, "/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, *HelloRequest) (*HelloResponse, 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(HelloRequest) 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: "/Greeter/Hello", 125 } 126 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 127 return srv.(GreeterServer).Hello(ctx, req.(*HelloRequest)) 128 } 129 return interceptor(ctx, in, info, handler) 130 } 131 132 var _Greeter_serviceDesc = grpc.ServiceDesc{ 133 ServiceName: "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/function/proto/greeter.proto", 143 } 144 145 func init() { 146 proto.RegisterFile("github.com/micro/go-micro/examples/function/proto/greeter.proto", fileDescriptor0) 147 } 148 149 var fileDescriptor0 = []byte{ 150 // 167 bytes of a gzipped FileDescriptorProto 151 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8e, 0xcb, 0x0a, 0xc2, 0x30, 152 0x10, 0x45, 0xad, 0xf8, 0x1c, 0xac, 0x8b, 0xac, 0x4a, 0x57, 0x92, 0x55, 0x41, 0x48, 0xc0, 0x82, 153 0xbf, 0xa0, 0xeb, 0xfe, 0x41, 0x5b, 0xc6, 0x1a, 0x68, 0x32, 0x35, 0x0f, 0xf0, 0xf3, 0x85, 0x51, 154 0x44, 0x77, 0x73, 0xe1, 0xce, 0x39, 0x17, 0xce, 0x83, 0x89, 0xf7, 0xd4, 0xa9, 0x9e, 0xac, 0xb6, 155 0xa6, 0xf7, 0xa4, 0xf1, 0xd9, 0xda, 0x69, 0xc4, 0xa0, 0x6f, 0xc9, 0xf5, 0xd1, 0x90, 0xd3, 0x93, 156 0xa7, 0x48, 0x7a, 0xf0, 0x88, 0x11, 0xbd, 0xe2, 0x24, 0x25, 0xec, 0xae, 0x38, 0x8e, 0xd4, 0xe0, 157 0x23, 0x61, 0x88, 0x42, 0xc0, 0xc2, 0xb5, 0x16, 0x8b, 0xec, 0x90, 0x55, 0xdb, 0x86, 0x6f, 0x79, 158 0x84, 0xfc, 0xd3, 0x09, 0x13, 0xb9, 0x80, 0xa2, 0x84, 0x0d, 0x53, 0x8c, 0x1b, 0x8a, 0x39, 0x17, 159 0xbf, 0xf9, 0x54, 0xc3, 0xfa, 0xf2, 0x36, 0x88, 0x0a, 0x96, 0xfc, 0x27, 0x72, 0xf5, 0xeb, 0x28, 160 0xf7, 0xea, 0x0f, 0x27, 0x67, 0xdd, 0x8a, 0xc7, 0xd4, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, 161 0x67, 0xb8, 0xdf, 0xc6, 0x00, 0x00, 0x00, 162 }