Documentation ¶
Index ¶
- Variables
- func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
- type AddToCartRequest
- func (*AddToCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddToCartRequest) GetProductId() string
- func (x *AddToCartRequest) GetUserId() string
- func (*AddToCartRequest) ProtoMessage()
- func (x *AddToCartRequest) ProtoReflect() protoreflect.Message
- func (x *AddToCartRequest) Reset()
- func (x *AddToCartRequest) String() string
- type CartContentRequest
- func (*CartContentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CartContentRequest) GetUserId() string
- func (*CartContentRequest) ProtoMessage()
- func (x *CartContentRequest) ProtoReflect() protoreflect.Message
- func (x *CartContentRequest) Reset()
- func (x *CartContentRequest) String() string
- type CartContentResponse
- func (*CartContentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CartContentResponse) GetCartItems() []*CartItem
- func (*CartContentResponse) ProtoMessage()
- func (x *CartContentResponse) ProtoReflect() protoreflect.Message
- func (x *CartContentResponse) Reset()
- func (x *CartContentResponse) String() string
- type CartItem
- func (*CartItem) Descriptor() ([]byte, []int)deprecated
- func (x *CartItem) GetDescription() string
- func (x *CartItem) GetId() string
- func (x *CartItem) GetImage() string
- func (x *CartItem) GetPrice() float32
- func (x *CartItem) GetProductId() string
- func (x *CartItem) GetTitle() string
- func (*CartItem) ProtoMessage()
- func (x *CartItem) ProtoReflect() protoreflect.Message
- func (x *CartItem) Reset()
- func (x *CartItem) String() string
- type CartOperation
- type CartOperationRequest
- func (*CartOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CartOperationRequest) GetProductId() string
- func (x *CartOperationRequest) GetUserId() string
- func (*CartOperationRequest) ProtoMessage()
- func (x *CartOperationRequest) ProtoReflect() protoreflect.Message
- func (x *CartOperationRequest) Reset()
- func (x *CartOperationRequest) String() string
- type CartServiceClient
- type CartServiceServer
- type RemoveFromCartRequest
- func (*RemoveFromCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveFromCartRequest) GetCartItemId() string
- func (x *RemoveFromCartRequest) GetUserId() string
- func (*RemoveFromCartRequest) ProtoMessage()
- func (x *RemoveFromCartRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveFromCartRequest) Reset()
- func (x *RemoveFromCartRequest) String() string
- type UnimplementedCartServiceServer
- func (UnimplementedCartServiceServer) AddToCart(context.Context, *AddToCartRequest) (*CartOperation, error)
- func (UnimplementedCartServiceServer) CartContent(context.Context, *CartContentRequest) (*CartContentResponse, error)
- func (UnimplementedCartServiceServer) RemoveFromCart(context.Context, *RemoveFromCartRequest) (*CartOperation, error)
- type UnsafeCartServiceServer
Constants ¶
This section is empty.
Variables ¶
var CartService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cart.CartService", HandlerType: (*CartServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CartContent", Handler: _CartService_CartContent_Handler, }, { MethodName: "AddToCart", Handler: _CartService_AddToCart_Handler, }, { MethodName: "RemoveFromCart", Handler: _CartService_RemoveFromCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cart.proto", }
CartService_ServiceDesc is the grpc.ServiceDesc for CartService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cart_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCartServiceServer ¶
func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
Types ¶
type AddToCartRequest ¶
type AddToCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=productId,proto3" json:"productId,omitempty"` // contains filtered or unexported fields }
func (*AddToCartRequest) Descriptor
deprecated
func (*AddToCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddToCartRequest.ProtoReflect.Descriptor instead.
func (*AddToCartRequest) GetProductId ¶
func (x *AddToCartRequest) GetProductId() string
func (*AddToCartRequest) GetUserId ¶
func (x *AddToCartRequest) GetUserId() string
func (*AddToCartRequest) ProtoMessage ¶
func (*AddToCartRequest) ProtoMessage()
func (*AddToCartRequest) ProtoReflect ¶
func (x *AddToCartRequest) ProtoReflect() protoreflect.Message
func (*AddToCartRequest) Reset ¶
func (x *AddToCartRequest) Reset()
func (*AddToCartRequest) String ¶
func (x *AddToCartRequest) String() string
type CartContentRequest ¶
type CartContentRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*CartContentRequest) Descriptor
deprecated
func (*CartContentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CartContentRequest.ProtoReflect.Descriptor instead.
func (*CartContentRequest) GetUserId ¶
func (x *CartContentRequest) GetUserId() string
func (*CartContentRequest) ProtoMessage ¶
func (*CartContentRequest) ProtoMessage()
func (*CartContentRequest) ProtoReflect ¶
func (x *CartContentRequest) ProtoReflect() protoreflect.Message
func (*CartContentRequest) Reset ¶
func (x *CartContentRequest) Reset()
func (*CartContentRequest) String ¶
func (x *CartContentRequest) String() string
type CartContentResponse ¶
type CartContentResponse struct { CartItems []*CartItem `protobuf:"bytes,2,rep,name=cartItems,proto3" json:"cartItems,omitempty"` // contains filtered or unexported fields }
func (*CartContentResponse) Descriptor
deprecated
func (*CartContentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CartContentResponse.ProtoReflect.Descriptor instead.
func (*CartContentResponse) GetCartItems ¶
func (x *CartContentResponse) GetCartItems() []*CartItem
func (*CartContentResponse) ProtoMessage ¶
func (*CartContentResponse) ProtoMessage()
func (*CartContentResponse) ProtoReflect ¶
func (x *CartContentResponse) ProtoReflect() protoreflect.Message
func (*CartContentResponse) Reset ¶
func (x *CartContentResponse) Reset()
func (*CartContentResponse) String ¶
func (x *CartContentResponse) String() string
type CartItem ¶
type CartItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=productId,proto3" json:"productId,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Price float32 `protobuf:"fixed32,5,opt,name=price,proto3" json:"price,omitempty"` Image string `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"` // contains filtered or unexported fields }
func (*CartItem) Descriptor
deprecated
func (*CartItem) GetDescription ¶
func (*CartItem) GetProductId ¶
func (*CartItem) ProtoMessage ¶
func (*CartItem) ProtoMessage()
func (*CartItem) ProtoReflect ¶
func (x *CartItem) ProtoReflect() protoreflect.Message
type CartOperation ¶
type CartOperation struct {
// contains filtered or unexported fields
}
func (*CartOperation) Descriptor
deprecated
func (*CartOperation) Descriptor() ([]byte, []int)
Deprecated: Use CartOperation.ProtoReflect.Descriptor instead.
func (*CartOperation) ProtoMessage ¶
func (*CartOperation) ProtoMessage()
func (*CartOperation) ProtoReflect ¶
func (x *CartOperation) ProtoReflect() protoreflect.Message
func (*CartOperation) Reset ¶
func (x *CartOperation) Reset()
func (*CartOperation) String ¶
func (x *CartOperation) String() string
type CartOperationRequest ¶
type CartOperationRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=productId,proto3" json:"productId,omitempty"` // contains filtered or unexported fields }
func (*CartOperationRequest) Descriptor
deprecated
func (*CartOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CartOperationRequest.ProtoReflect.Descriptor instead.
func (*CartOperationRequest) GetProductId ¶
func (x *CartOperationRequest) GetProductId() string
func (*CartOperationRequest) GetUserId ¶
func (x *CartOperationRequest) GetUserId() string
func (*CartOperationRequest) ProtoMessage ¶
func (*CartOperationRequest) ProtoMessage()
func (*CartOperationRequest) ProtoReflect ¶
func (x *CartOperationRequest) ProtoReflect() protoreflect.Message
func (*CartOperationRequest) Reset ¶
func (x *CartOperationRequest) Reset()
func (*CartOperationRequest) String ¶
func (x *CartOperationRequest) String() string
type CartServiceClient ¶
type CartServiceClient interface { CartContent(ctx context.Context, in *CartContentRequest, opts ...grpc.CallOption) (*CartContentResponse, error) AddToCart(ctx context.Context, in *AddToCartRequest, opts ...grpc.CallOption) (*CartOperation, error) RemoveFromCart(ctx context.Context, in *RemoveFromCartRequest, opts ...grpc.CallOption) (*CartOperation, error) }
CartServiceClient is the client API for CartService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCartServiceClient ¶
func NewCartServiceClient(cc grpc.ClientConnInterface) CartServiceClient
type CartServiceServer ¶
type CartServiceServer interface { CartContent(context.Context, *CartContentRequest) (*CartContentResponse, error) AddToCart(context.Context, *AddToCartRequest) (*CartOperation, error) RemoveFromCart(context.Context, *RemoveFromCartRequest) (*CartOperation, error) // contains filtered or unexported methods }
CartServiceServer is the server API for CartService service. All implementations must embed UnimplementedCartServiceServer for forward compatibility
type RemoveFromCartRequest ¶
type RemoveFromCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` CartItemId string `protobuf:"bytes,2,opt,name=cartItemId,proto3" json:"cartItemId,omitempty"` // contains filtered or unexported fields }
func (*RemoveFromCartRequest) Descriptor
deprecated
func (*RemoveFromCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveFromCartRequest.ProtoReflect.Descriptor instead.
func (*RemoveFromCartRequest) GetCartItemId ¶
func (x *RemoveFromCartRequest) GetCartItemId() string
func (*RemoveFromCartRequest) GetUserId ¶
func (x *RemoveFromCartRequest) GetUserId() string
func (*RemoveFromCartRequest) ProtoMessage ¶
func (*RemoveFromCartRequest) ProtoMessage()
func (*RemoveFromCartRequest) ProtoReflect ¶
func (x *RemoveFromCartRequest) ProtoReflect() protoreflect.Message
func (*RemoveFromCartRequest) Reset ¶
func (x *RemoveFromCartRequest) Reset()
func (*RemoveFromCartRequest) String ¶
func (x *RemoveFromCartRequest) String() string
type UnimplementedCartServiceServer ¶
type UnimplementedCartServiceServer struct { }
UnimplementedCartServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCartServiceServer) AddToCart ¶
func (UnimplementedCartServiceServer) AddToCart(context.Context, *AddToCartRequest) (*CartOperation, error)
func (UnimplementedCartServiceServer) CartContent ¶
func (UnimplementedCartServiceServer) CartContent(context.Context, *CartContentRequest) (*CartContentResponse, error)
func (UnimplementedCartServiceServer) RemoveFromCart ¶
func (UnimplementedCartServiceServer) RemoveFromCart(context.Context, *RemoveFromCartRequest) (*CartOperation, error)
type UnsafeCartServiceServer ¶
type UnsafeCartServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCartServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartServiceServer will result in compilation errors.