Documentation
¶
Index ¶
- type AuthUseCase
- func (a *AuthUseCase) ChangePassword(ctx context.Context, uid, oldPassword, newPassword string) error
- func (a *AuthUseCase) ChangeRole(ctx context.Context, uid, roleId string) error
- func (a *AuthUseCase) CheckAuth(ctx context.Context, uid string) (existed bool, err error)
- func (a *AuthUseCase) CheckAuthWithProvider(ctx context.Context, provider domain.Provider, token string) (existed bool, err error)
- func (a *AuthUseCase) Delete(ctx context.Context, id string) error
- func (a *AuthUseCase) GetById(ctx context.Context, id string) (*domain.Auth, error)
- func (a *AuthUseCase) GetByUsername(ctx context.Context, username string) (*domain.Auth, error)
- func (a *AuthUseCase) GetStaticUserList(ctx context.Context) *domain.StaticUserList
- func (a *AuthUseCase) List(ctx context.Context, opt *common.QueryOpts) (*common.ListResult[*domain.Auth], error)
- func (a *AuthUseCase) SignIn(ctx context.Context, username, password string) (token *domain.Token, err error)
- func (a *AuthUseCase) SignInWithProvider(ctx context.Context, provider domain.Provider, token string) (genToken *domain.Token, err error)
- func (a *AuthUseCase) SignUp(ctx context.Context, auth *domain.Auth) error
- func (a *AuthUseCase) SignUpWithProvider(ctx context.Context, provider domain.Provider, token string) error
- func (a *AuthUseCase) Update(ctx context.Context, auth *domain.Auth) error
- func (a *AuthUseCase) Verify(ctx context.Context, token string) (auth *domain.Auth, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthUseCase ¶
type AuthUseCase struct {
// contains filtered or unexported fields
}
func NewAuthUseCase ¶
func NewAuthUseCase(repo domain.AuthRepository, jwt domain.JwtGenerator) *AuthUseCase
func (*AuthUseCase) ChangePassword ¶ added in v0.1.32
func (a *AuthUseCase) ChangePassword(ctx context.Context, uid, oldPassword, newPassword string) error
func (*AuthUseCase) ChangeRole ¶ added in v0.1.32
func (a *AuthUseCase) ChangeRole(ctx context.Context, uid, roleId string) error
func (*AuthUseCase) CheckAuthWithProvider ¶ added in v0.1.6
func (*AuthUseCase) Delete ¶ added in v0.1.11
func (a *AuthUseCase) Delete(ctx context.Context, id string) error
func (*AuthUseCase) GetByUsername ¶ added in v0.1.30
func (*AuthUseCase) GetStaticUserList ¶ added in v0.1.39
func (a *AuthUseCase) GetStaticUserList(ctx context.Context) *domain.StaticUserList
func (*AuthUseCase) List ¶ added in v0.1.29
func (a *AuthUseCase) List(ctx context.Context, opt *common.QueryOpts) (*common.ListResult[*domain.Auth], error)
func (*AuthUseCase) SignInWithProvider ¶
func (*AuthUseCase) SignUpWithProvider ¶ added in v0.1.4
Click to show internal directories.
Click to hide internal directories.