proxies

package
v0.0.0-...-ab6c89e Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func (*EmailProxy) SendEmail

func (e *EmailProxy) SendEmail(name string, addr string, data string) error

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

func (p OrderProxy) UpdateOrderRewardStatus(orderID int64, rewardID int64, status string) (bool, error)

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

Jump to

Keyboard shortcuts

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