Documentation ¶
Index ¶
- type Bcrypt
- type Cache
- type Repository
- type Service
- func (s *Service) CheckAccessToken(ctx context.Context, accessToken string) error
- func (s *Service) GetUserByID(ctx context.Context, userID string) (domain.User, error)
- func (s *Service) GetUsersList(ctx context.Context, skip, limit int) ([]domain.User, int, error)
- func (s *Service) LogOut(ctx context.Context, accessToken, refreshToken string) error
- func (s *Service) Refresh(ctx context.Context, rt string) (domain.Tokens, error)
- func (s *Service) SignIn(ctx context.Context, email, password string) (domain.Tokens, error)
- func (s *Service) SignUp(ctx context.Context, name, email, password, repeatedPassword string) (domain.Tokens, error)
- type Tokener
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { SetAccessToken(ctx context.Context, userID, token string) error SetRefreshToken(ctx context.Context, userID, token string) error CheckAccessToken(ctx context.Context, userID, token string) (bool, error) CheckRefreshToken(ctx context.Context, userID, token string) (bool, error) RemoveAccessToken(ctx context.Context, userID, token string) error RemoveRefreshToken(ctx context.Context, userID, token string) error }
type Repository ¶
type Repository interface { GetUserByID(ctx context.Context, userID string) (*domain.User, error) GetUserByName(ctx context.Context, name string) (*domain.User, error) GetUserByEmail(ctx context.Context, email string) (*domain.User, error) AddUser(ctx context.Context, name, email, password string) (string, error) GetUsersTotalCount(ctx context.Context) (int, error) GetUsers(ctx context.Context, skip, limit int) ([]domain.User, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CheckAccessToken ¶
func (*Service) GetUserByID ¶
func (*Service) GetUsersList ¶
Click to show internal directories.
Click to hide internal directories.