Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationResult ¶
type ValidationResult struct { Settings map[string]interface{} Version int Warning string Error string }
func (ValidationResult) HasError ¶
func (v ValidationResult) HasError() bool
HasError return true if result has error. TODO(future) use regular error instead.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is a validator for values in ModuleConfig.
func NewValidator ¶
func NewValidator(valuesValidator ValuesValidator) *Validator
func (*Validator) Validate ¶
func (v *Validator) Validate(config *v1alpha1.ModuleConfig) ValidationResult
Validate checks ModuleConfig resource: - check if resource is well-formed - runs conversions for spec.settings if it`s needed - use OpenAPI schema defined in related config-values.yaml file to validate converted spec.settings. TODO(future) return cfg, error. Put cfg.Spec into result cfg.
type ValuesValidator ¶
type ValuesValidator interface { GetGlobal() *modules.GlobalModule GetModule(name string) *modules.BasicModule }
ValuesValidator is a part of ValuesValidator from addon-operator with needed methods to validate config values.
Click to show internal directories.
Click to hide internal directories.