Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCategoryRepositoryImpl ¶
func NewCategoryRepositoryImpl(db *gorm.DB) domain.CategoryRepository
Types ¶
type ProductInventory ¶
type ProductInventory struct {
Inventory uint64
}
type ProductRepository ¶
type ProductRepository interface { CheckProduct(ctx context.Context, productID uint64, quantity uint64) (*valueobject.ProductStatus, error) GetProductDetail(ctx context.Context, productID uint64) (*valueobject.ProductDetail, error) GetProductInventory(ctx context.Context, productID uint64) (uint64, error) GetProduct(ctx context.Context, productID uint64) (*entity.Product, error) ListProducts(ctx context.Context, limit, offset uint64) (*[]valueobject.ProductCatalog, error) CreateProduct(ctx context.Context, product *entity.Product) error UpdateProductDetail(ctx context.Context, productID uint64, product *valueobject.ProductDetail) error UpdateProductInventory(ctx context.Context, idempotencyKey uint64, purchasedProducts *[]valueobject.PurchasedProduct) error RollbackProductInventory(ctx context.Context, idempotencyKey uint64, purchasedProducts *[]valueobject.PurchasedProduct) error }
func NewProductRepository ¶
func NewProductRepository(db *gorm.DB) ProductRepository
Click to show internal directories.
Click to hide internal directories.