Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
type ErrorHandler func( runtime runtimecontract.Runtime, writer nethttp.ResponseWriter, request Request, err error, ) Response
type ForwardedHeadersPolicy ¶
type Handler ¶
type Handler func( runtimeInstance runtimecontract.Runtime, writer nethttp.ResponseWriter, request Request, ) (Response, error)
type Kernel ¶
type Kernel interface {
Use(middlewares ...Middleware)
SetNotFoundHandler(handler Handler)
SetErrorHandler(handler ErrorHandler)
SetForwardedHeadersPolicy(policy ForwardedHeadersPolicy)
SetSessionCookiePolicy(policy SessionCookiePolicy)
ServeHttp(serviceContainer containercontract.Container) nethttp.Handler
}
type MatchResult ¶
type Middleware ¶
type RateLimiter ¶
type Request ¶
type Request interface {
HttpRequest() *nethttp.Request
Param(name string) (string, bool)
Params() map[string]string
Query() bagcontract.ParameterBag
Post() bagcontract.ParameterBag
Attributes() bagcontract.ParameterBag
Header(name string) string
RouteName() string
RoutePattern() string
RuntimeInstance() runtimecontract.Runtime
RequestContext() RequestContext
}
type RequestContext ¶
type RouteDefinition ¶
type RouteRegistry ¶
type RouteRegistry interface {
RouteDefinitions() []RouteDefinition
RouteDefinition(routeName string) (RouteDefinition, bool)
RouteDefinitionForUrlGeneration(routeName string) (UrlGenerationRouteDefinition, bool)
}
type Router ¶
type Router interface {
RouteDefinitions() []RouteDefinition
RouteDefinition(routeName string) (RouteDefinition, bool)
Handle(method string, pattern string, handler Handler)
HandleNamed(name string, method string, pattern string, handler Handler)
Match(method string, path string, host string, scheme string) (*MatchResult, bool)
}
type SessionCookiePolicy ¶
Click to show internal directories.
Click to hide internal directories.