Documentation ¶
Index ¶
- 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 *PromptOptions, 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 *PromptOptions, 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 EmailValidator() func(string) (string, error)
- func EnvVar(envVarName string) string
- func ErrorAlphaNumericDashDotUnderscore(provided string) error
- func ErrorAlphaNumericDashUnderscore(provided string) error
- func ErrorCannotBeEmpty() error
- func ErrorCannotBeNull() error
- func ErrorCannotSetStructField() error
- func ErrorCortexResourceNotAllowed(resourceName string) error
- func ErrorCortexResourceOnlyAllowed(invalidStr string) error
- func ErrorDuplicatedValue(val interface{}) error
- func ErrorInvalidFloat32(provided float32, allowed ...float32) error
- func ErrorInvalidFloat64(provided float64, allowed ...float64) error
- func ErrorInvalidInt(provided int, allowed ...int) error
- func ErrorInvalidInt32(provided int32, allowed ...int32) error
- func ErrorInvalidInt64(provided int64, allowed ...int64) error
- func ErrorInvalidInterface(provided interface{}, allowed ...interface{}) error
- func ErrorInvalidPrimitiveType(provided interface{}, allowedTypes ...PrimitiveType) error
- func ErrorInvalidStr(provided string, allowed ...string) error
- func ErrorInvalidYAML(err error) error
- func ErrorMapMustBeDefined(keys ...string) error
- func ErrorMustBeDefined() 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) error
- func ErrorUnsupportedKey(key interface{}) 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 GetS3PathValidator() func(string) (string, error)
- func GetS3aPathValidator() func(string) (string, error)
- func GetURLValidator(defaultHTTP bool, addPort bool) 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 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 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 *PromptOptions, 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 *PromptOptions, 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 StructList(dest interface{}, inter interface{}, v *StructListValidation) (interface{}, []error)
- func ValidateBool(val bool, v *BoolValidation) (bool, error)
- func ValidateBoolListMissing(v *BoolListValidation) ([]bool, error)
- func ValidateBoolListProvided(val []bool, v *BoolListValidation) ([]bool, error)
- func ValidateBoolMissing(v *BoolValidation) (bool, error)
- func ValidateBoolPtrMissing(v *BoolPtrValidation) (*bool, error)
- func ValidateBoolPtrProvided(val *bool, v *BoolPtrValidation) (*bool, error)
- func ValidateFloat32(val float32, v *Float32Validation) (float32, error)
- func ValidateFloat32ListMissing(v *Float32ListValidation) ([]float32, error)
- func ValidateFloat32ListProvided(val []float32, v *Float32ListValidation) ([]float32, error)
- func ValidateFloat32Missing(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 ValidateFloat64(val float64, v *Float64Validation) (float64, error)
- func ValidateFloat64ListMissing(v *Float64ListValidation) ([]float64, error)
- func ValidateFloat64ListProvided(val []float64, v *Float64ListValidation) ([]float64, error)
- func ValidateFloat64Missing(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 ValidateInt(val int, v *IntValidation) (int, error)
- func ValidateInt32(val int32, v *Int32Validation) (int32, error)
- func ValidateInt32ListMissing(v *Int32ListValidation) ([]int32, error)
- func ValidateInt32ListProvided(val []int32, v *Int32ListValidation) ([]int32, error)
- func ValidateInt32Missing(v *Int32Validation) (int32, error)
- func ValidateInt32PtrMissing(v *Int32PtrValidation) (*int32, error)
- func ValidateInt32PtrProvdied(val *int32, v *Int32PtrValidation) (*int32, error)
- func ValidateInt32Val(val int32, v *Int32Validation) error
- func ValidateInt64(val int64, v *Int64Validation) (int64, error)
- func ValidateInt64ListMissing(v *Int64ListValidation) ([]int64, error)
- func ValidateInt64ListProvided(val []int64, v *Int64ListValidation) ([]int64, error)
- func ValidateInt64Missing(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 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 ValidateString(val string, v *StringValidation) (string, 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 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 Error
- type ErrorKind
- 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 PromptOptions
- type PromptValidation
- type StringListValidation
- type StringMapValidation
- type StringPtrValidation
- type StringValidation
- type StructFieldValidation
- type StructListValidation
- type StructValidation
- type TypePlaceholder
Constants ¶
This section is empty.
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 *PromptOptions, 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 *PromptOptions, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromStr ¶
func BoolPtrFromStr(valStr string, v *BoolPtrValidation) (*bool, error)
func BoolPtrFromStrMap ¶
func EmailValidator ¶ added in v0.9.0
func ErrorAlphaNumericDashDotUnderscore ¶ added in v0.4.0
func ErrorAlphaNumericDashUnderscore ¶ added in v0.4.0
func ErrorCannotBeEmpty ¶ added in v0.4.0
func ErrorCannotBeEmpty() error
func ErrorCannotBeNull ¶ added in v0.4.0
func ErrorCannotBeNull() error
func ErrorCannotSetStructField ¶ added in v0.4.0
func ErrorCannotSetStructField() error
func ErrorCortexResourceNotAllowed ¶ added in v0.4.0
func ErrorCortexResourceOnlyAllowed ¶ added in v0.4.0
func ErrorDuplicatedValue ¶ added in v0.4.0
func ErrorDuplicatedValue(val interface{}) error
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{}) error
func ErrorInvalidPrimitiveType ¶ added in v0.4.0
func ErrorInvalidPrimitiveType(provided interface{}, allowedTypes ...PrimitiveType) error
func ErrorInvalidStr ¶ added in v0.4.0
func ErrorInvalidYAML ¶ added in v0.4.0
func ErrorMapMustBeDefined ¶ added in v0.4.0
func ErrorMustBeDefined ¶ added in v0.4.0
func ErrorMustBeDefined() 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 ErrorUnsupportedKey ¶ added in v0.4.0
func ErrorUnsupportedKey(key interface{}) error
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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromStr ¶
func Float64PtrFromStr(valStr string, v *Float64PtrValidation) (*float64, error)
func Float64PtrFromStrMap ¶
func GetFilePathValidator ¶ added in v0.4.0
func GetS3PathValidator ¶ added in v0.4.0
func GetS3aPathValidator ¶ added in v0.4.0
func GetURLValidator ¶ added in v0.4.0
uses https unless defaultHTTP == true
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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 *PromptOptions, 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 ReadEnvVar ¶
func ReadInterfaceMapValue ¶
func ReadJSONBytes ¶
func ReadPrompt ¶
func ReadPrompt(dest interface{}, promptValidation *PromptValidation) error
func ReadYAMLBytes ¶
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 *PromptOptions, 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 *PromptOptions, 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 StructList ¶
func StructList(dest interface{}, inter interface{}, v *StructListValidation) (interface{}, []error)
func ValidateBool ¶
func ValidateBool(val bool, v *BoolValidation) (bool, 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 ValidateBoolPtrMissing ¶
func ValidateBoolPtrMissing(v *BoolPtrValidation) (*bool, error)
func ValidateBoolPtrProvided ¶ added in v0.4.0
func ValidateBoolPtrProvided(val *bool, v *BoolPtrValidation) (*bool, error)
func ValidateFloat32 ¶
func ValidateFloat32(val float32, v *Float32Validation) (float32, 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 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 ValidateFloat64 ¶
func ValidateFloat64(val float64, v *Float64Validation) (float64, 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 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 ValidateInt ¶
func ValidateInt(val int, v *IntValidation) (int, error)
func ValidateInt32 ¶
func ValidateInt32(val int32, v *Int32Validation) (int32, error)
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 ValidateInt32PtrMissing ¶
func ValidateInt32PtrMissing(v *Int32PtrValidation) (*int32, error)
func ValidateInt32PtrProvdied ¶ added in v0.4.0
func ValidateInt32PtrProvdied(val *int32, v *Int32PtrValidation) (*int32, error)
func ValidateInt32Val ¶
func ValidateInt32Val(val int32, v *Int32Validation) error
func ValidateInt64 ¶
func ValidateInt64(val int64, v *Int64Validation) (int64, 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 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 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 ValidateString ¶
func ValidateString(val string, v *StringValidation) (string, 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 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 Error ¶ added in v0.4.0
type Error struct { Kind ErrorKind // contains filtered or unexported fields }
type ErrorKind ¶ added in v0.4.0
type ErrorKind int
const ( ErrUnknown ErrorKind = iota ErrUnsupportedKey ErrInvalidYAML ErrAlphaNumericDashUnderscore ErrAlphaNumericDashDotUnderscore ErrMustHavePrefix ErrInvalidInterface ErrInvalidFloat64 ErrInvalidFloat32 ErrInvalidInt64 ErrInvalidInt32 ErrInvalidInt ErrInvalidStr ErrMustBeLessThanOrEqualTo ErrMustBeLessThan ErrMustBeGreaterThanOrEqualTo ErrMustBeGreaterThan ErrInvalidPrimitiveType ErrDuplicatedValue ErrCannotSetStructField ErrCannotBeNull ErrCannotBeEmpty ErrMustBeDefined ErrMapMustBeDefined ErrMustBeEmpty ErrCortexResourceOnlyAllowed ErrCortexResourceNotAllowed )
func (ErrorKind) MarshalBinary ¶ added in v0.4.0
MarshalBinary satisfies BinaryMarshaler
func (ErrorKind) MarshalText ¶ added in v0.4.0
MarshalText satisfies TextMarshaler
func (*ErrorKind) UnmarshalBinary ¶ added in v0.4.0
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*ErrorKind) UnmarshalText ¶ added in v0.4.0
UnmarshalText satisfies TextUnmarshaler
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 InterfaceMapValidation ¶
type InterfaceMapValidation struct { Required bool Default map[string]interface{} AllowExplicitNull bool AllowEmpty bool ScalarsOnly bool StringLeavesOnly bool AllowedLeafValues []string AllowCortexResources bool RequireCortexResources bool Validator func(map[string]interface{}) (map[string]interface{}, error) }
type InterfaceStructListValidation ¶
type InterfaceStructListValidation struct { InterfaceStructValidation *InterfaceStructValidation Required bool AllowExplicitNull bool ShortCircuit bool }
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 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 *PromptOptions // Required // Provide one of the following: StringValidation *StringValidation BoolValidation *BoolValidation IntValidation *IntValidation Int32Validation *Int32Validation Int64Validation *Int64Validation Float32Validation *Float32Validation Float64Validation *Float64Validation }
type PromptOptions ¶
type PromptValidation ¶
type PromptValidation struct {
PromptItemValidations []*PromptItemValidation
}
type StringListValidation ¶
type StringMapValidation ¶
type StringPtrValidation ¶
type StringPtrValidation struct { Required bool Default *string AllowExplicitNull bool AllowEmpty bool AllowedValues []string Prefix string AlphaNumericDashDotUnderscore bool AlphaNumericDashUnderscore bool DNS1035 bool DNS1123 bool CastScalar bool CastNumeric bool AllowCortexResources bool RequireCortexResources bool Validator func(string) (string, error) }
type StringValidation ¶
type StringValidation struct { Required bool Default string AllowEmpty bool AllowedValues []string Prefix string AlphaNumericDashDotUnderscoreOrEmpty bool AlphaNumericDashDotUnderscore bool AlphaNumericDashUnderscore bool DNS1035 bool DNS1123 bool CastNumeric bool CastScalar bool AllowCortexResources bool RequireCortexResources bool Validator func(string) (string, error) }
type StructFieldValidation ¶
type StructFieldValidation struct { Key string // Required, defaults to json key or "StructField" StructField string // Required DefaultField string // Optional. Will set the default to the runtime value of this field DefaultFieldFunc func(interface{}) interface{} // Optional. Will call the func with the value of DefaultField // 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 ShortCircuit bool }
type StructValidation ¶
type StructValidation struct { StructFieldValidations []*StructFieldValidation Required bool AllowExplicitNull bool 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) 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.