errors

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxDepthExceeded    = errors.New("max depth exceeded")
	ErrUnsupportedValue    = errors.New("unsupported Go value")
	ErrInvalidMapKey       = errors.New("invalid WAF object map key")
	ErrNilObjectPtr        = errors.New("nil WAF object pointer")
	ErrInvalidObjectType   = errors.New("invalid type encountered when decoding")
	ErrTooManyIndirections = errors.New("too many indirections")
)

Encoder/Decoder errors

Functions

This section is empty.

Types

type CgoDisabledError

type CgoDisabledError struct{}

func (CgoDisabledError) Error

func (e CgoDisabledError) Error() string

type ManuallyDisabledError

type ManuallyDisabledError struct{}

ManuallyDisabledError is a wrapper error type helping to handle the error case of trying to execute this package when the WAF has been manually disabled with the `datadog.no_waf` go build tag.

func (ManuallyDisabledError) Error

func (e ManuallyDisabledError) Error() string

type PanicError

type PanicError struct {
	// The recovered panic error while executing the function `in`.
	Err error
	// The function symbol name that was given to `tryCall()`.
	In string
}

PanicError is an error type wrapping a recovered panic value that happened during a function call. Such error must be considered unrecoverable and be used to try to gracefully abort. Keeping using this package after such an error is unreliable and the caller must rather stop using the library. Examples include safety checks errors.

func (*PanicError) Error

func (e *PanicError) Error() string

Error returns the error string representation.

func (*PanicError) Unwrap

func (e *PanicError) Unwrap() error

Unwrap the error and return it. Required by errors.Is and errors.As functions.

type RunError

type RunError int

RunError the WAF can return when running it.

const (
	ErrInternal RunError = iota + 1
	ErrInvalidObject
	ErrInvalidArgument
	ErrTimeout
	ErrOutOfMemory
	ErrEmptyRuleAddresses
)

Errors the WAF can return when running it.

func (RunError) Error

func (e RunError) Error() string

Error returns the string representation of the RunError.

type UnsupportedGoVersionError

type UnsupportedGoVersionError struct{}

UnsupportedGoVersionError is a wrapper error type helping to handle the error case of trying to execute this package when the Go version is not supported.

func (UnsupportedGoVersionError) Error

type UnsupportedOSArchError

type UnsupportedOSArchError struct {
	Os   string
	Arch string
}

UnsupportedOSArchError is a wrapper error type helping to handle the error case of trying to execute this package when the OS or architecture is not supported.

func (UnsupportedOSArchError) Error

func (e UnsupportedOSArchError) Error() string

Jump to

Keyboard shortcuts

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