model

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 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 DeleteTeam added in v0.2.2

func DeleteTeam(t structs.Team) error

DeleteTeam from key

func OpenDB added in v0.2.8

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

OpenDB the boltdb

func PutSite

func PutSite(s structs.Site) error

PutSite inna da db

func PutTeam

func PutTeam(t structs.Team) error

PutTeam - create or update a team

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