fs

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ObjectKeySuffix = ".dsobject"

Functions

func NewDatastore

func NewDatastore(path string) (ds.Datastore, error)

NewDatastore returns a new fs Datastore at given `path`

Types

type Datastore

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

Datastore uses a standard Go map for internal storage.

func (*Datastore) Delete

func (d *Datastore) Delete(key ds.Key) (err error)

Delete removes the value for given key

func (*Datastore) Get

func (d *Datastore) Get(key ds.Key) (value interface{}, err error)

Get returns the value for given key

func (*Datastore) Has

func (d *Datastore) Has(key ds.Key) (exists bool, err error)

Has returns whether the datastore has a value for a given key

func (*Datastore) KeyFilename

func (d *Datastore) KeyFilename(key ds.Key) string

KeyFilename returns the filename associated with `key`

func (*Datastore) Put

func (d *Datastore) Put(key ds.Key, value interface{}) (err error)

Put stores the given value.

func (*Datastore) Query

func (d *Datastore) Query(q query.Query) (query.Results, error)

Query implements Datastore.Query

Jump to

Keyboard shortcuts

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