router

package
v0.0.0-...-f1a9239 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(method string, path string, controller func(echo.Context) error)

Add is a generic function to add a route

func Delete

func Delete(path string, controller func(echo.Context) error)

Delete adds a DELETE method given a path and a controller

func Get

func Get(path string, controller func(echo.Context) error)

Get adds a GET method given a path and a controller

func Patch

func Patch(path string, controller func(echo.Context) error)

Patch adds a PATCH method given a path and a controller

func Post

func Post(path string, controller func(echo.Context) error)

Post adds a POST method given a path and a controller

Types

type Route

type Route struct {
	Method     string
	Path       string
	Controller func(echo.Context) error
}

Route is the DTO for a route object

func List

func List() []Route

List returns all the routes for the application

Jump to

Keyboard shortcuts

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