Documentation
¶
Overview ¶
Package boltstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using github.com/boltdb/bolt - DB.
Index ¶
- type BoltAuthStore
- func (b *BoltAuthStore) Authenticate(username, plainPassword string) (success bool, err error)
- func (b *BoltAuthStore) CreateUser(username, plainPassword string) error
- func (b *BoltAuthStore) DeleteUser(username string) error
- func (b *BoltAuthStore) ListUsers() (usernames []string, err error)
- func (b *BoltAuthStore) ResetPassword(username, plainPassword string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltAuthStore ¶
type BoltAuthStore struct {
// contains filtered or unexported fields
}
func NewBoltAuthStore ¶
func NewBoltAuthStore(filename string) (*BoltAuthStore, error)
NewBoltAuthStore creates a new auth store using BoltDB, at the specified file location
func (*BoltAuthStore) Authenticate ¶
func (b *BoltAuthStore) Authenticate(username, plainPassword string) (success bool, err error)
Authenticate attempts to authenticate the given credentials
func (*BoltAuthStore) CreateUser ¶
func (b *BoltAuthStore) CreateUser(username, plainPassword string) error
CreateUser creates a user with the given username
func (*BoltAuthStore) DeleteUser ¶
func (b *BoltAuthStore) DeleteUser(username string) error
DeleteUser removes the username from the database entirely
func (*BoltAuthStore) ListUsers ¶
func (b *BoltAuthStore) ListUsers() (usernames []string, err error)
ListUsers lists all information about the users TODO: this could be very neat for the sysadmin, but probably a lot of metadata
about users is desired, and not just the usernames.
func (*BoltAuthStore) ResetPassword ¶
func (b *BoltAuthStore) ResetPassword(username, plainPassword string) error
ResetPassword resets the password for the given username
Click to show internal directories.
Click to hide internal directories.