configtools

package
v1.68.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeConfigManagerMock added in v1.68.0

type KubeConfigManagerMock struct {
	IsModuleEnabledMock mKubeConfigManagerMockIsModuleEnabled

	KubeConfigEventChMock mKubeConfigManagerMockKubeConfigEventCh

	SafeReadConfigMock mKubeConfigManagerMockSafeReadConfig

	SaveConfigValuesMock mKubeConfigManagerMockSaveConfigValues

	UpdateModuleConfigMock mKubeConfigManagerMockUpdateModuleConfig
	// contains filtered or unexported fields
}

KubeConfigManagerMock implements mm_module_manager.KubeConfigManager

func NewKubeConfigManagerMock added in v1.68.0

func NewKubeConfigManagerMock(t minimock.Tester) *KubeConfigManagerMock

NewKubeConfigManagerMock returns a mock for mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) IsModuleEnabled added in v1.68.0

func (mmIsModuleEnabled *KubeConfigManagerMock) IsModuleEnabled(moduleName string) (bp1 *bool)

IsModuleEnabled implements mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) IsModuleEnabledAfterCounter added in v1.68.0

func (mmIsModuleEnabled *KubeConfigManagerMock) IsModuleEnabledAfterCounter() uint64

IsModuleEnabledAfterCounter returns a count of finished KubeConfigManagerMock.IsModuleEnabled invocations

func (*KubeConfigManagerMock) IsModuleEnabledBeforeCounter added in v1.68.0

func (mmIsModuleEnabled *KubeConfigManagerMock) IsModuleEnabledBeforeCounter() uint64

IsModuleEnabledBeforeCounter returns a count of KubeConfigManagerMock.IsModuleEnabled invocations

func (*KubeConfigManagerMock) KubeConfigEventCh added in v1.68.0

func (mmKubeConfigEventCh *KubeConfigManagerMock) KubeConfigEventCh() (ch1 chan config.KubeConfigEvent)

KubeConfigEventCh implements mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) KubeConfigEventChAfterCounter added in v1.68.0

func (mmKubeConfigEventCh *KubeConfigManagerMock) KubeConfigEventChAfterCounter() uint64

KubeConfigEventChAfterCounter returns a count of finished KubeConfigManagerMock.KubeConfigEventCh invocations

func (*KubeConfigManagerMock) KubeConfigEventChBeforeCounter added in v1.68.0

func (mmKubeConfigEventCh *KubeConfigManagerMock) KubeConfigEventChBeforeCounter() uint64

KubeConfigEventChBeforeCounter returns a count of KubeConfigManagerMock.KubeConfigEventCh invocations

func (*KubeConfigManagerMock) MinimockFinish added in v1.68.0

func (m *KubeConfigManagerMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*KubeConfigManagerMock) MinimockIsModuleEnabledDone added in v1.68.0

func (m *KubeConfigManagerMock) MinimockIsModuleEnabledDone() bool

MinimockIsModuleEnabledDone returns true if the count of the IsModuleEnabled invocations corresponds the number of defined expectations

func (*KubeConfigManagerMock) MinimockIsModuleEnabledInspect added in v1.68.0

func (m *KubeConfigManagerMock) MinimockIsModuleEnabledInspect()

MinimockIsModuleEnabledInspect logs each unmet expectation

func (*KubeConfigManagerMock) MinimockKubeConfigEventChDone added in v1.68.0

func (m *KubeConfigManagerMock) MinimockKubeConfigEventChDone() bool

MinimockKubeConfigEventChDone returns true if the count of the KubeConfigEventCh invocations corresponds the number of defined expectations

func (*KubeConfigManagerMock) MinimockKubeConfigEventChInspect added in v1.68.0

func (m *KubeConfigManagerMock) MinimockKubeConfigEventChInspect()

MinimockKubeConfigEventChInspect logs each unmet expectation

func (*KubeConfigManagerMock) MinimockSafeReadConfigDone added in v1.68.0

func (m *KubeConfigManagerMock) MinimockSafeReadConfigDone() bool

MinimockSafeReadConfigDone returns true if the count of the SafeReadConfig invocations corresponds the number of defined expectations

func (*KubeConfigManagerMock) MinimockSafeReadConfigInspect added in v1.68.0

func (m *KubeConfigManagerMock) MinimockSafeReadConfigInspect()

MinimockSafeReadConfigInspect logs each unmet expectation

func (*KubeConfigManagerMock) MinimockSaveConfigValuesDone added in v1.68.0

func (m *KubeConfigManagerMock) MinimockSaveConfigValuesDone() bool

MinimockSaveConfigValuesDone returns true if the count of the SaveConfigValues invocations corresponds the number of defined expectations

func (*KubeConfigManagerMock) MinimockSaveConfigValuesInspect added in v1.68.0

func (m *KubeConfigManagerMock) MinimockSaveConfigValuesInspect()

MinimockSaveConfigValuesInspect logs each unmet expectation

