route

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	CollectRoutes(g *Group)
}

type Group

type Group struct {
	Path        string
	Groups      []*Group
	Routes      []*Route
	Middlewares []echo.MiddlewareFunc
}

func (*Group) ANY

func (g *Group) ANY(path string, h echo.HandlerFunc, isAnonymous bool, middleware ...echo.MiddlewareFunc)

func (*Group) DELETE

func (g *Group) DELETE(path string, h echo.HandlerFunc, isAnonymous bool, middleware ...echo.MiddlewareFunc)

func (*Group) GET

func (g *Group) GET(path string, h echo.HandlerFunc, isAnonymous bool, middleware ...echo.MiddlewareFunc)

func (*Group) Group

func (g *Group) Group(path string, middleware ...echo.MiddlewareFunc) *Group

func (*Group) POST

func (g *Group) POST(path string, h echo.HandlerFunc, isAnonymous bool, middleware ...echo.MiddlewareFunc)

func (*Group) PUT

func (g *Group) PUT(path string, h echo.HandlerFunc, isAnonymous bool, middleware ...echo.MiddlewareFunc)

type Route

type Route struct {
	// Method is the HTTP method such as POST, PUT, DELETE, etc.
	Method  string
	Path    string
	Handler echo.HandlerFunc
	// IsAnonymous is telling if the given route should be accessible without a JWT token.
	IsAnonymous bool
	Middlewares []echo.MiddlewareFunc
}

func (*Route) Register

func (r *Route) Register(g *echo.Group, middleware ...echo.MiddlewareFunc)

Jump to

Keyboard shortcuts

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