Documentation ¶
Index ¶
- type CategoryItemsUsecase
- func (pc *CategoryItemsUsecase) Create(ctx context.Context, domain Domain) (Domain, error)
- func (uc *CategoryItemsUsecase) Delete(ctx context.Context, id int) error
- func (uc *CategoryItemsUsecase) GetAll(ctx context.Context) ([]Domain, error)
- func (uc *CategoryItemsUsecase) GetById(ctx context.Context, id int) (Domain, error)
- func (uc *CategoryItemsUsecase) Update(ctx context.Context, domain Domain, id int) (Domain, error)
- type Domain
- type Repository
- type Usecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryItemsUsecase ¶
type CategoryItemsUsecase struct { Repo Repository ConfigJWT middlewares.ConfigJWT // contains filtered or unexported fields }
func (*CategoryItemsUsecase) Delete ¶
func (uc *CategoryItemsUsecase) Delete(ctx context.Context, id int) error
func (*CategoryItemsUsecase) GetAll ¶
func (uc *CategoryItemsUsecase) GetAll(ctx context.Context) ([]Domain, error)
type Repository ¶
type Usecase ¶
type Usecase interface { Create(ctx context.Context, domain Domain) (Domain, error) Update(ctx context.Context, domain Domain, id int) (Domain, error) GetAll(ctx context.Context) ([]Domain, error) GetById(ctx context.Context, id int) (Domain, error) Delete(ctx context.Context, id int) error }
func NewCategoryUsecase ¶
func NewCategoryUsecase(repo Repository, timeout time.Duration, configJWT middlewares.ConfigJWT) Usecase
Click to show internal directories.
Click to hide internal directories.