api

package
v0.0.0-...-b95dbb3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminCLI

func AdminCLI(d db.DB) cli.Binding

func Routes

func Routes(apis ...API) (*htr.Router, error)

func WriteResponse

func WriteResponse(w http.ResponseWriter, values ...interface{})

Types

type API

type API func(*htr.Router) error

API defines how a new API will be attached to the router. api packages should export a function such as:

func Auth(d db.DB) API {
	return func(r *htr.Router) error {
		r.GET("/user/auth", handleAuth(d))
	}
}

func Admin

func Admin(d db.DB) API

func Object

func Object(d db.DB) API

Object binds the Object database package for the given DB to a Router.

func Source

func Source(d db.DB) API

func Task

func Task(d db.DB) API

func User

func User(d db.DB) API

Jump to

Keyboard shortcuts

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