1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: addsvc.proto 3 4package pb 5 6import ( 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. 15var _ = proto.Marshal 16var _ = fmt.Errorf 17var _ = 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. 23const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25// The sum request contains two parameters. 26type SumRequest struct { 27 A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` 28 B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_unrecognized []byte `json:"-"` 31 XXX_sizecache int32 `json:"-"` 32} 33 34func (m *SumRequest) Reset() { *m = SumRequest{} } 35func (m *SumRequest) String() string { return proto.CompactTextString(m) } 36func (*SumRequest) ProtoMessage() {} 37func (*SumRequest) Descriptor() ([]byte, []int) { 38 return fileDescriptor_174367f558d60c26, []int{0} 39} 40 41func (m *SumRequest) XXX_Unmarshal(b []byte) error { 42 return xxx_messageInfo_SumRequest.Unmarshal(m, b) 43} 44func (m *SumRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 return xxx_messageInfo_SumRequest.Marshal(b, m, deterministic) 46} 47func (m *SumRequest) XXX_Merge(src proto.Message) { 48 xxx_messageInfo_SumRequest.Merge(m, src) 49} 50func (m *SumRequest) XXX_Size() int { 51 return xxx_messageInfo_SumRequest.Size(m) 52} 53func (m *SumRequest) XXX_DiscardUnknown() { 54 xxx_messageInfo_SumRequest.DiscardUnknown(m) 55} 56 57var xxx_messageInfo_SumRequest proto.InternalMessageInfo 58 59func (m *SumRequest) GetA() int64 { 60 if m != nil { 61 return m.A 62 } 63 return 0 64} 65 66func (m *SumRequest) GetB() int64 { 67 if m != nil { 68 return m.B 69 } 70 return 0 71} 72 73// The sum response contains the result of the calculation. 74type SumReply struct { 75 V int64 `protobuf:"varint,1,opt,name=v,proto3" json:"v,omitempty"` 76 Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` 77 XXX_NoUnkeyedLiteral struct{} `json:"-"` 78 XXX_unrecognized []byte `json:"-"` 79 XXX_sizecache int32 `json:"-"` 80} 81 82func (m *SumReply) Reset() { *m = SumReply{} } 83func (m *SumReply) String() string { return proto.CompactTextString(m) } 84func (*SumReply) ProtoMessage() {} 85func (*SumReply) Descriptor() ([]byte, []int) { 86 return fileDescriptor_174367f558d60c26, []int{1} 87} 88 89func (m *SumReply) XXX_Unmarshal(b []byte) error { 90 return xxx_messageInfo_SumReply.Unmarshal(m, b) 91} 92func (m *SumReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 93 return xxx_messageInfo_SumReply.Marshal(b, m, deterministic) 94} 95func (m *SumReply) XXX_Merge(src proto.Message) { 96 xxx_messageInfo_SumReply.Merge(m, src) 97} 98func (m *SumReply) XXX_Size() int { 99 return xxx_messageInfo_SumReply.Size(m) 100} 101func (m *SumReply) XXX_DiscardUnknown() { 102 xxx_messageInfo_SumReply.DiscardUnknown(m) 103} 104 105var xxx_messageInfo_SumReply proto.InternalMessageInfo 106 107func (m *SumReply) GetV() int64 { 108 if m != nil { 109 return m.V 110 } 111 return 0 112} 113 114func (m *SumReply) GetErr() string { 115 if m != nil { 116 return m.Err 117 } 118 return "" 119} 120 121// The Concat request contains two parameters. 122type ConcatRequest struct { 123 A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"` 124 B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` 125 XXX_NoUnkeyedLiteral struct{} `json:"-"` 126 XXX_unrecognized []byte `json:"-"` 127 XXX_sizecache int32 `json:"-"` 128} 129 130func (m *ConcatRequest) Reset() { *m = ConcatRequest{} } 131func (m *ConcatRequest) String() string { return proto.CompactTextString(m) } 132func (*ConcatRequest) ProtoMessage() {} 133func (*ConcatRequest) Descriptor() ([]byte, []int) { 134 return fileDescriptor_174367f558d60c26, []int{2} 135} 136 137func (m *ConcatRequest) XXX_Unmarshal(b []byte) error { 138 return xxx_messageInfo_ConcatRequest.Unmarshal(m, b) 139} 140func (m *ConcatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 141 return xxx_messageInfo_ConcatRequest.Marshal(b, m, deterministic) 142} 143func (m *ConcatRequest) XXX_Merge(src proto.Message) { 144 xxx_messageInfo_ConcatRequest.Merge(m, src) 145} 146func (m *ConcatRequest) XXX_Size() int { 147 return xxx_messageInfo_ConcatRequest.Size(m) 148} 149func (m *ConcatRequest) XXX_DiscardUnknown() { 150 xxx_messageInfo_ConcatRequest.DiscardUnknown(m) 151} 152 153var xxx_messageInfo_ConcatRequest proto.InternalMessageInfo 154 155func (m *ConcatRequest) GetA() string { 156 if m != nil { 157 return m.A 158 } 159 return "" 160} 161 162func (m *ConcatRequest) GetB() string { 163 if m != nil { 164 return m.B 165 } 166 return "" 167} 168 169// The Concat response contains the result of the concatenation. 170type ConcatReply struct { 171 V string `protobuf:"bytes,1,opt,name=v,proto3" json:"v,omitempty"` 172 Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` 173 XXX_NoUnkeyedLiteral struct{} `json:"-"` 174 XXX_unrecognized []byte `json:"-"` 175 XXX_sizecache int32 `json:"-"` 176} 177 178func (m *ConcatReply) Reset() { *m = ConcatReply{} } 179func (m *ConcatReply) String() string { return proto.CompactTextString(m) } 180func (*ConcatReply) ProtoMessage() {} 181func (*ConcatReply) Descriptor() ([]byte, []int) { 182 return fileDescriptor_174367f558d60c26, []int{3} 183} 184 185func (m *ConcatReply) XXX_Unmarshal(b []byte) error { 186 return xxx_messageInfo_ConcatReply.Unmarshal(m, b) 187} 188func (m *ConcatReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 189 return xxx_messageInfo_ConcatReply.Marshal(b, m, deterministic) 190} 191func (m *ConcatReply) XXX_Merge(src proto.Message) { 192 xxx_messageInfo_ConcatReply.Merge(m, src) 193} 194func (m *ConcatReply) XXX_Size() int { 195 return xxx_messageInfo_ConcatReply.Size(m) 196} 197func (m *ConcatReply) XXX_DiscardUnknown() { 198 xxx_messageInfo_ConcatReply.DiscardUnknown(m) 199} 200 201var xxx_messageInfo_ConcatReply proto.InternalMessageInfo 202 203func (m *ConcatReply) GetV() string { 204 if m != nil { 205 return m.V 206 } 207 return "" 208} 209 210func (m *ConcatReply) GetErr() string { 211 if m != nil { 212 return m.Err 213 } 214 return "" 215} 216 217func init() { 218 proto.RegisterType((*SumRequest)(nil), "pb.SumRequest") 219 proto.RegisterType((*SumReply)(nil), "pb.SumReply") 220 proto.RegisterType((*ConcatRequest)(nil), "pb.ConcatRequest") 221 proto.RegisterType((*ConcatReply)(nil), "pb.ConcatReply") 222} 223 224func init() { proto.RegisterFile("addsvc.proto", fileDescriptor_174367f558d60c26) } 225 226var fileDescriptor_174367f558d60c26 = []byte{ 227 // 189 bytes of a gzipped FileDescriptorProto 228 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x4c, 0x49, 0x29, 229 0x2e, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0xd2, 0xe0, 0xe2, 230 0x0a, 0x2e, 0xcd, 0x0d, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0xe2, 0xe1, 0x62, 0x4c, 0x94, 231 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x62, 0x4c, 0x04, 0xf1, 0x92, 0x24, 0x98, 0x20, 0xbc, 0x24, 232 0x25, 0x2d, 0x2e, 0x0e, 0xb0, 0xca, 0x82, 0x9c, 0x4a, 0x90, 0x4c, 0x19, 0x4c, 0x5d, 0x99, 0x90, 233 0x00, 0x17, 0x73, 0x6a, 0x51, 0x11, 0x58, 0x25, 0x67, 0x10, 0x88, 0xa9, 0xa4, 0xcd, 0xc5, 0xeb, 234 0x9c, 0x9f, 0x97, 0x9c, 0x58, 0x82, 0x61, 0x30, 0x27, 0x8a, 0xc1, 0x9c, 0x20, 0x83, 0x75, 0xb9, 235 0xb8, 0x61, 0x8a, 0x51, 0xcc, 0xe6, 0xc4, 0x6a, 0xb6, 0x51, 0x0c, 0x17, 0xb3, 0x63, 0x4a, 0x8a, 236 0x90, 0x2a, 0x17, 0x73, 0x70, 0x69, 0xae, 0x10, 0x9f, 0x5e, 0x41, 0x92, 0x1e, 0xc2, 0x07, 0x52, 237 0x3c, 0x70, 0x7e, 0x41, 0x4e, 0xa5, 0x12, 0x83, 0x90, 0x1e, 0x17, 0x1b, 0xc4, 0x70, 0x21, 0x41, 238 0x90, 0x0c, 0x8a, 0xab, 0xa4, 0xf8, 0x91, 0x85, 0xc0, 0xea, 0x93, 0xd8, 0xc0, 0x41, 0x63, 0x0c, 239 0x08, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x37, 0x81, 0x99, 0x2a, 0x01, 0x00, 0x00, 240} 241 242// Reference imports to suppress errors if they are not otherwise used. 243var _ context.Context 244var _ grpc.ClientConn 245 246// This is a compile-time assertion to ensure that this generated file 247// is compatible with the grpc package it is being compiled against. 248const _ = grpc.SupportPackageIsVersion4 249 250// AddClient is the client API for Add service. 251// 252// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 253type AddClient interface { 254 // Sums two integers. 255 Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumReply, error) 256 // Concatenates two strings 257 Concat(ctx context.Context, in *ConcatRequest, opts ...grpc.CallOption) (*ConcatReply, error) 258} 259 260type addClient struct { 261 cc *grpc.ClientConn 262} 263 264func NewAddClient(cc *grpc.ClientConn) AddClient { 265 return &addClient{cc} 266} 267 268func (c *addClient) Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumReply, error) { 269 out := new(SumReply) 270 err := c.cc.Invoke(ctx, "/pb.Add/Sum", in, out, opts...) 271 if err != nil { 272 return nil, err 273 } 274 return out, nil 275} 276 277func (c *addClient) Concat(ctx context.Context, in *ConcatRequest, opts ...grpc.CallOption) (*ConcatReply, error) { 278 out := new(ConcatReply) 279 err := c.cc.Invoke(ctx, "/pb.Add/Concat", in, out, opts...) 280 if err != nil { 281 return nil, err 282 } 283 return out, nil 284} 285 286// AddServer is the server API for Add service. 287type AddServer interface { 288 // Sums two integers. 289 Sum(context.Context, *SumRequest) (*SumReply, error) 290 // Concatenates two strings 291 Concat(context.Context, *ConcatRequest) (*ConcatReply, error) 292} 293 294func RegisterAddServer(s *grpc.Server, srv AddServer) { 295 s.RegisterService(&_Add_serviceDesc, srv) 296} 297 298func _Add_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 299 in := new(SumRequest) 300 if err := dec(in); err != nil { 301 return nil, err 302 } 303 if interceptor == nil { 304 return srv.(AddServer).Sum(ctx, in) 305 } 306 info := &grpc.UnaryServerInfo{ 307 Server: srv, 308 FullMethod: "/pb.Add/Sum", 309 } 310 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 311 return srv.(AddServer).Sum(ctx, req.(*SumRequest)) 312 } 313 return interceptor(ctx, in, info, handler) 314} 315 316func _Add_Concat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 317 in := new(ConcatRequest) 318 if err := dec(in); err != nil { 319 return nil, err 320 } 321 if interceptor == nil { 322 return srv.(AddServer).Concat(ctx, in) 323 } 324 info := &grpc.UnaryServerInfo{ 325 Server: srv, 326 FullMethod: "/pb.Add/Concat", 327 } 328 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 329 return srv.(AddServer).Concat(ctx, req.(*ConcatRequest)) 330 } 331 return interceptor(ctx, in, info, handler) 332} 333 334var _Add_serviceDesc = grpc.ServiceDesc{ 335 ServiceName: "pb.Add", 336 HandlerType: (*AddServer)(nil), 337 Methods: []grpc.MethodDesc{ 338 { 339 MethodName: "Sum", 340 Handler: _Add_Sum_Handler, 341 }, 342 { 343 MethodName: "Concat", 344 Handler: _Add_Concat_Handler, 345 }, 346 }, 347 Streams: []grpc.StreamDesc{}, 348 Metadata: "addsvc.proto", 349} 350