Documentation
¶
Index ¶
- func Code(code int) errors.ErrorTracer
- func CodeWithMessage(code int, message string) errors.ErrorTracer
- func CodeWithMeta(code int, message string, meta map[string]interface{}) errors.ErrorTracer
- func Internal(controller string, params ...url.Values) *errors.Internal
- func Redirect(url string, code ...int) *errors.Redirect
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.