router

package
v0.58.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 3 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)
}

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(prefix 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(prefix 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(prefix string) *Router

func (*Router) HEAD

func (router *Router) HEAD(prefix 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(prefix 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(prefix 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(prefix 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(prefix 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) Prefix

func (router *Router) Prefix() string

func (*Router) Register

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

Register registers controller's endpoints

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