Documentation ¶
Index ¶
- Variables
- type ContinueWithOAuthParams
- type Manager
- type MockManager
- func (_m *MockManager) ConfirmRegistration(confirmationToken uuid.UUID) (*models.User, *models.SessionTokens, error)
- func (_m *MockManager) ContinueWithOAuth(params ContinueWithOAuthParams) (*models.SessionTokens, error)
- func (_m *MockManager) CreateUserWithEmail(email string, password string, clientID models.ClientID) error
- func (_m *MockManager) DeleteExpiredRegistrationConfirmations() error
- func (_m *MockManager) DeleteExpiredSessions() error
- func (_m *MockManager) DeleteExpiredToken(tokenType models.TokenType) error
- func (_m *MockManager) DeleteSessionBySessionID(sessionID uuid.UUID) error
- func (_m *MockManager) DeleteUsedTokens() error
- func (_m *MockManager) DeleteUserByID(userID uuid.UUID) error
- func (_m *MockManager) GetFullUser(userID uuid.UUID) (*models.User, error)
- func (_m *MockManager) GetSessionByAccessToken(accessToken uuid.UUID) (*models.Session, error)
- func (_m *MockManager) GetUserByID(userID uuid.UUID) (*models.User, error)
- func (_m *MockManager) GetUserByName(userName string) (*models.User, error)
- func (_m *MockManager) LoginWithEmailAndPassword(email string, password string, clientIP string, clientID models.ClientID) (*models.User, *models.SessionTokens, error)
- func (_m *MockManager) RefreshSession(refreshToken uuid.UUID) (*models.SessionTokens, error)
- func (_m *MockManager) UpdateAccountName(userID uuid.UUID, name string) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrUserWithSameIdentityExists = errors.New("a user with the same identity already exists") ErrUserWithSameUnconfirmedIdentityExists = errors.New("a user with the same unconfirmed identity already exists") ErrUserNotFound = errors.New("user not found") ErrUserIsNotUpdated = errors.New("user is not updated") ErrUserWithSameNameExists = errors.New("a user with the same name already exists") ErrUserNoIdentitiesFound = errors.New("there is no identities found for passed params") ErrUserSessionNotFound = errors.New("there is no sessions found for passed params") ErrUserNoExpiredRegistraions = errors.New("there is no expired registration found") ErrUserIncorrectTokenToUse = errors.New("token can not be used") )
Functions ¶
This section is empty.
Types ¶
type ContinueWithOAuthParams ¶
type Manager ¶
type Manager interface { // Auth CreateUserWithEmail(email, password string, clientID models.ClientID) error ConfirmRegistration(confirmationToken uuid.UUID) (*models.User, *models.SessionTokens, error) DeleteUserByID(userID uuid.UUID) error LoginWithEmailAndPassword( email, password, clientIP string, clientID models.ClientID, ) (*models.User, *models.SessionTokens, error) ContinueWithOAuth(params ContinueWithOAuthParams) (*models.SessionTokens, error) RefreshSession(refreshToken uuid.UUID) (*models.SessionTokens, error) DeleteSessionBySessionID(sessionID uuid.UUID) error GetSessionByAccessToken(accessToken uuid.UUID) (*models.Session, error) // Used in cron jobs DeleteExpiredRegistrationConfirmations() error DeleteUsedTokens() error DeleteExpiredToken(tokenType models.TokenType) error DeleteExpiredSessions() error // Users get GetUserByID(userID uuid.UUID) (*models.User, error) GetUserByName(userName string) (*models.User, error) GetFullUser(userID uuid.UUID) (*models.User, error) // Own user updates UpdateAccountName(userID uuid.UUID, name string) error }
type MockManager ¶
MockManager is an autogenerated mock type for the Manager type
func (*MockManager) ConfirmRegistration ¶
func (_m *MockManager) ConfirmRegistration(confirmationToken uuid.UUID) (*models.User, *models.SessionTokens, error)
ConfirmRegistration provides a mock function with given fields: confirmationToken
func (*MockManager) ContinueWithOAuth ¶
func (_m *MockManager) ContinueWithOAuth(params ContinueWithOAuthParams) (*models.SessionTokens, error)
ContinueWithOAuth provides a mock function with given fields: params
func (*MockManager) CreateUserWithEmail ¶
func (_m *MockManager) CreateUserWithEmail(email string, password string, clientID models.ClientID) error
CreateUserWithEmail provides a mock function with given fields: email, password, clientID
func (*MockManager) DeleteExpiredRegistrationConfirmations ¶
func (_m *MockManager) DeleteExpiredRegistrationConfirmations() error
DeleteExpiredRegistrationConfirmations provides a mock function with given fields:
func (*MockManager) DeleteExpiredSessions ¶
func (_m *MockManager) DeleteExpiredSessions() error
DeleteExpiredSessions provides a mock function with given fields:
func (*MockManager) DeleteExpiredToken ¶
func (_m *MockManager) DeleteExpiredToken(tokenType models.TokenType) error
DeleteExpiredToken provides a mock function with given fields: tokenType
func (*MockManager) DeleteSessionBySessionID ¶
func (_m *MockManager) DeleteSessionBySessionID(sessionID uuid.UUID) error
DeleteSessionBySessionID provides a mock function with given fields: sessionID
func (*MockManager) DeleteUsedTokens ¶
func (_m *MockManager) DeleteUsedTokens() error
DeleteUsedTokens provides a mock function with given fields:
func (*MockManager) DeleteUserByID ¶
func (_m *MockManager) DeleteUserByID(userID uuid.UUID) error
DeleteUserByID provides a mock function with given fields: userID
func (*MockManager) GetFullUser ¶
GetFullUser provides a mock function with given fields: userID
func (*MockManager) GetSessionByAccessToken ¶
GetSessionByAccessToken provides a mock function with given fields: accessToken
func (*MockManager) GetUserByID ¶
GetUserByID provides a mock function with given fields: userID
func (*MockManager) GetUserByName ¶
func (_m *MockManager) GetUserByName(userName string) (*models.User, error)
GetUserByName provides a mock function with given fields: userName
func (*MockManager) LoginWithEmailAndPassword ¶
func (_m *MockManager) LoginWithEmailAndPassword(email string, password string, clientIP string, clientID models.ClientID) (*models.User, *models.SessionTokens, error)
LoginWithEmailAndPassword provides a mock function with given fields: email, password, clientIP, clientID
func (*MockManager) RefreshSession ¶
func (_m *MockManager) RefreshSession(refreshToken uuid.UUID) (*models.SessionTokens, error)
RefreshSession provides a mock function with given fields: refreshToken
func (*MockManager) UpdateAccountName ¶
func (_m *MockManager) UpdateAccountName(userID uuid.UUID, name string) error
UpdateAccountName provides a mock function with given fields: userID, name