status

package
v0.0.0-...-2262de7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: NCSA Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(code int) errors.ErrorTracer

Code returns a pre-configured error with a message matching that of the HTTP status matching the specified code.

For custom response codes, consider using CodeWithMessage instead.

func CodeWithMessage

func CodeWithMessage(code int, message string) errors.ErrorTracer

CodeWithMessage returns a pre-configured error with the specified code and a custom message. This is useful if you don't want your response text to contain the typical HTTP status text or you wish to return a custom code.

func CodeWithMeta

func CodeWithMeta(code int, message string, meta map[string]interface{}) errors.ErrorTracer

CodeWithMeta returns a pre-configured error with the specified code, custom message, and metadata. This may be used by custom templates to provide distinct error handling, custom error pages, or similar.

func Internal

func Internal(controller string, params ...url.Values) *errors.Internal

func Redirect

func Redirect(url string, code ...int) *errors.Redirect

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL