model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when the key supplied to a Get or Delete
	// method does not exist in the database.
	ErrNotFound = errors.New("key not found")

	// ErrBadValue is returned when the value supplied to the Put method
	// is nil.
	ErrBadValue = errors.New("bad value")

	//Db holds the db
	Db *bolt.DB
)

Functions

func AllSites

func AllSites(sites *[]structs.Site) error

AllSites collect all items

func AllTeams

func AllTeams(teams *[]structs.Team) error

AllTeams collect all items

func AllUsers

func AllUsers(users *[]structs.User) error

AllUsers collect all items

func Open

func Open(dbfile string) (*bolt.DB, error)

Open the boltdb

func PutSite

func PutSite(s structs.Site) error

PutSite inna da db

func PutTeam

func PutTeam(t structs.Team) error

PutTeam inna da db

func PutUser

func PutUser(u structs.User) error

PutUser inna da db

func Site

func Site(key []byte, s *structs.Site) error

Site lookup user from key

func Team

func Team(key []byte, t *structs.Team) error

Team lookup team from key

func User

func User(key []byte, u *structs.User) error

User lookup user from key

Types

This section is empty.

Jump to

Keyboard shortcuts

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