package
1.0.33
Repository: https://github.com/eluv-io/common-go.git
Documentation: pkg.go.dev

# Functions

Abort aborts the current HTTP request with the given error.
AbortHead aborts the current HTTP HEAD request with the HTTP status code set according to the given error type.
AbortHeadWithStatus aborts the current HTTP HEAD request with the given status code.
AbortWithStatus aborts the current HTTP request with the given status code and error.
GetCustomAbortHandler gets the custom abort handler if previously set.
HttpStatus returns the HTTP status code for the given error.
Send send back an HTTP response with the given HTTP status code and the data marshaled to JSON or XML depending on the "accept" headers of the request.
SendError sends back an HTTP response with the given HTTP status code and the data marshaled to JSON or XML depending on the "accept" headers of the request.
SetCustomAbortHandler sets a custom handler that is called if an API call is aborted.
SetLogger sets the logger for all logging performed in this package on the given gin context.

# Type aliases

CustomAbortHandler is an optional handler that can be registered on the gin.Context with SetCustomAbortHandler() that allows intercepting calls to Abort() or AbortWithStatus().