Documentation ¶
Index ¶
- func JSONSchemaValidator() validator.String
- func RegexMatches(regexp *regexp.Regexp, message string) validator.String
- func StringListAllowedValues(values ...string) validator.List
- func ValidateDeviceConfiguationAssignmentSettings(config *sharedmodels.SettingsCatalogSettingsAssignmentResourceModel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONSchemaValidator ¶
JSONSchemaValidator returns a validator which ensures that a string attribute is a valid JSON and doesn't exceed the maximum allowed nesting depth
func RegexMatches ¶
RegexMatches returns a validator.String that ensures any configured value matches the provided regular expression pattern. Null and unknown values are skipped. An optional message can be provided to customize the error output.
func StringListAllowedValues ¶
StringListAllowedValues returns a validator that ensures each string in a list matches one of the allowed values.
func ValidateDeviceConfiguationAssignmentSettings ¶
func ValidateDeviceConfiguationAssignmentSettings(config *sharedmodels.SettingsCatalogSettingsAssignmentResourceModel) error
ValidateDeviceConfiguationAssignmentSettings validates the assignment configuration - if all_devices is false, device filter settings should not be set - if all_users is false, user filter settings should not be set - if all_devices is true and all_devices_filter_id is nil, then all_devices_filter_type must set to "none" - if all_users is true and all_users_filter_id is nil, then all_users_filter_type must set to "none" - if all_devices is true and all_devices_filter_id is set, then all_devices_filter_type must be either "include" or "exclude" - if all_users is true and all_users_filter_id is set, then all_users_filter_type must be either "include" or "exclude" - if group_id is provided in include_groups, include_groups_filter_type must be set - if group_id is provided in include_groups and include_groups_filter_id is nil, then include_groups_filter_type must be "none" - if group_id is provided in include_groups and include_groups_filter_id is set, then include_groups_filter_type must be either "include" or "exclude" - AllDevicesFilterType must be one of: include, exclude, none - AllUsersFilterType must be one of: include, exclude, none - IncludeGroupsFilterType must be one of: include, exclude, none - ExcludeGroupIds must be in alphanumeric order by group_id - IncludeGroups must be in alphanumeric order by group_id - No group is used more than once across include and exclude assignments - AllDevices and IncludeGroups cannot be used at the same time - AllUsers and IncludeGroups cannot be used at the same time
Types ¶
This section is empty.