gqlerror

package
v0.0.0-...-1ac4f16 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 4 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

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