route

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Route
	Run(addr string) error
	ServeHTTP(w http.ResponseWriter, req *http.Request)
}

type GroupFunc

type GroupFunc func(routes Route)

type Route

type Route interface {
	Group(GroupFunc)
	Prefix(addr string) Route
	GlobalMiddleware(...httpcontract.HandlerFunc) Route
	Middleware(...httpcontract.HandlerFunc) Route

	Any(string, ...httpcontract.HandlerFunc)
	Get(string, ...httpcontract.HandlerFunc)
	Post(string, ...httpcontract.HandlerFunc)
	Delete(string, ...httpcontract.HandlerFunc)
	Patch(string, ...httpcontract.HandlerFunc)
	Put(string, ...httpcontract.HandlerFunc)
	Options(string, ...httpcontract.HandlerFunc)

	Static(string, string)
	StaticFile(string, string)
	StaticFS(string, http.FileSystem)
}

Jump to

Keyboard shortcuts

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