errors

package
v0.0.0-...-f94be1b Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilIndices    = errors.New(`indices cannot be set to "nil"`)
	ErrNilACLs       = errors.New(`acls cannot be set to "nil"`)
	ErrNilOps        = errors.New(`ops cannot be set to "nil"`)
	ErrNilCategories = errors.New(`categories cannot be set to "nil"`)
	ErrNilSources    = errors.New(`sources cannot be set to "nil"`)
	ErrNilReferers   = errors.New(`referers cannot be set to "nil"`)
)

Nil field errors.

Functions

This section is empty.

Types

type EnvVarNotSetError

type EnvVarNotSetError struct {
	Var string
}

EnvVarNotSetError is an error which is returned when a required env var is not set.

func NewEnvVarNotSetError

func NewEnvVarNotSetError(envVarName string) *EnvVarNotSetError

NewEnvVarNotSetError returns an error for an envVarName whose value is not set.

func (*EnvVarNotSetError) Error

func (e *EnvVarNotSetError) Error() string

Error implements the error interface.

type InvalidCastError

type InvalidCastError struct {
	From string
	To   string
}

InvalidCastError is an error which is returned when an invalid cast of a particular type is attempted.

func NewInvalidCastError

func NewInvalidCastError(from, to string) *InvalidCastError

NewInvalidCastError returns an error two types that were involved in invalid cast operation.

func (*InvalidCastError) Error

func (i *InvalidCastError) Error() string

Error implements the error interface.

type NotFoundInContextError

type NotFoundInContextError struct {
	Field string
}

NotFoundInContextError is an error which is returned when an expected value in the context is missing.

func NewNotFoundInContextError

func NewNotFoundInContextError(field string) *NotFoundInContextError

NewNotFoundInContextError returns an error for the given field when it is missing from the context.

func (*NotFoundInContextError) Error

func (n *NotFoundInContextError) Error() string

Error implements the error interface.

type UnsupportedPatchError

type UnsupportedPatchError struct {
	Type  string
	Field string
}

UnsupportedPatchError is an error which is returned when a patch request is received for a readonly field.

func NewUnsupportedPatchError

func NewUnsupportedPatchError(typeName, field string) *UnsupportedPatchError

NewUnsupportedPatchError returns an error for a readonly field in a given type when it is tried to be modified.

func (*UnsupportedPatchError) Error

func (u *UnsupportedPatchError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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