errors

package
v0.0.0-...-a36a61a Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2016 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingAnnotations the ingress rule does not contain annotations
	// This is an error only when annotations are being parsed
	ErrMissingAnnotations = errors.New("ingress rule without annotations")

	// ErrInvalidAnnotationName the ingress rule does contains an invalid
	// annotation name
	ErrInvalidAnnotationName = errors.New("invalid annotation name")
)

Functions

func Errorf

func Errorf(format string, args ...interface{}) error

Errorf formats according to a format specifier and returns the string as a value that satisfies error.

func IsErrDifferentIngressClass

func IsErrDifferentIngressClass(err error) bool

IsErrDifferentIngressClass: Reflect: returns true if the error is a ErrDifferentIngressClass

func IsErrInvalidIngressSpec

func IsErrInvalidIngressSpec(err error) bool

IsErrInvalidIngressSpec: Reflect: returns true if the error is a ErrInvalidIngressSpec

func IsErrMissingRequiredSecret

func IsErrMissingRequiredSecret(err error) bool

IsErrMissingRequiredSecret: Reflect: returns true if the error is a ErrMissingRequiredSecret

func IsErrorNoDefaultIngressClassFound

func IsErrorNoDefaultIngressClassFound(err error) bool

func IsErrorNotFound

func IsErrorNotFound(err error) bool

IsErrorNotFound: Reflect: returns true if the error is a ErrNotFoundInStore

func IsInvalidContent

func IsInvalidContent(e error) bool

IsInvalidContent checks if the err is an error which indicates an annotations value is not valid

func IsLocationDenied

func IsLocationDenied(e error) bool

IsLocationDenied checks if the err is an error which indicates a location should return HTTP code 503

func IsMissingAnnotations

func IsMissingAnnotations(e error) bool

IsMissingAnnotations checks if the err is an error which indicates the ingress does not contain annotations

func IsNotAllDomainsReadyYet

func IsNotAllDomainsReadyYet(err error) bool

IsNotAllDomainsReadyYet returns true if the error is a NotAllDomainsReadyYetError

func New

func New(m string) error

New returns a new error

func NewErrInvalidConfiguration

func NewErrInvalidConfiguration(cause error) error

func NewInvalidAnnotationConfiguration

func NewInvalidAnnotationConfiguration(name string, reason string) error

NewInvalidAnnotationConfiguration returns a new InvalidConfiguration error for use when annotations are not correctly configured

func NewInvalidAnnotationContent

func NewInvalidAnnotationContent(name string, val interface{}) error

NewInvalidAnnotationContent returns a new InvalidContent error

func NewNoDefaultIngressClassFound

func NewNoDefaultIngressClassFound() error

NoDefaultIngressClassFound is meant to be used when no default ingress class is found

func NewNotAllDomainsReadyYetError

func NewNotAllDomainsReadyYetError() error

NewNotAllDomainsReadyYetError returns a new NotAllDomainsReadyYetError

Types

type ErrDifferentIngressClass

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

ErrInvalidIngressClass is meant to be used when an ingress object has an invalid ingress class

func NewErrDifferentIngressClass

func NewErrDifferentIngressClass(ourIngressClasses []*netv1.IngressClass, foundIngressClass *string) ErrDifferentIngressClass

NewErrDifferentIngressClass returns a new ErrDifferentIngressClass

func (ErrDifferentIngressClass) Error

func (e ErrDifferentIngressClass) Error() string

Error: Stringer: returns the error message

type ErrInvalidConfiguration

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

func (ErrInvalidConfiguration) Error

func (e ErrInvalidConfiguration) Error() string

func (ErrInvalidConfiguration) Unwrap

func (e ErrInvalidConfiguration) Unwrap() error

type ErrInvalidIngressSpec

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

ErrInvalidIngressSpec is meant to be used when an ingress object has an invalid spec

func NewErrInvalidIngressSpec

func NewErrInvalidIngressSpec() ErrInvalidIngressSpec

NewErrInvalidIngressSpec returns a new ErrInvalidIngressSpec

func (*ErrInvalidIngressSpec) AddError

func (e *ErrInvalidIngressSpec) AddError(err string)

AddError adds an error to the list of errors

func (ErrInvalidIngressSpec) Error

func (e ErrInvalidIngressSpec) Error() string

Error: Stringer: returns the error message

func (ErrInvalidIngressSpec) HasErrors

func (e ErrInvalidIngressSpec) HasErrors() bool

HasErrors returns true if there are errors

type ErrMissingRequiredSecret

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

func NewErrMissingRequiredSecret

func NewErrMissingRequiredSecret(message string) ErrMissingRequiredSecret

func (ErrMissingRequiredSecret) Error

func (e ErrMissingRequiredSecret) Error() string

type ErrNotFoundInStore

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

ErrNotFoundInStore is meant to be used when an object is not found in the store so that the caller can decide what to do with it.

func NewErrorNotFound

func NewErrorNotFound(message string) ErrNotFoundInStore

NewErrorNotFound returns a new ErrNotFoundInStore

func (ErrNotFoundInStore) Error

func (e ErrNotFoundInStore) Error() string

Error: Stringer: returns the error message

type ErrorNoDefaultIngressClassFound

type ErrorNoDefaultIngressClassFound struct{}

func (ErrorNoDefaultIngressClassFound) Error

type InvalidConfiguration

type InvalidConfiguration struct {
	Name string
}

InvalidConfiguration Error

func (InvalidConfiguration) Error

func (e InvalidConfiguration) Error() string

type InvalidContent

type InvalidContent struct {
	Name string
}

InvalidContent error

func (InvalidContent) Error

func (e InvalidContent) Error() string

type LocationDenied

type LocationDenied struct {
	Reason error
}

LocationDenied error

func (LocationDenied) Error

func (e LocationDenied) Error() string

type NotAllDomainsReadyYetError

type NotAllDomainsReadyYetError struct{}

Not all domains are reconciled yet and have a domain in their status

func (*NotAllDomainsReadyYetError) Error

Error returns the error message

Jump to

Keyboard shortcuts

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