Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { AddAfterShutdownFunc(f func()) AddBeforeShutdownFunc(f func()) AddSection(Section) error ListenAndServe() SetServerListenPort(int) }
func NewApplication ¶
func NewApplication() Application
type HandlerFuncWithError ¶
type HandlerFuncWithError func(http.ResponseWriter, *http.Request, error)
type Section ¶
type Section interface { AddPathPatternHandler(pattern string, handler http.Handler, contextKey any) AddRateLimitingSessionConfig(maxRequests int64, sessionDuration, banDuration time.Duration) AfterShutdown() BeforeStart(*sync.WaitGroup) NewHandler() http.Handler Root() string SetBasicAuthPassword(string) SetBasicAuthRealm(string) SetBasicAuthUsername(string) SetRateLimitingHostCacheEntryIdleDuration(time.Duration) SetSimpleHandler(handler http.Handler) SetStatusBadRequestHandlerFunc(HandlerFuncWithError) SetStatusNotFoundHandlerFunc(http.HandlerFunc) SetStatusTooManyRequestsHandlerFunc(http.HandlerFunc) }
func NewSection ¶
func NewSection(deps SectionDependencies, root string) Section
type SectionDependencies ¶
Click to show internal directories.
Click to hide internal directories.