db

package
v0.0.0-...-4feb759 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StorageDir string
}

Config provides the configuration for the Bolt database.

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB provides a centralized entrypoint to the Bolt database.

func New

func New(cfg *Config) (*DB, error)

New creates and initializes the database.

func (*DB) Close

func (d *DB) Close()

Close frees all database resources.

func (*DB) CreateUser

func (d *DB) CreateUser(username, password string) error

CreateUser creates a new user in the database.

func (*DB) LoginUser

func (d *DB) LoginUser(username, password string) error

LoginUser verifies the specified login credentials.

Jump to

Keyboard shortcuts

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