purchasehandler

package
v0.0.0-...-ffefdcf Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Router chi.Router

	*deliveryhttp.BaseHandler
	// contains filtered or unexported fields
}

func NewPurchaseHandler

func NewPurchaseHandler(
	baseHandler *deliveryhttp.BaseHandler,
	purchaseSrv PurchaseSrv,
	authMiddleware *middleware.AuthMiddleware,
) *Handler

type PurchaseSrv

type PurchaseSrv interface {
	AddToPurchase(ctx context.Context, productName string, position string, purchaseUUID string) error
	DeleteFromPurchase(ctx context.Context, productName string, position string, purchaseUUID string) error
	ConfirmPurchase(ctx context.Context, userID, pharmacyID int, purchaseUUID string, isSocialCardUsed bool) error
	GetPurchase(ctx context.Context, pharmacyID int, purchaseUUID string, isSocialCard bool) (entities.Purchase, error)
}

Jump to

Keyboard shortcuts

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