route

package
v0.0.0-...-47b4a58 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	// Allow defines a permission bit flag that can be set
	// To specify what users can access this resource
	Allow permission.Permissions
	// Method is the main http method that the route will respond to
	Method string
	// URL holds the relative URL of the resource
	URL string
	// Handler main handler that will be called in a separate go routine
	// by the main router to handle the client's request
	Handler handler.Handler
	// QueryPairs holds a list of query parameters key and value used for
	// retrieving different types of values
	QueryPairs query.Pairs
	// Middlewares list of middlewares that will be executed first one by one
	// like a chain before executing the main Handler
	Middlewares []func(http.Handler) http.Handler
}

Route defines how a route should be treated by an http rest client This holds various ways of interaction with a rest resource

type Routes

type Routes []Route

Routes defines a slice of routes for a resource

Jump to

Keyboard shortcuts

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