Documentation ¶
Index ¶
- func GenerateUUID() string
- type AuthService
- func (s AuthService) Authenticate(login, password string) (*TokenResponse, error)
- func (s AuthService) ConfirmAccount(secret string) error
- func (s AuthService) GetSessions(id uint64) ([]UserSession, error)
- func (s AuthService) GetUserInfo(id uint64) (*model.User, error)
- func (s AuthService) PasswordRequest(mail string) (*model.User, error)
- func (s AuthService) PasswordReset(secret, password string) (*TokenResponse, error)
- func (s AuthService) RefreshToken(token string) (*string, error)
- func (s AuthService) Registration(login, mail, password, firstName, lastName, middleName string) (*RegResponse, error)
- func (s AuthService) RevokeToken(uuid string) error
- func (s AuthService) SetNewConfirmCode(id uint64) (*string, error)
- type RegResponse
- type TokenResponse
- type UserSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateUUID ¶
func GenerateUUID() string
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(r postgres.UserRepository) AuthService
func (AuthService) Authenticate ¶
func (s AuthService) Authenticate(login, password string) (*TokenResponse, error)
func (AuthService) ConfirmAccount ¶
func (s AuthService) ConfirmAccount(secret string) error
func (AuthService) GetSessions ¶
func (s AuthService) GetSessions(id uint64) ([]UserSession, error)
func (AuthService) GetUserInfo ¶
func (s AuthService) GetUserInfo(id uint64) (*model.User, error)
func (AuthService) PasswordRequest ¶
func (s AuthService) PasswordRequest(mail string) (*model.User, error)
func (AuthService) PasswordReset ¶
func (s AuthService) PasswordReset(secret, password string) (*TokenResponse, error)
func (AuthService) RefreshToken ¶
func (s AuthService) RefreshToken(token string) (*string, error)
func (AuthService) Registration ¶
func (s AuthService) Registration(login, mail, password, firstName, lastName, middleName string) (*RegResponse, error)
func (AuthService) RevokeToken ¶
func (s AuthService) RevokeToken(uuid string) error
func (AuthService) SetNewConfirmCode ¶
func (s AuthService) SetNewConfirmCode(id uint64) (*string, error)
type RegResponse ¶
type TokenResponse ¶
type UserSession ¶
Click to show internal directories.
Click to hide internal directories.