Documentation ¶
Index ¶
- type Domain
- type RedeemUsecase
- func (tc *RedeemUsecase) Create(ctx context.Context, domain Domain) (Domain, error)
- func (tc *RedeemUsecase) Delete(ctx context.Context, id int) error
- func (tc *RedeemUsecase) GetAll(ctx context.Context) ([]Domain, error)
- func (tc *RedeemUsecase) GetById(ctx context.Context, id int) (Domain, error)
- func (tc *RedeemUsecase) GetByItemId(ctx context.Context, id int) ([]Domain, error)
- func (tc *RedeemUsecase) GetByUserId(ctx context.Context, id int) ([]Domain, error)
- type Repository
- type Usecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedeemUsecase ¶
type RedeemUsecase struct { PointRepo point.Repository ItemRepo items.Repository Repo Repository ConfigJWT middlewares.ConfigJWT // contains filtered or unexported fields }
func (*RedeemUsecase) GetAll ¶
func (tc *RedeemUsecase) GetAll(ctx context.Context) ([]Domain, error)
func (*RedeemUsecase) GetByItemId ¶
func (*RedeemUsecase) GetByUserId ¶
type Repository ¶
type Repository interface { Create(ctx context.Context, domain *Domain) (Domain, error) GetAll(ctx context.Context) ([]Domain, error) GetById(ctx context.Context, id int) (Domain, error) GetByUserId(ctx context.Context, id int) ([]Domain, error) GetByItemId(ctx context.Context, id int) ([]Domain, error) //GetByUserIdAndStatus(ctx context.Context, id int, status int) ([]Domain, error) Delete(ctx context.Context, id int) error }
type Usecase ¶
type Usecase interface { Create(ctx context.Context, domain Domain) (Domain, error) GetAll(ctx context.Context) ([]Domain, error) GetById(ctx context.Context, id int) (Domain, error) GetByUserId(ctx context.Context, id int) ([]Domain, error) GetByItemId(ctx context.Context, id int) ([]Domain, error) Delete(ctx context.Context, id int) error }
func NewRedeemUsecase ¶
func NewRedeemUsecase(pointRepo point.Repository, itemRepo items.Repository, repo Repository, timeout time.Duration, configJWT middlewares.ConfigJWT) Usecase
Click to show internal directories.
Click to hide internal directories.