errors

package
v0.1.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ErrorKind = "Error"

Error kind is the name of the type used to represent errors.

View Source
const ErrorNilKind = "ErrorNil"

ErrorNilKind is the name of the type used to nil errors.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

Error represents errors.

func UnmarshalError

func UnmarshalError(source interface{}) (object *Error, err error)

UnmarshalError reads an error from the given which can be an slice of bytes, a string, a reader or a JSON decoder.

func (*Error) Code

func (e *Error) Code() string

Code returns the code of the error.

func (*Error) Error

func (e *Error) Error() string

Error is the implementation of the error interface.

func (*Error) GetCode

func (e *Error) GetCode() (value string, ok bool)

GetCode returns the link of the error and a flag indicating if the code has a value.

func (*Error) GetHREF

func (e *Error) GetHREF() (value string, ok bool)

GetHREF returns the link of the error and a flag indicating if the link has a value.

func (*Error) GetID

func (e *Error) GetID() (value string, ok bool)

GetID returns the identifier of the error and a flag indicating if the identifier has a value.

func (*Error) GetReason

func (e *Error) GetReason() (value string, ok bool)

GetReason returns the link of the error and a flag indicating if the reason has a value.

func (*Error) HREF

func (e *Error) HREF() string

HREF returns the link to the error.

func (*Error) ID

func (e *Error) ID() string

ID returns the identifier of the error.

func (*Error) Kind

func (e *Error) Kind() string

Kind returns the name of the type of the error.

func (*Error) Reason

func (e *Error) Reason() string

Reason returns the reason of the error.

Jump to

Keyboard shortcuts

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