rest

package
v0.0.0-...-df3db6e Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleEntity

func HandleEntity(entity interface{}, err error) restful.RouteFunction

This utility function checks if an error is a "NotFound" and returns a HTTP NotFound to the caller. If it is another error it returns in internal server error.

func HandleError

func HandleError(err error, response *restful.Response)

Wraps the error in a json document.

func JsonError

func JsonError(msg string, pars ...interface{}) error

Format the message an parametes and return an error in json-format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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