bolt

package
v0.0.0-...-8a4eff6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

func (*Driver) Close

func (d *Driver) Close() error

Close closes the underlying database.

func (*Driver) Open

func (d *Driver) Open(path string) error

Open opens the connection to the bolt database defined by path.

type PaperStore

type PaperStore struct {
	Driver *Driver
}

PaperStore is used to store and retrieve papers from a bolt database.

func (*PaperStore) Delete

func (s *PaperStore) Delete(id int) error

func (*PaperStore) Get

func (s *PaperStore) Get(ids ...int) ([]*papernet.Paper, error)

Get retrieves the paper defined by id in the database. If no paper can be found with the given id, Get returns nil.

func (*PaperStore) List

func (s *PaperStore) List() ([]*papernet.Paper, error)

func (*PaperStore) Upsert

func (s *PaperStore) Upsert(paper *papernet.Paper) error

Upsert inserts or update a paper in the database, depending on paper.ID.

type TagIndex

type TagIndex struct {
	Driver *Driver
}

func (*TagIndex) Index

func (s *TagIndex) Index(tag string) error

func (*TagIndex) Search

func (s *TagIndex) Search(prefix string) ([]string, error)

type TeamStore

type TeamStore struct {
	Driver *Driver
}

func (*TeamStore) All

func (s *TeamStore) All() ([]*papernet.Team, error)

func (*TeamStore) Delete

func (s *TeamStore) Delete(id int) error

func (*TeamStore) Get

func (s *TeamStore) Get(id int) (papernet.Team, error)

func (*TeamStore) List

func (s *TeamStore) List(userID string) ([]papernet.Team, error)

func (*TeamStore) Upsert

func (s *TeamStore) Upsert(team *papernet.Team) error

type UserStore

type UserStore struct {
	Driver *Driver
}

func (*UserStore) Get

func (r *UserStore) Get(id string) (*papernet.User, error)

func (*UserStore) List

func (s *UserStore) List() ([]*papernet.User, error)

func (*UserStore) Search

func (s *UserStore) Search(email string) (*papernet.User, error)

func (*UserStore) Upsert

func (r *UserStore) Upsert(user *papernet.User) error

Jump to

Keyboard shortcuts

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