Versions in this module Expand all Collapse all v0 v0.3.0 Jan 13, 2021 Changes in this version + var File_value_shoppingcart_proto protoreflect.FileDescriptor + func NewShoppingCart(value.EntityID) value.EntityHandler + func RegisterShoppingCartServer(s grpc.ServiceRegistrar, srv ShoppingCartServer) + type AddLineItem struct + Name string + ProductId string + Quantity int32 + UserId string + func (*AddLineItem) Descriptor() ([]byte, []int) + func (*AddLineItem) ProtoMessage() + func (x *AddLineItem) GetName() string + func (x *AddLineItem) GetProductId() string + func (x *AddLineItem) GetQuantity() int32 + func (x *AddLineItem) GetUserId() string + func (x *AddLineItem) ProtoReflect() protoreflect.Message + func (x *AddLineItem) Reset() + func (x *AddLineItem) String() string + type Cart struct + Items []*LineItem + func (*Cart) Descriptor() ([]byte, []int) + func (*Cart) ProtoMessage() + func (x *Cart) GetItems() []*LineItem + func (x *Cart) ProtoReflect() protoreflect.Message + func (x *Cart) Reset() + func (x *Cart) String() string + type GetShoppingCart struct + UserId string + func (*GetShoppingCart) Descriptor() ([]byte, []int) + func (*GetShoppingCart) ProtoMessage() + func (x *GetShoppingCart) GetUserId() string + func (x *GetShoppingCart) ProtoReflect() protoreflect.Message + func (x *GetShoppingCart) Reset() + func (x *GetShoppingCart) String() string + type LineItem struct + Name string + ProductId string + Quantity int32 + func (*LineItem) Descriptor() ([]byte, []int) + func (*LineItem) ProtoMessage() + func (x *LineItem) GetName() string + func (x *LineItem) GetProductId() string + func (x *LineItem) GetQuantity() int32 + func (x *LineItem) ProtoReflect() protoreflect.Message + func (x *LineItem) Reset() + func (x *LineItem) String() string + type RemoveLineItem struct + ProductId string + UserId string + func (*RemoveLineItem) Descriptor() ([]byte, []int) + func (*RemoveLineItem) ProtoMessage() + func (x *RemoveLineItem) GetProductId() string + func (x *RemoveLineItem) GetUserId() string + func (x *RemoveLineItem) ProtoReflect() protoreflect.Message + func (x *RemoveLineItem) Reset() + func (x *RemoveLineItem) String() string + type RemoveShoppingCart struct + UserId string + func (*RemoveShoppingCart) Descriptor() ([]byte, []int) + func (*RemoveShoppingCart) ProtoMessage() + func (x *RemoveShoppingCart) GetUserId() string + func (x *RemoveShoppingCart) ProtoReflect() protoreflect.Message + func (x *RemoveShoppingCart) Reset() + func (x *RemoveShoppingCart) String() string + type ShoppingCart struct + func (sc *ShoppingCart) AddItem(ctx *value.Context, item *AddLineItem) (*any.Any, error) + func (sc *ShoppingCart) GetCart(*value.Context, *GetShoppingCart) (*any.Any, error) + func (sc *ShoppingCart) HandleCommand(ctx *value.Context, name string, cmd proto.Message) (*any.Any, error) + func (sc *ShoppingCart) HandleState(ctx *value.Context, state *any.Any) error + func (sc *ShoppingCart) RemoveItem(ctx *value.Context, item *RemoveLineItem) (*any.Any, error) + type ShoppingCartClient interface + AddItem func(ctx context.Context, in *AddLineItem, opts ...grpc.CallOption) (*empty.Empty, error) + GetCart func(ctx context.Context, in *GetShoppingCart, opts ...grpc.CallOption) (*Cart, error) + RemoveCart func(ctx context.Context, in *RemoveShoppingCart, opts ...grpc.CallOption) (*empty.Empty, error) + RemoveItem func(ctx context.Context, in *RemoveLineItem, opts ...grpc.CallOption) (*empty.Empty, error) + func NewShoppingCartClient(cc grpc.ClientConnInterface) ShoppingCartClient + type ShoppingCartServer interface + AddItem func(context.Context, *AddLineItem) (*empty.Empty, error) + GetCart func(context.Context, *GetShoppingCart) (*Cart, error) + RemoveCart func(context.Context, *RemoveShoppingCart) (*empty.Empty, error) + RemoveItem func(context.Context, *RemoveLineItem) (*empty.Empty, error) + type UnimplementedShoppingCartServer struct + func (UnimplementedShoppingCartServer) AddItem(context.Context, *AddLineItem) (*empty.Empty, error) + func (UnimplementedShoppingCartServer) GetCart(context.Context, *GetShoppingCart) (*Cart, error) + func (UnimplementedShoppingCartServer) RemoveCart(context.Context, *RemoveShoppingCart) (*empty.Empty, error) + func (UnimplementedShoppingCartServer) RemoveItem(context.Context, *RemoveLineItem) (*empty.Empty, error) + type UnsafeShoppingCartServer interface