boltdb

package
v0.0.0-...-094c5f7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaStore

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

MetaStore implements a metadata storage. It stores user credentials and Meta information for objects. The storage is handled by boltdb.

func NewMetaStore

func NewMetaStore(dbFile string) (*MetaStore, error)

NewMetaStore creates a new MetaStore using the boltdb database at dbFile.

func (*MetaStore) AddProject

func (s *MetaStore) AddProject(name string) error

TODO

func (*MetaStore) AddUser

func (s *MetaStore) AddUser(user, pass string) error

AddUser adds user credentials to the meta store.

func (*MetaStore) Authenticate

func (s *MetaStore) Authenticate(user, pass string) (bool, error)

Authenticate uses the authorization string to determine whether or not to proceed. This server assumes an HTTP Basic auth format.

func (*MetaStore) Close

func (s *MetaStore) Close()

Close closes the underlying boltdb.

func (*MetaStore) Commit

func (s *MetaStore) Commit(rv *meta.RequestVars) (*meta.Object, error)

Commit() finds uncommitted objects in the meta store using data in meta.RequestVars and commits them

func (*MetaStore) DeleteUser

func (s *MetaStore) DeleteUser(user string) error

DeleteUser removes user credentials from the meta store.

func (*MetaStore) Get

func (s *MetaStore) Get(rv *meta.RequestVars) (*meta.Object, error)

Get() retrieves meta information for a committed object given information in meta.RequestVars

func (*MetaStore) GetPending

func (s *MetaStore) GetPending(rv *meta.RequestVars) (*meta.Object, error)

Same as Get() but for uncommitted objects

func (*MetaStore) Objects

func (s *MetaStore) Objects() ([]*meta.Object, error)

Objects returns all meta.Objects in the meta store

func (*MetaStore) Projects

func (s *MetaStore) Projects() ([]*meta.Project, error)

func (*MetaStore) Put

func (s *MetaStore) Put(rv *meta.RequestVars) (*meta.Object, error)

Put() creates uncommitted objects from meta.RequestVars and stores them in the meta store

func (*MetaStore) Users

func (s *MetaStore) Users() ([]*meta.User, error)

Users returns all meta.Users in the meta store

Jump to

Keyboard shortcuts

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