validate

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package validate contains validation utilities for installer types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CIDRsDontOverlap

func CIDRsDontOverlap(acidr, bcidr string) error

CIDRsDontOverlap ensures two given CIDRs don't overlap with one another. CIDR starting IPs are canonicalized before being compared.

func ClusterName

func ClusterName(v string) error

ClusterName checks if the given string is a valid name for a cluster and returns an error if not.

func DomainName

func DomainName(v string) error

DomainName checks if the given string is a valid domain name and returns an error if not.

func Email

func Email(v string) error

Email checks if the given string is a valid email address and returns an error if not.

func IPv4

func IPv4(v string) error

IPv4 checks if the given string is a valid IP v4 address and returns an error if not. Based on net.ParseIP.

func JSON

func JSON(data []byte) error

JSON validates that the given data is valid JSON.

func SSHPublicKey added in v0.4.0

func SSHPublicKey(v string) error

SSHPublicKey checks if the given string is a valid OpenSSH public key and returns an error if not.

func SubnetCIDR

func SubnetCIDR(v string) error

SubnetCIDR checks if the given string is a valid CIDR for a master nodes or worker nodes subnet and returns an error if not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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