Documentation ¶
Index ¶
- type ProductRepository
- func (r *ProductRepository) Client() sqlutils.SQLDB
- func (r *ProductRepository) CreateProduct(ctx context.Context, product *models.Product) (int64, error)
- func (r *ProductRepository) DeleteProduct(ctx context.Context, id uuid.UUID) (int64, error)
- func (r *ProductRepository) GetManyProduct(ctx context.Context, params models.GetManyProductPayload) ([]*models.Product, error)
- func (r *ProductRepository) GetManyProductByCategoryID(ctx context.Context, categoryID uuid.UUID) ([]*models.Product, error)
- func (r *ProductRepository) GetProductByID(ctx context.Context, id uuid.UUID) (*models.Product, error)
- func (r *ProductRepository) UpdateProduct(ctx context.Context, id uuid.UUID, product *models.Product) (int64, error)
- func (r *ProductRepository) WithTx(tx sqlutils.SQLTX) models.ProductRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductRepository ¶
func NewWithDefaultStorage ¶
func NewWithDefaultStorage(sql *sqlutils.Storage) *ProductRepository
func (*ProductRepository) Client ¶
func (r *ProductRepository) Client() sqlutils.SQLDB
func (*ProductRepository) CreateProduct ¶
func (*ProductRepository) DeleteProduct ¶
func (*ProductRepository) GetManyProduct ¶
func (r *ProductRepository) GetManyProduct(ctx context.Context, params models.GetManyProductPayload) ([]*models.Product, error)
func (*ProductRepository) GetManyProductByCategoryID ¶
func (*ProductRepository) GetProductByID ¶
func (*ProductRepository) UpdateProduct ¶
func (*ProductRepository) WithTx ¶
func (r *ProductRepository) WithTx(tx sqlutils.SQLTX) models.ProductRepository
Click to show internal directories.
Click to hide internal directories.