validating

package
v2.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Maximum IP address prefix lengths
	MaxIPv4PrefixLength int = 32
	MaxIPv6PrefixLength int = 128
)
View Source
const AllowedReason string = "allowed to be admitted"

Webhook response reasons

Variables

View Source
var (
	// Builders contain admission webhook builders
	Builders = map[string]*builder.WebhookBuilder{}
	// HandlerMap contains admission webhook handlers
	HandlerMap = map[string][]admission.Handler{}
)

Functions

func IsIPAddress

func IsIPAddress(value string) bool

Determines if a string is a valid IP address

func IsValidPrefix

func IsValidPrefix(address string, prefix int) bool

Determines if the a prefix length agrees with the address family of the specified address

Types

type PlatformNetworkCreateUpdateHandler

type PlatformNetworkCreateUpdateHandler struct {

	// Decoder decodes objects
	Decoder types.Decoder
}

PlatformNetworkCreateUpdateHandler handles PlatformNetwork

func (*PlatformNetworkCreateUpdateHandler) Handle

Handle handles admission requests.

func (*PlatformNetworkCreateUpdateHandler) InjectDecoder

InjectDecoder injects the decoder into the PlatformNetworkCreateUpdateHandler

Jump to

Keyboard shortcuts

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