Versions in this module Expand all Collapse all v12 v12.3.1 Feb 23, 2023 v12.3.0 Feb 22, 2023 v12.2.2 Feb 22, 2023 v12.2.1 Feb 22, 2023 v12.2.0 Feb 22, 2023 Changes in this version + const B + const EB + const GB + const KB + const MB + const MethodConnect + const MethodDelete + const MethodGet + const MethodHead + const MethodNone + const MethodOptions + const MethodPatch + const MethodPost + const MethodPut + const MethodTrace + const NoLayout + const PB + const ReferrerDirect + const ReferrerEmail + const ReferrerGoogleAdwords + const ReferrerGoogleOrganicSearch + const ReferrerIndirect + const ReferrerInvalid + const ReferrerNotGoogleSearch + const ReferrerSearch + const ReferrerSocial + const RouteError + const RouteOverlap + const RouteOverride + const RouteSkip + const SameSiteDefaultMode + const SameSiteLaxMode + const SameSiteNoneMode + const SameSiteStrictMode + const StatusAccepted + const StatusAlreadyReported + const StatusBadGateway + const StatusBadRequest + const StatusBandwidthLimitExceeded + const StatusBlockedByWindowsParentalControls + const StatusConflict + const StatusContinue + const StatusCreated + const StatusEarlyHints + const StatusExpectationFailed + const StatusFailedDependency + const StatusForbidden + const StatusFound + const StatusGatewayTimeout + const StatusGone + const StatusHTTPVersionNotSupported + const StatusIMUsed + const StatusInsufficientStorage + const StatusInternalServerError + const StatusInvalidSSLCertificate + const StatusInvalidToken + const StatusLengthRequired + const StatusLocked + const StatusLoopDetected + const StatusMethodNotAllowed + const StatusMisdirectedRequest + const StatusMovedPermanently + const StatusMultiStatus + const StatusMultipleChoices + const StatusNetworkAuthenticationRequired + const StatusNetworkReadTimeout + const StatusNoContent + const StatusNonAuthoritativeInfo + const StatusNotAcceptable + const StatusNotExtended + const StatusNotFound + const StatusNotImplemented + const StatusNotModified + const StatusOK + const StatusPageExpired + const StatusPartialContent + const StatusPaymentRequired + const StatusPermanentRedirect + const StatusPreconditionFailed + const StatusPreconditionRequired + const StatusProcessing + const StatusProxyAuthRequired + const StatusRequestEntityTooLarge + const StatusRequestHeaderFieldsTooLarge + const StatusRequestTimeout + const StatusRequestURITooLong + const StatusRequestedRangeNotSatisfiable + const StatusResetContent + const StatusSeeOther + const StatusServiceUnavailable + const StatusSiteFrozen + const StatusSiteOverloaded + const StatusSwitchingProtocols + const StatusTeapot + const StatusTemporaryRedirect + const StatusTokenRequired + const StatusTooEarly + const StatusTooManyRequests + const StatusUnauthorized + const StatusUnavailableForLegalReasons + const StatusUnprocessableEntity + const StatusUnsupportedMediaType + const StatusUpgradeRequired + const StatusUseProxy + const StatusVariantAlsoNegotiates + const TB + const Version + var Ace = view.Ace + var AllowQuerySemicolons = func(ctx Context) + var Amber = view.Amber + var AutoTLSNoRedirect = func(...) host.Configurator + var Blocks = view.Blocks + var BuildRevision = context.BuildRevision + var BuildTime = context.BuildTime + var Cache = cache.Handler + var Cache304 = cache.Cache304 + var Compression = func(ctx Context) + var CookieAllowReclaim = context.CookieAllowReclaim + var CookieAllowSubdomains = context.CookieAllowSubdomains + var CookieCleanPath = context.CookieCleanPath + var CookieEncoding = context.CookieEncoding + var CookieExpires = context.CookieExpires + var CookieHTTPOnly = context.CookieHTTPOnly + var CookiePath = context.CookiePath + var CookieSameSite = context.CookieSameSite + var CookieSecure = context.CookieSecure + var DefaultTimeoutMessage = `<html><head><title>Timeout</title></head><body><h1>Timeout</h1>Looks like the server is taking too long to respond, this can be caused by either poor connectivity or an error with our servers. Please try again in a while.</body></html>` + var DirList = router.DirList + var DirListRich = router.DirListRich + var Django = view.Django + var ErrEmptyForm = context.ErrEmptyForm + var ErrEmptyFormField = context.ErrEmptyFormField + var ErrHijackNotSupported = context.ErrHijackNotSupported + var ErrNotFound = context.ErrNotFound + var ErrPushNotSupported = context.ErrPushNotSupported + var ErrServerClosed = http.ErrServerClosed + var ErrStopExecution = hero.ErrStopExecution + var ErrURLQuerySemicolon = errors.New(...) + var FileServer = router.FileServer + var FromStd = handlerconv.FromStd + var HTML = view.HTML + var Handlebars = view.Handlebars + var IsErrCanceled = context.IsErrCanceled + var IsErrEmptyJSON = context.IsErrEmptyJSON + var IsErrPath = context.IsErrPath + var Jet = view.Jet + var LimitRequestBodySize = context.LimitRequestBodySize + var MatchCommonAssets = regexp.MustCompile("((.*).js|(.*).css|(.*).ico|(.*).png|(.*).ttf|(.*).svg|(.*).webp|(.*).gif)$") + var MatchImagesAssets = regexp.MustCompile("((.*).pdf|(.*).jpg|(.*).jpeg|(.*).gif|(.*).tif|(.*).tiff)$") + var NewConditionalHandler = context.NewConditionalHandler + var NewProblem = context.NewProblem + var NoCache = cache.NoCache + var PrivateError = context.PrivateError + var Pug = view.Pug + var RegisterMethods = router.RegisterMethods + var RegisterOnInterrupt = host.RegisterOnInterrupt + var StaticCache = cache.StaticCache + var StatusText = context.StatusText + var StripPrefix = router.StripPrefix + var TLSNoRedirect = func(su *host.Supervisor) + var TrimParamFilePart Handler = context.TrimParamFilePart + var WebDAVMethods = []string + var WithEasyJSON = func(app *Application) + var WithEmptyFormError = func(app *Application) + var WithFireMethodNotAllowed = func(app *Application) + var WithGlobalConfiguration = func(app *Application) + var WithLowercaseRouting = func(app *Application) + var WithOptimizations = func(app *Application) + var WithPathEscape = func(app *Application) + var WithPathIntelligence = func(app *Application) + var WithProtoJSON = func(app *Application) + var WithResetOnFireErrorCode = func(app *Application) + var WithTunneling = func(app *Application) + var WithURLParamSeparator = func(sep string) Configurator + var WithoutAutoFireStatusCode = func(app *Application) + var WithoutBanner = WithoutStartupLog + var WithoutBodyConsumptionOnUnmarshal = func(app *Application) + var WithoutInterruptHandler = func(app *Application) + var WithoutPathCorrection = func(app *Application) + var WithoutPathCorrectionRedirection = func(app *Application) + var WithoutStartupLog = func(app *Application) + var XMLMap = context.XMLMap + func ConfigureMiddleware(handlers ...Handler) router.PartyConfigurator + func Minify(ctx Context) + func PrefixDir(prefix string, fs http.FileSystem) http.FileSystem + func PrefixFS(fileSystem fs.FS, dir string) (fs.FS, error) + func WithSocketSharding(app *Application) + type APIContainer = router.APIContainer + type Application struct + ContextPool *context.Pool + Hosts []*host.Supervisor + I18n *i18n.I18n + OnBuild func() error + Validator context.Validator + func Default() *Application + func New() *Application + func (app *Application) Build() error + func (app *Application) ConfigurationReadOnly() context.ConfigurationReadOnly + func (app *Application) Configure(configurators ...Configurator) *Application + func (app *Application) ConfigureHost(configurators ...host.Configurator) *Application + func (app *Application) GetContextErrorHandler() context.ErrorHandler + func (app *Application) GetContextPool() *context.Pool + func (app *Application) I18nReadOnly() context.I18nReadOnly + func (app *Application) IsDebug() bool + func (app *Application) Listen(hostPort string, withOrWithout ...Configurator) error + func (app *Application) Logger() *golog.Logger + func (app *Application) Minifier() *minify.M + func (app *Application) NewHost(srv *http.Server) *host.Supervisor + func (app *Application) RegisterView(viewEngine view.Engine) + func (app *Application) Run(serve Runner, withOrWithout ...Configurator) error + func (app *Application) SetContextErrorHandler(errHandler context.ErrorHandler) *Application + func (app *Application) SetName(appName string) *Application + func (app *Application) Shutdown(ctx stdContext.Context) error + func (app *Application) String() string + func (app *Application) SubdomainRedirect(from, to router.Party) router.Party + func (app *Application) Validate(v interface{}) error + func (app *Application) View(writer io.Writer, filename string, layout string, bindingData interface{}) error + func (app *Application) WWW() router.Party + type Attachments = router.Attachments + type Configuration struct + Charset string + DisableAutoFireStatusCode bool + DisableBodyConsumptionOnUnmarshal bool + DisableInterruptHandler bool + DisablePathCorrection bool + DisablePathCorrectionRedirection bool + DisableStartupLog bool + EnableEasyJSON bool + EnableOptimizations bool + EnablePathEscape bool + EnablePathIntelligence bool + EnableProtoJSON bool + FallbackViewContextKey string + FireEmptyFormError bool + FireMethodNotAllowed bool + ForceLowercaseRouting bool + HostProxyHeaders map[string]bool + IgnoreServerErrors []string + KeepAlive time.Duration + LanguageContextKey string + LanguageInputContextKey string + LocaleContextKey string + LogLevel string + Other map[string]interface{} + PostMaxMemory int64 + RemoteAddrHeaders []string + RemoteAddrHeadersForce bool + RemoteAddrPrivateSubnets []netutil.IPRange + ResetOnFireErrorCode bool + SSLProxyHeaders map[string]string + SocketSharding bool + TimeFormat string + Timeout time.Duration + TimeoutMessage string + Tunneling TunnelingConfiguration + URLParamSeparator *string + VHost string + VersionAliasesContextKey string + VersionContextKey string + ViewDataContextKey string + ViewEngineContextKey string + ViewLayoutContextKey string + func DefaultConfiguration() Configuration + func TOML(filename string) Configuration + func YAML(filename string) Configuration + func (c *Configuration) GetCharset() string + func (c *Configuration) GetDisableAutoFireStatusCode() bool + func (c *Configuration) GetDisableBodyConsumptionOnUnmarshal() bool + func (c *Configuration) GetDisablePathCorrection() bool + func (c *Configuration) GetDisablePathCorrectionRedirection() bool + func (c *Configuration) GetEnableEasyJSON() bool + func (c *Configuration) GetEnableOptimizations() bool + func (c *Configuration) GetEnablePathEscape() bool + func (c *Configuration) GetEnablePathIntelligence() bool + func (c *Configuration) GetEnableProtoJSON() bool + func (c *Configuration) GetFallbackViewContextKey() string + func (c *Configuration) GetFireEmptyFormError() bool + func (c *Configuration) GetFireMethodNotAllowed() bool + func (c *Configuration) GetForceLowercaseRouting() bool + func (c *Configuration) GetHostProxyHeaders() map[string]bool + func (c *Configuration) GetKeepAlive() time.Duration + func (c *Configuration) GetLanguageContextKey() string + func (c *Configuration) GetLanguageInputContextKey() string + func (c *Configuration) GetLocaleContextKey() string + func (c *Configuration) GetLogLevel() string + func (c *Configuration) GetOther() map[string]interface{} + func (c *Configuration) GetPostMaxMemory() int64 + func (c *Configuration) GetRemoteAddrHeaders() []string + func (c *Configuration) GetRemoteAddrHeadersForce() bool + func (c *Configuration) GetRemoteAddrPrivateSubnets() []netutil.IPRange + func (c *Configuration) GetResetOnFireErrorCode() bool + func (c *Configuration) GetSSLProxyHeaders() map[string]string + func (c *Configuration) GetSocketSharding() bool + func (c *Configuration) GetTimeFormat() string + func (c *Configuration) GetTimeout() time.Duration + func (c *Configuration) GetTimeoutMessage() string + func (c *Configuration) GetURLParamSeparator() *string + func (c *Configuration) GetVHost() string + func (c *Configuration) GetVersionAliasesContextKey() string + func (c *Configuration) GetVersionContextKey() string + func (c *Configuration) GetViewDataContextKey() string + func (c *Configuration) GetViewEngineContextKey() string + func (c *Configuration) GetViewLayoutContextKey() string + type Configurator func(*Application) + func WithCharset(charset string) Configurator + func WithConfiguration(c Configuration) Configurator + func WithHostProxyHeader(headers ...string) Configurator + func WithKeepAlive(keepAliveDur time.Duration) Configurator + func WithLogLevel(level string) Configurator + func WithOtherValue(key string, val interface{}) Configurator + func WithPostMaxMemory(limit int64) Configurator + func WithRemoteAddrHeader(header ...string) Configurator + func WithRemoteAddrPrivateSubnet(startIP, endIP string) Configurator + func WithSSLProxyHeader(headerKey, headerValue string) Configurator + func WithSitemap(startURL string) Configurator + func WithTimeFormat(timeformat string) Configurator + func WithTimeout(timeoutDur time.Duration, htmlBody ...string) Configurator + func WithoutRemoteAddrHeader(headerName string) Configurator + func WithoutServerError(errors ...error) Configurator + type Context = *context.Context + type ContextPatches struct + func (cp *ContextPatches) GetDomain(patchFunc func(hostport string) string) + func (cp *ContextPatches) ResolveFS(patchFunc func(fsOrDir interface{}) fs.FS) + func (cp *ContextPatches) ResolveHTTPFS(patchFunc func(fsOrDir interface{}) http.FileSystem) + func (cp *ContextPatches) SetCookieKVExpiration(patch time.Duration) + func (cp *ContextPatches) Writers() *ContextWriterPatches + type ContextWriterPatches struct + func (cwp *ContextWriterPatches) JSON(patchFunc func(ctx Context, v interface{}, options *JSON) error) + func (cwp *ContextWriterPatches) JSONP(patchFunc func(ctx Context, v interface{}, options *JSONP) error) + func (cwp *ContextWriterPatches) Markdown(patchFunc func(ctx Context, v []byte, options *Markdown) error) + func (cwp *ContextWriterPatches) XML(patchFunc func(ctx Context, v interface{}, options *XML) error) + func (cwp *ContextWriterPatches) YAML(patchFunc func(ctx Context, v interface{}, indentSpace int) error) + type Cookie = http.Cookie + type CookieOption = context.CookieOption + type DecodeFunc = context.DecodeFunc + type Dir = http.Dir + type DirCacheOptions = router.DirCacheOptions + type DirListRichOptions = router.DirListRichOptions + type DirOptions = router.DirOptions + type ErrPrivate = context.ErrPrivate + type ErrViewNotExist = context.ErrViewNotExist + type ExecutionOptions = router.ExecutionOptions + type ExecutionRules = router.ExecutionRules + type FallbackView = context.FallbackView + type FallbackViewFunc = context.FallbackViewFunc + type FallbackViewLayout = context.FallbackViewLayout + type Filter = context.Filter + type GlobalPatches struct + func Patches() *GlobalPatches + func (p *GlobalPatches) Context() *ContextPatches + type Handler = context.Handler + type JSON = context.JSON + type JSONP = context.JSONP + type JSONReader = context.JSONReader + type Locale = context.Locale + type Map = context.Map + type Markdown = context.Markdown + type N = context.N + type Party = router.Party + type Problem = context.Problem + type ProblemOptions = context.ProblemOptions + type ProtoMarshalOptions = context.ProtoMarshalOptions + type ProtoUnmarshalOptions = context.ProtoUnmarshalOptions + type ResultHandler = hero.ResultHandler + type Runner func(*Application) error + func Addr(addr string, hostConfigs ...host.Configurator) Runner + func AutoTLS(addr string, domain string, email string, hostConfigs ...host.Configurator) Runner + func Listener(l net.Listener, hostConfigs ...host.Configurator) Runner + func Raw(f func() error) Runner + func Server(srv *http.Server, hostConfigs ...host.Configurator) Runner + func TLS(addr string, certFileOrContents, keyFileOrContents string, ...) Runner + type SimpleUser = context.SimpleUser + type Step1 interface + AllowOrigin func(originLine string) Step2 + func NewGuide() Step1 + type Step2 interface + Compression func(b bool) Step3 + type Step3 interface + Health func(b bool, env, developer string) Step4 + type Step4 interface + Timeout func(requestResponseLife, read time.Duration, write time.Duration) Step5 + type Step5 interface + Middlewares func(handlers ...Handler) Step6 + RouterMiddlewares func(handlers ...Handler) Step5 + type Step6 interface + Services func(deps ...interface{}) Step7 + type Step7 interface + API func(pathPrefix string, c ...router.PartyConfigurator) Step7 + Build func() *Application + Handle func(method, path string, handlers ...Handler) Step7 + Listen func(hostPort string, configurators ...Configurator) error + Run func(runner Runner, configurators ...Configurator) error + type Supervisor = host.Supervisor + type Tunnel = tunnel.Tunnel + type TunnelingConfiguration = tunnel.Configuration + type UnmarshalerFunc = context.UnmarshalerFunc + type User = context.User + type ViewEngine = context.ViewEngine + type XML = context.XML