errorsresponse

package
v0.0.0-...-23038bb Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequestResponse

type BadRequestResponse struct {
	ErrorCode string `json:"errorCode"`
	Message   string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	ErrorCode int    `json:"errorCode"`
	Message   string `json:"message"`
}

func Forbidden

func Forbidden(message string) ErrorResponse

func InternalServerError

func InternalServerError(message string) ErrorResponse

func NotFound

func NotFound(message string) ErrorResponse

func Unauthorized

func Unauthorized(message string) ErrorResponse

type InvalidQueryResponse

type InvalidQueryResponse struct {
	ErrorCode string `json:"errorCode"`
	Message   string `json:"message"`
}

func InvalidQuery

func InvalidQuery(errorCode string, message error) InvalidQueryResponse

type ValidationErrorResponse

type ValidationErrorResponse struct {
	ErrorCode string            `json:"errorCode"`
	Message   string            `json:"message"`
	Error     map[string]string `json:"error"`
}

func ValidationError

func ValidationError(errorCode string, message error, error map[string]string) ValidationErrorResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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