Documentation ¶
Overview ¶
Package bolt provides a boltdb implementation of the justanotherbotkit/users/DB interface. It provides this in the form of 2 event driven snapshot buckets; this means that the snapshot bucket will always retain a previous version of a DB record. While the context arguments are currently ignored future updates will use the context to house metadata pertaining to a given change.
Index ¶
- type Config
- type DB
- func (db *DB) CreateUser(ctx context.Context, u users.User) (users.User, error)
- func (db *DB) DeleteUser(ctx context.Context, id string) (users.User, error)
- func (db *DB) GetUser(ctx context.Context, id string) (users.User, error)
- func (db *DB) UpdateUser(ctx context.Context, u users.User) (users.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // File is the bolt db path/name. File string // Options are the bolt db options. Options *bolt.Options }
Config is a database config.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB provides a Bolt implementation of a users.DB
func (*DB) CreateUser ¶
CreateUser creates a new user and saves it to the database.
func (*DB) DeleteUser ¶
DeleteUser deletes a user record from the database.
Click to show internal directories.
Click to hide internal directories.