// Code generated by protoc-gen-go. DO NOT EDIT. // source: model.proto package model import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" 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 type Product struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Product) Reset() { *m = Product{} } func (m *Product) String() string { return proto.CompactTextString(m) } func (*Product) ProtoMessage() {} func (*Product) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{0} } func (m *Product) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Product.Unmarshal(m, b) } func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Product.Marshal(b, m, deterministic) } func (m *Product) XXX_Merge(src proto.Message) { xxx_messageInfo_Product.Merge(m, src) } func (m *Product) XXX_Size() int { return xxx_messageInfo_Product.Size(m) } func (m *Product) XXX_DiscardUnknown() { xxx_messageInfo_Product.DiscardUnknown(m) } var xxx_messageInfo_Product proto.InternalMessageInfo func (m *Product) GetId() uint64 { if m != nil { return m.Id } return 0 } func (m *Product) GetName() string { if m != nil { return m.Name } return "" } func (m *Product) GetPrice() float32 { if m != nil { return m.Price } return 0 } type Item struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quanity int32 `protobuf:"varint,2,opt,name=quanity,proto3" json:"quanity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Item) Reset() { *m = Item{} } func (m *Item) String() string { return proto.CompactTextString(m) } func (*Item) ProtoMessage() {} func (*Item) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{1} } func (m *Item) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Item.Unmarshal(m, b) } func (m *Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Item.Marshal(b, m, deterministic) } func (m *Item) XXX_Merge(src proto.Message) { xxx_messageInfo_Item.Merge(m, src) } func (m *Item) XXX_Size() int { return xxx_messageInfo_Item.Size(m) } func (m *Item) XXX_DiscardUnknown() { xxx_messageInfo_Item.DiscardUnknown(m) } var xxx_messageInfo_Item proto.InternalMessageInfo func (m *Item) GetProductId() uint64 { if m != nil { return m.ProductId } return 0 } func (m *Item) GetQuanity() int32 { if m != nil { return m.Quanity } return 0 } type Cart struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` TotalPrice float32 `protobuf:"fixed32,2,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"` ItemsCount int32 `protobuf:"varint,3,opt,name=items_count,json=itemsCount,proto3" json:"items_count,omitempty"` QuanityCount int32 `protobuf:"varint,4,opt,name=quanity_count,json=quanityCount,proto3" json:"quanity_count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Cart) Reset() { *m = Cart{} } func (m *Cart) String() string { return proto.CompactTextString(m) } func (*Cart) ProtoMessage() {} func (*Cart) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{2} } func (m *Cart) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Cart.Unmarshal(m, b) } func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Cart.Marshal(b, m, deterministic) } func (m *Cart) XXX_Merge(src proto.Message) { xxx_messageInfo_Cart.Merge(m, src) } func (m *Cart) XXX_Size() int { return xxx_messageInfo_Cart.Size(m) } func (m *Cart) XXX_DiscardUnknown() { xxx_messageInfo_Cart.DiscardUnknown(m) } var xxx_messageInfo_Cart proto.InternalMessageInfo func (m *Cart) GetItems() []*Item { if m != nil { return m.Items } return nil } func (m *Cart) GetTotalPrice() float32 { if m != nil { return m.TotalPrice } return 0 } func (m *Cart) GetItemsCount() int32 { if m != nil { return m.ItemsCount } return 0 } func (m *Cart) GetQuanityCount() int32 { if m != nil { return m.QuanityCount } return 0 } type AddRequest struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quanity int32 `protobuf:"varint,2,opt,name=quanity,proto3" json:"quanity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *AddRequest) Reset() { *m = AddRequest{} } func (m *AddRequest) String() string { return proto.CompactTextString(m) } func (*AddRequest) ProtoMessage() {} func (*AddRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{3} } func (m *AddRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddRequest.Unmarshal(m, b) } func (m *AddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_AddRequest.Marshal(b, m, deterministic) } func (m *AddRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AddRequest.Merge(m, src) } func (m *AddRequest) XXX_Size() int { return xxx_messageInfo_AddRequest.Size(m) } func (m *AddRequest) XXX_DiscardUnknown() { xxx_messageInfo_AddRequest.DiscardUnknown(m) } var xxx_messageInfo_AddRequest proto.InternalMessageInfo func (m *AddRequest) GetProductId() uint64 { if m != nil { return m.ProductId } return 0 } func (m *AddRequest) GetQuanity() int32 { if m != nil { return m.Quanity } return 0 } type GetRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *GetRequest) Reset() { *m = GetRequest{} } func (m *GetRequest) String() string { return proto.CompactTextString(m) } func (*GetRequest) ProtoMessage() {} func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{4} } func (m *GetRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetRequest.Unmarshal(m, b) } func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) } func (m *GetRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_GetRequest.Merge(m, src) } func (m *GetRequest) XXX_Size() int { return xxx_messageInfo_GetRequest.Size(m) } func (m *GetRequest) XXX_DiscardUnknown() { xxx_messageInfo_GetRequest.DiscardUnknown(m) } var xxx_messageInfo_GetRequest proto.InternalMessageInfo type UpdateRequest struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quanity int32 `protobuf:"varint,2,opt,name=quanity,proto3" json:"quanity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *UpdateRequest) Reset() { *m = UpdateRequest{} } func (m *UpdateRequest) String() string { return proto.CompactTextString(m) } func (*UpdateRequest) ProtoMessage() {} func (*UpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{5} } func (m *UpdateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateRequest.Unmarshal(m, b) } func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UpdateRequest.Marshal(b, m, deterministic) } func (m *UpdateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_UpdateRequest.Merge(m, src) } func (m *UpdateRequest) XXX_Size() int { return xxx_messageInfo_UpdateRequest.Size(m) } func (m *UpdateRequest) XXX_DiscardUnknown() { xxx_messageInfo_UpdateRequest.DiscardUnknown(m) } var xxx_messageInfo_UpdateRequest proto.InternalMessageInfo func (m *UpdateRequest) GetProductId() uint64 { if m != nil { return m.ProductId } return 0 } func (m *UpdateRequest) GetQuanity() int32 { if m != nil { return m.Quanity } return 0 } type RemoveRequest struct { ProductId uint64 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *RemoveRequest) Reset() { *m = RemoveRequest{} } func (m *RemoveRequest) String() string { return proto.CompactTextString(m) } func (*RemoveRequest) ProtoMessage() {} func (*RemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{6} } func (m *RemoveRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveRequest.Unmarshal(m, b) } func (m *RemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RemoveRequest.Marshal(b, m, deterministic) } func (m *RemoveRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_RemoveRequest.Merge(m, src) } func (m *RemoveRequest) XXX_Size() int { return xxx_messageInfo_RemoveRequest.Size(m) } func (m *RemoveRequest) XXX_DiscardUnknown() { xxx_messageInfo_RemoveRequest.DiscardUnknown(m) } var xxx_messageInfo_RemoveRequest proto.InternalMessageInfo func (m *RemoveRequest) GetProductId() uint64 { if m != nil { return m.ProductId } return 0 } type Response struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Types that are valid to be assigned to Result: // *Response_Item // *Response_Cart Result isResponse_Result `protobuf_oneof:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor_4c16552f9fdb66d8, []int{7} } func (m *Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Response.Unmarshal(m, b) } func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Response.Marshal(b, m, deterministic) } func (m *Response) XXX_Merge(src proto.Message) { xxx_messageInfo_Response.Merge(m, src) } func (m *Response) XXX_Size() int { return xxx_messageInfo_Response.Size(m) } func (m *Response) XXX_DiscardUnknown() { xxx_messageInfo_Response.DiscardUnknown(m) } var xxx_messageInfo_Response proto.InternalMessageInfo func (m *Response) GetOk() bool { if m != nil { return m.Ok } return false } func (m *Response) GetDescription() string { if m != nil { return m.Description } return "" } type isResponse_Result interface { isResponse_Result() } type Response_Item struct { Item *Item `protobuf:"bytes,3,opt,name=item,proto3,oneof"` } type Response_Cart struct { Cart *Cart `protobuf:"bytes,4,opt,name=cart,proto3,oneof"` } func (*Response_Item) isResponse_Result() {} func (*Response_Cart) isResponse_Result() {} func (m *Response) GetResult() isResponse_Result { if m != nil { return m.Result } return nil } func (m *Response) GetItem() *Item { if x, ok := m.GetResult().(*Response_Item); ok { return x.Item } return nil } func (m *Response) GetCart() *Cart { if x, ok := m.GetResult().(*Response_Cart); ok { return x.Cart } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*Response) XXX_OneofWrappers() []interface{} { return []interface{}{ (*Response_Item)(nil), (*Response_Cart)(nil), } } func init() { proto.RegisterType((*Product)(nil), "model.Product") proto.RegisterType((*Item)(nil), "model.Item") proto.RegisterType((*Cart)(nil), "model.Cart") proto.RegisterType((*AddRequest)(nil), "model.AddRequest") proto.RegisterType((*GetRequest)(nil), "model.GetRequest") proto.RegisterType((*UpdateRequest)(nil), "model.UpdateRequest") proto.RegisterType((*RemoveRequest)(nil), "model.RemoveRequest") proto.RegisterType((*Response)(nil), "model.Response") } func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) } var fileDescriptor_4c16552f9fdb66d8 = []byte{ // 402 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xcf, 0x4a, 0xc3, 0x40, 0x10, 0xc6, 0xbb, 0x69, 0xd2, 0xa6, 0x93, 0x56, 0x71, 0xe9, 0x21, 0x08, 0x62, 0x1a, 0x2f, 0x01, 0xa1, 0x60, 0x7d, 0x00, 0xa9, 0x45, 0xda, 0xde, 0xca, 0x8a, 0xe7, 0x12, 0xb3, 0x0b, 0x86, 0x36, 0xd9, 0x34, 0xd9, 0x08, 0xbe, 0x83, 0x07, 0x9f, 0xcb, 0xa7, 0x92, 0xfd, 0xd3, 0xd6, 0x42, 0x05, 0xd1, 0x5b, 0xe6, 0x9b, 0xdf, 0x7c, 0x99, 0x7c, 0x43, 0xc0, 0xcb, 0x38, 0x65, 0xeb, 0x61, 0x51, 0x72, 0xc1, 0xb1, 0xa3, 0x8a, 0x70, 0x02, 0xed, 0x45, 0xc9, 0x69, 0x9d, 0x08, 0x7c, 0x02, 0x56, 0x4a, 0x7d, 0x14, 0xa0, 0xc8, 0x26, 0x56, 0x4a, 0x31, 0x06, 0x3b, 0x8f, 0x33, 0xe6, 0x5b, 0x01, 0x8a, 0x3a, 0x44, 0x3d, 0xe3, 0x3e, 0x38, 0x45, 0x99, 0x26, 0xcc, 0x6f, 0x06, 0x28, 0xb2, 0x88, 0x2e, 0xc2, 0x3b, 0xb0, 0xe7, 0x82, 0x65, 0xf8, 0x02, 0xa0, 0xd0, 0x66, 0xcb, 0x9d, 0x53, 0xc7, 0x28, 0x73, 0x8a, 0x7d, 0x68, 0x6f, 0xea, 0x38, 0x4f, 0xc5, 0x9b, 0xf2, 0x74, 0xc8, 0xb6, 0x0c, 0x3f, 0x10, 0xd8, 0x93, 0xb8, 0x14, 0x78, 0x00, 0x4e, 0x2a, 0x58, 0x56, 0xf9, 0x28, 0x68, 0x46, 0xde, 0xc8, 0x1b, 0xea, 0x95, 0xa5, 0x3b, 0xd1, 0x1d, 0x7c, 0x09, 0x9e, 0xe0, 0x22, 0x5e, 0x2f, 0xf5, 0x22, 0x96, 0x5a, 0x04, 0x94, 0xb4, 0x90, 0x8a, 0x04, 0x14, 0xb9, 0x4c, 0x78, 0x9d, 0x0b, 0xb5, 0xa9, 0x43, 0x40, 0x49, 0x13, 0xa9, 0xe0, 0x2b, 0xe8, 0x99, 0x17, 0x1b, 0xc4, 0x56, 0x48, 0xd7, 0x88, 0x0a, 0x0a, 0x1f, 0x00, 0xc6, 0x94, 0x12, 0xb6, 0xa9, 0x59, 0x25, 0xfe, 0xfe, 0x65, 0x5d, 0x80, 0x29, 0x13, 0xc6, 0x26, 0x9c, 0x41, 0xef, 0xa9, 0xa0, 0xb1, 0x60, 0xff, 0xf6, 0x1d, 0x42, 0x8f, 0xb0, 0x8c, 0xbf, 0xfe, 0xd2, 0x29, 0x7c, 0x47, 0xe0, 0x12, 0x56, 0x15, 0x3c, 0xaf, 0x98, 0xbc, 0x34, 0x5f, 0x29, 0xc6, 0x25, 0x16, 0x5f, 0xe1, 0x00, 0x3c, 0xca, 0xaa, 0xa4, 0x4c, 0x0b, 0x91, 0xf2, 0xdc, 0x1c, 0xfc, 0xbb, 0x84, 0x07, 0x60, 0xcb, 0x00, 0x55, 0x98, 0x87, 0x67, 0x99, 0x35, 0x88, 0x6a, 0x49, 0x24, 0x89, 0x4b, 0x1d, 0xe6, 0x1e, 0x91, 0x57, 0x95, 0x88, 0x6c, 0xdd, 0xbb, 0xd0, 0x2a, 0x59, 0x55, 0xaf, 0xc5, 0xe8, 0x13, 0x81, 0xfb, 0xf8, 0xc2, 0x0b, 0x75, 0xf4, 0x6b, 0x68, 0x8e, 0x29, 0xc5, 0x67, 0x66, 0x64, 0x1f, 0xfb, 0xf9, 0xa9, 0x91, 0xb6, 0x9b, 0x87, 0x0d, 0x09, 0x4f, 0x99, 0xd8, 0xc1, 0xfb, 0x70, 0x8f, 0xc1, 0x37, 0xd0, 0xd2, 0x79, 0xe3, 0xbe, 0x69, 0x1e, 0xc4, 0xff, 0xc3, 0x88, 0x0e, 0x76, 0x37, 0x72, 0x90, 0xf3, 0x91, 0x91, 0xe7, 0x96, 0xfa, 0xa3, 0x6e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x9b, 0xe9, 0x0b, 0x60, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // 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.SupportPackageIsVersion4 // ShopCartClient is the client API for ShopCart service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ShopCartClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*Response, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Response, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Response, error) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*Response, error) } type shopCartClient struct { cc *grpc.ClientConn } func NewShopCartClient(cc *grpc.ClientConn) ShopCartClient { return &shopCartClient{cc} } func (c *shopCartClient) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/model.ShopCart/Add", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopCartClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/model.ShopCart/Get", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopCartClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/model.ShopCart/Update", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shopCartClient) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/model.ShopCart/Remove", in, out, opts...) if err != nil { return nil, err } return out, nil } // ShopCartServer is the server API for ShopCart service. type ShopCartServer interface { Add(context.Context, *AddRequest) (*Response, error) Get(context.Context, *GetRequest) (*Response, error) Update(context.Context, *UpdateRequest) (*Response, error) Remove(context.Context, *RemoveRequest) (*Response, error) } // UnimplementedShopCartServer can be embedded to have forward compatible implementations. type UnimplementedShopCartServer struct { } func (*UnimplementedShopCartServer) Add(ctx context.Context, req *AddRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") } func (*UnimplementedShopCartServer) Get(ctx context.Context, req *GetRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } func (*UnimplementedShopCartServer) Update(ctx context.Context, req *UpdateRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (*UnimplementedShopCartServer) Remove(ctx context.Context, req *RemoveRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented") } func RegisterShopCartServer(s *grpc.Server, srv ShopCartServer) { s.RegisterService(&_ShopCart_serviceDesc, srv) } func _ShopCart_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopCartServer).Add(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/model.ShopCart/Add", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopCartServer).Add(ctx, req.(*AddRequest)) } return interceptor(ctx, in, info, handler) } func _ShopCart_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopCartServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/model.ShopCart/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopCartServer).Get(ctx, req.(*GetRequest)) } return interceptor(ctx, in, info, handler) } func _ShopCart_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopCartServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/model.ShopCart/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopCartServer).Update(ctx, req.(*UpdateRequest)) } return interceptor(ctx, in, info, handler) } func _ShopCart_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RemoveRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ShopCartServer).Remove(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/model.ShopCart/Remove", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShopCartServer).Remove(ctx, req.(*RemoveRequest)) } return interceptor(ctx, in, info, handler) } var _ShopCart_serviceDesc = grpc.ServiceDesc{ ServiceName: "model.ShopCart", HandlerType: (*ShopCartServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _ShopCart_Add_Handler, }, { MethodName: "Get", Handler: _ShopCart_Get_Handler, }, { MethodName: "Update", Handler: _ShopCart_Update_Handler, }, { MethodName: "Remove", Handler: _ShopCart_Remove_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "model.proto", }