boltstore

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boltstore added in v1.2.1

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

func NewSuggestionStore

func NewSuggestionStore(boltFile string, userQuota teian.Quota) *Boltstore

NewSuggestionStore opens the bolt database file and returns an implementation of teian.SuggestionStore. The bolt database file will be created if it does not exist.

func (*Boltstore) All added in v1.2.1

func (db *Boltstore) All() ([]teian.Suggestion, error)

func (*Boltstore) CheckQuota added in v1.2.1

func (db *Boltstore) CheckQuota(username string, n teian.Quota) (teian.Quota, error)

func (*Boltstore) CleanQuota added in v1.2.1

func (db *Boltstore) CleanQuota() error

func (*Boltstore) Close added in v1.2.1

func (db *Boltstore) Close()

Close releases all database resources.

func (*Boltstore) Create added in v1.2.1

func (db *Boltstore) Create(username string, sugg *teian.Suggestion) error

func (*Boltstore) Delete added in v1.2.1

func (db *Boltstore) Delete(username string, id uint64) error

func (*Boltstore) OfUser added in v1.2.1

func (db *Boltstore) OfUser(username string) ([]teian.Suggestion, error)

Jump to

Keyboard shortcuts

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