Documentation ¶
Index ¶
- Constants
- Variables
- func Bool(inter interface{}, v *BoolValidation) (bool, error)
- func BoolFromEnv(envVarName string, v *BoolValidation) (bool, error)
- func BoolFromEnvOrFile(envVarName string, filePath string, v *BoolValidation) (bool, error)
- func BoolFromFile(filePath string, v *BoolValidation) (bool, error)
- func BoolFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolValidation) (bool, error)
- func BoolFromPrompt(promptOpts *prompt.Options, v *BoolValidation) (bool, error)
- func BoolFromStr(valStr string, v *BoolValidation) (bool, error)
- func BoolFromStrMap(key string, sMap map[string]string, v *BoolValidation) (bool, error)
- func BoolList(inter interface{}, v *BoolListValidation) ([]bool, error)
- func BoolListFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolListValidation) ([]bool, error)
- func BoolPtr(inter interface{}, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromEnv(envVarName string, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromEnvOrFile(envVarName string, filePath string, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromFile(filePath string, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromPrompt(promptOpts *prompt.Options, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromStr(valStr string, v *BoolPtrValidation) (*bool, error)
- func BoolPtrFromStrMap(key string, sMap map[string]string, v *BoolPtrValidation) (*bool, error)
- func DurationParser(v *DurationValidation) func(string) (interface{}, error)
- func EmailValidator(val string) (string, error)
- func EnvVar(envVarName string) string
- func ErrorAlphaNumericDash(provided string) error
- func ErrorAlphaNumericDashDotUnderscore(provided string) error
- func ErrorAlphaNumericDashUnderscore(provided string) error
- func ErrorAlphaNumericDotUnderscore(provided string) error
- func ErrorCannotBeEmpty() error
- func ErrorCannotBeEmptyOrNull(isRequired bool) error
- func ErrorCannotBeNull(isRequired bool) error
- func ErrorCannotSetStructField() error
- func ErrorCantHavePrefix(provided string, prefix string) error
- func ErrorCantHaveSuffix(provided string, suffix string) error
- func ErrorCortexResourceNotAllowed(resourceName string) error
- func ErrorCortexResourceOnlyAllowed(invalidStr string) error
- func ErrorDisallowedValue(provided interface{}) error
- func ErrorDuplicatedValue(val interface{}) error
- func ErrorEmailInvalid() error
- func ErrorEmailTooLong() error
- func ErrorFieldCantBeSpecified(errMsg string) error
- func ErrorImageVersionMismatch(image, tag, cortexVersion string) error
- func ErrorInvalidAWSTag(provided string) error
- func ErrorInvalidDockerImage(provided string) error
- func ErrorInvalidFloat32(provided float32, allowed float32, allowedVals ...float32) error
- func ErrorInvalidFloat64(provided float64, allowed float64, allowedVals ...float64) error
- func ErrorInvalidInt(provided int, allowed int, allowedVals ...int) error
- func ErrorInvalidInt32(provided int32, allowed int32, allowedVals ...int32) error
- func ErrorInvalidInt64(provided int64, allowed int64, allowedVals ...int64) error
- func ErrorInvalidInterface(provided interface{}, allowed interface{}, allowedVals ...interface{}) error
- func ErrorInvalidPrimitiveType(provided interface{}, allowedType PrimitiveType, allowedTypes ...PrimitiveType) error
- func ErrorInvalidStr(provided string, allowed string, allowedVals ...string) error
- func ErrorInvalidYAML(err error) error
- func ErrorIsNotMultiple(provided interface{}, multiple interface{}) error
- func ErrorLeadingWhitespace(provided string) error
- func ErrorMapMustBeDefined(keys ...string) error
- func ErrorMustBeDefined(validValues ...interface{}) error
- func ErrorMustBeEmpty() error
- func ErrorMustBeGreaterThan(provided interface{}, boundary interface{}) error
- func ErrorMustBeGreaterThanOrEqualTo(provided interface{}, boundary interface{}) error
- func ErrorMustBeLessThan(provided interface{}, boundary interface{}) error
- func ErrorMustBeLessThanOrEqualTo(provided interface{}, boundary interface{}) error
- func ErrorMustHavePrefix(provided string, prefix string, prefixes ...string) error
- func ErrorMustHaveSuffix(provided string, suffix string, suffixes ...string) error
- func ErrorNonStringKeyFound(key interface{}) error
- func ErrorParseConfig() error
- func ErrorTooFewElements(minLength int) error
- func ErrorTooLong(provided string, maxLen int) error
- func ErrorTooManyElements(maxLength int) error
- func ErrorTooShort(provided string, minLen int) error
- func ErrorTrailingWhitespace(provided string) error
- func ErrorUnsupportedFieldValidation() error
- func ErrorUnsupportedKey(key interface{}) error
- func ErrorWrongNumberOfElements(invalidLengths []int) error
- func FlattenAllStrValues(obj interface{}) ([]string, error)
- func FlattenAllStrValuesAsSet(obj interface{}) (strset.Set, error)
- func Float32(inter interface{}, v *Float32Validation) (float32, error)
- func Float32FromEnv(envVarName string, v *Float32Validation) (float32, error)
- func Float32FromEnvOrFile(envVarName string, filePath string, v *Float32Validation) (float32, error)
- func Float32FromFile(filePath string, v *Float32Validation) (float32, error)
- func Float32FromInterfaceMap(key string, iMap map[string]interface{}, v *Float32Validation) (float32, error)
- func Float32FromPrompt(promptOpts *prompt.Options, v *Float32Validation) (float32, error)
- func Float32FromStr(valStr string, v *Float32Validation) (float32, error)
- func Float32FromStrMap(key string, sMap map[string]string, v *Float32Validation) (float32, error)
- func Float32List(inter interface{}, v *Float32ListValidation) ([]float32, error)
- func Float32ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Float32ListValidation) ([]float32, error)
- func Float32Ptr(inter interface{}, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromEnv(envVarName string, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromEnvOrFile(envVarName string, filePath string, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromFile(filePath string, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromPrompt(promptOpts *prompt.Options, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromStr(valStr string, v *Float32PtrValidation) (*float32, error)
- func Float32PtrFromStrMap(key string, sMap map[string]string, v *Float32PtrValidation) (*float32, error)
- func Float64(inter interface{}, v *Float64Validation) (float64, error)
- func Float64FromEnv(envVarName string, v *Float64Validation) (float64, error)
- func Float64FromEnvOrFile(envVarName string, filePath string, v *Float64Validation) (float64, error)
- func Float64FromFile(filePath string, v *Float64Validation) (float64, error)
- func Float64FromInterfaceMap(key string, iMap map[string]interface{}, v *Float64Validation) (float64, error)
- func Float64FromPrompt(promptOpts *prompt.Options, v *Float64Validation) (float64, error)
- func Float64FromStr(valStr string, v *Float64Validation) (float64, error)
- func Float64FromStrMap(key string, sMap map[string]string, v *Float64Validation) (float64, error)
- func Float64List(inter interface{}, v *Float64ListValidation) ([]float64, error)
- func Float64ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64ListValidation) ([]float64, error)
- func Float64Ptr(inter interface{}, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromEnv(envVarName string, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromEnvOrFile(envVarName string, filePath string, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromFile(filePath string, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromPrompt(promptOpts *prompt.Options, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromStr(valStr string, v *Float64PtrValidation) (*float64, error)
- func Float64PtrFromStrMap(key string, sMap map[string]string, v *Float64PtrValidation) (*float64, error)
- func GetFilePathValidator(baseDir string) func(string) (string, error)
- func Int(inter interface{}, v *IntValidation) (int, error)
- func Int32(inter interface{}, v *Int32Validation) (int32, error)
- func Int32FromEnv(envVarName string, v *Int32Validation) (int32, error)
- func Int32FromEnvOrFile(envVarName string, filePath string, v *Int32Validation) (int32, error)
- func Int32FromFile(filePath string, v *Int32Validation) (int32, error)
- func Int32FromInterfaceMap(key string, iMap map[string]interface{}, v *Int32Validation) (int32, error)
- func Int32FromPrompt(promptOpts *prompt.Options, v *Int32Validation) (int32, error)
- func Int32FromStr(valStr string, v *Int32Validation) (int32, error)
- func Int32FromStrMap(key string, sMap map[string]string, v *Int32Validation) (int32, error)
- func Int32List(inter interface{}, v *Int32ListValidation) ([]int32, error)
- func Int32ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Int32ListValidation) ([]int32, error)
- func Int32Ptr(inter interface{}, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromEnv(envVarName string, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromEnvOrFile(envVarName string, filePath string, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromFile(filePath string, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromPrompt(promptOpts *prompt.Options, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromStr(valStr string, v *Int32PtrValidation) (*int32, error)
- func Int32PtrFromStrMap(key string, sMap map[string]string, v *Int32PtrValidation) (*int32, error)
- func Int64(inter interface{}, v *Int64Validation) (int64, error)
- func Int64FromEnv(envVarName string, v *Int64Validation) (int64, error)
- func Int64FromEnvOrFile(envVarName string, filePath string, v *Int64Validation) (int64, error)
- func Int64FromFile(filePath string, v *Int64Validation) (int64, error)
- func Int64FromInterfaceMap(key string, iMap map[string]interface{}, v *Int64Validation) (int64, error)
- func Int64FromPrompt(promptOpts *prompt.Options, v *Int64Validation) (int64, error)
- func Int64FromStr(valStr string, v *Int64Validation) (int64, error)
- func Int64FromStrMap(key string, sMap map[string]string, v *Int64Validation) (int64, error)
- func Int64List(inter interface{}, v *Int64ListValidation) ([]int64, error)
- func Int64ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Int64ListValidation) ([]int64, error)
- func Int64Ptr(inter interface{}, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromEnv(envVarName string, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromEnvOrFile(envVarName string, filePath string, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromFile(filePath string, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromPrompt(promptOpts *prompt.Options, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromStr(valStr string, v *Int64PtrValidation) (*int64, error)
- func Int64PtrFromStrMap(key string, sMap map[string]string, v *Int64PtrValidation) (*int64, error)
- func IntFromEnv(envVarName string, v *IntValidation) (int, error)
- func IntFromEnvOrFile(envVarName string, filePath string, v *IntValidation) (int, error)
- func IntFromFile(filePath string, v *IntValidation) (int, error)
- func IntFromInterfaceMap(key string, iMap map[string]interface{}, v *IntValidation) (int, error)
- func IntFromPrompt(promptOpts *prompt.Options, v *IntValidation) (int, error)
- func IntFromStr(valStr string, v *IntValidation) (int, error)
- func IntFromStrMap(key string, sMap map[string]string, v *IntValidation) (int, error)
- func IntList(inter interface{}, v *IntListValidation) ([]int, error)
- func IntListFromInterfaceMap(key string, iMap map[string]interface{}, v *IntListValidation) ([]int, error)
- func IntPtr(inter interface{}, v *IntPtrValidation) (*int, error)
- func IntPtrFromEnv(envVarName string, v *IntPtrValidation) (*int, error)
- func IntPtrFromEnvOrFile(envVarName string, filePath string, v *IntPtrValidation) (*int, error)
- func IntPtrFromFile(filePath string, v *IntPtrValidation) (*int, error)
- func IntPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *IntPtrValidation) (*int, error)
- func IntPtrFromPrompt(promptOpts *prompt.Options, v *IntPtrValidation) (*int, error)
- func IntPtrFromStr(valStr string, v *IntPtrValidation) (*int, error)
- func IntPtrFromStrMap(key string, sMap map[string]string, v *IntPtrValidation) (*int, error)
- func Interface(inter interface{}, v *InterfaceValidation) (interface{}, error)
- func InterfaceFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceValidation) (interface{}, error)
- func InterfaceMap(inter interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
- func InterfaceMapFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
- func InterfaceMapList(inter interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
- func InterfaceMapListFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
- func InterfaceStruct(inter interface{}, v *InterfaceStructValidation) (interface{}, []error)
- func InterfaceStructList(dest interface{}, inter interface{}, v *InterfaceStructListValidation) (interface{}, []error)
- func MustBoolFromEnv(envVarName string, v *BoolValidation) bool
- func MustBoolFromEnvOrFile(envVarName string, filePath string, v *BoolValidation) bool
- func MustBoolFromFile(filePath string, v *BoolValidation) bool
- func MustFloat32FromEnv(envVarName string, v *Float32Validation) float32
- func MustFloat32FromEnvOrFile(envVarName string, filePath string, v *Float32Validation) float32
- func MustFloat32FromFile(filePath string, v *Float32Validation) float32
- func MustFloat64FromEnv(envVarName string, v *Float64Validation) float64
- func MustFloat64FromEnvOrFile(envVarName string, filePath string, v *Float64Validation) float64
- func MustFloat64FromFile(filePath string, v *Float64Validation) float64
- func MustInt32FromEnv(envVarName string, v *Int32Validation) int32
- func MustInt32FromEnvOrFile(envVarName string, filePath string, v *Int32Validation) int32
- func MustInt32FromFile(filePath string, v *Int32Validation) int32
- func MustInt64FromEnv(envVarName string, v *Int64Validation) int64
- func MustInt64FromEnvOrFile(envVarName string, filePath string, v *Int64Validation) int64
- func MustInt64FromFile(filePath string, v *Int64Validation) int64
- func MustIntFromEnv(envVarName string, v *IntValidation) int
- func MustIntFromEnvOrFile(envVarName string, filePath string, v *IntValidation) int
- func MustIntFromFile(filePath string, v *IntValidation) int
- func MustReadJSONStr(jsonStr string) interface{}
- func MustReadYAMLStr(yamlStr string) interface{}
- func MustReadYAMLStrMap(yamlStr string) map[string]interface{}
- func MustStringFromEnv(envVarName string, v *StringValidation) string
- func MustStringFromEnvOrFile(envVarName string, filePath string, v *StringValidation) string
- func MustStringFromFile(filePath string, v *StringValidation) string
- func ParseYAMLBytes(dest interface{}, validation *StructValidation, data []byte) error
- func ParseYAMLFile(dest interface{}, validation *StructValidation, filePath string) []error
- func ReadEnvVar(envVarName string) *string
- func ReadInterfaceMapValue(name string, interMap map[string]interface{}) (interface{}, bool)
- func ReadJSONBytes(jsonBytes []byte) (interface{}, error)
- func ReadPrompt(dest interface{}, promptValidation *PromptValidation) error
- func ReadYAMLBytes(yamlBytes []byte) (interface{}, error)
- func ReadYAMLFile(filePath string) (interface{}, error)
- func ReadYAMLFileStrMap(filePath string) (map[string]interface{}, error)
- func S3PathValidator(val string) (string, error)
- func S3aPathValidator(val string) (string, error)
- func String(inter interface{}, v *StringValidation) (string, error)
- func StringFromEnv(envVarName string, v *StringValidation) (string, error)
- func StringFromEnvOrFile(envVarName string, filePath string, v *StringValidation) (string, error)
- func StringFromFile(filePath string, v *StringValidation) (string, error)
- func StringFromInterfaceMap(key string, iMap map[string]interface{}, v *StringValidation) (string, error)
- func StringFromPrompt(promptOpts *prompt.Options, v *StringValidation) (string, error)
- func StringFromStr(valStr string, v *StringValidation) (string, error)
- func StringFromStrMap(key string, sMap map[string]string, v *StringValidation) (string, error)
- func StringList(inter interface{}, v *StringListValidation) ([]string, error)
- func StringListFromInterfaceMap(key string, iMap map[string]interface{}, v *StringListValidation) ([]string, error)
- func StringMap(inter interface{}, v *StringMapValidation) (map[string]string, error)
- func StringMapFromInterfaceMap(key string, iMap map[string]interface{}, v *StringMapValidation) (map[string]string, error)
- func StringPtr(inter interface{}, v *StringPtrValidation) (*string, error)
- func StringPtrFromEnv(envVarName string, v *StringPtrValidation) (*string, error)
- func StringPtrFromEnvOrFile(envVarName string, filePath string, v *StringPtrValidation) (*string, error)
- func StringPtrFromFile(filePath string, v *StringPtrValidation) (*string, error)
- func StringPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *StringPtrValidation) (*string, error)
- func StringPtrFromPrompt(promptOpts *prompt.Options, v *StringPtrValidation) (*string, error)
- func StringPtrFromStr(str string, v *StringPtrValidation) (*string, error)
- func StringPtrFromStrMap(key string, sMap map[string]string, v *StringPtrValidation) (*string, error)
- func Struct(dest interface{}, inter interface{}, v *StructValidation) []error
- func StructFromFiles(dest interface{}, dirPath string, v *StructValidation) []error
- func StructFromStringMap(dest interface{}, strMap map[string]string, v *StructValidation) []error
- func StructList(dest interface{}, inter interface{}, v *StructListValidation) (interface{}, []error)
- func ValidateBoolListMissing(v *BoolListValidation) ([]bool, error)
- func ValidateBoolListProvided(val []bool, v *BoolListValidation) ([]bool, error)
- func ValidateBoolMissing(v *BoolValidation) (bool, error)
- func ValidateBoolProvided(val bool, v *BoolValidation) (bool, error)
- func ValidateBoolPtrMissing(v *BoolPtrValidation) (*bool, error)
- func ValidateBoolPtrProvided(val *bool, v *BoolPtrValidation) (*bool, error)
- func ValidateFloat32ListMissing(v *Float32ListValidation) ([]float32, error)
- func ValidateFloat32ListProvided(val []float32, v *Float32ListValidation) ([]float32, error)
- func ValidateFloat32Missing(v *Float32Validation) (float32, error)
- func ValidateFloat32Provided(val float32, v *Float32Validation) (float32, error)
- func ValidateFloat32PtrMissing(v *Float32PtrValidation) (*float32, error)
- func ValidateFloat32PtrProvided(val *float32, v *Float32PtrValidation) (*float32, error)
- func ValidateFloat32Val(val float32, v *Float32Validation) error
- func ValidateFloat64ListMissing(v *Float64ListValidation) ([]float64, error)
- func ValidateFloat64ListProvided(val []float64, v *Float64ListValidation) ([]float64, error)
- func ValidateFloat64Missing(v *Float64Validation) (float64, error)
- func ValidateFloat64Provided(val float64, v *Float64Validation) (float64, error)
- func ValidateFloat64PtrMissing(v *Float64PtrValidation) (*float64, error)
- func ValidateFloat64PtrProvided(val *float64, v *Float64PtrValidation) (*float64, error)
- func ValidateFloat64Val(val float64, v *Float64Validation) error
- func ValidateImageVersion(image, cortexVersion string) (string, error)
- func ValidateInt32ListMissing(v *Int32ListValidation) ([]int32, error)
- func ValidateInt32ListProvided(val []int32, v *Int32ListValidation) ([]int32, error)
- func ValidateInt32Missing(v *Int32Validation) (int32, error)
- func ValidateInt32Provided(val int32, v *Int32Validation) (int32, error)
- func ValidateInt32PtrMissing(v *Int32PtrValidation) (*int32, error)
- func ValidateInt32PtrProvided(val *int32, v *Int32PtrValidation) (*int32, error)
- func ValidateInt32Val(val int32, v *Int32Validation) error
- func ValidateInt64ListMissing(v *Int64ListValidation) ([]int64, error)
- func ValidateInt64ListProvided(val []int64, v *Int64ListValidation) ([]int64, error)
- func ValidateInt64Missing(v *Int64Validation) (int64, error)
- func ValidateInt64Provided(val int64, v *Int64Validation) (int64, error)
- func ValidateInt64PtrMissing(v *Int64PtrValidation) (*int64, error)
- func ValidateInt64PtrProvided(val *int64, v *Int64PtrValidation) (*int64, error)
- func ValidateInt64Val(val int64, v *Int64Validation) error
- func ValidateIntListMissing(v *IntListValidation) ([]int, error)
- func ValidateIntListProvided(val []int, v *IntListValidation) ([]int, error)
- func ValidateIntMissing(v *IntValidation) (int, error)
- func ValidateIntProvided(val int, v *IntValidation) (int, error)
- func ValidateIntPtrMissing(v *IntPtrValidation) (*int, error)
- func ValidateIntPtrProvided(val *int, v *IntPtrValidation) (*int, error)
- func ValidateIntVal(val int, v *IntValidation) error
- func ValidateInterfaceMapListMissing(v *InterfaceMapListValidation) ([]map[string]interface{}, error)
- func ValidateInterfaceMapListProvided(val []map[string]interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
- func ValidateInterfaceMapMissing(v *InterfaceMapValidation) (map[string]interface{}, error)
- func ValidateInterfaceMapProvided(val map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
- func ValidateInterfaceMissing(v *InterfaceValidation) (interface{}, error)
- func ValidateInterfaceProvided(val interface{}, v *InterfaceValidation) (interface{}, error)
- func ValidateStringListMissing(v *StringListValidation) ([]string, error)
- func ValidateStringListProvided(val []string, v *StringListValidation) ([]string, error)
- func ValidateStringMapMissing(v *StringMapValidation) (map[string]string, error)
- func ValidateStringMapProvided(val map[string]string, v *StringMapValidation) (map[string]string, error)
- func ValidateStringMissing(v *StringValidation) (string, error)
- func ValidateStringProvided(val string, v *StringValidation) (string, error)
- func ValidateStringPtrMissing(v *StringPtrValidation) (*string, error)
- func ValidateStringPtrProvided(val *string, v *StringPtrValidation) (*string, error)
- func ValidateStringVal(val string, v *StringValidation) error
- type BoolListValidation
- type BoolPtrValidation
- type BoolValidation
- type DurationValidation
- type Float32ListValidation
- type Float32PtrValidation
- type Float32Validation
- type Float64ListValidation
- type Float64PtrValidation
- type Float64Validation
- type Int32ListValidation
- type Int32PtrValidation
- type Int32Validation
- type Int64ListValidation
- type Int64PtrValidation
- type Int64Validation
- type IntListValidation
- type IntPtrValidation
- type IntValidation
- type InterfaceMapListValidation
- type InterfaceMapValidation
- type InterfaceStructListValidation
- type InterfaceStructType
- type InterfaceStructValidation
- type InterfaceValidation
- type PrimitiveType
- type PrimitiveTypes
- type PromptItemValidation
- type PromptValidation
- type StringListValidation
- type StringMapValidation
- type StringPtrValidation
- type StringValidation
- type StructFieldValidation
- type StructListValidation
- type StructValidation
- type TypePlaceholder
Constants ¶
View Source
const ( ErrParseConfig = "configreader.parse_config" ErrUnsupportedFieldValidation = "configreader.unsupported_field_validation" ErrUnsupportedKey = "configreader.unsupported_key" ErrInvalidYAML = "configreader.invalid_yaml" ErrTooLong = "configreader.too_long" ErrTooShort = "configreader.too_short" ErrLeadingWhitespace = "configreader.leading_whitespace" ErrTrailingWhitespace = "configreader.trailing_whitespace" ErrAlphaNumericDashUnderscore = "configreader.alpha_numeric_dash_underscore" ErrAlphaNumericDash = "configreader.alpha_numeric_dash" ErrAlphaNumericDotUnderscore = "configreader.alpha_numeric_dot_underscore" ErrAlphaNumericDashDotUnderscore = "configreader.alpha_numeric_dash_dot_underscore" ErrInvalidAWSTag = "configreader.invalid_aws_tag" ErrInvalidDockerImage = "configreader.invalid_docker_image" ErrMustHavePrefix = "configreader.must_have_prefix" ErrMustHaveSuffix = "configreader.must_have_suffix" ErrCantHavePrefix = "configreader.cant_have_prefix" ErrCantHaveSuffix = "configreader.cant_have_suffix" ErrInvalidInterface = "configreader.invalid_interface" ErrInvalidFloat64 = "configreader.invalid_float64" ErrInvalidFloat32 = "configreader.invalid_float32" ErrInvalidInt64 = "configreader.invalid_int64" ErrInvalidInt32 = "configreader.invalid_int32" ErrInvalidInt = "configreader.invalid_int" ErrInvalidStr = "configreader.invalid_str" ErrDisallowedValue = "configreader.disallowed_value" ErrMustBeLessThanOrEqualTo = "configreader.must_be_less_than_or_equal_to" ErrMustBeLessThan = "configreader.must_be_less_than" ErrMustBeGreaterThanOrEqualTo = "configreader.must_be_greater_than_or_equal_to" ErrMustBeGreaterThan = "configreader.must_be_greater_than" ErrIsNotMultiple = "configreader.is_not_multiple" ErrNonStringKeyFound = "configreader.non_string_key_found" ErrInvalidPrimitiveType = "configreader.invalid_primitive_type" ErrDuplicatedValue = "configreader.duplicated_value" ErrTooFewElements = "configreader.too_few_elements" ErrTooManyElements = "configreader.too_many_elements" ErrWrongNumberOfElements = "configreader.wrong_number_of_elements" ErrCannotSetStructField = "configreader.cannot_set_struct_field" ErrCannotBeNull = "configreader.cannot_be_null" ErrCannotBeEmptyOrNull = "configreader.cannot_be_empty_or_null" ErrCannotBeEmpty = "configreader.cannot_be_empty" ErrMustBeDefined = "configreader.must_be_defined" ErrMapMustBeDefined = "configreader.map_must_be_defined" ErrMustBeEmpty = "configreader.must_be_empty" ErrEmailTooLong = "configreader.email_too_long" ErrEmailInvalid = "configreader.email_invalid" ErrCortexResourceOnlyAllowed = "configreader.cortex_resource_only_allowed" ErrCortexResourceNotAllowed = "configreader.cortex_resource_not_allowed" ErrImageVersionMismatch = "configreader.image_version_mismatch" ErrFieldCantBeSpecified = "configreader.field_cant_be_specified" )
Variables ¶
View Source
var PrimTypeScalars = []PrimitiveType{PrimTypeInt, PrimTypeFloat, PrimTypeString, PrimTypeBool}
Functions ¶
func Bool ¶
func Bool(inter interface{}, v *BoolValidation) (bool, error)
func BoolFromEnv ¶
func BoolFromEnv(envVarName string, v *BoolValidation) (bool, error)
func BoolFromEnvOrFile ¶
func BoolFromEnvOrFile(envVarName string, filePath string, v *BoolValidation) (bool, error)
func BoolFromFile ¶
func BoolFromFile(filePath string, v *BoolValidation) (bool, error)
func BoolFromInterfaceMap ¶
func BoolFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolValidation) (bool, error)
func BoolFromPrompt ¶
func BoolFromPrompt(promptOpts *prompt.Options, v *BoolValidation) (bool, error)
func BoolFromStr ¶
func BoolFromStr(valStr string, v *BoolValidation) (bool, error)
func BoolFromStrMap ¶
func BoolList ¶
func BoolList(inter interface{}, v *BoolListValidation) ([]bool, error)
func BoolListFromInterfaceMap ¶
func BoolListFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolListValidation) ([]bool, error)
func BoolPtr ¶
func BoolPtr(inter interface{}, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromEnv ¶
func BoolPtrFromEnv(envVarName string, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromEnvOrFile ¶
func BoolPtrFromEnvOrFile(envVarName string, filePath string, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromFile ¶
func BoolPtrFromFile(filePath string, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromInterfaceMap ¶
func BoolPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromPrompt ¶
func BoolPtrFromPrompt(promptOpts *prompt.Options, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromStr ¶
func BoolPtrFromStr(valStr string, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromStrMap ¶
func DurationParser ¶ added in v0.14.0
func DurationParser(v *DurationValidation) func(string) (interface{}, error)
func EmailValidator ¶ added in v0.9.0
func ErrorAlphaNumericDash ¶ added in v0.38.0
func ErrorAlphaNumericDashDotUnderscore ¶ added in v0.4.0
func ErrorAlphaNumericDashUnderscore ¶ added in v0.4.0
func ErrorAlphaNumericDotUnderscore ¶ added in v0.32.0
func ErrorCannotBeEmpty ¶ added in v0.4.0
func ErrorCannotBeEmpty() error
func ErrorCannotBeEmptyOrNull ¶ added in v0.19.0
func ErrorCannotBeNull ¶ added in v0.4.0
func ErrorCannotSetStructField ¶ added in v0.4.0
func ErrorCannotSetStructField() error
func ErrorCantHavePrefix ¶ added in v0.20.0
func ErrorCantHaveSuffix ¶ added in v0.39.0
func ErrorCortexResourceNotAllowed ¶ added in v0.4.0
func ErrorCortexResourceOnlyAllowed ¶ added in v0.4.0
func ErrorDisallowedValue ¶ added in v0.18.0
func ErrorDisallowedValue(provided interface{}) error
func ErrorDuplicatedValue ¶ added in v0.4.0
func ErrorDuplicatedValue(val interface{}) error
func ErrorEmailInvalid ¶ added in v0.15.0
func ErrorEmailInvalid() error
func ErrorEmailTooLong ¶ added in v0.15.0
func ErrorEmailTooLong() error
func ErrorFieldCantBeSpecified ¶ added in v0.25.0
func ErrorImageVersionMismatch ¶ added in v0.16.0
func ErrorInvalidAWSTag ¶ added in v0.20.0
func ErrorInvalidDockerImage ¶ added in v0.16.0
func ErrorInvalidFloat32 ¶ added in v0.4.0
func ErrorInvalidFloat64 ¶ added in v0.4.0
func ErrorInvalidInt ¶ added in v0.4.0
func ErrorInvalidInt32 ¶ added in v0.4.0
func ErrorInvalidInt64 ¶ added in v0.4.0
func ErrorInvalidInterface ¶ added in v0.4.0
func ErrorInvalidInterface(provided interface{}, allowed interface{}, allowedVals ...interface{}) error
func ErrorInvalidPrimitiveType ¶ added in v0.4.0
func ErrorInvalidPrimitiveType(provided interface{}, allowedType PrimitiveType, allowedTypes ...PrimitiveType) error
func ErrorInvalidStr ¶ added in v0.4.0
func ErrorInvalidYAML ¶ added in v0.4.0
func ErrorIsNotMultiple ¶ added in v0.14.0
func ErrorIsNotMultiple(provided interface{}, multiple interface{}) error
func ErrorLeadingWhitespace ¶ added in v0.20.0
func ErrorMapMustBeDefined ¶ added in v0.4.0
func ErrorMustBeDefined ¶ added in v0.4.0
func ErrorMustBeDefined(validValues ...interface{}) error
func ErrorMustBeEmpty ¶ added in v0.4.0
func ErrorMustBeEmpty() error
func ErrorMustBeGreaterThan ¶ added in v0.4.0
func ErrorMustBeGreaterThan(provided interface{}, boundary interface{}) error
func ErrorMustBeGreaterThanOrEqualTo ¶ added in v0.4.0
func ErrorMustBeGreaterThanOrEqualTo(provided interface{}, boundary interface{}) error
func ErrorMustBeLessThan ¶ added in v0.4.0
func ErrorMustBeLessThan(provided interface{}, boundary interface{}) error
func ErrorMustBeLessThanOrEqualTo ¶ added in v0.4.0
func ErrorMustBeLessThanOrEqualTo(provided interface{}, boundary interface{}) error
func ErrorMustHavePrefix ¶ added in v0.4.0
func ErrorMustHaveSuffix ¶ added in v0.32.0
func ErrorNonStringKeyFound ¶ added in v0.10.0
func ErrorNonStringKeyFound(key interface{}) error
func ErrorParseConfig ¶ added in v0.10.0
func ErrorParseConfig() error
func ErrorTooFewElements ¶ added in v0.15.0
func ErrorTooLong ¶ added in v0.13.0
func ErrorTooManyElements ¶ added in v0.15.0
func ErrorTooShort ¶ added in v0.13.0
func ErrorTrailingWhitespace ¶ added in v0.20.0
func ErrorUnsupportedFieldValidation ¶ added in v0.15.0
func ErrorUnsupportedFieldValidation() error
func ErrorUnsupportedKey ¶ added in v0.4.0
func ErrorUnsupportedKey(key interface{}) error
func ErrorWrongNumberOfElements ¶ added in v0.15.0
func FlattenAllStrValues ¶ added in v0.4.0
FlattenAllStrValues assumes that the order for maps is deterministic
func FlattenAllStrValuesAsSet ¶ added in v0.4.0
func Float32 ¶
func Float32(inter interface{}, v *Float32Validation) (float32, error)
func Float32FromEnv ¶
func Float32FromEnv(envVarName string, v *Float32Validation) (float32, error)
func Float32FromEnvOrFile ¶
func Float32FromEnvOrFile(envVarName string, filePath string, v *Float32Validation) (float32, error)
func Float32FromFile ¶
func Float32FromFile(filePath string, v *Float32Validation) (float32, error)
func Float32FromInterfaceMap ¶
func Float32FromInterfaceMap(key string, iMap map[string]interface{}, v *Float32Validation) (float32, error)
func Float32FromPrompt ¶
func Float32FromPrompt(promptOpts *prompt.Options, v *Float32Validation) (float32, error)
func Float32FromStr ¶
func Float32FromStr(valStr string, v *Float32Validation) (float32, error)
func Float32FromStrMap ¶
func Float32List ¶
func Float32List(inter interface{}, v *Float32ListValidation) ([]float32, error)
func Float32ListFromInterfaceMap ¶
func Float32ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Float32ListValidation) ([]float32, error)
func Float32Ptr ¶
func Float32Ptr(inter interface{}, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromEnv ¶
func Float32PtrFromEnv(envVarName string, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromEnvOrFile ¶
func Float32PtrFromEnvOrFile(envVarName string, filePath string, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromFile ¶
func Float32PtrFromFile(filePath string, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromInterfaceMap ¶
func Float32PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromPrompt ¶
func Float32PtrFromPrompt(promptOpts *prompt.Options, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromStr ¶
func Float32PtrFromStr(valStr string, v *Float32PtrValidation) (*float32, error)
func Float32PtrFromStrMap ¶
func Float64 ¶
func Float64(inter interface{}, v *Float64Validation) (float64, error)
func Float64FromEnv ¶
func Float64FromEnv(envVarName string, v *Float64Validation) (float64, error)
func Float64FromEnvOrFile ¶
func Float64FromEnvOrFile(envVarName string, filePath string, v *Float64Validation) (float64, error)
func Float64FromFile ¶
func Float64FromFile(filePath string, v *Float64Validation) (float64, error)
func Float64FromInterfaceMap ¶
func Float64FromInterfaceMap(key string, iMap map[string]interface{}, v *Float64Validation) (float64, error)
func Float64FromPrompt ¶
func Float64FromPrompt(promptOpts *prompt.Options, v *Float64Validation) (float64, error)
func Float64FromStr ¶
func Float64FromStr(valStr string, v *Float64Validation) (float64, error)
func Float64FromStrMap ¶
func Float64List ¶
func Float64List(inter interface{}, v *Float64ListValidation) ([]float64, error)
func Float64ListFromInterfaceMap ¶
func Float64ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64ListValidation) ([]float64, error)
func Float64Ptr ¶
func Float64Ptr(inter interface{}, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromEnv ¶
func Float64PtrFromEnv(envVarName string, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromEnvOrFile ¶
func Float64PtrFromEnvOrFile(envVarName string, filePath string, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromFile ¶
func Float64PtrFromFile(filePath string, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromInterfaceMap ¶
func Float64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromPrompt ¶
func Float64PtrFromPrompt(promptOpts *prompt.Options, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromStr ¶
func Float64PtrFromStr(valStr string, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromStrMap ¶
func GetFilePathValidator ¶ added in v0.4.0
func Int ¶
func Int(inter interface{}, v *IntValidation) (int, error)
func Int32 ¶
func Int32(inter interface{}, v *Int32Validation) (int32, error)
func Int32FromEnv ¶
func Int32FromEnv(envVarName string, v *Int32Validation) (int32, error)
func Int32FromEnvOrFile ¶
func Int32FromEnvOrFile(envVarName string, filePath string, v *Int32Validation) (int32, error)
func Int32FromFile ¶
func Int32FromFile(filePath string, v *Int32Validation) (int32, error)
func Int32FromInterfaceMap ¶
func Int32FromInterfaceMap(key string, iMap map[string]interface{}, v *Int32Validation) (int32, error)
func Int32FromPrompt ¶
func Int32FromPrompt(promptOpts *prompt.Options, v *Int32Validation) (int32, error)
func Int32FromStr ¶
func Int32FromStr(valStr string, v *Int32Validation) (int32, error)
func Int32FromStrMap ¶
func Int32List ¶
func Int32List(inter interface{}, v *Int32ListValidation) ([]int32, error)
func Int32ListFromInterfaceMap ¶
func Int32ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Int32ListValidation) ([]int32, error)
func Int32Ptr ¶
func Int32Ptr(inter interface{}, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromEnv ¶
func Int32PtrFromEnv(envVarName string, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromEnvOrFile ¶
func Int32PtrFromEnvOrFile(envVarName string, filePath string, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromFile ¶
func Int32PtrFromFile(filePath string, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromInterfaceMap ¶
func Int32PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromPrompt ¶
func Int32PtrFromPrompt(promptOpts *prompt.Options, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromStr ¶
func Int32PtrFromStr(valStr string, v *Int32PtrValidation) (*int32, error)
func Int32PtrFromStrMap ¶
func Int64 ¶
func Int64(inter interface{}, v *Int64Validation) (int64, error)
func Int64FromEnv ¶
func Int64FromEnv(envVarName string, v *Int64Validation) (int64, error)
func Int64FromEnvOrFile ¶
func Int64FromEnvOrFile(envVarName string, filePath string, v *Int64Validation) (int64, error)
func Int64FromFile ¶
func Int64FromFile(filePath string, v *Int64Validation) (int64, error)
func Int64FromInterfaceMap ¶
func Int64FromInterfaceMap(key string, iMap map[string]interface{}, v *Int64Validation) (int64, error)
func Int64FromPrompt ¶
func Int64FromPrompt(promptOpts *prompt.Options, v *Int64Validation) (int64, error)
func Int64FromStr ¶
func Int64FromStr(valStr string, v *Int64Validation) (int64, error)
func Int64FromStrMap ¶
func Int64List ¶
func Int64List(inter interface{}, v *Int64ListValidation) ([]int64, error)
func Int64ListFromInterfaceMap ¶
func Int64ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Int64ListValidation) ([]int64, error)
func Int64Ptr ¶
func Int64Ptr(inter interface{}, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromEnv ¶
func Int64PtrFromEnv(envVarName string, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromEnvOrFile ¶
func Int64PtrFromEnvOrFile(envVarName string, filePath string, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromFile ¶
func Int64PtrFromFile(filePath string, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromInterfaceMap ¶
func Int64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromPrompt ¶
func Int64PtrFromPrompt(promptOpts *prompt.Options, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromStr ¶
func Int64PtrFromStr(valStr string, v *Int64PtrValidation) (*int64, error)
func Int64PtrFromStrMap ¶
func IntFromEnv ¶
func IntFromEnv(envVarName string, v *IntValidation) (int, error)
func IntFromEnvOrFile ¶
func IntFromEnvOrFile(envVarName string, filePath string, v *IntValidation) (int, error)
func IntFromFile ¶
func IntFromFile(filePath string, v *IntValidation) (int, error)
func IntFromInterfaceMap ¶
func IntFromInterfaceMap(key string, iMap map[string]interface{}, v *IntValidation) (int, error)
func IntFromPrompt ¶
func IntFromPrompt(promptOpts *prompt.Options, v *IntValidation) (int, error)
func IntFromStr ¶
func IntFromStr(valStr string, v *IntValidation) (int, error)
func IntFromStrMap ¶
func IntList ¶
func IntList(inter interface{}, v *IntListValidation) ([]int, error)
func IntListFromInterfaceMap ¶
func IntListFromInterfaceMap(key string, iMap map[string]interface{}, v *IntListValidation) ([]int, error)
func IntPtr ¶
func IntPtr(inter interface{}, v *IntPtrValidation) (*int, error)
func IntPtrFromEnv ¶
func IntPtrFromEnv(envVarName string, v *IntPtrValidation) (*int, error)
func IntPtrFromEnvOrFile ¶
func IntPtrFromEnvOrFile(envVarName string, filePath string, v *IntPtrValidation) (*int, error)
func IntPtrFromFile ¶
func IntPtrFromFile(filePath string, v *IntPtrValidation) (*int, error)
func IntPtrFromInterfaceMap ¶
func IntPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *IntPtrValidation) (*int, error)
func IntPtrFromPrompt ¶
func IntPtrFromPrompt(promptOpts *prompt.Options, v *IntPtrValidation) (*int, error)
func IntPtrFromStr ¶
func IntPtrFromStr(valStr string, v *IntPtrValidation) (*int, error)
func IntPtrFromStrMap ¶
func Interface ¶
func Interface(inter interface{}, v *InterfaceValidation) (interface{}, error)
func InterfaceFromInterfaceMap ¶
func InterfaceFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceValidation) (interface{}, error)
func InterfaceMap ¶
func InterfaceMap(inter interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
func InterfaceMapFromInterfaceMap ¶
func InterfaceMapFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
func InterfaceMapList ¶
func InterfaceMapList(inter interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
func InterfaceMapListFromInterfaceMap ¶
func InterfaceMapListFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
func InterfaceStruct ¶
func InterfaceStruct(inter interface{}, v *InterfaceStructValidation) (interface{}, []error)
func InterfaceStructList ¶
func InterfaceStructList(dest interface{}, inter interface{}, v *InterfaceStructListValidation) (interface{}, []error)
func MustBoolFromEnv ¶
func MustBoolFromEnv(envVarName string, v *BoolValidation) bool
func MustBoolFromEnvOrFile ¶
func MustBoolFromEnvOrFile(envVarName string, filePath string, v *BoolValidation) bool
func MustBoolFromFile ¶
func MustBoolFromFile(filePath string, v *BoolValidation) bool
func MustFloat32FromEnv ¶
func MustFloat32FromEnv(envVarName string, v *Float32Validation) float32
func MustFloat32FromEnvOrFile ¶
func MustFloat32FromEnvOrFile(envVarName string, filePath string, v *Float32Validation) float32
func MustFloat32FromFile ¶
func MustFloat32FromFile(filePath string, v *Float32Validation) float32
func MustFloat64FromEnv ¶
func MustFloat64FromEnv(envVarName string, v *Float64Validation) float64
func MustFloat64FromEnvOrFile ¶
func MustFloat64FromEnvOrFile(envVarName string, filePath string, v *Float64Validation) float64
func MustFloat64FromFile ¶
func MustFloat64FromFile(filePath string, v *Float64Validation) float64
func MustInt32FromEnv ¶
func MustInt32FromEnv(envVarName string, v *Int32Validation) int32
func MustInt32FromEnvOrFile ¶
func MustInt32FromEnvOrFile(envVarName string, filePath string, v *Int32Validation) int32
func MustInt32FromFile ¶
func MustInt32FromFile(filePath string, v *Int32Validation) int32
func MustInt64FromEnv ¶
func MustInt64FromEnv(envVarName string, v *Int64Validation) int64
func MustInt64FromEnvOrFile ¶
func MustInt64FromEnvOrFile(envVarName string, filePath string, v *Int64Validation) int64
func MustInt64FromFile ¶
func MustInt64FromFile(filePath string, v *Int64Validation) int64
func MustIntFromEnv ¶
func MustIntFromEnv(envVarName string, v *IntValidation) int
func MustIntFromEnvOrFile ¶
func MustIntFromEnvOrFile(envVarName string, filePath string, v *IntValidation) int
func MustIntFromFile ¶
func MustIntFromFile(filePath string, v *IntValidation) int
func MustReadJSONStr ¶
func MustReadJSONStr(jsonStr string) interface{}
func MustReadYAMLStr ¶
func MustReadYAMLStr(yamlStr string) interface{}
func MustReadYAMLStrMap ¶
func MustStringFromEnv ¶
func MustStringFromEnv(envVarName string, v *StringValidation) string
func MustStringFromEnvOrFile ¶
func MustStringFromEnvOrFile(envVarName string, filePath string, v *StringValidation) string
func MustStringFromFile ¶
func MustStringFromFile(filePath string, v *StringValidation) string
func ParseYAMLBytes ¶ added in v0.36.0
func ParseYAMLBytes(dest interface{}, validation *StructValidation, data []byte) error
func ParseYAMLFile ¶ added in v0.10.0
func ParseYAMLFile(dest interface{}, validation *StructValidation, filePath string) []error
func ReadEnvVar ¶
func ReadInterfaceMapValue ¶
func ReadJSONBytes ¶
func ReadPrompt ¶
func ReadPrompt(dest interface{}, promptValidation *PromptValidation) error
func ReadYAMLBytes ¶
func ReadYAMLFile ¶ added in v0.10.0
func ReadYAMLFileStrMap ¶ added in v0.20.0
func S3PathValidator ¶ added in v0.10.0
func S3aPathValidator ¶ added in v0.14.1
func String ¶
func String(inter interface{}, v *StringValidation) (string, error)
func StringFromEnv ¶
func StringFromEnv(envVarName string, v *StringValidation) (string, error)
func StringFromEnvOrFile ¶
func StringFromEnvOrFile(envVarName string, filePath string, v *StringValidation) (string, error)
func StringFromFile ¶
func StringFromFile(filePath string, v *StringValidation) (string, error)
func StringFromInterfaceMap ¶
func StringFromInterfaceMap(key string, iMap map[string]interface{}, v *StringValidation) (string, error)
func StringFromPrompt ¶
func StringFromPrompt(promptOpts *prompt.Options, v *StringValidation) (string, error)
func StringFromStr ¶
func StringFromStr(valStr string, v *StringValidation) (string, error)
func StringFromStrMap ¶
func StringList ¶
func StringList(inter interface{}, v *StringListValidation) ([]string, error)
func StringListFromInterfaceMap ¶
func StringListFromInterfaceMap(key string, iMap map[string]interface{}, v *StringListValidation) ([]string, error)
func StringMap ¶
func StringMap(inter interface{}, v *StringMapValidation) (map[string]string, error)
func StringPtr ¶
func StringPtr(inter interface{}, v *StringPtrValidation) (*string, error)
func StringPtrFromEnv ¶
func StringPtrFromEnv(envVarName string, v *StringPtrValidation) (*string, error)
func StringPtrFromEnvOrFile ¶
func StringPtrFromEnvOrFile(envVarName string, filePath string, v *StringPtrValidation) (*string, error)
func StringPtrFromFile ¶
func StringPtrFromFile(filePath string, v *StringPtrValidation) (*string, error)
func StringPtrFromInterfaceMap ¶
func StringPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *StringPtrValidation) (*string, error)
func StringPtrFromPrompt ¶
func StringPtrFromPrompt(promptOpts *prompt.Options, v *StringPtrValidation) (*string, error)
func StringPtrFromStr ¶
func StringPtrFromStr(str string, v *StringPtrValidation) (*string, error)
func StringPtrFromStrMap ¶
func Struct ¶
func Struct(dest interface{}, inter interface{}, v *StructValidation) []error
func StructFromFiles ¶ added in v0.10.0
func StructFromFiles(dest interface{}, dirPath string, v *StructValidation) []error
Reads a directory of files into a struct, where each file name is the key and the contents is the value
func StructFromStringMap ¶ added in v0.10.0
func StructFromStringMap(dest interface{}, strMap map[string]string, v *StructValidation) []error
Reads a string map into a struct
func StructList ¶
func StructList(dest interface{}, inter interface{}, v *StructListValidation) (interface{}, []error)
func ValidateBoolListMissing ¶
func ValidateBoolListMissing(v *BoolListValidation) ([]bool, error)
func ValidateBoolListProvided ¶ added in v0.4.0
func ValidateBoolListProvided(val []bool, v *BoolListValidation) ([]bool, error)
func ValidateBoolMissing ¶
func ValidateBoolMissing(v *BoolValidation) (bool, error)
func ValidateBoolProvided ¶ added in v0.25.0
func ValidateBoolProvided(val bool, v *BoolValidation) (bool, error)
func ValidateBoolPtrMissing ¶
func ValidateBoolPtrMissing(v *BoolPtrValidation) (*bool, error)
func ValidateBoolPtrProvided ¶ added in v0.4.0
func ValidateBoolPtrProvided(val *bool, v *BoolPtrValidation) (*bool, error)
func ValidateFloat32ListMissing ¶
func ValidateFloat32ListMissing(v *Float32ListValidation) ([]float32, error)
func ValidateFloat32ListProvided ¶ added in v0.4.0
func ValidateFloat32ListProvided(val []float32, v *Float32ListValidation) ([]float32, error)
func ValidateFloat32Missing ¶
func ValidateFloat32Missing(v *Float32Validation) (float32, error)
func ValidateFloat32Provided ¶ added in v0.25.0
func ValidateFloat32Provided(val float32, v *Float32Validation) (float32, error)
func ValidateFloat32PtrMissing ¶
func ValidateFloat32PtrMissing(v *Float32PtrValidation) (*float32, error)
func ValidateFloat32PtrProvided ¶ added in v0.4.0
func ValidateFloat32PtrProvided(val *float32, v *Float32PtrValidation) (*float32, error)
func ValidateFloat32Val ¶
func ValidateFloat32Val(val float32, v *Float32Validation) error
func ValidateFloat64ListMissing ¶
func ValidateFloat64ListMissing(v *Float64ListValidation) ([]float64, error)
func ValidateFloat64ListProvided ¶ added in v0.4.0
func ValidateFloat64ListProvided(val []float64, v *Float64ListValidation) ([]float64, error)
func ValidateFloat64Missing ¶
func ValidateFloat64Missing(v *Float64Validation) (float64, error)
func ValidateFloat64Provided ¶ added in v0.25.0
func ValidateFloat64Provided(val float64, v *Float64Validation) (float64, error)
func ValidateFloat64PtrMissing ¶
func ValidateFloat64PtrMissing(v *Float64PtrValidation) (*float64, error)
func ValidateFloat64PtrProvided ¶ added in v0.4.0
func ValidateFloat64PtrProvided(val *float64, v *Float64PtrValidation) (*float64, error)
func ValidateFloat64Val ¶
func ValidateFloat64Val(val float64, v *Float64Validation) error
func ValidateImageVersion ¶ added in v0.16.0
func ValidateInt32ListMissing ¶
func ValidateInt32ListMissing(v *Int32ListValidation) ([]int32, error)
func ValidateInt32ListProvided ¶ added in v0.4.0
func ValidateInt32ListProvided(val []int32, v *Int32ListValidation) ([]int32, error)
func ValidateInt32Missing ¶
func ValidateInt32Missing(v *Int32Validation) (int32, error)
func ValidateInt32Provided ¶ added in v0.25.0
func ValidateInt32Provided(val int32, v *Int32Validation) (int32, error)
func ValidateInt32PtrMissing ¶
func ValidateInt32PtrMissing(v *Int32PtrValidation) (*int32, error)
func ValidateInt32PtrProvided ¶ added in v0.21.0
func ValidateInt32PtrProvided(val *int32, v *Int32PtrValidation) (*int32, error)
func ValidateInt32Val ¶
func ValidateInt32Val(val int32, v *Int32Validation) error
func ValidateInt64ListMissing ¶
func ValidateInt64ListMissing(v *Int64ListValidation) ([]int64, error)
func ValidateInt64ListProvided ¶ added in v0.4.0
func ValidateInt64ListProvided(val []int64, v *Int64ListValidation) ([]int64, error)
func ValidateInt64Missing ¶
func ValidateInt64Missing(v *Int64Validation) (int64, error)
func ValidateInt64Provided ¶ added in v0.25.0
func ValidateInt64Provided(val int64, v *Int64Validation) (int64, error)
func ValidateInt64PtrMissing ¶
func ValidateInt64PtrMissing(v *Int64PtrValidation) (*int64, error)
func ValidateInt64PtrProvided ¶ added in v0.4.0
func ValidateInt64PtrProvided(val *int64, v *Int64PtrValidation) (*int64, error)
func ValidateInt64Val ¶
func ValidateInt64Val(val int64, v *Int64Validation) error
func ValidateIntListMissing ¶
func ValidateIntListMissing(v *IntListValidation) ([]int, error)
func ValidateIntListProvided ¶ added in v0.4.0
func ValidateIntListProvided(val []int, v *IntListValidation) ([]int, error)
func ValidateIntMissing ¶
func ValidateIntMissing(v *IntValidation) (int, error)
func ValidateIntProvided ¶ added in v0.25.0
func ValidateIntProvided(val int, v *IntValidation) (int, error)
func ValidateIntPtrMissing ¶
func ValidateIntPtrMissing(v *IntPtrValidation) (*int, error)
func ValidateIntPtrProvided ¶ added in v0.4.0
func ValidateIntPtrProvided(val *int, v *IntPtrValidation) (*int, error)
func ValidateIntVal ¶
func ValidateIntVal(val int, v *IntValidation) error
func ValidateInterfaceMapListMissing ¶
func ValidateInterfaceMapListMissing(v *InterfaceMapListValidation) ([]map[string]interface{}, error)
func ValidateInterfaceMapListProvided ¶ added in v0.4.0
func ValidateInterfaceMapListProvided(val []map[string]interface{}, v *InterfaceMapListValidation) ([]map[string]interface{}, error)
func ValidateInterfaceMapMissing ¶
func ValidateInterfaceMapMissing(v *InterfaceMapValidation) (map[string]interface{}, error)
func ValidateInterfaceMapProvided ¶ added in v0.4.0
func ValidateInterfaceMapProvided(val map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error)
func ValidateInterfaceMissing ¶
func ValidateInterfaceMissing(v *InterfaceValidation) (interface{}, error)
func ValidateInterfaceProvided ¶ added in v0.4.0
func ValidateInterfaceProvided(val interface{}, v *InterfaceValidation) (interface{}, error)
func ValidateStringListMissing ¶
func ValidateStringListMissing(v *StringListValidation) ([]string, error)
func ValidateStringListProvided ¶ added in v0.4.0
func ValidateStringListProvided(val []string, v *StringListValidation) ([]string, error)
func ValidateStringMapMissing ¶
func ValidateStringMapMissing(v *StringMapValidation) (map[string]string, error)
func ValidateStringMapProvided ¶ added in v0.4.0
func ValidateStringMissing ¶
func ValidateStringMissing(v *StringValidation) (string, error)
func ValidateStringProvided ¶ added in v0.25.0
func ValidateStringProvided(val string, v *StringValidation) (string, error)
func ValidateStringPtrMissing ¶
func ValidateStringPtrMissing(v *StringPtrValidation) (*string, error)
func ValidateStringPtrProvided ¶ added in v0.4.0
func ValidateStringPtrProvided(val *string, v *StringPtrValidation) (*string, error)
func ValidateStringVal ¶
func ValidateStringVal(val string, v *StringValidation) error
Types ¶
type BoolListValidation ¶
type BoolPtrValidation ¶
type BoolValidation ¶
type DurationValidation ¶ added in v0.14.0
type Float32ListValidation ¶
type Float32PtrValidation ¶
type Float32PtrValidation struct { Required bool Default *float32 AllowExplicitNull bool AllowedValues []float32 HiddenAllowedValues []float32 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []float32 CantBeSpecifiedErrStr *string GreaterThan *float32 GreaterThanOrEqualTo *float32 LessThan *float32 LessThanOrEqualTo *float32 Validator func(float32) (float32, error) }
type Float32Validation ¶
type Float32Validation struct { Required bool Default float32 TreatNullAsZero bool // `<field>: ` and `<field>: null` will be read as `<field>: 0.0` AllowedValues []float32 HiddenAllowedValues []float32 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []float32 CantBeSpecifiedErrStr *string GreaterThan *float32 GreaterThanOrEqualTo *float32 LessThan *float32 LessThanOrEqualTo *float32 Validator func(float32) (float32, error) }
type Float64ListValidation ¶
type Float64PtrValidation ¶
type Float64PtrValidation struct { Required bool Default *float64 AllowExplicitNull bool AllowedValues []float64 HiddenAllowedValues []float64 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []float64 CantBeSpecifiedErrStr *string GreaterThan *float64 GreaterThanOrEqualTo *float64 LessThan *float64 LessThanOrEqualTo *float64 Validator func(float64) (float64, error) }
type Float64Validation ¶
type Float64Validation struct { Required bool Default float64 TreatNullAsZero bool // `<field>: ` and `<field>: null` will be read as `<field>: 0.0` AllowedValues []float64 HiddenAllowedValues []float64 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []float64 CantBeSpecifiedErrStr *string GreaterThan *float64 GreaterThanOrEqualTo *float64 LessThan *float64 LessThanOrEqualTo *float64 Validator func(float64) (float64, error) }
type Int32ListValidation ¶
type Int32PtrValidation ¶
type Int32PtrValidation struct { Required bool Default *int32 AllowExplicitNull bool AllowedValues []int32 HiddenAllowedValues []int32 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int32 CantBeSpecifiedErrStr *string GreaterThan *int32 GreaterThanOrEqualTo *int32 LessThan *int32 LessThanOrEqualTo *int32 Validator func(int32) (int32, error) }
type Int32Validation ¶
type Int32Validation struct { Required bool Default int32 TreatNullAsZero bool // `<field>: ` and `<field>: null` will be read as `<field>: 0` AllowedValues []int32 HiddenAllowedValues []int32 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int32 CantBeSpecifiedErrStr *string GreaterThan *int32 GreaterThanOrEqualTo *int32 LessThan *int32 LessThanOrEqualTo *int32 Validator func(int32) (int32, error) }
type Int64ListValidation ¶
type Int64PtrValidation ¶
type Int64PtrValidation struct { Required bool Default *int64 AllowExplicitNull bool AllowedValues []int64 HiddenAllowedValues []int64 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int64 CantBeSpecifiedErrStr *string GreaterThan *int64 GreaterThanOrEqualTo *int64 LessThan *int64 LessThanOrEqualTo *int64 Validator func(int64) (int64, error) }
type Int64Validation ¶
type Int64Validation struct { Required bool Default int64 TreatNullAsZero bool // `<field>: ` and `<field>: null` will be read as `<field>: 0` AllowedValues []int64 HiddenAllowedValues []int64 // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int64 CantBeSpecifiedErrStr *string GreaterThan *int64 GreaterThanOrEqualTo *int64 LessThan *int64 LessThanOrEqualTo *int64 Validator func(int64) (int64, error) }
type IntListValidation ¶
type IntPtrValidation ¶
type IntPtrValidation struct { Required bool Default *int AllowExplicitNull bool AllowedValues []int HiddenAllowedValues []int // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int CantBeSpecifiedErrStr *string GreaterThan *int GreaterThanOrEqualTo *int LessThan *int LessThanOrEqualTo *int Validator func(int) (int, error) }
type IntValidation ¶
type IntValidation struct { Required bool Default int TreatNullAsZero bool // `<field>: ` and `<field>: null` will be read as `<field>: 0` AllowedValues []int HiddenAllowedValues []int // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []int CantBeSpecifiedErrStr *string GreaterThan *int GreaterThanOrEqualTo *int LessThan *int LessThanOrEqualTo *int Validator func(int) (int, error) }
type InterfaceMapListValidation ¶
type InterfaceMapListValidation struct { Required bool Default []map[string]interface{} AllowExplicitNull bool AllowEmpty bool CantBeSpecifiedErrStr *string CastSingleItem bool MinLength int MaxLength int InvalidLengths []int AllowCortexResources bool RequireCortexResources bool Validator func([]map[string]interface{}) ([]map[string]interface{}, error) }
type InterfaceMapValidation ¶
type InterfaceMapValidation struct { Required bool Default map[string]interface{} AllowExplicitNull bool AllowEmpty bool CantBeSpecifiedErrStr *string ConvertNullToEmpty bool ScalarsOnly bool StringLeavesOnly bool StringKeysOnly bool // Useful for ensuring this field is JSON parsable; validates that all maps and nested maps only use string keys AllowedLeafValues []string AllowCortexResources bool RequireCortexResources bool Validator func(map[string]interface{}) (map[string]interface{}, error) }
type InterfaceStructType ¶
type InterfaceStructType struct { Type interface{} // e.g. (*MyType)(nil) StructFieldValidations []*StructFieldValidation }
type InterfaceStructValidation ¶
type InterfaceStructValidation struct { TypeKey string // required TypeStructField string // optional (will set this field if present) InterfaceStructTypes map[string]*InterfaceStructType // specify this or ParsedInterfaceStructTypes ParsedInterfaceStructTypes map[interface{}]*InterfaceStructType // must specify Parser if using this Parser func(string) (interface{}, error) Required bool AllowExplicitNull bool TreatNullAsEmpty bool // If explicit null or if it's top level and the file is empty, treat as empty map CantBeSpecifiedErrStr *string ShortCircuit bool AllowExtraFields bool }
type InterfaceValidation ¶
type PrimitiveType ¶ added in v0.4.0
type PrimitiveType string
var ( PrimTypeInt PrimitiveType = "integer" PrimTypeIntList PrimitiveType = "integer list" PrimTypeFloat PrimitiveType = "float" PrimTypeFloatList PrimitiveType = "float list" PrimTypeString PrimitiveType = "string" PrimTypeStringList PrimitiveType = "string list" PrimTypeBool PrimitiveType = "boolean" PrimTypeBoolList PrimitiveType = "boolean list" PrimTypeMap PrimitiveType = "map" PrimTypeMapList PrimitiveType = "list of maps" PrimTypeList PrimitiveType = "list" PrimTypeStringToStringMap PrimitiveType = "map of strings to strings" )
type PrimitiveTypes ¶ added in v0.4.0
type PrimitiveTypes []PrimitiveType
func (PrimitiveTypes) StringList ¶ added in v0.4.0
func (ts PrimitiveTypes) StringList() []string
type PromptItemValidation ¶
type PromptItemValidation struct { StructField string // Required PromptOpts *prompt.Options // Required // Provide one of the following: StringValidation *StringValidation StringPtrValidation *StringPtrValidation BoolValidation *BoolValidation BoolPtrValidation *BoolPtrValidation IntValidation *IntValidation IntPtrValidation *IntPtrValidation Int32Validation *Int32Validation Int32PtrValidation *Int32PtrValidation Int64Validation *Int64Validation Int64PtrValidation *Int64PtrValidation Float32Validation *Float32Validation Float32PtrValidation *Float32PtrValidation Float64Validation *Float64Validation Float64PtrValidation *Float64PtrValidation // Additional parsing step for StringValidation or StringPtrValidation Parser func(string) (interface{}, error) }
type PromptValidation ¶
type PromptValidation struct { PromptItemValidations []*PromptItemValidation SkipNonEmptyFields bool // skips fields that are not zero-valued SkipNonNilFields bool // skips pointer fields that are not nil PrintNewLineIfPrompted bool // prints an extra new line at the end if any questions were asked }
type StringListValidation ¶
type StringListValidation struct { Required bool Default []string AllowExplicitNull bool AllowEmpty bool CantBeSpecifiedErrStr *string CastSingleItem bool DisallowDups bool MinLength int MaxLength int InvalidLengths []int AllowCortexResources bool RequireCortexResources bool ElementStringValidation *StringValidation // Required, Default, AllowEmpty, TreatNullAsEmpty & Validator fields not applicable here Validator func([]string) ([]string, error) }
type StringMapValidation ¶
type StringMapValidation struct { Required bool Default map[string]string AllowExplicitNull bool AllowEmpty bool ConvertNullToEmpty bool CantBeSpecifiedErrStr *string KeyStringValidator *StringValidation ValueStringValidator *StringValidation Validator func(map[string]string) (map[string]string, error) }
type StringPtrValidation ¶
type StringPtrValidation struct { Required bool Default *string AllowExplicitNull bool AllowEmpty bool AllowedValues []string HiddenAllowedValues []string // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []string CantBeSpecifiedErrStr *string Prefix string Suffix string InvalidPrefixes []string InvalidSuffixes []string AllowedPrefixes []string AllowedSuffixes []string MaxLength int MinLength int DisallowLeadingWhitespace bool DisallowTrailingWhitespace bool AlphaNumericDashDotUnderscoreOrEmpty bool AlphaNumericDashDotUnderscore bool AlphaNumericDashUnderscore bool AlphaNumericDotUnderscore bool AWSTag bool DNS1035 bool DNS1123 bool CastInt bool CastNumeric bool CastScalar bool AllowCortexResources bool RequireCortexResources bool DockerImage bool DockerImageOrEmpty bool Validator func(string) (string, error) }
type StringValidation ¶
type StringValidation struct { Required bool Default string AllowEmpty bool // Allow `<field>: ""` TreatNullAsEmpty bool // `<field>: ` and `<field>: null` will be read as `<field>: ""` AllowedValues []string HiddenAllowedValues []string // allowed, but will not be listed as valid values (must be used in conjunction with AllowedValues) DisallowedValues []string CantBeSpecifiedErrStr *string Prefix string Suffix string InvalidPrefixes []string InvalidSuffixes []string AllowedPrefixes []string AllowedSuffixes []string MaxLength int MinLength int DisallowLeadingWhitespace bool DisallowTrailingWhitespace bool AlphaNumericDashDotUnderscoreOrEmpty bool AlphaNumericDashDotUnderscore bool AlphaNumericDashUnderscoreOrEmpty bool AlphaNumericDashUnderscore bool AlphaNumericDotUnderscore bool AlphaNumericDash bool AWSTag bool DNS1035 bool DNS1123 bool CastInt bool CastNumeric bool CastScalar bool AllowCortexResources bool RequireCortexResources bool DockerImage bool DockerImageOrEmpty bool Validator func(string) (string, error) }
type StructFieldValidation ¶
type StructFieldValidation struct { StructField string // Required (can be omitted to skip writing of value to struct) Key string // Required, or defaults to json key or "StructField" DefaultField string // Optional. Will set the default to the runtime value of this field DefaultDependentFields []string // Optional. Will be passed in to DefaultDependentFieldsFunc. Dependent fields must be listed first in the `[]*cr.StructFieldValidation`. DefaultDependentFieldsFunc func([]interface{}) interface{} // Optional. Will be called with DefaultDependentFields // Provide one of the following: StringValidation *StringValidation StringPtrValidation *StringPtrValidation StringListValidation *StringListValidation BoolValidation *BoolValidation BoolPtrValidation *BoolPtrValidation BoolListValidation *BoolListValidation IntValidation *IntValidation IntPtrValidation *IntPtrValidation IntListValidation *IntListValidation Int32Validation *Int32Validation Int32PtrValidation *Int32PtrValidation Int32ListValidation *Int32ListValidation Int64Validation *Int64Validation Int64PtrValidation *Int64PtrValidation Int64ListValidation *Int64ListValidation Float32Validation *Float32Validation Float32PtrValidation *Float32PtrValidation Float32ListValidation *Float32ListValidation Float64Validation *Float64Validation Float64PtrValidation *Float64PtrValidation Float64ListValidation *Float64ListValidation StringMapValidation *StringMapValidation InterfaceMapValidation *InterfaceMapValidation InterfaceMapListValidation *InterfaceMapListValidation InterfaceValidation *InterfaceValidation StructValidation *StructValidation StructListValidation *StructListValidation InterfaceStructValidation *InterfaceStructValidation InterfaceStructListValidation *InterfaceStructListValidation Nil bool // Additional parsing step for StringValidation or StringPtrValidation Parser func(string) (interface{}, error) }
type StructListValidation ¶
type StructListValidation struct { StructValidation *StructValidation Required bool AllowExplicitNull bool TreatNullAsEmpty bool // If explicit null or if it's top level and the file is empty, treat as empty list MinLength int MaxLength int InvalidLengths []int CantBeSpecifiedErrStr *string ShortCircuit bool }
type StructValidation ¶
type StructValidation struct { StructFieldValidations []*StructFieldValidation Required bool AllowExplicitNull bool TreatNullAsEmpty bool // If explicit null or if it's top level and the file is empty, treat as empty map DefaultNil bool // If this struct is nested and its key is not defined, set it to nil instead of defaults or erroring (e.g. if any subfields are required) CantBeSpecifiedErrStr *string ShortCircuit bool AllowExtraFields bool }
type TypePlaceholder ¶
type TypePlaceholder struct {
Type string `json:"type"`
}
Source Files ¶
- bool.go
- bool_list.go
- bool_ptr.go
- errors.go
- float32.go
- float32_list.go
- float32_ptr.go
- float64.go
- float64_list.go
- float64_ptr.go
- int.go
- int32.go
- int32_list.go
- int32_ptr.go
- int64.go
- int64_list.go
- int64_ptr.go
- int_list.go
- int_ptr.go
- interface.go
- interface_map.go
- interface_map_list.go
- reader.go
- string.go
- string_list.go
- string_map.go
- string_ptr.go
- types.go
- validators.go
Click to show internal directories.
Click to hide internal directories.