Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LdapGroupValidateRule ¶
type LdapGroupValidateRule struct { }
LdapGroupValidateRule validate the ldap group configuration
func (LdapGroupValidateRule) Validate ¶
func (l LdapGroupValidateRule) Validate(ctx context.Context, cfgMgr config.Manager, cfgs map[string]interface{}) error
Validate validate the ldap group config settings, cfgs is the config items need to be updated, the final config should be merged with the cfgMgr
type Rule ¶
type Rule interface { // Validate validates a specific group of configuration items, cfgs contains the config need to be updated, the final config should merged with the cfgMgr Validate(ctx context.Context, cfgMgr config.Manager, cfgs map[string]interface{}) error }
Rule rules to validate the configure input Steps to add validation rule for configure parameter 1. Create/find the model need to validate, add validate tag in the field. 2. Implement the Rule interface like LdapGroupValidateRule 3. Add the rule to validateRules in pkg/config/manager.go
Click to show internal directories.
Click to hide internal directories.