route

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 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(prefix string, dir string)
	StaticFile(prefix string, file string)
	StaticFS(dir string, fs http.FileSystem)
}

Jump to

Keyboard shortcuts

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