errors

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateIPSet  = "CreateIPSet"
	AppendIPSet  = "AppendIPSet"
	DeleteIPSet  = "DeleteIPSet"
	DestroyIPSet = "DestroyIPSet"
	TestIPSet    = "TestIPSet"
	AddPolicy    = "AddNetworkPolicy"

	SetCannotBeDestroyedInUseByKernelComponent = 1
	ElemSeperatorNotSupported                  = 2
	SetWithGivenNameDoesNotExist               = 3
	SecondElementIsMissing                     = 4
	MissingSecondMandatoryArgument             = 5
	MaximalNumberOfSetsReached                 = 6
	IPSetWithGivenNameAlreadyExists            = 7
	SetToBeAddedDeletedTestedDoesNotExist      = 8
	Unknown                                    = 999
)

Variables

View Source
var (
	// ErrSrcNotSpecified thrown during NPM debug cli mode when the source packet is not specified
	ErrSrcNotSpecified = errors.New("source not specified")

	// ErrDstNotSpecified thrown during NPM debug cli mode when the source packet is not specified
	ErrDstNotSpecified = errors.New("destination not specified")
)

Functions

This section is empty.

Types

type NPMError

type NPMError struct {
	OperationAction string
	IsRetriable     bool
	FullCmd         []string
	ErrID           int
	Err             error
}

func ConvertToNPMError

func ConvertToNPMError(operationFlag string, err error, cmd []string) *NPMError

func Error

func Error(operation string, isRetriable bool, err error) *NPMError

func Errorf

func Errorf(operation string, isRetriable bool, errstring string) *NPMError

func (*NPMError) Error

func (n *NPMError) Error() string

Jump to

Keyboard shortcuts

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