Documentation ¶
Index ¶
- func NewPostgresProductRepository(log logger.ILogger, cfg *gormpgsql.GormPostgresConfig, gorm *gorm.DB) data.ProductRepository
- type PostgresProductRepository
- func (p *PostgresProductRepository) CreateProduct(ctx context.Context, product *models.Product) (*models.Product, error)
- func (p *PostgresProductRepository) DeleteProductByID(ctx context.Context, uuid uuid.UUID) error
- func (p *PostgresProductRepository) GetAllProducts(ctx context.Context, listQuery *utils.ListQuery) (*utils.ListResult[*models.Product], error)
- func (p *PostgresProductRepository) GetProductById(ctx context.Context, uuid uuid.UUID) (*models.Product, error)
- func (p *PostgresProductRepository) SearchProducts(ctx context.Context, searchText string, listQuery *utils.ListQuery) (*utils.ListResult[*models.Product], error)
- func (p *PostgresProductRepository) UpdateProduct(ctx context.Context, updateProduct *models.Product) (*models.Product, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresProductRepository ¶
func NewPostgresProductRepository(log logger.ILogger, cfg *gormpgsql.GormPostgresConfig, gorm *gorm.DB) data.ProductRepository
Types ¶
type PostgresProductRepository ¶
type PostgresProductRepository struct {
// contains filtered or unexported fields
}
func (*PostgresProductRepository) CreateProduct ¶
func (*PostgresProductRepository) DeleteProductByID ¶
func (*PostgresProductRepository) GetAllProducts ¶
func (p *PostgresProductRepository) GetAllProducts(ctx context.Context, listQuery *utils.ListQuery) (*utils.ListResult[*models.Product], error)
func (*PostgresProductRepository) GetProductById ¶
func (*PostgresProductRepository) SearchProducts ¶
func (*PostgresProductRepository) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.