base

package
v0.0.0-...-c6b3300 Latest Latest
Warning

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

Go to latest
Published: May 5, 2015 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_JSON_INPUT      = errors.New("Invalid JSON input.")
	ERROR_INTERNAL        = errors.New("Unexpected internal server error.")
	ERROR_DATABASE        = errors.New("Database error.")
	ERROR_NOT_FOUND       = errors.New("Not found.")
	ERROR_NO_ACTION       = errors.New("Action not found.")
	ERROR_NOT_IMPLEMENTED = errors.New("Action not implemented.")
	ERROR_BAD_REQUEST     = errors.New("Bad request.")
)

Functions

This section is empty.

Types

type Base

type Base struct {
	*revel.Controller
}

func (*Base) Error

func (b *Base) Error(err error, httpStatus int) revel.Result

func (*Base) ErrorBadRequest

func (b *Base) ErrorBadRequest() revel.Result

func (*Base) ErrorInternal

func (b *Base) ErrorInternal() revel.Result

func (*Base) ErrorInternalMsg

func (b *Base) ErrorInternalMsg(msg string) revel.Result

func (*Base) ErrorNotFound

func (b *Base) ErrorNotFound() revel.Result

func (*Base) ErrorNotFoundMsg

func (b *Base) ErrorNotFoundMsg(msg string) revel.Result

func (*Base) ErrorNotImplemented

func (b *Base) ErrorNotImplemented() revel.Result

func (*Base) FromJson

func (b *Base) FromJson(obj interface{}, validator func(interface{}, *revel.Validation)) revel.Result

Jump to

Keyboard shortcuts

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