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(host ...string) error
RunTLS(host ...string) error
RunTLSWithCert(host, certFile, keyFile string) error
ServeHTTP(writer http.ResponseWriter, request *http.Request)
GlobalMiddleware(middlewares ...httpcontract.Middleware)
}
type Route ¶
type Route interface {
Group(handler GroupFunc)
Prefix(addr string) Route
Middleware(middlewares ...httpcontract.Middleware) Route
Any(relativePath string, handler httpcontract.HandlerFunc)
Get(relativePath string, handler httpcontract.HandlerFunc)
Post(relativePath string, handler httpcontract.HandlerFunc)
Delete(relativePath string, handler httpcontract.HandlerFunc)
Patch(relativePath string, handler httpcontract.HandlerFunc)
Put(relativePath string, handler httpcontract.HandlerFunc)
Options(relativePath string, handler httpcontract.HandlerFunc)
Static(relativePath, root string)
StaticFile(relativePath, filepath string)
StaticFS(relativePath string, fs http.FileSystem)
}
Click to show internal directories.
Click to hide internal directories.