Documentation ¶
Index ¶
- type CategoryRepository
- func (c *CategoryRepository) Add(ctx context.Context, category *entities.Category) (*entities.Category, *errors.CustomError)
- func (r *CategoryRepository) GetAll(ctx context.Context) (*[]entities.Category, *errors.CustomError)
- func (r *CategoryRepository) GetByID(ctx context.Context, id int64) (*entities.Category, *errors.CustomError)
- func (r *CategoryRepository) GetByName(ctx context.Context, name string) (*entities.Category, *errors.CustomError)
- type ICategoryRepository
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryRepository ¶
type CategoryRepository struct {
Model categorymodel.ICategoryModel
}
func (*CategoryRepository) Add ¶
func (c *CategoryRepository) Add(ctx context.Context, category *entities.Category) (*entities.Category, *errors.CustomError)
func (*CategoryRepository) GetAll ¶
func (r *CategoryRepository) GetAll(ctx context.Context) (*[]entities.Category, *errors.CustomError)
func (*CategoryRepository) GetByID ¶
func (r *CategoryRepository) GetByID(ctx context.Context, id int64) (*entities.Category, *errors.CustomError)
func (*CategoryRepository) GetByName ¶
func (r *CategoryRepository) GetByName(ctx context.Context, name string) (*entities.Category, *errors.CustomError)
type ICategoryRepository ¶
type ICategoryRepository interface { Add(ctx context.Context, category *entities.Category) (*entities.Category, *errors.CustomError) GetAll(ctx context.Context) (*[]entities.Category, *errors.CustomError) GetByName(ctx context.Context, name string) (*entities.Category, *errors.CustomError) GetByID(ctx context.Context, id int64) (*entities.Category, *errors.CustomError) }
Click to show internal directories.
Click to hide internal directories.