gqlerror

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(err error) bool

func IsInternal

func IsInternal(err error) bool

func IsInvalid

func IsInvalid(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func New

func New(err error, kind fmt.Stringer, opts ...Option) error

func NewAlreadyExists

func NewAlreadyExists(kind fmt.Stringer, opts ...Option) error

func NewInternal

func NewInternal(opts ...Option) error

func NewInvalid

func NewInvalid(err string, kind fmt.Stringer, opts ...Option) error

func NewNotFound

func NewNotFound(kind fmt.Stringer, opts ...Option) error

func NewNotFoundFromError

func NewNotFoundFromError(err string, opts ...Option) error

Types

type GQLError

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

func (*GQLError) Error

func (e *GQLError) Error() string

func (*GQLError) Status

func (e *GQLError) Status() Status

type Option

type Option func(*GQLError)

func WithCustomArgument

func WithCustomArgument(argument, value string) Option

func WithDetails

func WithDetails(details string) Option

func WithName

func WithName(name string) Option

func WithNamespace

func WithNamespace(namespace string) Option

type Status

type Status int
const (
	Unknown Status = iota
	Internal
	NotFound
	AlreadyExists
	Invalid
)

func (Status) String

func (r Status) String() string

Jump to

Keyboard shortcuts

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