fs

package
v0.0.0-...-e4696f9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2014 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) KeyList

func (d *Datastore) KeyList() ([]ds.Key, error)

KeyList returns a list of all keys in the datastore

func (*Datastore) Put

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

Put stores the given value.

Jump to

Keyboard shortcuts

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