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

# Packages

# Functions

Create handles a create operation and sends a JSON response with the created resource to the client.
CreateHandler handles a create operation and sends a JSON response with the created resource to the client with status code of 201.
GetRequestInputs returns a slice of generic type T from a slice of HandlerInputFunc[T].
Handle handles a generic response and error from a service call and sends a JSON response to the client.
HandleAPIError handles remote server errors.
HandleCreate handles a create operation and sends a JSON response with the created resource to the client.
HandleDelete handles a delete operation and sends a status code to the client.
HandleDelete handles a delete operation and sends a status code to the client.
HandleError handles an error by sending it to the client based on the registered error code names and their error functions.
Handler handles a generic response and error from a service call and sends a JSON response to the client with status code of 200.
HandleUpdate handles an update operation and sends a status code to the client.
Intercept adds a context response handler function to the context.
List handles a generic response and error from a service paginated call and sends a JSON response to the client.
ListHandler handles a generic response and error from a service paginated call and sends a JSON response to the client.
NoContent handles a generic response and error from a service call and sends a JSON response to the client.
NoContentHandler handles a generic response and error from a service call and sends a JSON response to the client with status code of 204.
NoContent handles a generic response and error from a service call and sends a JSON response to the client.
NoContentOrNotModifiedHandler handles a generic response and error from a service call and sends a JSON response to the client with status code of 204 or 304.
OK handles a generic response and error from a service call and sends a JSON response to the client.
PathParam returns a HandlerInputFunc which reads a path parameter from the context and returns it as a generic type T.
Query returns a HandlerInputFunc which reads a URL query from the context and returns it as a generic type T.
ReadPaginationOptions reads the ListOptions from the URL Query and any filter options of generic T from the request body.
ReadPayload reads a JSON payload from the context and returns it as a generic type T.
ReadQuery reads URL query values from the context and returns it as a generic type T.
RecoveryHandler is a middleware which recovers from panics and sends an appropriate error response to the logger and the client.
Register registers a custom HTTP Error and returns its canonical name for future use.
RegisterErrorCode registers a custom HTTP Error.
RegisterErrorCodeMap registers one or more custom HTTP Errors.
Validation adds a context validator function to the context.
Value returns a HandlerInputFunc which returns a generic type T.

# Variables

List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
As is an alias of the standard errors.As function.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
DefaultContextErrorHandler returns a context error handler which calls the HandleError on any incoming error when a rich rest response failed to be written to the client.
DefaultPathParameterTypeErrorHandler registers an error handler for macro path type parameter.
Deprecated: Use Register instead.
ErrUnexpected is the HTTP error which sent to the client when server fails to send an error, it's a fallback error.
ErrUnexpectedErrorCode is the error which logged when the given error code name is not registered.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
Is is an alias of the standard errors.Is function.
Join is an alias of the standard errors.Join function.
LogError can be modified to customize the way an error is logged to the server (most common: internal server errors, database errors et.c.).
New is an alias of the standard errors.New function.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
SkipCanceled is a package-level setting which by default skips the logging of a canceled response or operation.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
List of default error codes a server should follow and send back to the client.
Unwrap is an alias of the standard errors.Unwrap function.

# Structs

Error represents the JSON form of "http wire errors".
IDPayload is a simple struct which describes a json id value.

# Interfaces

HandlerInputFunc is a function which takes a context and returns a generic type T.
ListResponseFunc is a function which takes a context, a pagination.ListOptions and a generic type T and returns a slice []R, total count of the items and an error.
RequestHandler is an interface which can be implemented by a request payload struct in order to validate the context before calling a service function.
ResponseFunc is a function which takes a context and a generic type T and returns a generic type R and an error.
ResponseHandler is an interface which can be implemented by a request payload struct in order to handle a response before sending it to the client.
ResponseOnlyErrorFunc is a function which takes a context and a generic type T and returns an error.
ValidationError is an interface which IF it custom error types completes, then it can by mapped to a validation error.

# Type aliases

ContextRequestFunc is a function which takes a context and a generic type T and returns an error.
ContextResponseFunc is a function which takes a context, a generic type T and a generic type R and returns an error.
LogErrorFunc is an alias of a function type which accepts the Iris request context and an error and it's fired whenever an error should be logged.