errs

package
v0.0.0-...-9ef13ba Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E

func E(args ...interface{}) error

func NewGRPCError

func NewGRPCError(logger logr.Logger, err error) error

Types

type Code

type Code string

type Error

type Error struct {
	Kind   Kind
	Code   Code
	Err    error
	Fields []ErrorField
}

func (Error) Error

func (e Error) Error() string

type ErrorField

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

type Kind

type Kind uint8
const (
	Other         Kind = iota // Unclassified error. This value is not printed in the error message.
	Invalid                   // Invalid operation for this type of item.
	IO                        // External I/O error such as network failure.
	Exist                     // Item already exists.
	NotExist                  // Item does not exist.
	Private                   // Information withheld.
	Internal                  // Internal error or inconsistency.
	BrokenLink                // Link target does not exist.
	Database                  // Error from database.
	Validation                // Input validation error.
	Unanticipated             // Unanticipated error.
	Unknown
	InvalidRequest // Invalid Request
	Unauthenticated
	Unauthorized
)

func (Kind) String

func (k Kind) String() string

Jump to

Keyboard shortcuts

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