handlers

package
v0.0.0-...-4d2bcf4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Datastore represents a store of data

func NewDatastore

func NewDatastore(path string) (*Datastore, error)

NewDatastore loads a new datastore from a directory of json files

func (*Datastore) DumpNew

func (d *Datastore) DumpNew(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

DumpNew dumps a list of all newData users

func (*Datastore) DumpOld

func (d *Datastore) DumpOld(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

DumpOld dumps a list of all oldData users

func (*Datastore) FetchOld

func (d *Datastore) FetchOld(w http.ResponseWriter, r *http.Request, p httprouter.Params)

FetchOld gets a single oldUser

func (*Datastore) PostNew

func (d *Datastore) PostNew(w http.ResponseWriter, r *http.Request, p httprouter.Params)

PostNew adds a single user to newData

Jump to

Keyboard shortcuts

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