cart

package
v0.0.0-...-657e486 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CartService_AddItem_FullMethodName   = "/boutiqueshop.CartService/AddItem"
	CartService_GetCart_FullMethodName   = "/boutiqueshop.CartService/GetCart"
	CartService_EmptyCart_FullMethodName = "/boutiqueshop.CartService/EmptyCart"
)
View Source
const OperationCartServiceAddItem = "/boutiqueshop.CartService/AddItem"
View Source
const OperationCartServiceEmptyCart = "/boutiqueshop.CartService/EmptyCart"
View Source
const OperationCartServiceGetCart = "/boutiqueshop.CartService/GetCart"

Variables

View Source
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)

View Source
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.

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 (*CartServiceHTTPClientImpl) EmptyCart

func (*CartServiceHTTPClientImpl) GetCart

type CartServiceHTTPServer

type CartServiceHTTPServer interface {
	AddItem(context.Context, *AddItemRequest) (*shared.Empty, error)
	EmptyCart(context.Context, *EmptyCartRequest) (*shared.Empty, error)
	GetCart(context.Context, *GetCartRequest) (*shared.Cart, error)
}

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) EmptyCart

func (UnimplementedCartServiceServer) GetCart

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL