github.com/jtzjtz/kit@v1.0.2/balance/example/pb/greeter.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: pb/greeter.proto 3 4 package helloworld 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 24 25 // The request message containing the user's name. 26 type HelloRequest struct { 27 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 28 XXX_NoUnkeyedLiteral struct{} `json:"-"` 29 XXX_unrecognized []byte `json:"-"` 30 XXX_sizecache int32 `json:"-"` 31 } 32 33 func (m *HelloRequest) Reset() { *m = HelloRequest{} } 34 func (m *HelloRequest) String() string { return proto.CompactTextString(m) } 35 func (*HelloRequest) ProtoMessage() {} 36 func (*HelloRequest) Descriptor() ([]byte, []int) { 37 return fileDescriptor_12ed69d2af90d5ad, []int{0} 38 } 39 40 func (m *HelloRequest) XXX_Unmarshal(b []byte) error { 41 return xxx_messageInfo_HelloRequest.Unmarshal(m, b) 42 } 43 func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 return xxx_messageInfo_HelloRequest.Marshal(b, m, deterministic) 45 } 46 func (m *HelloRequest) XXX_Merge(src proto.Message) { 47 xxx_messageInfo_HelloRequest.Merge(m, src) 48 } 49 func (m *HelloRequest) XXX_Size() int { 50 return xxx_messageInfo_HelloRequest.Size(m) 51 } 52 func (m *HelloRequest) XXX_DiscardUnknown() { 53 xxx_messageInfo_HelloRequest.DiscardUnknown(m) 54 } 55 56 var xxx_messageInfo_HelloRequest proto.InternalMessageInfo 57 58 func (m *HelloRequest) GetName() string { 59 if m != nil { 60 return m.Name 61 } 62 return "" 63 } 64 65 // The response message containing the greetings 66 type HelloReply struct { 67 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 68 XXX_NoUnkeyedLiteral struct{} `json:"-"` 69 XXX_unrecognized []byte `json:"-"` 70 XXX_sizecache int32 `json:"-"` 71 } 72 73 func (m *HelloReply) Reset() { *m = HelloReply{} } 74 func (m *HelloReply) String() string { return proto.CompactTextString(m) } 75 func (*HelloReply) ProtoMessage() {} 76 func (*HelloReply) Descriptor() ([]byte, []int) { 77 return fileDescriptor_12ed69d2af90d5ad, []int{1} 78 } 79 80 func (m *HelloReply) XXX_Unmarshal(b []byte) error { 81 return xxx_messageInfo_HelloReply.Unmarshal(m, b) 82 } 83 func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 84 return xxx_messageInfo_HelloReply.Marshal(b, m, deterministic) 85 } 86 func (m *HelloReply) XXX_Merge(src proto.Message) { 87 xxx_messageInfo_HelloReply.Merge(m, src) 88 } 89 func (m *HelloReply) XXX_Size() int { 90 return xxx_messageInfo_HelloReply.Size(m) 91 } 92 func (m *HelloReply) XXX_DiscardUnknown() { 93 xxx_messageInfo_HelloReply.DiscardUnknown(m) 94 } 95 96 var xxx_messageInfo_HelloReply proto.InternalMessageInfo 97 98 func (m *HelloReply) GetMessage() string { 99 if m != nil { 100 return m.Message 101 } 102 return "" 103 } 104 105 func init() { 106 proto.RegisterType((*HelloRequest)(nil), "helloworld.HelloRequest") 107 proto.RegisterType((*HelloReply)(nil), "helloworld.HelloReply") 108 } 109 110 func init() { proto.RegisterFile("pb/greeter.proto", fileDescriptor_12ed69d2af90d5ad) } 111 112 var fileDescriptor_12ed69d2af90d5ad = []byte{ 113 // 146 bytes of a gzipped FileDescriptorProto 114 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x28, 0x48, 0xd2, 0x4f, 115 0x2f, 0x4a, 0x4d, 0x2d, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xca, 0x48, 116 0xcd, 0xc9, 0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0x51, 0x52, 0xe2, 0xe2, 0xf1, 0x00, 0xf1, 0x82, 117 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x84, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 118 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x25, 0x35, 0x2e, 0x2e, 0xa8, 0x9a, 0x82, 0x9c, 0x4a, 119 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0x74, 0x98, 0x22, 0x18, 0xd7, 0xc8, 0x93, 120 0x8b, 0xdd, 0x1d, 0x62, 0x91, 0x90, 0x1d, 0x17, 0x47, 0x70, 0x62, 0x25, 0x58, 0x97, 0x90, 0x84, 121 0x1e, 0xc2, 0x3e, 0x3d, 0x64, 0xcb, 0xa4, 0xc4, 0xb0, 0xc8, 0x14, 0xe4, 0x54, 0x2a, 0x31, 0x24, 122 0xb1, 0x81, 0x5d, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x33, 0x1d, 0xde, 0x17, 0xbd, 0x00, 123 0x00, 0x00, 124 } 125 126 // Reference imports to suppress errors if they are not otherwise used. 127 var _ context.Context 128 var _ grpc.ClientConn 129 130 // This is a compile-time assertion to ensure that this generated file 131 // is compatible with the grpc package it is being compiled against. 132 const _ = grpc.SupportPackageIsVersion4 133 134 // GreeterClient is the client API for Greeter service. 135 // 136 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 137 type GreeterClient interface { 138 // Sends a greeting 139 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) 140 } 141 142 type greeterClient struct { 143 cc *grpc.ClientConn 144 } 145 146 func NewGreeterClient(cc *grpc.ClientConn) GreeterClient { 147 return &greeterClient{cc} 148 } 149 150 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) { 151 out := new(HelloReply) 152 err := c.cc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, opts...) 153 if err != nil { 154 return nil, err 155 } 156 return out, nil 157 } 158 159 // GreeterServer is the server API for Greeter service. 160 type GreeterServer interface { 161 // Sends a greeting 162 SayHello(context.Context, *HelloRequest) (*HelloReply, error) 163 } 164 165 func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) { 166 s.RegisterService(&_Greeter_serviceDesc, srv) 167 } 168 169 func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 170 in := new(HelloRequest) 171 if err := dec(in); err != nil { 172 return nil, err 173 } 174 if interceptor == nil { 175 return srv.(GreeterServer).SayHello(ctx, in) 176 } 177 info := &grpc.UnaryServerInfo{ 178 Server: srv, 179 FullMethod: "/helloworld.Greeter/SayHello", 180 } 181 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 182 return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest)) 183 } 184 return interceptor(ctx, in, info, handler) 185 } 186 187 var _Greeter_serviceDesc = grpc.ServiceDesc{ 188 ServiceName: "helloworld.Greeter", 189 HandlerType: (*GreeterServer)(nil), 190 Methods: []grpc.MethodDesc{ 191 { 192 MethodName: "SayHello", 193 Handler: _Greeter_SayHello_Handler, 194 }, 195 }, 196 Streams: []grpc.StreamDesc{}, 197 Metadata: "pb/greeter.proto", 198 }