Back to godoc.org

Package router

v0.2.3
Latest Go to latest

The latest major version is .

Published: May 8, 2020 | License: MIT | Module: github.com/cancue/gobase

Index

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.

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier