kubernetes

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicFileClient

type DynamicFileClient interface {
	// Create iterates a set of YAML documents and calls client.Create on them.
	Create(ctx context.Context, file []byte) error
}

DynamicFileClient interacts with a cluster with file manifests.

type LabelValidationError

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

LabelValidationError is returned (with a set of underlying violations) when a label is invalid.

func (LabelValidationError) Error

func (e LabelValidationError) Error() string

Error implements the error interface.

func (LabelValidationError) ServiceError

func (LabelValidationError) ServiceError() bool

ServiceError tells the consumer whether this error is caused by invalid input supplied by the client. Client errors are usually returned to the consumer without retrying the operation.

func (LabelValidationError) Validation

func (LabelValidationError) Validation() bool

Validation tells a client that this error is related to a semantic validation of the request. Can be used to translate the error to status codes for example.

func (LabelValidationError) Violations

func (e LabelValidationError) Violations() []string

Violations returns details of the failed validation.

type LabelValidator

type LabelValidator struct {
	ForbiddenDomains []string
}

LabelValidator validates Kubernetes object labels.

func (LabelValidator) ValidateKey

func (v LabelValidator) ValidateKey(key string) error

ValidateKey validates a label key.

func (LabelValidator) ValidateLabel

func (v LabelValidator) ValidateLabel(key string, value string) error

ValidateLabel validates both a label key and a value.

func (LabelValidator) ValidateLabels

func (v LabelValidator) ValidateLabels(labels map[string]string) error

ValidateLabels validates a set of label key-value pairs.

func (LabelValidator) ValidateValue

func (v LabelValidator) ValidateValue(value string) error

ValidateValue validates a label value.

type MockDynamicFileClient

type MockDynamicFileClient struct {
	mock.Mock
}

MockDynamicFileClient is an autogenerated mock for the DynamicFileClient type.

func (*MockDynamicFileClient) Create

func (_m *MockDynamicFileClient) Create(ctx context.Context, file []uint8) (_result_0 error)

Create provides a mock function.

Directories

Path Synopsis
custom

Jump to

Keyboard shortcuts

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