Documentation ¶
Index ¶
- Variables
- type Database
- func (d *Database) CheckAndReturnUser(nickname, password string) (User, error)
- func (d *Database) ChkMigration() error
- func (d *Database) Close() error
- func (d *Database) CreateUser(nickname, email, password, sshPublicKey, groups string) (User, error)
- func (d *Database) GetUserByEmail(email string) (User, error)
- func (d *Database) GetUserByID(id int) (User, error)
- func (d *Database) GetUserByNickname(nickname string) (User, error)
- func (d *Database) GetVersion() (string, error)
- func (d *Database) RunMigration() error
- func (d *Database) VerifyMigration() (int, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDatabaseAhead = errors.New("database is ahead of current migration, please update the application") ErrDatabaseNotUpToDate = errors.New("database is not up to date, please run migrations") ErrNicknameEmpty = errors.New("nickname is required") ErrEmailEmpty = errors.New("email is required") ErrPasswordOrSSHKeyRequired = errors.New("password or ssh public key is required") ErrPasswordTooShort = errors.New("password must be at least 8 characters") ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) CheckAndReturnUser ¶ added in v0.1.12
func (*Database) ChkMigration ¶ added in v0.1.8
func (*Database) CreateUser ¶ added in v0.1.12
func (*Database) GetUserByEmail ¶ added in v0.1.12
func (*Database) GetUserByID ¶ added in v0.1.12
func (*Database) GetUserByNickname ¶ added in v0.1.12
func (*Database) GetVersion ¶
func (*Database) RunMigration ¶ added in v0.1.8
func (*Database) VerifyMigration ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.