Documentation
¶
Index ¶
- type DBWrapper
- func (db *DBWrapper) AddCredentialToUser(username string, cred models.Credential) error
- func (db *DBWrapper) AddUser(user models.User) error
- func (db *DBWrapper) DeleteUserByID(id uint) error
- func (db *DBWrapper) DeleteUserByUsername(username string) error
- func (db *DBWrapper) GetUserByID(id uint) (models.User, error)
- func (db *DBWrapper) GetUserByUsername(username string) (models.User, error)
- func (db *DBWrapper) UpdateUser(username string, userUpdates models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBWrapper ¶
type DBWrapper struct {
// contains filtered or unexported fields
}
This wrapper exists solely so that member functions can be written to work on the database.
func (*DBWrapper) AddCredentialToUser ¶
func (db *DBWrapper) AddCredentialToUser(username string, cred models.Credential) error
Adds the given credential to the user with the given username
func (*DBWrapper) DeleteUserByID ¶
Deletes the user with the given ID
func (*DBWrapper) DeleteUserByUsername ¶
Deletes user with the given username
func (*DBWrapper) GetUserByID ¶
Gets the user object based on the given ID
func (*DBWrapper) GetUserByUsername ¶
Gets the user object based on the given username
Click to show internal directories.
Click to hide internal directories.