apierrors

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidTokenError = errors.New("Invalid token")
View Source
var MalformedTokenMessage = "The provided token does not meet the required format"
View Source
var MissingTokenMessage = "No Authorization token was provided"

Functions

This section is empty.

Types

type ErrorStructure

type ErrorStructure struct {
	Errors []IndividualError `json:"errors"`
}

func ErrorResponseBodyBuilder

func ErrorResponseBodyBuilder(listOfErrors []IndividualError) (errorResponseBody ErrorStructure)

type IndividualError

type IndividualError struct {
	SpecificError string `json:"error"`
	Message       string `json:"message"`
	Source        Source `json:"source"`
}

func IndividualErrorBuilder

func IndividualErrorBuilder(err error, message, sourceField, sourceParam string) (individualError IndividualError)

type Source

type Source struct {
	Field string `json:"field"`
	Param string `json:"param"`
}

Jump to

Keyboard shortcuts

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