Documentation ¶
Index ¶
- type AttributeRepository
- func (r *AttributeRepository) Create(ctx context.Context, dto *dtos.CreateAttributeDto) error
- func (r *AttributeRepository) Delete(ctx context.Context, id int) error
- func (r *AttributeRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.AttributePaginated, error)
- func (r *AttributeRepository) GetByID(ctx context.Context, id int) (res *entities.Attribute, err error)
- func (r *AttributeRepository) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*entities.AttributePaginated, error)
- func (r *AttributeRepository) Update(ctx context.Context, dto *dtos.UpdateAttributeDto) error
- type CategoryRepository
- func (r *CategoryRepository) Create(ctx context.Context, dto *dtos.CreateCategoryDto) error
- func (r *CategoryRepository) Delete(ctx context.Context, id int) error
- func (r *CategoryRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.CategoryPaginated, error)
- func (r *CategoryRepository) GetByID(ctx context.Context, id int) (res *entities.Category, err error)
- func (r *CategoryRepository) GetProducts(ctx context.Context, id int, page int, size int, sortBy string, orderBy string) (*entities.CategoryProductsPaginated, error)
- func (r *CategoryRepository) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*entities.CategoryPaginated, error)
- func (r *CategoryRepository) Update(ctx context.Context, dto *dtos.UpdateCategoryDto) error
- type ImageRepository
- type ProductRepository
- func (r *ProductRepository) AddAttribute(ctx context.Context, dto *dtos.CreateProductVariantAttributeDto) error
- func (r *ProductRepository) AddImage(ctx context.Context, id int, imageID int) error
- func (r *ProductRepository) Create(ctx context.Context, dto *dtos.CreateProductDto) error
- func (r *ProductRepository) CreateVariant(ctx context.Context, dto *dtos.CreateProductVariantDto) error
- func (r *ProductRepository) Delete(ctx context.Context, id int) error
- func (r *ProductRepository) DeleteVariant(ctx context.Context, id int, variantID int) error
- func (r *ProductRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.ProductPaginated, error)
- func (r *ProductRepository) FetchVariants(ctx context.Context, id int, page int, size int, sortBy string, orderBy string) (*entities.ProductVariantPaginated, error)
- func (r *ProductRepository) GetAttributes(ctx context.Context, id int, variantID int) ([]*entities.Attribute, error)
- func (r *ProductRepository) GetByID(ctx context.Context, id int) (*entities.Product, error)
- func (r *ProductRepository) GetImages(ctx context.Context, id int) ([]*entities.Image, error)
- func (r *ProductRepository) GetVariantByID(ctx context.Context, id int, variantID int) (*entities.ProductVariant, error)
- func (r *ProductRepository) RemoveAttribute(ctx context.Context, id int, variantID int, attributeID int) error
- func (r *ProductRepository) RemoveImage(ctx context.Context, id int, imageID int) error
- func (r *ProductRepository) Search(ctx context.Context, q string, page int, size int, sortBy string, ...) (*entities.ProductPaginated, error)
- func (r *ProductRepository) SearchVariants(ctx context.Context, q string, id int, page int, size int, sortBy string, ...) (*entities.ProductVariantPaginated, error)
- func (r *ProductRepository) Update(ctx context.Context, dto *dtos.UpdateProductDto) error
- func (r *ProductRepository) UpdateVariant(ctx context.Context, dto *dtos.UpdateProductVariantDto) error
- type UserRepository
- func (r *UserRepository) ChangePassword(ctx context.Context, username string, dto *dtos.ChangePasswordDto) error
- func (r *UserRepository) ChangeUsername(ctx context.Context, username string, dto *dtos.ChangeUsernameDto) error
- func (r *UserRepository) Create(ctx context.Context, dto *dtos.SignupDto) error
- func (r *UserRepository) Delete(ctx context.Context, username string) error
- func (r *UserRepository) GetByUsername(ctx context.Context, username string) (res *entities.User, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeRepository ¶
type AttributeRepository struct {
// contains filtered or unexported fields
}
func NewAttributeRepository ¶
func NewAttributeRepository(dbConn *pgxpool.Pool) *AttributeRepository
func (*AttributeRepository) Create ¶
func (r *AttributeRepository) Create(ctx context.Context, dto *dtos.CreateAttributeDto) error
func (*AttributeRepository) Delete ¶
func (r *AttributeRepository) Delete(ctx context.Context, id int) error
func (*AttributeRepository) Fetch ¶
func (r *AttributeRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.AttributePaginated, error)
func (*AttributeRepository) Update ¶
func (r *AttributeRepository) Update(ctx context.Context, dto *dtos.UpdateAttributeDto) error
type CategoryRepository ¶
type CategoryRepository struct {
// contains filtered or unexported fields
}
func NewCategoryRepository ¶
func NewCategoryRepository(dbConn *pgxpool.Pool) *CategoryRepository
func (*CategoryRepository) Create ¶
func (r *CategoryRepository) Create(ctx context.Context, dto *dtos.CreateCategoryDto) error
func (*CategoryRepository) Delete ¶
func (r *CategoryRepository) Delete(ctx context.Context, id int) error
func (*CategoryRepository) Fetch ¶
func (r *CategoryRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.CategoryPaginated, error)
func (*CategoryRepository) GetProducts ¶
func (*CategoryRepository) Update ¶
func (r *CategoryRepository) Update(ctx context.Context, dto *dtos.UpdateCategoryDto) error
type ImageRepository ¶
type ImageRepository struct {
// contains filtered or unexported fields
}
func NewImageRepository ¶
func NewImageRepository(dbConn *pgxpool.Pool) *ImageRepository
func (*ImageRepository) Create ¶
func (r *ImageRepository) Create(ctx context.Context, dto *dtos.CreateImageDto) (int, error)
func (*ImageRepository) Update ¶
func (r *ImageRepository) Update(ctx context.Context, dto *dtos.UpdateImageDto) error
type ProductRepository ¶
type ProductRepository struct {
// contains filtered or unexported fields
}
func NewProductRepository ¶
func NewProductRepository(dbConn *pgxpool.Pool) *ProductRepository
func (*ProductRepository) AddAttribute ¶
func (r *ProductRepository) AddAttribute(ctx context.Context, dto *dtos.CreateProductVariantAttributeDto) error
func (*ProductRepository) Create ¶
func (r *ProductRepository) Create(ctx context.Context, dto *dtos.CreateProductDto) error
func (*ProductRepository) CreateVariant ¶
func (r *ProductRepository) CreateVariant(ctx context.Context, dto *dtos.CreateProductVariantDto) error
func (*ProductRepository) Delete ¶
func (r *ProductRepository) Delete(ctx context.Context, id int) error
func (*ProductRepository) DeleteVariant ¶
func (*ProductRepository) Fetch ¶
func (r *ProductRepository) Fetch(ctx context.Context, page int, size int, sortBy string, orderBy string) (*entities.ProductPaginated, error)
func (*ProductRepository) FetchVariants ¶
func (*ProductRepository) GetAttributes ¶
func (*ProductRepository) GetVariantByID ¶
func (r *ProductRepository) GetVariantByID(ctx context.Context, id int, variantID int) (*entities.ProductVariant, error)
func (*ProductRepository) RemoveAttribute ¶
func (*ProductRepository) RemoveImage ¶
func (*ProductRepository) SearchVariants ¶
func (r *ProductRepository) SearchVariants(ctx context.Context, q string, id int, page int, size int, sortBy string, orderBy string, attrs []*dtos.AttributeSearchQueryDto) (*entities.ProductVariantPaginated, error)
func (*ProductRepository) Update ¶
func (r *ProductRepository) Update(ctx context.Context, dto *dtos.UpdateProductDto) error
func (*ProductRepository) UpdateVariant ¶
func (r *ProductRepository) UpdateVariant(ctx context.Context, dto *dtos.UpdateProductVariantDto) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(dbConn *pgxpool.Pool) *UserRepository
func (*UserRepository) ChangePassword ¶
func (r *UserRepository) ChangePassword(ctx context.Context, username string, dto *dtos.ChangePasswordDto) error
func (*UserRepository) ChangeUsername ¶
func (r *UserRepository) ChangeUsername(ctx context.Context, username string, dto *dtos.ChangeUsernameDto) error
func (*UserRepository) Delete ¶
func (r *UserRepository) Delete(ctx context.Context, username string) error
func (*UserRepository) GetByUsername ¶
Click to show internal directories.
Click to hide internal directories.