Documentation ¶
Index ¶
- Constants
- Variables
- type FakeAdapter
- func (f *FakeAdapter) CancelCustomerOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos, _ auth.Identity) error
- func (f *FakeAdapter) CancelGuestOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos) error
- func (f *FakeAdapter) Inject() *FakeAdapter
- func (f *FakeAdapter) PlaceCustomerCart(_ context.Context, _ auth.Identity, cart *cartDomain.Cart, ...) (placeorder.PlacedOrderInfos, error)
- func (f *FakeAdapter) PlaceGuestCart(_ context.Context, cart *cartDomain.Cart, _ *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
- func (f *FakeAdapter) ReserveOrderID(_ context.Context, cart *cartDomain.Cart) (string, error)
- type Module
Constants ¶
View Source
const ( // CustomAttributesKeyPlaceOrderError can be used to force an error during place order CustomAttributesKeyPlaceOrderError = "place-order-error" // CustomAttributesKeyReserveOrderIDError can be used to force an error during reserve order id CustomAttributesKeyReserveOrderIDError = "reserve-order-id-error" )
Variables ¶
View Source
var ( // NextCancelFails can be set to let the next call to any FakeAdapter's instance fail NextCancelFails bool )
Functions ¶
This section is empty.
Types ¶
type FakeAdapter ¶
type FakeAdapter struct {
// contains filtered or unexported fields
}
FakeAdapter provides fake place order adapter
func (*FakeAdapter) CancelCustomerOrder ¶
func (f *FakeAdapter) CancelCustomerOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos, _ auth.Identity) error
CancelCustomerOrder cancels a customer order
func (*FakeAdapter) CancelGuestOrder ¶
func (f *FakeAdapter) CancelGuestOrder(_ context.Context, orderInfos placeorder.PlacedOrderInfos) error
CancelGuestOrder cancels a guest order
func (*FakeAdapter) PlaceCustomerCart ¶
func (f *FakeAdapter) PlaceCustomerCart(_ context.Context, _ auth.Identity, cart *cartDomain.Cart, _ *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
PlaceCustomerCart places a customer cart
func (*FakeAdapter) PlaceGuestCart ¶
func (f *FakeAdapter) PlaceGuestCart(_ context.Context, cart *cartDomain.Cart, _ *placeorder.Payment) (placeorder.PlacedOrderInfos, error)
PlaceGuestCart places a guest cart order
func (*FakeAdapter) ReserveOrderID ¶
func (f *FakeAdapter) ReserveOrderID(_ context.Context, cart *cartDomain.Cart) (string, error)
ReserveOrderID returns the reserved order id
Click to show internal directories.
Click to hide internal directories.