router

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Controller

func Controller(obj interface{}) func(echo.Context) error

Controller returns echo controller from a struct written in suggested form.

func Routes

func Routes(echo *echo.Echo) (data []byte, err error)

Routes returns labstack/echo Routes result in marshalled json.

Types

type Context

type Context echo.Context

Context is for controller.

type Router

type Router func(Server)

Router public

type Server

type Server interface {
	Group(prefix string, m ...echo.MiddlewareFunc) *echo.Group
	GET(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, controller echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

Server is interface for Router

Jump to

Keyboard shortcuts

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