Documentation ¶
Index ¶
- type AuthAdapter
- type AuthHandler
- type AuthService
- type MigrationService
- type MockAuthAdapter
- func (m *MockAuthAdapter) CreateAccount(username string, credentials types.CredentialsArgon2id) error
- func (m *MockAuthAdapter) DeleteSession(token string) error
- func (m *MockAuthAdapter) GetCredentials(login string) ([]types.CredentialsArgon2id, error)
- func (m *MockAuthAdapter) GetSession(token string) (*types.Session, error)
- func (m *MockAuthAdapter) GetUser(username string) (types.User, error)
- func (m *MockAuthAdapter) GetUserByID(id uint) (types.User, error)
- func (m *MockAuthAdapter) GetUserCredentialsMethods(userID uint) ([]types.CredentialsMethods, error)
- func (m *MockAuthAdapter) GetUsersByCredential(credentialID uint) ([]types.User, error)
- func (m *MockAuthAdapter) PatchUser(user types.User) (types.User, error)
- func (m *MockAuthAdapter) SaveSession(session *types.Session) error
- type MockAuthService
- type UserHandler
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAdapter ¶
type AuthAdapter interface { CreateAccount(username string, credentials types.CredentialsArgon2id) error GetCredentials(login string) ([]types.CredentialsArgon2id, error) SaveSession(token *types.Session) error DeleteSession(token string) error GetSession(token string) (*types.Session, error) GetUser(username string) (types.User, error) GetUserByID(id uint) (types.User, error) GetUsersByCredential(credentialID uint) ([]types.User, error) PatchUser(user types.User) (types.User, error) GetUserCredentialsMethods(userID uint) ([]types.CredentialsMethods, error) }
type AuthHandler ¶
type AuthService ¶
type MigrationService ¶
type MigrationService interface{}
type MockAuthAdapter ¶
func (*MockAuthAdapter) CreateAccount ¶
func (m *MockAuthAdapter) CreateAccount(username string, credentials types.CredentialsArgon2id) error
func (*MockAuthAdapter) DeleteSession ¶
func (m *MockAuthAdapter) DeleteSession(token string) error
func (*MockAuthAdapter) GetCredentials ¶
func (m *MockAuthAdapter) GetCredentials(login string) ([]types.CredentialsArgon2id, error)
func (*MockAuthAdapter) GetSession ¶
func (m *MockAuthAdapter) GetSession(token string) (*types.Session, error)
func (*MockAuthAdapter) GetUser ¶
func (m *MockAuthAdapter) GetUser(username string) (types.User, error)
func (*MockAuthAdapter) GetUserByID ¶
func (m *MockAuthAdapter) GetUserByID(id uint) (types.User, error)
func (*MockAuthAdapter) GetUserCredentialsMethods ¶
func (m *MockAuthAdapter) GetUserCredentialsMethods(userID uint) ([]types.CredentialsMethods, error)
func (*MockAuthAdapter) GetUsersByCredential ¶
func (m *MockAuthAdapter) GetUsersByCredential(credentialID uint) ([]types.User, error)
func (*MockAuthAdapter) SaveSession ¶
func (m *MockAuthAdapter) SaveSession(session *types.Session) error
type MockAuthService ¶
func (*MockAuthService) Login ¶
func (m *MockAuthService) Login(login, password string) (types.Session, error)
func (*MockAuthService) Logout ¶
func (m *MockAuthService) Logout(token string) error
type UserHandler ¶
Click to show internal directories.
Click to hide internal directories.