Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(repo repository.User) *AuthService
func (*AuthService) CreateUser ¶
func (s *AuthService) CreateUser(username, email, password string) (int, error)
func (*AuthService) GenerateTokenPair ¶
func (s *AuthService) GenerateTokenPair(email, password string) (Tokens, error)
func (*AuthService) ParseToken ¶
func (s *AuthService) ParseToken(token string) (int, error)
type Authorization ¶
type Deps ¶
type Deps struct {
Repos *repository.Repository
}
type TokenClaims ¶
type TokenClaims struct { jwt.StandardClaims UserId int `json:"user_id"` }
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo repository.User) *UserService
Click to show internal directories.
Click to hide internal directories.