rest

package
v0.0.0-...-2be0f72 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RouteHandler

func RouteHandler(f RouteFunc) restful.RouteFunction

RouteHandler creates a wrapper function for route methods. This allows route methods to return errors and have them handled correctly.

func RouteHandler1

func RouteHandler1(f RouteFunc1) restful.RouteFunction

RouteHandler1 creates a wrapper function for route methods that only return an error. See RouteHandler for details.

Types

type Handler

type Handler func(request *restful.Request, response *restful.Response)

Handler represents the way a route function should actually be written.

type RouteFunc

type RouteFunc func(request *restful.Request, response *restful.Response, user schema.User) (interface{}, error)

RouteFunc represents the routes function

type RouteFunc1

type RouteFunc1 func(request *restful.Request, response *restful.Response, user schema.User) error

RouteFunc1 is a route function that only returns an error, but no value

type Service

type Service interface {
	WebService() *restful.WebService
}

Service implements a REST based web service.

Jump to

Keyboard shortcuts

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