Documentation
¶
Index ¶
- type CampaignProxy
- type EmailProxy
- type InventoryProxy
- type OrderProxy
- type ShippingProxy
- func (p *ShippingProxy) GetShipmentStatus(shipmentID string) (string, error)
- func (p *ShippingProxy) ShipItem(itemID int64, shipmentDetail *dtos.UserDetail) (*dtos.ShipmentResponse, error)
- func (p *ShippingProxy) ShipItems(itemIDs []int64, shipmentDetail *dtos.UserDetail) (*dtos.ShipmentResponse, error)
- type UserProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CampaignProxy ¶
type CampaignProxy struct{}
func NewCampaignProxy ¶
func NewCampaignProxy() *CampaignProxy
func (*CampaignProxy) FetchMostEligibleCampaign ¶
func (p *CampaignProxy) FetchMostEligibleCampaign() *CampaignDTO
func (*CampaignProxy) ReturnMockCampaigns ¶
func (p *CampaignProxy) ReturnMockCampaigns() []*CampaignDTO
ReturnMockCampaigns - returns list of mock campaigns
type EmailProxy ¶
type EmailProxy struct {
// contains filtered or unexported fields
}
func NewEmailProxy ¶
func NewEmailProxy(mailer contracts.Mailer, logger logger.ILogger) *EmailProxy
type InventoryProxy ¶
type InventoryProxy struct{}
func NewInventoryProxy ¶
func NewInventoryProxy() *InventoryProxy
func (*InventoryProxy) BlockInventoryForProducts ¶
func (p *InventoryProxy) BlockInventoryForProducts(productIDs []int64) (bool, []int64)
func (*InventoryProxy) BulkVerifyInventoryAvailability ¶
func (p *InventoryProxy) BulkVerifyInventoryAvailability(itemIDs []int64) (bool, []int64)
func (*InventoryProxy) ReturnMockInventoryData ¶
func (p *InventoryProxy) ReturnMockInventoryData(productID int64) *InventoryDTO
ReturnMockInventoryData - returns list of mock campaigns
type OrderProxy ¶
type OrderProxy struct { }
func NewOrderProxy ¶
func NewOrderProxy() *OrderProxy
func (OrderProxy) UpdateOrderRewardStatus ¶
type ShippingProxy ¶
type ShippingProxy struct {
// contains filtered or unexported fields
}
ShippingProxy is a proxy that adds additional functionality before delegating to the actual shipper
func NewShippingProxy ¶
func NewShippingProxy(shipper Shipper) *ShippingProxy
NewShippingProxy creates a new instance of the ShippingProxy with the injected shipper (e.g., LogiDeli)
func (*ShippingProxy) GetShipmentStatus ¶
func (p *ShippingProxy) GetShipmentStatus(shipmentID string) (string, error)
GetShipmentStatus adds logging and then delegates the actual status check to the shipper
func (*ShippingProxy) ShipItem ¶
func (p *ShippingProxy) ShipItem(itemID int64, shipmentDetail *dtos.UserDetail) (*dtos.ShipmentResponse, error)
ShipItem ShipRewardItem adds logging and retries, then delegates the actual shipping operation to the shipper
func (*ShippingProxy) ShipItems ¶
func (p *ShippingProxy) ShipItems(itemIDs []int64, shipmentDetail *dtos.UserDetail) (*dtos.ShipmentResponse, error)
ShipItems performs the shipping of multiple items with retries and logs the result
type UserProxy ¶
type UserProxy struct { }
func NewUserProxy ¶
func NewUserProxy() *UserProxy
func (UserProxy) GetUserDetails ¶
func (u UserProxy) GetUserDetails(userID string) *dtos.UserDetail
TODO: handler error cases
Click to show internal directories.
Click to hide internal directories.