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

# Functions

https://golang.org/doc/go1.9#callersframes.
Handler accepts a "handler" function which can accept any input arguments that match with the Container's `Dependencies` and any output result; like string, int (string,int), custom structs, Result(View | Response) and anything you can imagine.
New returns a new Container, a container for dependencies and a factory for handlers and controllers, this is used internally by the `mvc#Application` structure.
NewDependency converts a function or a function which accepts other dependencies or static struct value to a *Dependency.
Register adds a dependency.
ToDependencyMatchFunc converts a DependencyMatcher (generic for all dependencies) to a dependency-specific input matcher.
Try will check if "fn" ran without any panics, using recovery, and return its result as the final response otherwise it returns the "failure" response if any, if not then a 400 bad request is being sent.

# Variables

BuiltinDependencies is a list of builtin dependencies that are added on Container's initilization.
Default is the default container value which can be used for dependencies share.
DefaultDependencyMatcher is the default dependency match function for all DI containers.
DefaultErrorHandler is the default error handler which is fired when a function returns a non-nil error or a request-scoped dependency failed to binded.
DefaultErrStatusCode is the default error status code (400) when the response contains a non-nil error or a request-scoped binding error occur.
ErrMissingDependency may returned only from the `Container.Inject` method when not a matching dependency found for "toPtr".
ErrSeeOther may be returned from a dependency handler to skip a specific dependency based on custom logic.
ErrStopExecution may be returned from a dependency handler to stop and return the execution of the function without error (it calls ctx.StopExecution() too).

# Structs

Container contains and delivers the Dependencies that will be binded to the controller(s) or handler(s) that can be created using the Container's `Handler` and `Struct` methods.
Input contains the input reference of which a dependency is binded to.
A Report holds meta information about dependency sources and target values per package, struct, struct's fields, struct's method, package-level function or closure.
A ReportEntry holds the information about a binding.
Response completes the `methodfunc.Result` interface.
Source describes where a dependency is located at the source code itself.
Struct keeps a record of a particular struct value injection.
View completes the `hero.Result` interface.

# Interfaces

PreflightResult is an interface which implementers should be responsible to perform preflight checks of a <T> resource (or Result) before sent to the client.
Result is a response dispatcher.

# Type aliases

DependencyMatcher type alias describes a dependency match function.
ResultHandler describes the function type which should serve the "v" struct value.
Sorter is the type for sort customization of a struct's fields and its available bindable values.