Documentation ¶
Index ¶
- Constants
- func IsIp(ip string) error
- func IsIpv4(ip string) error
- func IsIpv4Cidr(cidr string) error
- func IsMac(mac string) error
- func IsTarGz(r io.Reader) error
- func IsValidLabel(label string) []string
- func IsValidName(name string) []string
- func IsValidNumber(value, min, max int) []string
- func IsValidNumberStr(value string, min, max int) []string
- func IsValidParameterPresent(vars map[string]string, sp []string) error
- func IsValidString(str string, min, max int, format string) []string
- func ValidateJsonSchemaData(jsonSchemaFile string, jsonData interface{}) (error, int)
Constants ¶
const VALID_ALPHANUM_STR string = "ALPHANUM"
const VALID_ALPHA_STR string = "ALPHA"
const VALID_ANY_STR string = "ANY"
const VALID_BASE64_STR string = "BASE64"
doesn't verify valid base64 length - just checks for proper base64 characters
const VALID_NAME_STR string = "NAME"
Variables ¶
This section is empty.
Functions ¶
func IsIpv4Cidr ¶
func IsValidLabel ¶
validate that label conforms to kubernetes label conventions
general label format expected is: "<labelprefix>/<labelname>=<Labelvalue>" where labelprefix matches DNS1123Subdomain format labelname matches DNS1123Label format
Input labels are allowed to match following formats:
"<DNS1123Subdomain>/<DNS1123Label>=<Labelvalue>" "<DNS1123Label>=<LabelValue>" "<LabelValue>"
func IsValidName ¶
default name check - matches valid label value with addtion that length > 0
func IsValidNumber ¶
func IsValidNumberStr ¶
func IsValidParameterPresent ¶
IsValidParameterPresent method takes in a vars map and a array of string parameters that you expect to be present in the GET request. Returns Nil if all the parameters are present or else shall return error message.
func IsValidString ¶
string check - validates for conformance to provided lengths and specified content min and max - the string if format string provided - check against matching predefined
func ValidateJsonSchemaData ¶
ValidateJsonSchemaData function validates the document against the Json Schema
Types ¶
This section is empty.