web

package
v0.0.0-...-3fb2df9 Latest Latest
Warning

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

Go to latest
Published: May 14, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitApplicationsRoutes

func InitApplicationsRoutes(r martini.Router)

func InitGroupsRoutes

func InitGroupsRoutes(r martini.Router)

func InitOperationsRoutes

func InitOperationsRoutes(r martini.Router)

func InitRolesRoutes

func InitRolesRoutes(r martini.Router)

func InitUsersRoutes

func InitUsersRoutes(r martini.Router)

func MapEncoder

func MapEncoder(c martini.Context, w http.ResponseWriter, r *http.Request)

MapEncoder intercepts the request's URL, detects the requested format, and injects the correct encoder dependency for this request. It rewrites the URL to remove the format extension, so that routes can be defined without it.

func Result

func Result(enc Encoder, httpCode int, value interface{}) (int, string)

Types

type Encoder

type Encoder interface {
	Encode(v interface{}) (string, error)
}

An Encoder implements an encoding format of values to be sent as response to requests on the API endpoints.

Jump to

Keyboard shortcuts

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