package
0.0.2
Repository: https://github.com/kataras/iris.git
Documentation: pkg.go.dev

# Functions

AcquireCompressResponseWriter returns a CompressResponseWriter from the pool.
AcquireResponseRecorder returns a new *AcquireResponseRecorder from the pool.
AcquireResponseWriter returns a new *ResponseWriter from the pool.
AddCompressHeaders just adds the headers "Vary" to "Accept-Encoding" and "Content-Encoding" to the given encoding.
CookieAllowReclaim accepts the Context itself.
CookieAllowSubdomains set to the Cookie Options in order to allow subdomains to have access to the cookies.
CookieCleanPath is a `CookieOption`.
CookieEncoding accepts a value which implements `Encode` and `Decode` methods.
CookieExpires is a `CookieOption`.
CookieHTTPOnly is a `CookieOption`.
CookieIncluded reports whether the "cookie.Name" is in the list of "cookieNames".
CookiePath is a `CookieOption`.
CookieSameSite sets a same-site rule for cookies to set.
CookieSecure sets the cookie's Secure option if the current request's connection is using TLS.
DecodeQuery returns the uri parameter as url (string) useful when you want to pass something to a database and be valid to retrieve it via context.Param use it only for special cases, when the default behavior doesn't suits you.
DecodeURL returns the decoded uri useful when you want to pass something to a database and be valid to retrieve it via context.Param use it only for special cases, when the default behavior doesn't suits you.
FormValueDefault retruns a single parsed form value.
GetBody reads and returns the request body.
GetEncoding extracts the best available encoding from the request.
GetForm returns the request form (url queries, post or multipart) values.
GetHost returns the host part of the current URI.
HandlerFileLine returns the handler's file and line information.
HandlerFileLineRel same as `HandlerFileLine` but it returns the path corresponding to its relative based on the package-level "WorkingDir" variable.
HandlerName returns the handler's function name.
HandlersNames returns a slice of "handlers" names separated by commas.
IgnoreHandlerName compares a static slice of Iris builtin internal methods that should be ignored from trace.
IsZeroTime reports whether t is obviously unspecified (either zero or Unix()=0).
JoinHandlers returns a copy of "h1" and "h2" Handlers slice joined as one slice of Handlers.
MainHandlerName tries to find the main handler that end-developer registered on the provided chain of handlers and returns its function name.
New creates and returns a new context pool.
NewCompressReader returns a new "compressReader" wrapper of "src".
NewCompressWriter returns a CompressWriter of "w" based on the given "encoding".
NewConditionalHandler returns a single Handler which can be registered as a middleware.
NewContext returns a new Context instance.
NewProblem retruns a new Problem.
NewTransactionErrResult returns a new transaction result with the given error message, it can be empty too, but if not then the transaction's scope is decided what to do with that.
ParamResolverByTypeAndIndex will return a function that can be used to bind path parameter's exact value by its Go std type and the parameter's index based on the registered path.
SetHandlerName sets a handler name that could be fetched through `HandlerName`.
StatusText returns a text for the HTTP status code.
TrimHeaderValue returns the "v[0:first space or semicolon]".
UpsertHandlers like `JoinHandlers` but it does NOT copies the handlers entries and it does remove duplicates.
WriteJSON marshals the given interface object and writes the JSON response to the 'writer'.
WriteJSONP marshals the given interface object and writes the JSON response to the writer.
WriteMarkdown parses the markdown to html and writes these contents to the writer.
WriteXML marshals the given interface object and writes the XML response to the writer.
XMLMap wraps a map[string]interface{} to compatible xml marshaler, in order to be able to render maps as XML on the `Context.XML` method.

# Constants

