Documentation ¶
Index ¶
- Variables
- func RegisterCartAPIServer(s grpc.ServiceRegistrar, srv CartAPIServer)
- type AbandonShoppingCartRequest
- func (*AbandonShoppingCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AbandonShoppingCartRequest) GetCartId() string
- func (*AbandonShoppingCartRequest) ProtoMessage()
- func (x *AbandonShoppingCartRequest) ProtoReflect() protoreflect.Message
- func (x *AbandonShoppingCartRequest) Reset()
- func (x *AbandonShoppingCartRequest) String() string
- type AbandonShoppingCartResponse
- func (*AbandonShoppingCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AbandonShoppingCartResponse) GetCart() *ShoppingCart
- func (*AbandonShoppingCartResponse) ProtoMessage()
- func (x *AbandonShoppingCartResponse) ProtoReflect() protoreflect.Message
- func (x *AbandonShoppingCartResponse) Reset()
- func (x *AbandonShoppingCartResponse) String() string
- type AddItemToShoppingCartRequest
- func (*AddItemToShoppingCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemToShoppingCartRequest) GetCartId() string
- func (x *AddItemToShoppingCartRequest) GetItem() *CartItem
- func (*AddItemToShoppingCartRequest) ProtoMessage()
- func (x *AddItemToShoppingCartRequest) ProtoReflect() protoreflect.Message
- func (x *AddItemToShoppingCartRequest) Reset()
- func (x *AddItemToShoppingCartRequest) String() string
- type AddItemToShoppingCartResponse
- func (*AddItemToShoppingCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AddItemToShoppingCartResponse) GetCart() *ShoppingCart
- func (*AddItemToShoppingCartResponse) ProtoMessage()
- func (x *AddItemToShoppingCartResponse) ProtoReflect() protoreflect.Message
- func (x *AddItemToShoppingCartResponse) Reset()
- func (x *AddItemToShoppingCartResponse) String() string
- type CartAPIClient
- type CartAPIServer
- type CartItem
- func (*CartItem) Descriptor() ([]byte, []int)deprecated
- func (x *CartItem) GetCartId() string
- func (x *CartItem) GetId() string
- func (x *CartItem) GetProductCode() string
- func (x *CartItem) GetQuantity() int32
- func (x *CartItem) GetUnitPrice() *money.Money
- func (*CartItem) ProtoMessage()
- func (x *CartItem) ProtoReflect() protoreflect.Message
- func (x *CartItem) Reset()
- func (x *CartItem) String() string
- type CheckoutShoppingCartRequest
- func (*CheckoutShoppingCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckoutShoppingCartRequest) GetCartId() string
- func (*CheckoutShoppingCartRequest) ProtoMessage()
- func (x *CheckoutShoppingCartRequest) ProtoReflect() protoreflect.Message
- func (x *CheckoutShoppingCartRequest) Reset()
- func (x *CheckoutShoppingCartRequest) String() string
- type CheckoutShoppingCartResponse
- func (*CheckoutShoppingCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckoutShoppingCartResponse) GetCart() *ShoppingCart
- func (*CheckoutShoppingCartResponse) ProtoMessage()
- func (x *CheckoutShoppingCartResponse) ProtoReflect() protoreflect.Message
- func (x *CheckoutShoppingCartResponse) Reset()
- func (x *CheckoutShoppingCartResponse) String() string
- type CreateShoppingCartRequest
- func (*CreateShoppingCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShoppingCartRequest) GetShopper() *types.Person
- func (*CreateShoppingCartRequest) ProtoMessage()
- func (x *CreateShoppingCartRequest) ProtoReflect() protoreflect.Message
- func (x *CreateShoppingCartRequest) Reset()
- func (x *CreateShoppingCartRequest) String() string
- type CreateShoppingCartResponse
- func (*CreateShoppingCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShoppingCartResponse) GetCart() *ShoppingCart
- func (*CreateShoppingCartResponse) ProtoMessage()
- func (x *CreateShoppingCartResponse) ProtoReflect() protoreflect.Message
- func (x *CreateShoppingCartResponse) Reset()
- func (x *CreateShoppingCartResponse) String() string
- type GetShoppingCartByIDRequest
- func (*GetShoppingCartByIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetShoppingCartByIDRequest) GetCartId() string
- func (*GetShoppingCartByIDRequest) ProtoMessage()
- func (x *GetShoppingCartByIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetShoppingCartByIDRequest) Reset()
- func (x *GetShoppingCartByIDRequest) String() string
- type GetShoppingCartByIDResponse
- func (*GetShoppingCartByIDResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetShoppingCartByIDResponse) GetCart() *ShoppingCart
- func (*GetShoppingCartByIDResponse) ProtoMessage()
- func (x *GetShoppingCartByIDResponse) ProtoReflect() protoreflect.Message
- func (x *GetShoppingCartByIDResponse) Reset()
- func (x *GetShoppingCartByIDResponse) String() string
- type RemoveItemFromShoppingCartRequest
- func (*RemoveItemFromShoppingCartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveItemFromShoppingCartRequest) GetCartId() string
- func (x *RemoveItemFromShoppingCartRequest) GetItemId() string
- func (*RemoveItemFromShoppingCartRequest) ProtoMessage()
- func (x *RemoveItemFromShoppingCartRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveItemFromShoppingCartRequest) Reset()
- func (x *RemoveItemFromShoppingCartRequest) String() string
- type RemoveItemFromShoppingCartResponse
- func (*RemoveItemFromShoppingCartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveItemFromShoppingCartResponse) GetCart() *ShoppingCart
- func (*RemoveItemFromShoppingCartResponse) ProtoMessage()
- func (x *RemoveItemFromShoppingCartResponse) ProtoReflect() protoreflect.Message
- func (x *RemoveItemFromShoppingCartResponse) Reset()
- func (x *RemoveItemFromShoppingCartResponse) String() string
- type SetDeliveryAddressRequest
- func (*SetDeliveryAddressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetDeliveryAddressRequest) GetCartId() string
- func (x *SetDeliveryAddressRequest) GetDeliveryAddress() *types.PostalAddress
- func (*SetDeliveryAddressRequest) ProtoMessage()
- func (x *SetDeliveryAddressRequest) ProtoReflect() protoreflect.Message
- func (x *SetDeliveryAddressRequest) Reset()
- func (x *SetDeliveryAddressRequest) String() string
- type SetDeliveryAddressResponse
- func (*SetDeliveryAddressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetDeliveryAddressResponse) GetCart() *ShoppingCart
- func (*SetDeliveryAddressResponse) ProtoMessage()
- func (x *SetDeliveryAddressResponse) ProtoReflect() protoreflect.Message
- func (x *SetDeliveryAddressResponse) Reset()
- func (x *SetDeliveryAddressResponse) String() string
- type ShoppingCart
- func (*ShoppingCart) Descriptor() ([]byte, []int)deprecated
- func (x *ShoppingCart) GetCartItems() []*CartItem
- func (x *ShoppingCart) GetClosedTime() *timestamppb.Timestamp
- func (x *ShoppingCart) GetCreationTime() *timestamppb.Timestamp
- func (x *ShoppingCart) GetDeliveryAddress() *types.PostalAddress
- func (x *ShoppingCart) GetId() string
- func (x *ShoppingCart) GetShopper() *types.Person
- func (x *ShoppingCart) GetStatus() ShoppingCartStatus
- func (*ShoppingCart) ProtoMessage()
- func (x *ShoppingCart) ProtoReflect() protoreflect.Message
- func (x *ShoppingCart) Reset()
- func (x *ShoppingCart) String() string
- type ShoppingCartStatus
- func (ShoppingCartStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ShoppingCartStatus) Enum() *ShoppingCartStatus
- func (ShoppingCartStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ShoppingCartStatus) Number() protoreflect.EnumNumber
- func (x ShoppingCartStatus) String() string
- func (ShoppingCartStatus) Type() protoreflect.EnumType
- type UnimplementedCartAPIServer
- func (UnimplementedCartAPIServer) AbandonShoppingCart(context.Context, *AbandonShoppingCartRequest) (*AbandonShoppingCartResponse, error)
- func (UnimplementedCartAPIServer) AddItemToShoppingCart(context.Context, *AddItemToShoppingCartRequest) (*AddItemToShoppingCartResponse, error)
- func (UnimplementedCartAPIServer) CheckoutShoppingCart(context.Context, *CheckoutShoppingCartRequest) (*CheckoutShoppingCartResponse, error)
- func (UnimplementedCartAPIServer) CreateShoppingCart(context.Context, *CreateShoppingCartRequest) (*CreateShoppingCartResponse, error)
- func (UnimplementedCartAPIServer) GetShoppingCartByID(context.Context, *GetShoppingCartByIDRequest) (*GetShoppingCartByIDResponse, error)
- func (UnimplementedCartAPIServer) RemoveItemFromShoppingCart(context.Context, *RemoveItemFromShoppingCartRequest) (*RemoveItemFromShoppingCartResponse, error)
- func (UnimplementedCartAPIServer) SetDeliveryAddress(context.Context, *SetDeliveryAddressRequest) (*SetDeliveryAddressResponse, error)
- type UnsafeCartAPIServer
Constants ¶
This section is empty.
Variables ¶
var ( ShoppingCartStatus_name = map[int32]string{ 0: "SCS_UNSPECIFIED", 1: "SCS_OPEN", 2: "SCS_ORDER_SUBMITTED", 3: "SCS_ABANDONED_BY_USER", 4: "SCS_ABANDONED_BY_TIMEOUT", } ShoppingCartStatus_value = map[string]int32{ "SCS_UNSPECIFIED": 0, "SCS_OPEN": 1, "SCS_ORDER_SUBMITTED": 2, "SCS_ABANDONED_BY_USER": 3, "SCS_ABANDONED_BY_TIMEOUT": 4, } )
Enum value maps for ShoppingCartStatus.
var CartAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cart.CartAPI", HandlerType: (*CartAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateShoppingCart", Handler: _CartAPI_CreateShoppingCart_Handler, }, { MethodName: "GetShoppingCartByID", Handler: _CartAPI_GetShoppingCartByID_Handler, }, { MethodName: "AddItemToShoppingCart", Handler: _CartAPI_AddItemToShoppingCart_Handler, }, { MethodName: "RemoveItemFromShoppingCart", Handler: _CartAPI_RemoveItemFromShoppingCart_Handler, }, { MethodName: "SetDeliveryAddress", Handler: _CartAPI_SetDeliveryAddress_Handler, }, { MethodName: "CheckoutShoppingCart", Handler: _CartAPI_CheckoutShoppingCart_Handler, }, { MethodName: "AbandonShoppingCart", Handler: _CartAPI_AbandonShoppingCart_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "mikebway/cart/cart_api.proto", }
CartAPI_ServiceDesc is the grpc.ServiceDesc for CartAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_mikebway_cart_cart_api_proto protoreflect.FileDescriptor
var File_mikebway_cart_cart_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCartAPIServer ¶
func RegisterCartAPIServer(s grpc.ServiceRegistrar, srv CartAPIServer)
Types ¶
type AbandonShoppingCartRequest ¶
type AbandonShoppingCartRequest struct { CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // contains filtered or unexported fields }
Request parameters for the AbandonShoppingCart API
func (*AbandonShoppingCartRequest) Descriptor
deprecated
func (*AbandonShoppingCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use AbandonShoppingCartRequest.ProtoReflect.Descriptor instead.
func (*AbandonShoppingCartRequest) GetCartId ¶
func (x *AbandonShoppingCartRequest) GetCartId() string
func (*AbandonShoppingCartRequest) ProtoMessage ¶
func (*AbandonShoppingCartRequest) ProtoMessage()
func (*AbandonShoppingCartRequest) ProtoReflect ¶
func (x *AbandonShoppingCartRequest) ProtoReflect() protoreflect.Message
func (*AbandonShoppingCartRequest) Reset ¶
func (x *AbandonShoppingCartRequest) Reset()
func (*AbandonShoppingCartRequest) String ¶
func (x *AbandonShoppingCartRequest) String() string
type AbandonShoppingCartResponse ¶
type AbandonShoppingCartResponse struct { Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the AbandonShoppingCart API.
func (*AbandonShoppingCartResponse) Descriptor
deprecated
func (*AbandonShoppingCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use AbandonShoppingCartResponse.ProtoReflect.Descriptor instead.
func (*AbandonShoppingCartResponse) GetCart ¶
func (x *AbandonShoppingCartResponse) GetCart() *ShoppingCart
func (*AbandonShoppingCartResponse) ProtoMessage ¶
func (*AbandonShoppingCartResponse) ProtoMessage()
func (*AbandonShoppingCartResponse) ProtoReflect ¶
func (x *AbandonShoppingCartResponse) ProtoReflect() protoreflect.Message
func (*AbandonShoppingCartResponse) Reset ¶
func (x *AbandonShoppingCartResponse) Reset()
func (*AbandonShoppingCartResponse) String ¶
func (x *AbandonShoppingCartResponse) String() string
type AddItemToShoppingCartRequest ¶
type AddItemToShoppingCartRequest struct { // The ID of the cart that the item should be added too CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // The item to be added to the shopping cart Item *CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
Request parameters for the AddItemToShoppingCart API
func (*AddItemToShoppingCartRequest) Descriptor
deprecated
func (*AddItemToShoppingCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddItemToShoppingCartRequest.ProtoReflect.Descriptor instead.
func (*AddItemToShoppingCartRequest) GetCartId ¶
func (x *AddItemToShoppingCartRequest) GetCartId() string
func (*AddItemToShoppingCartRequest) GetItem ¶
func (x *AddItemToShoppingCartRequest) GetItem() *CartItem
func (*AddItemToShoppingCartRequest) ProtoMessage ¶
func (*AddItemToShoppingCartRequest) ProtoMessage()
func (*AddItemToShoppingCartRequest) ProtoReflect ¶
func (x *AddItemToShoppingCartRequest) ProtoReflect() protoreflect.Message
func (*AddItemToShoppingCartRequest) Reset ¶
func (x *AddItemToShoppingCartRequest) Reset()
func (*AddItemToShoppingCartRequest) String ¶
func (x *AddItemToShoppingCartRequest) String() string
type AddItemToShoppingCartResponse ¶
type AddItemToShoppingCartResponse struct { // The populated cart requested Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the AddItemToShoppingCart API
func (*AddItemToShoppingCartResponse) Descriptor
deprecated
func (*AddItemToShoppingCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddItemToShoppingCartResponse.ProtoReflect.Descriptor instead.
func (*AddItemToShoppingCartResponse) GetCart ¶
func (x *AddItemToShoppingCartResponse) GetCart() *ShoppingCart
func (*AddItemToShoppingCartResponse) ProtoMessage ¶
func (*AddItemToShoppingCartResponse) ProtoMessage()
func (*AddItemToShoppingCartResponse) ProtoReflect ¶
func (x *AddItemToShoppingCartResponse) ProtoReflect() protoreflect.Message
func (*AddItemToShoppingCartResponse) Reset ¶
func (x *AddItemToShoppingCartResponse) Reset()
func (*AddItemToShoppingCartResponse) String ¶
func (x *AddItemToShoppingCartResponse) String() string
type CartAPIClient ¶
type CartAPIClient interface { // Create a new shopping cart CreateShoppingCart(ctx context.Context, in *CreateShoppingCartRequest, opts ...grpc.CallOption) (*CreateShoppingCartResponse, error) // Retrieve a cart by UUID ID GetShoppingCartByID(ctx context.Context, in *GetShoppingCartByIDRequest, opts ...grpc.CallOption) (*GetShoppingCartByIDResponse, error) // Add an item to a cart AddItemToShoppingCart(ctx context.Context, in *AddItemToShoppingCartRequest, opts ...grpc.CallOption) (*AddItemToShoppingCartResponse, error) // Remove an item from the cart RemoveItemFromShoppingCart(ctx context.Context, in *RemoveItemFromShoppingCartRequest, opts ...grpc.CallOption) (*RemoveItemFromShoppingCartResponse, error) // Set the delivery address for physical cart items SetDeliveryAddress(ctx context.Context, in *SetDeliveryAddressRequest, opts ...grpc.CallOption) (*SetDeliveryAddressResponse, error) // Submit the order / checkout the shopping cart CheckoutShoppingCart(ctx context.Context, in *CheckoutShoppingCartRequest, opts ...grpc.CallOption) (*CheckoutShoppingCartResponse, error) // Explicitly abandon a shopping cart in response to a user request. AbandonShoppingCart(ctx context.Context, in *AbandonShoppingCartRequest, opts ...grpc.CallOption) (*AbandonShoppingCartResponse, error) }
CartAPIClient is the client API for CartAPI 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 NewCartAPIClient ¶
func NewCartAPIClient(cc grpc.ClientConnInterface) CartAPIClient
type CartAPIServer ¶
type CartAPIServer interface { // Create a new shopping cart CreateShoppingCart(context.Context, *CreateShoppingCartRequest) (*CreateShoppingCartResponse, error) // Retrieve a cart by UUID ID GetShoppingCartByID(context.Context, *GetShoppingCartByIDRequest) (*GetShoppingCartByIDResponse, error) // Add an item to a cart AddItemToShoppingCart(context.Context, *AddItemToShoppingCartRequest) (*AddItemToShoppingCartResponse, error) // Remove an item from the cart RemoveItemFromShoppingCart(context.Context, *RemoveItemFromShoppingCartRequest) (*RemoveItemFromShoppingCartResponse, error) // Set the delivery address for physical cart items SetDeliveryAddress(context.Context, *SetDeliveryAddressRequest) (*SetDeliveryAddressResponse, error) // Submit the order / checkout the shopping cart CheckoutShoppingCart(context.Context, *CheckoutShoppingCartRequest) (*CheckoutShoppingCartResponse, error) // Explicitly abandon a shopping cart in response to a user request. AbandonShoppingCart(context.Context, *AbandonShoppingCartRequest) (*AbandonShoppingCartResponse, error) // contains filtered or unexported methods }
CartAPIServer is the server API for CartAPI service. All implementations must embed UnimplementedCartAPIServer for forward compatibility
type CartItem ¶
type CartItem struct { // A UUID ID in hexadecimal string form - a unique ID for this item. // This will be set by the cart when the item is added to the shopper's cart Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The UUID ID (as a hexadecimal string) of the shopping cart that this item belongs to CartId string `protobuf:"bytes,2,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // Product code is the equivalent of a SKU code identifying the type of // product or service being ordered. ProductCode string `protobuf:"bytes,3,opt,name=product_code,json=productCode,proto3" json:"product_code,omitempty"` // Quantity is the number of this item type that is being ordered. Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // The unit price is the price that the customer was shown for a single item // when they selected the item for their cart UnitPrice *money.Money `protobuf:"bytes,5,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` // contains filtered or unexported fields }
CartItem represents a single entry in an order. An order will contain one to many order items.
func (*CartItem) Descriptor
deprecated
func (*CartItem) GetProductCode ¶
func (*CartItem) GetQuantity ¶
func (*CartItem) GetUnitPrice ¶
func (*CartItem) ProtoMessage ¶
func (*CartItem) ProtoMessage()
func (*CartItem) ProtoReflect ¶
func (x *CartItem) ProtoReflect() protoreflect.Message
type CheckoutShoppingCartRequest ¶
type CheckoutShoppingCartRequest struct { CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // contains filtered or unexported fields }
Request parameters for the CheckoutShoppingCart API
func (*CheckoutShoppingCartRequest) Descriptor
deprecated
func (*CheckoutShoppingCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutShoppingCartRequest.ProtoReflect.Descriptor instead.
func (*CheckoutShoppingCartRequest) GetCartId ¶
func (x *CheckoutShoppingCartRequest) GetCartId() string
func (*CheckoutShoppingCartRequest) ProtoMessage ¶
func (*CheckoutShoppingCartRequest) ProtoMessage()
func (*CheckoutShoppingCartRequest) ProtoReflect ¶
func (x *CheckoutShoppingCartRequest) ProtoReflect() protoreflect.Message
func (*CheckoutShoppingCartRequest) Reset ¶
func (x *CheckoutShoppingCartRequest) Reset()
func (*CheckoutShoppingCartRequest) String ¶
func (x *CheckoutShoppingCartRequest) String() string
type CheckoutShoppingCartResponse ¶
type CheckoutShoppingCartResponse struct { Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the CheckoutShoppingCart API.
func (*CheckoutShoppingCartResponse) Descriptor
deprecated
func (*CheckoutShoppingCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutShoppingCartResponse.ProtoReflect.Descriptor instead.
func (*CheckoutShoppingCartResponse) GetCart ¶
func (x *CheckoutShoppingCartResponse) GetCart() *ShoppingCart
func (*CheckoutShoppingCartResponse) ProtoMessage ¶
func (*CheckoutShoppingCartResponse) ProtoMessage()
func (*CheckoutShoppingCartResponse) ProtoReflect ¶
func (x *CheckoutShoppingCartResponse) ProtoReflect() protoreflect.Message
func (*CheckoutShoppingCartResponse) Reset ¶
func (x *CheckoutShoppingCartResponse) Reset()
func (*CheckoutShoppingCartResponse) String ¶
func (x *CheckoutShoppingCartResponse) String() string
type CreateShoppingCartRequest ¶
type CreateShoppingCartRequest struct { // The person / user requesting to open a new shopping cart Shopper *types.Person `protobuf:"bytes,1,opt,name=shopper,proto3" json:"shopper,omitempty"` // contains filtered or unexported fields }
Request parameters for the CreateShoppingCart API
func (*CreateShoppingCartRequest) Descriptor
deprecated
func (*CreateShoppingCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateShoppingCartRequest.ProtoReflect.Descriptor instead.
func (*CreateShoppingCartRequest) GetShopper ¶
func (x *CreateShoppingCartRequest) GetShopper() *types.Person
func (*CreateShoppingCartRequest) ProtoMessage ¶
func (*CreateShoppingCartRequest) ProtoMessage()
func (*CreateShoppingCartRequest) ProtoReflect ¶
func (x *CreateShoppingCartRequest) ProtoReflect() protoreflect.Message
func (*CreateShoppingCartRequest) Reset ¶
func (x *CreateShoppingCartRequest) Reset()
func (*CreateShoppingCartRequest) String ¶
func (x *CreateShoppingCartRequest) String() string
type CreateShoppingCartResponse ¶
type CreateShoppingCartResponse struct { // The empty cart requested Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the CreateShoppingCart API
func (*CreateShoppingCartResponse) Descriptor
deprecated
func (*CreateShoppingCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateShoppingCartResponse.ProtoReflect.Descriptor instead.
func (*CreateShoppingCartResponse) GetCart ¶
func (x *CreateShoppingCartResponse) GetCart() *ShoppingCart
func (*CreateShoppingCartResponse) ProtoMessage ¶
func (*CreateShoppingCartResponse) ProtoMessage()
func (*CreateShoppingCartResponse) ProtoReflect ¶
func (x *CreateShoppingCartResponse) ProtoReflect() protoreflect.Message
func (*CreateShoppingCartResponse) Reset ¶
func (x *CreateShoppingCartResponse) Reset()
func (*CreateShoppingCartResponse) String ¶
func (x *CreateShoppingCartResponse) String() string
type GetShoppingCartByIDRequest ¶
type GetShoppingCartByIDRequest struct { CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // contains filtered or unexported fields }
Request parameters for the GetShoppingCartByID API
func (*GetShoppingCartByIDRequest) Descriptor
deprecated
func (*GetShoppingCartByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetShoppingCartByIDRequest.ProtoReflect.Descriptor instead.
func (*GetShoppingCartByIDRequest) GetCartId ¶
func (x *GetShoppingCartByIDRequest) GetCartId() string
func (*GetShoppingCartByIDRequest) ProtoMessage ¶
func (*GetShoppingCartByIDRequest) ProtoMessage()
func (*GetShoppingCartByIDRequest) ProtoReflect ¶
func (x *GetShoppingCartByIDRequest) ProtoReflect() protoreflect.Message
func (*GetShoppingCartByIDRequest) Reset ¶
func (x *GetShoppingCartByIDRequest) Reset()
func (*GetShoppingCartByIDRequest) String ¶
func (x *GetShoppingCartByIDRequest) String() string
type GetShoppingCartByIDResponse ¶
type GetShoppingCartByIDResponse struct { Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the GetShoppingCartByID API.
The cart field shall be missing / empty if no match was wound for the given ID.
func (*GetShoppingCartByIDResponse) Descriptor
deprecated
func (*GetShoppingCartByIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetShoppingCartByIDResponse.ProtoReflect.Descriptor instead.
func (*GetShoppingCartByIDResponse) GetCart ¶
func (x *GetShoppingCartByIDResponse) GetCart() *ShoppingCart
func (*GetShoppingCartByIDResponse) ProtoMessage ¶
func (*GetShoppingCartByIDResponse) ProtoMessage()
func (*GetShoppingCartByIDResponse) ProtoReflect ¶
func (x *GetShoppingCartByIDResponse) ProtoReflect() protoreflect.Message
func (*GetShoppingCartByIDResponse) Reset ¶
func (x *GetShoppingCartByIDResponse) Reset()
func (*GetShoppingCartByIDResponse) String ¶
func (x *GetShoppingCartByIDResponse) String() string
type RemoveItemFromShoppingCartRequest ¶
type RemoveItemFromShoppingCartRequest struct { // The ID of the cart that the item should be removed from CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // The item to be removed from the shopping cart ItemId string `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"` // contains filtered or unexported fields }
Request parameters for the RemoveItemFromShoppingCart API
func (*RemoveItemFromShoppingCartRequest) Descriptor
deprecated
func (*RemoveItemFromShoppingCartRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveItemFromShoppingCartRequest.ProtoReflect.Descriptor instead.
func (*RemoveItemFromShoppingCartRequest) GetCartId ¶
func (x *RemoveItemFromShoppingCartRequest) GetCartId() string
func (*RemoveItemFromShoppingCartRequest) GetItemId ¶
func (x *RemoveItemFromShoppingCartRequest) GetItemId() string
func (*RemoveItemFromShoppingCartRequest) ProtoMessage ¶
func (*RemoveItemFromShoppingCartRequest) ProtoMessage()
func (*RemoveItemFromShoppingCartRequest) ProtoReflect ¶
func (x *RemoveItemFromShoppingCartRequest) ProtoReflect() protoreflect.Message
func (*RemoveItemFromShoppingCartRequest) Reset ¶
func (x *RemoveItemFromShoppingCartRequest) Reset()
func (*RemoveItemFromShoppingCartRequest) String ¶
func (x *RemoveItemFromShoppingCartRequest) String() string
type RemoveItemFromShoppingCartResponse ¶
type RemoveItemFromShoppingCartResponse struct { // The (slightly) depopulated cart Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the RemoveItemFromShoppingCart API
func (*RemoveItemFromShoppingCartResponse) Descriptor
deprecated
func (*RemoveItemFromShoppingCartResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveItemFromShoppingCartResponse.ProtoReflect.Descriptor instead.
func (*RemoveItemFromShoppingCartResponse) GetCart ¶
func (x *RemoveItemFromShoppingCartResponse) GetCart() *ShoppingCart
func (*RemoveItemFromShoppingCartResponse) ProtoMessage ¶
func (*RemoveItemFromShoppingCartResponse) ProtoMessage()
func (*RemoveItemFromShoppingCartResponse) ProtoReflect ¶
func (x *RemoveItemFromShoppingCartResponse) ProtoReflect() protoreflect.Message
func (*RemoveItemFromShoppingCartResponse) Reset ¶
func (x *RemoveItemFromShoppingCartResponse) Reset()
func (*RemoveItemFromShoppingCartResponse) String ¶
func (x *RemoveItemFromShoppingCartResponse) String() string
type SetDeliveryAddressRequest ¶
type SetDeliveryAddressRequest struct { // The ID of the cart that the address should be added too CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // The address to be set into the order DeliveryAddress *types.PostalAddress `protobuf:"bytes,2,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"` // contains filtered or unexported fields }
Request parameters for the SetDeliveryAddress API
func (*SetDeliveryAddressRequest) Descriptor
deprecated
func (*SetDeliveryAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetDeliveryAddressRequest.ProtoReflect.Descriptor instead.
func (*SetDeliveryAddressRequest) GetCartId ¶
func (x *SetDeliveryAddressRequest) GetCartId() string
func (*SetDeliveryAddressRequest) GetDeliveryAddress ¶
func (x *SetDeliveryAddressRequest) GetDeliveryAddress() *types.PostalAddress
func (*SetDeliveryAddressRequest) ProtoMessage ¶
func (*SetDeliveryAddressRequest) ProtoMessage()
func (*SetDeliveryAddressRequest) ProtoReflect ¶
func (x *SetDeliveryAddressRequest) ProtoReflect() protoreflect.Message
func (*SetDeliveryAddressRequest) Reset ¶
func (x *SetDeliveryAddressRequest) Reset()
func (*SetDeliveryAddressRequest) String ¶
func (x *SetDeliveryAddressRequest) String() string
type SetDeliveryAddressResponse ¶
type SetDeliveryAddressResponse struct { // The populated cart requested Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"` // contains filtered or unexported fields }
Response parameters for the SetDeliveryAddress API
func (*SetDeliveryAddressResponse) Descriptor
deprecated
func (*SetDeliveryAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetDeliveryAddressResponse.ProtoReflect.Descriptor instead.
func (*SetDeliveryAddressResponse) GetCart ¶
func (x *SetDeliveryAddressResponse) GetCart() *ShoppingCart
func (*SetDeliveryAddressResponse) ProtoMessage ¶
func (*SetDeliveryAddressResponse) ProtoMessage()
func (*SetDeliveryAddressResponse) ProtoReflect ¶
func (x *SetDeliveryAddressResponse) ProtoReflect() protoreflect.Message
func (*SetDeliveryAddressResponse) Reset ¶
func (x *SetDeliveryAddressResponse) Reset()
func (*SetDeliveryAddressResponse) String ¶
func (x *SetDeliveryAddressResponse) String() string
type ShoppingCart ¶
type ShoppingCart struct { // A UUID ID in hexadecimal string form - a unique ID for this cart. // This will be set by the cart service when the cart is first created. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The time at which shopping cart was first instantiated CreationTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // Optional. The time at which shopping cart was closed, either as // abandoned or submitted / checked out. See the Status to determine which ClosedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=closed_time,json=closedTime,proto3" json:"closed_time,omitempty"` // The state of the shopping cart as an enumerated value Status ShoppingCartStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cart.ShoppingCartStatus" json:"status,omitempty"` // The person who opened the shopping cart Shopper *types.Person `protobuf:"bytes,5,opt,name=shopper,proto3" json:"shopper,omitempty"` // The delivery address for the order DeliveryAddress *types.PostalAddress `protobuf:"bytes,6,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"` // Cart items is the list of one to many items that make up the potential order CartItems []*CartItem `protobuf:"bytes,7,rep,name=cart_items,json=cartItems,proto3" json:"cart_items,omitempty"` // contains filtered or unexported fields }
A shopping cart collects the cart items that a shopper is considering purchasing or has purchased. A cart should be considered immutable once purchase has been processed.
It is persisted in the cart datastore kind.
func (*ShoppingCart) Descriptor
deprecated
func (*ShoppingCart) Descriptor() ([]byte, []int)
Deprecated: Use ShoppingCart.ProtoReflect.Descriptor instead.
func (*ShoppingCart) GetCartItems ¶
func (x *ShoppingCart) GetCartItems() []*CartItem
func (*ShoppingCart) GetClosedTime ¶
func (x *ShoppingCart) GetClosedTime() *timestamppb.Timestamp
func (*ShoppingCart) GetCreationTime ¶
func (x *ShoppingCart) GetCreationTime() *timestamppb.Timestamp
func (*ShoppingCart) GetDeliveryAddress ¶
func (x *ShoppingCart) GetDeliveryAddress() *types.PostalAddress
func (*ShoppingCart) GetId ¶
func (x *ShoppingCart) GetId() string
func (*ShoppingCart) GetShopper ¶
func (x *ShoppingCart) GetShopper() *types.Person
func (*ShoppingCart) GetStatus ¶
func (x *ShoppingCart) GetStatus() ShoppingCartStatus
func (*ShoppingCart) ProtoMessage ¶
func (*ShoppingCart) ProtoMessage()
func (*ShoppingCart) ProtoReflect ¶
func (x *ShoppingCart) ProtoReflect() protoreflect.Message
func (*ShoppingCart) Reset ¶
func (x *ShoppingCart) Reset()
func (*ShoppingCart) String ¶
func (x *ShoppingCart) String() string
type ShoppingCartStatus ¶
type ShoppingCartStatus int32
An enumeration of shopping cart states
const ( ShoppingCartStatus_SCS_UNSPECIFIED ShoppingCartStatus = 0 ShoppingCartStatus_SCS_OPEN ShoppingCartStatus = 1 ShoppingCartStatus_SCS_ORDER_SUBMITTED ShoppingCartStatus = 2 ShoppingCartStatus_SCS_ABANDONED_BY_USER ShoppingCartStatus = 3 ShoppingCartStatus_SCS_ABANDONED_BY_TIMEOUT ShoppingCartStatus = 4 )
func (ShoppingCartStatus) Descriptor ¶
func (ShoppingCartStatus) Descriptor() protoreflect.EnumDescriptor
func (ShoppingCartStatus) Enum ¶
func (x ShoppingCartStatus) Enum() *ShoppingCartStatus
func (ShoppingCartStatus) EnumDescriptor
deprecated
func (ShoppingCartStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ShoppingCartStatus.Descriptor instead.
func (ShoppingCartStatus) Number ¶
func (x ShoppingCartStatus) Number() protoreflect.EnumNumber
func (ShoppingCartStatus) String ¶
func (x ShoppingCartStatus) String() string
func (ShoppingCartStatus) Type ¶
func (ShoppingCartStatus) Type() protoreflect.EnumType
type UnimplementedCartAPIServer ¶
type UnimplementedCartAPIServer struct { }
UnimplementedCartAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedCartAPIServer) AbandonShoppingCart ¶
func (UnimplementedCartAPIServer) AbandonShoppingCart(context.Context, *AbandonShoppingCartRequest) (*AbandonShoppingCartResponse, error)
func (UnimplementedCartAPIServer) AddItemToShoppingCart ¶
func (UnimplementedCartAPIServer) AddItemToShoppingCart(context.Context, *AddItemToShoppingCartRequest) (*AddItemToShoppingCartResponse, error)
func (UnimplementedCartAPIServer) CheckoutShoppingCart ¶
func (UnimplementedCartAPIServer) CheckoutShoppingCart(context.Context, *CheckoutShoppingCartRequest) (*CheckoutShoppingCartResponse, error)
func (UnimplementedCartAPIServer) CreateShoppingCart ¶
func (UnimplementedCartAPIServer) CreateShoppingCart(context.Context, *CreateShoppingCartRequest) (*CreateShoppingCartResponse, error)
func (UnimplementedCartAPIServer) GetShoppingCartByID ¶
func (UnimplementedCartAPIServer) GetShoppingCartByID(context.Context, *GetShoppingCartByIDRequest) (*GetShoppingCartByIDResponse, error)
func (UnimplementedCartAPIServer) RemoveItemFromShoppingCart ¶
func (UnimplementedCartAPIServer) RemoveItemFromShoppingCart(context.Context, *RemoveItemFromShoppingCartRequest) (*RemoveItemFromShoppingCartResponse, error)
func (UnimplementedCartAPIServer) SetDeliveryAddress ¶
func (UnimplementedCartAPIServer) SetDeliveryAddress(context.Context, *SetDeliveryAddressRequest) (*SetDeliveryAddressResponse, error)
type UnsafeCartAPIServer ¶
type UnsafeCartAPIServer interface {
// contains filtered or unexported methods
}
UnsafeCartAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartAPIServer will result in compilation errors.