func (*KubeConfigManagerMock) MinimockUpdateModuleConfigDone added in v1.68.0

func (m *KubeConfigManagerMock) MinimockUpdateModuleConfigDone() bool

MinimockUpdateModuleConfigDone returns true if the count of the UpdateModuleConfig invocations corresponds the number of defined expectations

func (*KubeConfigManagerMock) MinimockUpdateModuleConfigInspect added in v1.68.0

func (m *KubeConfigManagerMock) MinimockUpdateModuleConfigInspect()

MinimockUpdateModuleConfigInspect logs each unmet expectation

func (*KubeConfigManagerMock) MinimockWait added in v1.68.0

func (m *KubeConfigManagerMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*KubeConfigManagerMock) SafeReadConfig added in v1.68.0

func (mmSafeReadConfig *KubeConfigManagerMock) SafeReadConfig(handler func(config *config.KubeConfig))

SafeReadConfig implements mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) SafeReadConfigAfterCounter added in v1.68.0

func (mmSafeReadConfig *KubeConfigManagerMock) SafeReadConfigAfterCounter() uint64

SafeReadConfigAfterCounter returns a count of finished KubeConfigManagerMock.SafeReadConfig invocations

func (*KubeConfigManagerMock) SafeReadConfigBeforeCounter added in v1.68.0

func (mmSafeReadConfig *KubeConfigManagerMock) SafeReadConfigBeforeCounter() uint64

SafeReadConfigBeforeCounter returns a count of KubeConfigManagerMock.SafeReadConfig invocations

func (*KubeConfigManagerMock) SaveConfigValues added in v1.68.0

func (mmSaveConfigValues *KubeConfigManagerMock) SaveConfigValues(key string, values utils.Values) (err error)

SaveConfigValues implements mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) SaveConfigValuesAfterCounter added in v1.68.0

func (mmSaveConfigValues *KubeConfigManagerMock) SaveConfigValuesAfterCounter() uint64

SaveConfigValuesAfterCounter returns a count of finished KubeConfigManagerMock.SaveConfigValues invocations

func (*KubeConfigManagerMock) SaveConfigValuesBeforeCounter added in v1.68.0

func (mmSaveConfigValues *KubeConfigManagerMock) SaveConfigValuesBeforeCounter() uint64

SaveConfigValuesBeforeCounter returns a count of KubeConfigManagerMock.SaveConfigValues invocations

func (*KubeConfigManagerMock) UpdateModuleConfig added in v1.68.0

func (mmUpdateModuleConfig *KubeConfigManagerMock) UpdateModuleConfig(moduleName string) (err error)

UpdateModuleConfig implements mm_module_manager.KubeConfigManager

func (*KubeConfigManagerMock) UpdateModuleConfigAfterCounter added in v1.68.0

func (mmUpdateModuleConfig *KubeConfigManagerMock) UpdateModuleConfigAfterCounter() uint64

UpdateModuleConfigAfterCounter returns a count of finished KubeConfigManagerMock.UpdateModuleConfig invocations

func (*KubeConfigManagerMock) UpdateModuleConfigBeforeCounter added in v1.68.0

func (mmUpdateModuleConfig *KubeConfigManagerMock) UpdateModuleConfigBeforeCounter() uint64

UpdateModuleConfigBeforeCounter returns a count of KubeConfigManagerMock.UpdateModuleConfig invocations

type KubeConfigManagerMockIsModuleEnabledExpectation added in v1.68.0

type KubeConfigManagerMockIsModuleEnabledExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KubeConfigManagerMockIsModuleEnabledExpectation specifies expectation struct of the KubeConfigManager.IsModuleEnabled

func (*KubeConfigManagerMockIsModuleEnabledExpectation) Then added in v1.68.0

Then sets up KubeConfigManager.IsModuleEnabled return parameters for the expectation previously defined by the When method

type KubeConfigManagerMockIsModuleEnabledExpectationOrigins added in v1.68.0

type KubeConfigManagerMockIsModuleEnabledExpectationOrigins struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockIsModuleEnabledOrigins contains origins of expectations of the KubeConfigManager.IsModuleEnabled

type KubeConfigManagerMockIsModuleEnabledParamPtrs added in v1.68.0

type KubeConfigManagerMockIsModuleEnabledParamPtrs struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockIsModuleEnabledParamPtrs contains pointers to parameters of the KubeConfigManager.IsModuleEnabled

type KubeConfigManagerMockIsModuleEnabledParams added in v1.68.0

type KubeConfigManagerMockIsModuleEnabledParams struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockIsModuleEnabledParams contains parameters of the KubeConfigManager.IsModuleEnabled

type KubeConfigManagerMockIsModuleEnabledResults added in v1.68.0

type KubeConfigManagerMockIsModuleEnabledResults struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockIsModuleEnabledResults contains results of the KubeConfigManager.IsModuleEnabled

