validating

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 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 IsIPv4

func IsIPv4(address string) bool

Determines if an address is an IPv4 address

func IsIPv6

func IsIPv6(address string) bool

Determines if an address is an IPv6 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