boltstore

package
v0.0.0-...-e48fc18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package boltstore holds an implementation of github.com/alienscience/imapsrv/auth - AuthStore, using github.com/boltdb/bolt - DB.

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL