router

package
v0.66.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 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 Controller

type Controller interface {
	// Register is the method called by the router, passing the router
	// groups to let the controller register its methods
	Register(router *Router)

	// URL returns the controller fqdn.
	URL() *url.URL
}

Controller is an interface implemented by a REST controller

type Router

type Router struct {
	*echo.Echo
	// contains filtered or unexported fields
}

func New

func New() *Router

func (*Router) DELETE

func (router *Router) DELETE(urlPath string, handle echo.HandlerFunc)

DELETE registers a new DELETE route for a path with matching handler in the router with optional route-level middleware.

func (*Router) GET

func (router *Router) GET(urlPath string, handle echo.HandlerFunc)

GET registers a new GET route for a path with matching handler in the router with optional route-level middleware.

func (*Router) Group

func (router *Router) Group(urlPath string) *Router

func (*Router) HEAD

func (router *Router) HEAD(urlPath string, handle echo.HandlerFunc)

HEAD registers a new HEAD route for a path with matching handler in the router with optional route-level middleware.

func (*Router) OPTIONS

func (router *Router) OPTIONS(urlPath string, handle echo.HandlerFunc)

OPTIONS registers a new OPTIONS route for a path with matching handler in the router with optional route-level middleware.

func (*Router) PATCH

func (router *Router) PATCH(urlPath string, handle echo.HandlerFunc)

PATCH registers a new PATCH route for a path with matching handler in the router with optional route-level middleware.

func (*Router) POST

func (router *Router) POST(urlPath string, handle echo.HandlerFunc)

POST registers a new POST route for a path with matching handler in the router with optional route-level middleware.

func (*Router) PUT

func (router *Router) PUT(urlPath string, handle echo.HandlerFunc)

PUT registers a new PUT route for a path with matching handler in the router with optional route-level middleware.

func (*Router) Register

func (router *Router) Register(controllers ...Controller)

Register registers controller's endpoints

func (*Router) URL added in v0.58.7

func (router *Router) URL() *url.URL

func (*Router) Use

func (router *Router) Use(middlewares ...echo.MiddlewareFunc)

Use adds middleware to the chain which is run after router.

Jump to

Keyboard shortcuts

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