response

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultErrorMessage = "Unexpected error happened. Please try again later."

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Message    string `json:"message,omitempty"`
	Error      string `json:"error,omitempty"`
	StatusCode int    `json:"-"`
}

func ByError

func ByError(err error) ErrorResponse

func ByErrorAndStatus

func ByErrorAndStatus(err error, status int) ErrorResponse

func NewCaptchaBadResponse

func NewCaptchaBadResponse() ErrorResponse

func NewCaptchaErrorResponse

func NewCaptchaErrorResponse(err error) ErrorResponse

func NewErrorResponse

func NewErrorResponse(message string, err error, status int) ErrorResponse

func (ErrorResponse) Write

func (e ErrorResponse) Write(ctx *fasthttp.RequestCtx)

Jump to

Keyboard shortcuts

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