AcceptEncodingHeaderKey is the header key of "Accept-Encoding".
The available builtin compression algorithms.
CacheControlHeaderKey is the header key of "Cache-Control".
ContentBinaryHeaderValue header value for binary data.
ContentDispositionHeaderKey is the header key of "Content-Disposition".
ContentEncodingHeaderKey is the header key of "Content-Encoding".
ContentFormHeaderValue header value for post form data.
ContentFormMultipartHeaderValue header value for post multipart form data.
ContentGRPCHeaderValue Content-Type header value for gRPC.
ContentHTMLHeaderValue is the string of text/html response header's content type value.
ContentJavascriptHeaderValue header value for JSONP & Javascript data.
ContentJSONHeaderValue header value for JSON data.
ContentJSONProblemHeaderValue header value for JSON API problem error.
ContentLengthHeaderKey is the header key of "Content-Length".
ContentMarkdownHeaderValue custom key/content type, the real is the text/html.
ContentMsgPack2HeaderValue alternative header value for MsgPack data.
ContentMsgPackHeaderValue header value for MsgPack data.
ContentProtobufHeaderValue header value for Protobuf messages data.
ContentTextHeaderValue header value for Text data.
ContentTypeHeaderKey is the header key of "Content-Type".
ContentWebassemblyHeaderValue header value for web assembly files.
ContentXMLHeaderValue header value for XML data.
ContentXMLProblemHeaderValue header value for XML API problem error.
ContentXMLUnreadableHeaderValue obselete header value for XML.
ContentYAMLHeaderValue header value for YAML data.
ControllerContextKey returns the context key from which the `Context.Controller` method returns the store's value.
The available builtin compression algorithms.
DependenciesContextKey is the context key for the context's value to keep the serve-time static dependencies raw values.
ETagHeaderKey is the header key of "ETag".
The available builtin compression algorithms.
GzipHeaderValue is the header value of "gzip".
IDENTITY no transformation whatsoever.
IfModifiedSinceHeaderKey is the header key of "If-Modified-Since".
LastModifiedHeaderKey is the header key of "Last-Modified".
NoWritten !=-1 => when nothing written before.
Set of Cookie actions for `CookieOption`.
Set of Cookie actions for `CookieOption`.
Set of Cookie actions for `CookieOption`.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
Contains the available values of the goreferrer enums.
The available builtin compression algorithms.
The available builtin compression algorithms.
5xx.
Unofficial status error codes.
StatusCodeWritten != 0 => when only status code written.
Unofficial status error codes.
Unofficial status error codes.
Unofficial status error codes.
4xx.
Unofficial status error codes.
Unofficial status error codes.
Unofficial status error codes.
VaryHeaderKey is the header key of "Vary".

# Variables

AllEncodings is a slice of default content encodings.
ClientAndServerErrorCodes is the static list of all client and server error codes.
ClientErrorCodes holds the 4xx Client errors.
CookieExpireDelete may be set on Cookie.Expire for expiring the given cookie.
CookieExpireUnlimited indicates that does expires after 24 years.
DefaultJSONOptions is the optional settings that are being used inside `ctx.JSON`.
DefaultJSONPOptions is the optional settings that are being used inside `ctx.JSONP`.
DefaultMarkdownOptions is the optional settings that are being used from `WriteMarkdown` and `ctx.Markdown`.
DefaultProblemOptions the default options for `Context.Problem` method.
DefaultProblemStatusCode is being sent to the client when Problem's status is not a valid one.
DefaultXMLOptions is the optional settings that are being used from `ctx.XML`.
ErrContentNotSupported returns from the `Negotiate` method when server responds with 406.
ErrEmptyForm is returned by `context#ReadForm` and `context#ReadBody` when it should read data from a request form data but there is none.
ErrHijackNotSupported is returned by the Hijack method to indicate that Hijack feature is not available.
ErrNotFound is the type error which API users can make use of to check if a `Context` action of a `Handler` is type of Not Found, e.g.
ErrNotSupportedCompression returned from AcquireCompressResponseWriter, NewCompressWriter and NewCompressReader when the request's Accept-Encoding was not found in the server's supported compression algorithms.
ErrPreconditionFailed may be returned from `Context` methods that has to perform one or more client side preconditions before the actual check, e.g.
ErrPushNotSupported is returned by the Push method to indicate that HTTP/2 Push support is not available.
ErrRequestNotCompressed returned from NewCompressReader when request is not compressed.
ErrResponseNotCompressed returned from AcquireCompressResponseWriter when response's Content-Type header is missing due to golang/go/issues/31753 or when accept-encoding is empty.
ErrTransactionInterrupt can be used to manually force-complete a Context's transaction and log(warn) the wrapped error's message.
FormatTime returns a textual representation of the time value formatted according to the Application's configuration's TimeFormat field which defines the format.
IsErrPath can be used at `context#ReadForm` and `context#ReadQuery`.
LimitRequestBodySize is a middleware which sets a request body size limit for all next handlers in the chain.
PackageName is the Iris Go module package name.
ParamResolvers is the global param resolution for a parameter type for a specific go std or custom type.
ParseTime parses a time header (such as the Date: header), trying each forth formats (or three if Application's configuration's TimeFormat is defaulted) that are allowed by HTTP/1.1: Application's configuration's TimeFormat or/and http.TimeFormat, time.RFC850, and time.ANSIC.
Recorder the middleware to enable response writer recording ( ResponseWriter -> ResponseRecorder).
RequestTransactionScope explanation: if scope fails (if transaction.IsFailure() == true) then the rest of the context's response (transaction or normal flow) is not written to the client, and an error status code is written instead.
ServerErrorCodes holds the 5xx Server errors.
SetCookieKVExpiration is 365 days by-default you can change it or simple, use the SetCookie for more control.
StatusCodeNotSuccessful defines if a specific "statusCode" is not a valid status code for a successful response.
TransientTransactionScope explanation: independent 'silent' scope, if transaction fails (if transaction.IsFailure() == true) then its response is not written to the real context no error is provided to the user.
WorkingDir is the (initial) current directory.

