sqlite_store

package
v0.0.0-...-4038669 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

sqlite_store implements a SQLite based data store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// Path is a filesystem path where the SQLite database will be created.
	Path string
	// contains filtered or unexported fields
}

Store is our storage object.

func NewStore

func NewStore(path string) (*Store, error)

NewStore creates and returns a storage object.

func (*Store) AddInstance

func (s *Store) AddInstance(i objects.Instance) error

AddInstance adds an instance.

func (*Store) DeleteInstance

func (s *Store) DeleteInstance(i objects.Instance) error

DeleteInstance deletes an instance.

func (*Store) Open

func (s *Store) Open() (*Store, error)

Open creates a valid store.

func (*Store) QueryInstances

func (s *Store) QueryInstances(q objects.InstanceQuery) (instances []objects.Instance, err error)

queryInstance queries the instance table for an id (or 0 for everything).

Jump to

Keyboard shortcuts

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