product

package
v0.0.0-...-48c6f6e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductRepository

type ProductRepository struct {
	Postgres *sqlutils.Storage
	Storage  storages.Storage
}

func New

func NewWithDefaultStorage

func NewWithDefaultStorage(sql *sqlutils.Storage) *ProductRepository

func (*ProductRepository) Client

func (r *ProductRepository) Client() sqlutils.SQLDB

func (*ProductRepository) CreateProduct

func (r *ProductRepository) CreateProduct(ctx context.Context, product *models.Product) (int64, error)

func (*ProductRepository) DeleteProduct

func (r *ProductRepository) DeleteProduct(ctx context.Context, id uuid.UUID) (int64, error)

func (*ProductRepository) GetManyProduct

func (r *ProductRepository) GetManyProduct(ctx context.Context, params models.GetManyProductPayload) ([]*models.Product, error)

func (*ProductRepository) GetManyProductByCategoryID

func (r *ProductRepository) GetManyProductByCategoryID(ctx context.Context, categoryID uuid.UUID) ([]*models.Product, error)

func (*ProductRepository) GetProductByID

func (r *ProductRepository) GetProductByID(ctx context.Context, id uuid.UUID) (*models.Product, error)

func (*ProductRepository) UpdateProduct

func (r *ProductRepository) UpdateProduct(ctx context.Context, id uuid.UUID, product *models.Product) (int64, error)

func (*ProductRepository) WithTx

Jump to

Keyboard shortcuts

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