Documentation ¶
Index ¶
- type Domain
- type Repository
- type Usecase
- type UserUsecase
- func (uc *UserUsecase) Create(ctx context.Context, domain Domain) (Domain, error)
- func (uc *UserUsecase) Delete(ctx context.Context, id int) error
- func (uc *UserUsecase) ForgotPassword(ctx context.Context, emails string) (Domain, error)
- func (uc *UserUsecase) GetAll(ctx context.Context) ([]Domain, error)
- func (uc *UserUsecase) GetById(ctx context.Context, id int) (Domain, error)
- func (uc *UserUsecase) GetByToken(ctx context.Context, token string) (Domain, error)
- func (uc *UserUsecase) Login(ctx context.Context, domain Domain) (Domain, error)
- func (uc *UserUsecase) ResetPassword(ctx context.Context, password string, retypePassword string, id int) (Domain, error)
- func (uc *UserUsecase) Update(ctx context.Context, domain Domain, id int) (Domain, error)
- func (uc *UserUsecase) Verify(ctx context.Context, domain Domain, id int) (Domain, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Login(ctx context.Context, username string, password string) (Domain, error) Create(ctx context.Context, domain *Domain) (Domain, error) Update(ctx context.Context, domain Domain) (Domain, error) GetAll(ctx context.Context) ([]Domain, error) GetById(ctx context.Context, id int) (Domain, error) GetByToken(ctx context.Context, token string) (Domain, error) GetByUsername(ctx context.Context, username string) (Domain, error) GetByEmail(ctx context.Context, email string) (Domain, error) Delete(ctx context.Context, id int) error }
type Usecase ¶
type Usecase interface { Login(ctx context.Context, domain Domain) (Domain, error) Create(ctx context.Context, domain Domain) (Domain, error) Update(ctx context.Context, domain Domain, id int) (Domain, error) ResetPassword(ctx context.Context, password string, retypePassword string, id int) (Domain, error) GetAll(ctx context.Context) ([]Domain, error) GetById(ctx context.Context, id int) (Domain, error) GetByToken(ctx context.Context, token string) (Domain, error) ForgotPassword(ctx context.Context, email string) (Domain, error) Delete(ctx context.Context, id int) error Verify(ctx context.Context, domain Domain, id int) (Domain, error) }
func NewUserUsecase ¶
func NewUserUsecase(repo Repository, timeout time.Duration, configJWT middlewares.ConfigJWT) Usecase
type UserUsecase ¶
type UserUsecase struct { Repo Repository ConfigJWT middlewares.ConfigJWT // contains filtered or unexported fields }
func (*UserUsecase) ForgotPassword ¶
func (*UserUsecase) GetByToken ¶
func (*UserUsecase) ResetPassword ¶
Click to show internal directories.
Click to hide internal directories.