definitionError

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEVEL_WARNING errorLevel = iota
	LEVEL_FATAL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDescriptor added in v0.12.0

type ErrorDescriptor struct {
	Message string
	Code    string
	Level   errorLevel
}

type ErrorList

type ErrorList []GQLError

func (ErrorList) GetErrors added in v0.12.0

func (o ErrorList) GetErrors() (r []ErrorStruct)

type ErrorLocation

type ErrorLocation struct {
	// contains filtered or unexported fields
}

type ErrorStruct

type ErrorStruct struct {
	Code       string             `json:"-"`
	Message    string             `json:"message"`
	Locations  []GQLErrorLocation `json:"locations,omitempty"`
	Path       []interface{}      `json:"path,omitempty"`
	Extensions ExtensionError     `json:"extensions,omitempty"`
}

type ExtensionError

type ExtensionError map[string]interface{}

type Fatal

type Fatal struct {
	GQLError
	ErrorStruct
}

func NewFatal

func NewFatal(message string, extensions ExtensionError) *Fatal

func (*Fatal) Error added in v0.12.0

func (o *Fatal) Error() (r ErrorStruct)

type GQLError

type GQLError interface {
	Error() ErrorStruct
}

func NewError added in v0.12.0

func NewError(err ErrorDescriptor, extensions ExtensionError) (r GQLError)

type GQLErrorLocation

type GQLErrorLocation struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type Warning

type Warning struct {
	GQLError
	ErrorStruct
}

func NewWarning

func NewWarning(message string, extensions ExtensionError) *Warning

func (*Warning) Error

func (o *Warning) Error() (r ErrorStruct)

Jump to

Keyboard shortcuts

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