domain

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryRepository

type CategoryRepository interface {
	CheckCategory(ctx context.Context, categoryID uint64) (bool, error)
	GetCategory(ctx context.Context, categoryID uint64) (*entity.Category, error)
	CreateCategory(ctx context.Context, category *entity.Category) error
	UpdateCategory(ctx context.Context, categoryID uint64, category *entity.Category) error
}

CategoryRepository is an interface for category repository

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
}

ProductRepository is an interface for product repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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