type KubeConfigManagerMockKubeConfigEventChExpectation added in v1.68.0

type KubeConfigManagerMockKubeConfigEventChExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KubeConfigManagerMockKubeConfigEventChExpectation specifies expectation struct of the KubeConfigManager.KubeConfigEventCh

type KubeConfigManagerMockKubeConfigEventChResults added in v1.68.0

type KubeConfigManagerMockKubeConfigEventChResults struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockKubeConfigEventChResults contains results of the KubeConfigManager.KubeConfigEventCh

type KubeConfigManagerMockSafeReadConfigExpectation added in v1.68.0

type KubeConfigManagerMockSafeReadConfigExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KubeConfigManagerMockSafeReadConfigExpectation specifies expectation struct of the KubeConfigManager.SafeReadConfig

func (*KubeConfigManagerMockSafeReadConfigExpectation) Then added in v1.68.0

Then sets up KubeConfigManager.SafeReadConfig return parameters for the expectation previously defined by the When method

type KubeConfigManagerMockSafeReadConfigExpectationOrigins added in v1.68.0

type KubeConfigManagerMockSafeReadConfigExpectationOrigins struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSafeReadConfigOrigins contains origins of expectations of the KubeConfigManager.SafeReadConfig

type KubeConfigManagerMockSafeReadConfigParamPtrs added in v1.68.0

type KubeConfigManagerMockSafeReadConfigParamPtrs struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSafeReadConfigParamPtrs contains pointers to parameters of the KubeConfigManager.SafeReadConfig

type KubeConfigManagerMockSafeReadConfigParams added in v1.68.0

type KubeConfigManagerMockSafeReadConfigParams struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSafeReadConfigParams contains parameters of the KubeConfigManager.SafeReadConfig

type KubeConfigManagerMockSaveConfigValuesExpectation added in v1.68.0

type KubeConfigManagerMockSaveConfigValuesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KubeConfigManagerMockSaveConfigValuesExpectation specifies expectation struct of the KubeConfigManager.SaveConfigValues

func (*KubeConfigManagerMockSaveConfigValuesExpectation) Then added in v1.68.0

Then sets up KubeConfigManager.SaveConfigValues return parameters for the expectation previously defined by the When method

type KubeConfigManagerMockSaveConfigValuesExpectationOrigins added in v1.68.0

type KubeConfigManagerMockSaveConfigValuesExpectationOrigins struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSaveConfigValuesOrigins contains origins of expectations of the KubeConfigManager.SaveConfigValues

type KubeConfigManagerMockSaveConfigValuesParamPtrs added in v1.68.0

type KubeConfigManagerMockSaveConfigValuesParamPtrs struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSaveConfigValuesParamPtrs contains pointers to parameters of the KubeConfigManager.SaveConfigValues

type KubeConfigManagerMockSaveConfigValuesParams added in v1.68.0

type KubeConfigManagerMockSaveConfigValuesParams struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSaveConfigValuesParams contains parameters of the KubeConfigManager.SaveConfigValues

type KubeConfigManagerMockSaveConfigValuesResults added in v1.68.0

type KubeConfigManagerMockSaveConfigValuesResults struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockSaveConfigValuesResults contains results of the KubeConfigManager.SaveConfigValues

type KubeConfigManagerMockUpdateModuleConfigExpectation added in v1.68.0

type KubeConfigManagerMockUpdateModuleConfigExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KubeConfigManagerMockUpdateModuleConfigExpectation specifies expectation struct of the KubeConfigManager.UpdateModuleConfig

func (*KubeConfigManagerMockUpdateModuleConfigExpectation) Then added in v1.68.0

Then sets up KubeConfigManager.UpdateModuleConfig return parameters for the expectation previously defined by the When method

type KubeConfigManagerMockUpdateModuleConfigExpectationOrigins added in v1.68.0

type KubeConfigManagerMockUpdateModuleConfigExpectationOrigins struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockUpdateModuleConfigOrigins contains origins of expectations of the KubeConfigManager.UpdateModuleConfig

type KubeConfigManagerMockUpdateModuleConfigParamPtrs added in v1.68.0

type KubeConfigManagerMockUpdateModuleConfigParamPtrs struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockUpdateModuleConfigParamPtrs contains pointers to parameters of the KubeConfigManager.UpdateModuleConfig

type KubeConfigManagerMockUpdateModuleConfigParams added in v1.68.0

type KubeConfigManagerMockUpdateModuleConfigParams struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockUpdateModuleConfigParams contains parameters of the KubeConfigManager.UpdateModuleConfig

type KubeConfigManagerMockUpdateModuleConfigResults added in v1.68.0

type KubeConfigManagerMockUpdateModuleConfigResults struct {
	// contains filtered or unexported fields
}

KubeConfigManagerMockUpdateModuleConfigResults contains results of the KubeConfigManager.UpdateModuleConfig

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL