Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCartServiceHTTPServer(s *http.Server, srv CartServiceHTTPServer)
- func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
- type AddItemRequest
- func (*AddItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemRequest) GetItem() *shared.CartItem
- func (x *AddItemRequest) GetUserId() string
- func (*AddItemRequest) ProtoMessage()
- func (x *AddItemRequest) ProtoReflect() protoreflect.Message
- func (x *AddItemRequest) Reset()
- func (x *AddItemRequest) String() string
- type CartServiceClient
- type CartServiceHTTPClient
- type CartServiceHTTPClientImpl
- func (c *CartServiceHTTPClientImpl) AddItem(ctx context.Context, in *AddItemRequest, opts ...http.CallOption) (*shared.Empty, error)
- func (c *CartServiceHTTPClientImpl) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...http.CallOption) (*shared.Empty, error)
- func (c *CartServiceHTTPClientImpl) GetCart(ctx context.Context, in *GetCartRequest, opts ...http.CallOption) (*shared.Cart, error)
- type CartServiceHTTPServer
- type CartServiceServer
- type EmptyCartRequest
- type GetCartRequest
- type UnimplementedCartServiceServer
- func (UnimplementedCartServiceServer) AddItem(context.Context, *AddItemRequest) (*shared.Empty, error)
- func (UnimplementedCartServiceServer) EmptyCart(context.Context, *EmptyCartRequest) (*shared.Empty, error)
- func (UnimplementedCartServiceServer) GetCart(context.Context, *GetCartRequest) (*shared.Cart, error)
- type UnsafeCartServiceServer
Constants ¶
const ( CartService_AddItem_FullMethodName = "/boutiqueshop.CartService/AddItem" CartService_GetCart_FullMethodName = "/boutiqueshop.CartService/GetCart" CartService_EmptyCart_FullMethodName = "/boutiqueshop.CartService/EmptyCart" )
const OperationCartServiceAddItem = "/boutiqueshop.CartService/AddItem"
const OperationCartServiceEmptyCart = "/boutiqueshop.CartService/EmptyCart"
const OperationCartServiceGetCart = "/boutiqueshop.CartService/GetCart"
Variables ¶
var CartService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "boutiqueshop.CartService", HandlerType: (*CartServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddItem", Handler: _CartService_AddItem_Handler, }, { MethodName: "GetCart", Handler: _CartService_GetCart_Handler, }, { MethodName: "EmptyCart", Handler: _CartService_EmptyCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cart/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_cart_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCartServiceHTTPServer ¶
func RegisterCartServiceHTTPServer(s *http.Server, srv CartServiceHTTPServer)
func RegisterCartServiceServer ¶
func RegisterCartServiceServer(s grpc.ServiceRegistrar, srv CartServiceServer)
Types ¶
type AddItemRequest ¶
type AddItemRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Item *shared.CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*AddItemRequest) Descriptor
deprecated
func (*AddItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddItemRequest.ProtoReflect.Descriptor instead.
func (*AddItemRequest) GetItem ¶
func (x *AddItemRequest) GetItem() *shared.CartItem
func (*AddItemRequest) GetUserId ¶
func (x *AddItemRequest) GetUserId() string
func (*AddItemRequest) ProtoMessage ¶
func (*AddItemRequest) ProtoMessage()
func (*AddItemRequest) ProtoReflect ¶
func (x *AddItemRequest) ProtoReflect() protoreflect.Message
func (*AddItemRequest) Reset ¶
func (x *AddItemRequest) Reset()
func (*AddItemRequest) String ¶
func (x *AddItemRequest) String() string
type CartServiceClient ¶
type CartServiceClient interface { AddItem(ctx context.Context, in *AddItemRequest, opts ...grpc.CallOption) (*shared.Empty, error) GetCart(ctx context.Context, in *GetCartRequest, opts ...grpc.CallOption) (*shared.Cart, error) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...grpc.CallOption) (*shared.Empty, 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 CartServiceHTTPClient ¶
type CartServiceHTTPClient interface { AddItem(ctx context.Context, req *AddItemRequest, opts ...http.CallOption) (rsp *shared.Empty, err error) EmptyCart(ctx context.Context, req *EmptyCartRequest, opts ...http.CallOption) (rsp *shared.Empty, err error) GetCart(ctx context.Context, req *GetCartRequest, opts ...http.CallOption) (rsp *shared.Cart, err error) }
func NewCartServiceHTTPClient ¶
func NewCartServiceHTTPClient(client *http.Client) CartServiceHTTPClient
type CartServiceHTTPClientImpl ¶
type CartServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CartServiceHTTPClientImpl) AddItem ¶
func (c *CartServiceHTTPClientImpl) AddItem(ctx context.Context, in *AddItemRequest, opts ...http.CallOption) (*shared.Empty, error)
func (*CartServiceHTTPClientImpl) EmptyCart ¶
func (c *CartServiceHTTPClientImpl) EmptyCart(ctx context.Context, in *EmptyCartRequest, opts ...http.CallOption) (*shared.Empty, error)
func (*CartServiceHTTPClientImpl) GetCart ¶
func (c *CartServiceHTTPClientImpl) GetCart(ctx context.Context, in *GetCartRequest, opts ...http.CallOption) (*shared.Cart, error)
type CartServiceHTTPServer ¶
type CartServiceServer ¶
type CartServiceServer interface { AddItem(context.Context, *AddItemRequest) (*shared.Empty, error) GetCart(context.Context, *GetCartRequest) (*shared.Cart, error) EmptyCart(context.Context, *EmptyCartRequest) (*shared.Empty, error) // contains filtered or unexported methods }
CartServiceServer is the server API for CartService service. All implementations must embed UnimplementedCartServiceServer for forward compatibility
type EmptyCartRequest ¶
type EmptyCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*EmptyCartRequest) Descriptor
deprecated
func (*EmptyCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyCartRequest.ProtoReflect.Descriptor instead.
func (*EmptyCartRequest) GetUserId ¶
func (x *EmptyCartRequest) GetUserId() string
func (*EmptyCartRequest) ProtoMessage ¶
func (*EmptyCartRequest) ProtoMessage()
func (*EmptyCartRequest) ProtoReflect ¶
func (x *EmptyCartRequest) ProtoReflect() protoreflect.Message
func (*EmptyCartRequest) Reset ¶
func (x *EmptyCartRequest) Reset()
func (*EmptyCartRequest) String ¶
func (x *EmptyCartRequest) String() string
type GetCartRequest ¶
type GetCartRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetCartRequest) Descriptor
deprecated
func (*GetCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCartRequest.ProtoReflect.Descriptor instead.
func (*GetCartRequest) GetUserId ¶
func (x *GetCartRequest) GetUserId() string
func (*GetCartRequest) ProtoMessage ¶
func (*GetCartRequest) ProtoMessage()
func (*GetCartRequest) ProtoReflect ¶
func (x *GetCartRequest) ProtoReflect() protoreflect.Message
func (*GetCartRequest) Reset ¶
func (x *GetCartRequest) Reset()
func (*GetCartRequest) String ¶
func (x *GetCartRequest) String() string
type UnimplementedCartServiceServer ¶
type UnimplementedCartServiceServer struct { }
UnimplementedCartServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCartServiceServer) AddItem ¶
func (UnimplementedCartServiceServer) AddItem(context.Context, *AddItemRequest) (*shared.Empty, error)
func (UnimplementedCartServiceServer) EmptyCart ¶
func (UnimplementedCartServiceServer) EmptyCart(context.Context, *EmptyCartRequest) (*shared.Empty, error)
func (UnimplementedCartServiceServer) GetCart ¶
func (UnimplementedCartServiceServer) GetCart(context.Context, *GetCartRequest) (*shared.Cart, 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.