mem

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: 3 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 struct {
	Data  map[uuid.UUID]kanban.Project
	Order []uuid.UUID
}

func (*Bucket) Add

func (b *Bucket) Add(p kanban.Project)

func (*Bucket) Delete

func (b *Bucket) Delete(id uuid.UUID)

func (*Bucket) List

func (b *Bucket) List() (list []kanban.Project)

type Storer

type Storer struct {
	Active   Bucket
	Archived Bucket
}

Storer implements in-memory storage for Projects.

func New

func New() *Storer

func (*Storer) Archive

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

func (*Storer) Clear

func (s *Storer) Clear()

func (*Storer) Count

func (s *Storer) Count() (int, error)

func (*Storer) Create

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

func (*Storer) Find

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

func (*Storer) List

func (s *Storer) List() (list []kanban.Project, err error)

func (*Storer) ListArchived

func (s *Storer) ListArchived() (list []kanban.Project, err error)

func (*Storer) Load

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

func (*Storer) Restore

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

func (*Storer) Save

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

Jump to

Keyboard shortcuts

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