Documentation ¶
Index ¶
- func NewCategoryRepository(db *sqlx.DB) domain.CategoryRepository
- type CategoryRepo
- func (r *CategoryRepo) DeleteCategory(ctx context.Context, id int64) error
- func (r *CategoryRepo) GetAll(ctx context.Context, params *p.PaginationQuery) ([]domain.Category, error)
- func (r *CategoryRepo) GetByID(ctx context.Context, id int64) (*domain.Category, error)
- func (r *CategoryRepo) InsertCategory(ctx context.Context, c *domain.Category) (int64, error)
- func (r *CategoryRepo) UpdateCategory(ctx context.Context, c *domain.Category) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCategoryRepository ¶
func NewCategoryRepository(db *sqlx.DB) domain.CategoryRepository
Types ¶
type CategoryRepo ¶
type CategoryRepo struct {
// contains filtered or unexported fields
}
func (*CategoryRepo) DeleteCategory ¶
func (r *CategoryRepo) DeleteCategory(ctx context.Context, id int64) error
func (*CategoryRepo) GetAll ¶
func (r *CategoryRepo) GetAll(ctx context.Context, params *p.PaginationQuery) ([]domain.Category, error)
func (*CategoryRepo) InsertCategory ¶
func (*CategoryRepo) UpdateCategory ¶
Click to show internal directories.
Click to hide internal directories.