Documentation ¶
Index ¶
- Constants
- func CueValidate(cueTpl string) error
- func LoadConfigObjectFromContent(cfgType appsv1beta1.CfgFileFormat, rawData string) (map[string]interface{}, error)
- func ValidateConfigurationWithCue(cueString string, cfgType appsv1beta1.CfgFileFormat, rawData string) error
- type ConfigValidator
- type CueType
- type CueWalkVisitor
- type ValidatorOptions
Constants ¶
View Source
const ( StoreUnit = 1024 KByte = 1 * StoreUnit MByte = KByte * StoreUnit GByte = MByte * StoreUnit TByte = GByte * StoreUnit PByte = TByte * StoreUnit EByte = PByte * StoreUnit ZByte = EByte * StoreUnit YByte = ZByte * StoreUnit )
View Source
const ( Millisecond = time.Duration(1) Second = 1000 * Millisecond Minute = 60 * Second Hour = 60 * Minute Day = 24 * Hour )
Variables ¶
This section is empty.
Functions ¶
func LoadConfigObjectFromContent ¶
func LoadConfigObjectFromContent(cfgType appsv1beta1.CfgFileFormat, rawData string) (map[string]interface{}, error)
func ValidateConfigurationWithCue ¶
func ValidateConfigurationWithCue(cueString string, cfgType appsv1beta1.CfgFileFormat, rawData string) error
Types ¶
type ConfigValidator ¶
func NewConfigValidator ¶
func NewConfigValidator(configConstraint *appsv1beta1.ConfigConstraintSpec, options ...ValidatorOptions) ConfigValidator
type CueType ¶
type CueType string
CueType defines cue type +enum
const ( NullableType CueType = "nullable" FloatType CueType = "float" IntType CueType = "integer" BoolType CueType = "boolean" StringType CueType = "string" StructType CueType = "object" ListType CueType = "array" K8SQuantityType CueType = "quantity" ClassicStorageType CueType = "storage" ClassicTimeDurationType CueType = "timeDuration" )
type CueWalkVisitor ¶
type ValidatorOptions ¶
func WithKeySelector ¶
func WithKeySelector(keys []string) ValidatorOptions
Click to show internal directories.
Click to hide internal directories.