# Structs

CompressReader is a structure which wraps a compressed reader.
CompressResponseWriter is a compressed data http.ResponseWriter.
Context is the midle-man server's "object" dealing with incoming requests.
JSON contains the options for the JSON (Context's) Renderer.
JSONP contains the options for the JSONP (Context's) Renderer.
Markdown contains the options for the Markdown (Context's) Renderer.
N is a struct which can be passed on the `Context.Negotiate` method.
NegotiationAcceptBuilder builds the accepted mime types and charset and "Accept-Charset" headers respectfully.
NegotiationBuilder returns from the `Context.Negotitation` and can be used inside chain of handlers to build server-side mime type(s), charset(s) and encoding algorithm(s) that should match with the client's Accept, Accept-Charset and Accept-Encoding headers (by-default).
Pool is the context pool, it's used inside router and the framework by itself.
ProblemOptions the optional settings when server replies with a Problem.
No description provided by the author
RequestParams is a key string - value string storage which context's request dynamic path params are being kept.
A ResponseRecorder is used mostly by context's transactions in order to record and change if needed the body, status code and headers.
Transaction gives the users the opportunity to code their route handlers cleaner and safier it receives a scope which is decided when to send an error to the user, recover from panics stop the execution of the next transactions and so on..
TransactionErrResult could be named also something like 'MaybeError', it is useful to send it on transaction.Complete in order to execute a custom error mesasge to the user.
XML contains the options for the XML (Context's) Renderer.

# Interfaces

Application is the context's owner.
No description provided by the author
CompressWriter is an interface which all compress writers should implement.
ConfigurationReadOnly can be implemented by Configuration, it's being used inside the Context.
ContentNegotiator is the interface which structs can implement to override the `Context.Negotiate` default implementation and manually respond to the client based on a manuall call of `Context.Negotiation().Build()` to get the final negotiated mime and charset.
ContentSelector is the interface which structs can implement to manually choose a content based on the negotiated mime (content type).
I18nReadOnly is the interface which ontains the read-only i18n features.
Locale is the interface which returns from a `Localizer.GetLocale` metod.
ResponseWriter interface is used by the context to serve an HTTP handler to construct an HTTP response.
ResponseWriterBodyReseter can be implemented by response writers that supports response body overriding (e.g.
ResponseWriterDisabler can be implemented by response writers that can be disabled and restored to their previous state (e.g.
ResponseWriterReseter can be implemented by response writers that can clear the whole response so a new handler can write into this from the beginning.
ResponseWriterWriteTo can be implemented by response writers that needs a special encoding before writing to their buffers.
RouteReadOnly allows decoupled access to the current route inside the context.
SecureCookie should encodes and decodes authenticated and optionally encrypted cookie values.
TransactionScope is the manager of the transaction's response, can be resseted and skipped from its parent context or execute an error or skip other transactions.
No description provided by the author
Validator is the validator for request body on Context methods such as ReadJSON, ReadMsgPack, ReadXML, ReadYAML, ReadForm, ReadQuery, ReadBody and e.t.c.
ViewEngine is the interface which all view engines should be implemented in order to be registered inside iris.
ViewEngineFuncer is an addition of a view engine, if a view engine implements that interface then iris can add some closed-relative iris functions like {{ url }}, {{ urlpath }} and {{ tr }}.

# Type aliases

CookieOption is the type of function that is accepted on context's methods like `SetCookieKV`, `RemoveCookie` and `SetCookie` as their (last) variadic input argument to amend the to-be-sent cookie.
DependenciesMap is the type which context serve-time struct dependencies are stored with.
Filter is just a type of func(Handler) bool which reports whether an action must be performed based on the incoming request.
A Handler responds to an HTTP request.
Handlers is just a type of slice of []Handler.
Map is just a type alias of the map[string]interface{} type.
Problem Details for HTTP APIs.
ProtoMarshalOptions is a type alias for protojson.MarshalOptions.
ProtoUnmarshalOptions is a type alias for protojson.UnmarshalOptions.
No description provided by the author
No description provided by the author
TransactionScopeFunc the transaction's scope signature.
No description provided by the author