Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserExists is returned when user already exists during the // creation ErrUserExists = errors.New("User already exists") // ErrUserNotFound is returned when user not found in select/delete // query ErrUserNotFound = errors.New("User not found") // ErrPasswordDoesNotMatch is returned when the provided password is // wrong ErrPasswordDoesNotMatch = errors.New("Password doesn't match") )
Functions ¶
This section is empty.
Types ¶
type UserCredentials ¶
UserCredentials holds username and password
type UserManager ¶
type UserManager struct {
// contains filtered or unexported fields
}
UserManager provides encapsulated access to the users database
func NewWithSeed ¶
func NewWithSeed(dbName string, seed int64) (manager *UserManager)
NewWithSeed behaves like New, but with the provided seed for the salt generator
func (*UserManager) CheckPassword ¶
func (manager *UserManager) CheckPassword(username, password string) error
CheckPassword checks whether the provided credentials are correct
func (*UserManager) Close ¶
func (manager *UserManager) Close() error
Close closes database connection
Click to show internal directories.
Click to hide internal directories.