api

package
v6.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMyInternal

func IsMyInternal(err error) bool

IsMyInternal returns true if err is an instance of MyInternal.

func IsMyNotFound

func IsMyNotFound(err error) bool

IsMyNotFound returns true if err is an instance of MyNotFound.

Types

type Basic

type Basic struct {
	Data string `json:"data"`
}

func (Basic) MarshalYAML

func (o Basic) MarshalYAML() (interface{}, error)

func (*Basic) UnmarshalYAML

func (o *Basic) UnmarshalYAML(unmarshal func(interface{}) error) error

type MyInternal

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

MyInternal is an error type. Internal server error.

func NewMyInternal

func NewMyInternal(safeArgAArg Basic, safeArgBArg []int, typeArg string, unsafeArgAArg string, unsafeArgBArg *string, myInternalArg string) *MyInternal

NewMyInternal returns new instance of MyInternal error.

func WrapWithMyInternal

func WrapWithMyInternal(err error, safeArgAArg Basic, safeArgBArg []int, typeArg string, unsafeArgAArg string, unsafeArgBArg *string, myInternalArg string) *MyInternal

WrapWithMyInternal returns new instance of MyInternal error wrapping an existing error.

func (*MyInternal) Cause

func (e *MyInternal) Cause() error

Cause returns the underlying cause of the error, or nil if none. Note that cause is not serialized and sent over the wire.

func (*MyInternal) Code

func (e *MyInternal) Code() errors.ErrorCode

Code returns an enum describing error category.

func (*MyInternal) Error

func (e *MyInternal) Error() string

func (*MyInternal) Format

func (e *MyInternal) Format(state fmt.State, verb rune)

Format implements fmt.Formatter, a requirement of werror.Werror.

func (*MyInternal) InstanceID

func (e *MyInternal) InstanceID() uuid.UUID

InstanceID returns unique identifier of this particular error instance.

func (MyInternal) MarshalJSON

func (e MyInternal) MarshalJSON() ([]byte, error)

func (MyInternal) MarshalYAML

func (o MyInternal) MarshalYAML() (interface{}, error)

func (*MyInternal) Message

func (e *MyInternal) Message() string

Message returns the message body for the error.

func (*MyInternal) Name

func (e *MyInternal) Name() string

Name returns an error name identifying error type.

func (*MyInternal) Parameters

func (e *MyInternal) Parameters() map[string]interface{}

Parameters returns a set of named parameters detailing this particular error instance.

func (*MyInternal) SafeParams

func (e *MyInternal) SafeParams() map[string]interface{}

SafeParams returns a set of named safe parameters detailing this particular error instance and any underlying causes.

func (*MyInternal) StackTrace

func (e *MyInternal) StackTrace() werror.StackTrace

StackTrace returns the StackTrace for the error, or nil if none. Note that stack traces are not serialized and sent over the wire.

func (*MyInternal) UnmarshalJSON

func (e *MyInternal) UnmarshalJSON(data []byte) error

func (*MyInternal) UnmarshalYAML

func (o *MyInternal) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*MyInternal) UnsafeParams

func (e *MyInternal) UnsafeParams() map[string]interface{}

UnsafeParams returns a set of named unsafe parameters detailing this particular error instance and any underlying causes.

type MyNotFound

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

MyNotFound is an error type. Something was not found.

func NewMyNotFound

func NewMyNotFound(safeArgAArg Basic, safeArgBArg []int, typeArg string, unsafeArgAArg string, unsafeArgBArg *string) *MyNotFound

NewMyNotFound returns new instance of MyNotFound error.

func WrapWithMyNotFound

func WrapWithMyNotFound(err error, safeArgAArg Basic, safeArgBArg []int, typeArg string, unsafeArgAArg string, unsafeArgBArg *string) *MyNotFound

WrapWithMyNotFound returns new instance of MyNotFound error wrapping an existing error.

func (*MyNotFound) Cause

func (e *MyNotFound) Cause() error

Cause returns the underlying cause of the error, or nil if none. Note that cause is not serialized and sent over the wire.

func (*MyNotFound) Code

func (e *MyNotFound) Code() errors.ErrorCode

Code returns an enum describing error category.

func (*MyNotFound) Error

func (e *MyNotFound) Error() string

func (*MyNotFound) Format

func (e *MyNotFound) Format(state fmt.State, verb rune)

Format implements fmt.Formatter, a requirement of werror.Werror.

func (*MyNotFound) InstanceID

func (e *MyNotFound) InstanceID() uuid.UUID

InstanceID returns unique identifier of this particular error instance.

func (MyNotFound) MarshalJSON

func (e MyNotFound) MarshalJSON() ([]byte, error)

func (MyNotFound) MarshalYAML

func (o MyNotFound) MarshalYAML() (interface{}, error)

func (*MyNotFound) Message

func (e *MyNotFound) Message() string

Message returns the message body for the error.

func (*MyNotFound) Name

func (e *MyNotFound) Name() string

Name returns an error name identifying error type.

func (*MyNotFound) Parameters

func (e *MyNotFound) Parameters() map[string]interface{}

Parameters returns a set of named parameters detailing this particular error instance.

func (*MyNotFound) SafeParams

func (e *MyNotFound) SafeParams() map[string]interface{}

SafeParams returns a set of named safe parameters detailing this particular error instance and any underlying causes.

func (*MyNotFound) StackTrace

func (e *MyNotFound) StackTrace() werror.StackTrace

StackTrace returns the StackTrace for the error, or nil if none. Note that stack traces are not serialized and sent over the wire.

func (*MyNotFound) UnmarshalJSON

func (e *MyNotFound) UnmarshalJSON(data []byte) error

func (*MyNotFound) UnmarshalYAML

func (o *MyNotFound) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*MyNotFound) UnsafeParams

func (e *MyNotFound) UnsafeParams() map[string]interface{}

UnsafeParams returns a set of named unsafe parameters detailing this particular error instance and any underlying causes.

Jump to

Keyboard shortcuts

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