Documentation ¶
Index ¶
- type Auth
- func (s Auth) Authenticate(ctx context.Context, email, pwd, deviceID string) (auth.AccessToken, auth.RefreshToken, error)
- func (s Auth) Refresh(ctx context.Context, userID int, tokenUUID, deviceID string) (auth.AccessToken, auth.RefreshToken, error)
- func (s Auth) SignOut(ctx context.Context, userID int, deviceID string) error
- func (s Auth) SignOutAll(ctx context.Context, userID int) error
- func (s Auth) Validate(ctx context.Context, tokenStr string) (auth.Token, error)
- type Emailer
- type Password
- type Profile
- type PropertyRepository
- type SignUp
- type TokensRepository
- type UsersPublisher
- type UsersRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuthSrv ¶
func NewAuthSrv( usersRepository UsersRepository, redis *redis.Client, accessToken auth.TokenGenerator, refreshToken auth.TokenGenerator, logger *zap.SugaredLogger, ) Auth
func (Auth) Authenticate ¶
func (s Auth) Authenticate(ctx context.Context, email, pwd, deviceID string) ( auth.AccessToken, auth.RefreshToken, error, )
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
func NewPasswordSrv ¶
func NewPasswordSrv( signRepository UsersRepository, tokenRepository TokensRepository, emailer Emailer, pwdResetExpirationHours int, pwdResetUrl string, logger *zap.SugaredLogger, ) Password
func (Password) ResetPassword ¶
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
func NewProfileSrv ¶
func NewProfileSrv( repo UsersRepository, proprRepo PropertyRepository, publisher UsersPublisher, logger *zap.SugaredLogger, ) Profile
func (Profile) GetProfile ¶
type PropertyRepository ¶
type SignUp ¶
type SignUp struct {
// contains filtered or unexported fields
}
func NewSignupSrv ¶
func NewSignupSrv( signRepository UsersRepository, publisher UsersPublisher, registrationExpirationHours int, logger *zap.SugaredLogger, ) SignUp
type TokensRepository ¶
type UsersPublisher ¶
type UsersRepository ¶
type UsersRepository interface { GetByEmail(ctx context.Context, email string) (*domain.User, error) Get(ctx context.Context, userID int) (*domain.User, error) Update(ctx context.Context, user *domain.User) error UpdateActivity(ctx context.Context, userID int, active bool) error Create(ctx context.Context, u domain.User, t domain.UserTokenAction) error EmailExists(ctx context.Context, email string) (bool, error) SetNewPwd(ctx context.Context, user *domain.User) error }
Click to show internal directories.
Click to hide internal directories.