repositories

package
v0.0.0-...-c4ecebc Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 (p *PostgresProductRepository) CreateProduct(ctx context.Context, product *models.Product) (*models.Product, error)

func (*PostgresProductRepository) DeleteProductByID

func (p *PostgresProductRepository) DeleteProductByID(ctx context.Context, uuid uuid.UUID) error

func (*PostgresProductRepository) GetAllProducts

func (p *PostgresProductRepository) GetAllProducts(ctx context.Context, listQuery *utils.ListQuery) (*utils.ListResult[*models.Product], error)

func (*PostgresProductRepository) GetProductById

func (p *PostgresProductRepository) GetProductById(ctx context.Context, uuid uuid.UUID) (*models.Product, error)

func (*PostgresProductRepository) SearchProducts

func (p *PostgresProductRepository) SearchProducts(ctx context.Context, searchText string, listQuery *utils.ListQuery) (*utils.ListResult[*models.Product], error)

func (*PostgresProductRepository) UpdateProduct

func (p *PostgresProductRepository) UpdateProduct(ctx context.Context, updateProduct *models.Product) (*models.Product, error)

Jump to

Keyboard shortcuts

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