handlers

package
v0.0.0-...-306e96d Latest Latest
Warning

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

Go to latest
Published: Jan 10, 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 APIError

type APIError struct {
	Code    int    //`json:"code"`
	Message string //`json:"message"`
}

APIError models the error object sent back to the client on error

type Handler

type Handler struct {
	HandleGetValue    func(w http.ResponseWriter, r *http.Request)
	HandleAddValue    func(w http.ResponseWriter, r *http.Request)
	HandleRemoveValue func(w http.ResponseWriter, r *http.Request)
}

Handler is a strictly typed object containing the list of available handlers

func New

func New(store *splay.Tree) *Handler

New initializes the package with the underlying data store instance

type NodeCreationModel

type NodeCreationModel struct {
	Key      string    //`json:"key"`
	Value    splay.Any //`json:"value"`
	Duration int       //'json:"duration"'
}

NodeCreationModel models the input data for the POST request

Jump to

Keyboard shortcuts

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