bolt

package
v0.0.0-...-ad861b7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT, Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket []byte
var (
	BucketProject Bucket = Bucket("Project")
	BucketArchive Bucket = Bucket("Archive")
)

func (Bucket) String

func (b Bucket) String() string

type Storer

type Storer struct {
	*bolt.DB
}

func Open

func Open(path string) (*Storer, error)

func (*Storer) Archive

func (db *Storer) Archive(id uuid.UUID) error

func (*Storer) Count

func (db *Storer) Count() (count int, err error)

func (*Storer) Create

func (db *Storer) Create(p kanban.Project) error

func (*Storer) Find

func (db *Storer) Find(id uuid.UUID) (p kanban.Project, ok bool, err error)

func (*Storer) List

func (db *Storer) List() ([]kanban.Project, error)

func (*Storer) ListArchived

func (db *Storer) ListArchived() ([]kanban.Project, error)

func (*Storer) Load

func (db *Storer) Load(projects []kanban.Project) error

func (*Storer) Restore

func (db *Storer) Restore(id uuid.UUID) error

func (*Storer) Save

func (db *Storer) Save(projects ...kanban.Project) error

Save persists the provided projects. If a project is nil, or doesn't exist in the store, it will be zeroed out in the slice. The caller can then cleanup the slice by removing the zeroed out projects.

Jump to

Keyboard shortcuts

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