badger

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DB *badger.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB() (*DB, func(), error)

type Transaction

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

func NewTransaction

func NewTransaction(db *DB) *Transaction

func (*Transaction) RTransaction

func (t *Transaction) RTransaction(ctx context.Context, fn func(ctx context.Context) error) error

func (*Transaction) Transaction

func (t *Transaction) Transaction(ctx context.Context, fn func(ctx context.Context) error) error

type User

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

func NewUser

func NewUser(db *DB) *User

func (*User) Create

func (u *User) Create(ctx context.Context, user *domain.User) error

func (*User) GetAllUser

func (*User) GetAllUser(ctx context.Context) ([]values.UserName, error)

func (*User) GetPassword

func (*User) GetPassword(ctx context.Context, userName values.UserName) (values.HashedPassword, error)

Jump to

Keyboard shortcuts

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