Documentation
¶
Index ¶
- func SettingsCatalogValidator() validator.String
- func SingleIncludeExcludeAssignment() validator.List
- func ValidateDeviceConfiguationAssignmentSettings(config *sharedmodels.SettingsCatalogSettingsAssignmentResourceModel) error
- type SingleIncludeExcludeAssignmentValidator
- func (v SingleIncludeExcludeAssignmentValidator) Description(ctx context.Context) string
- func (v SingleIncludeExcludeAssignmentValidator) MarkdownDescription(ctx context.Context) string
- func (v SingleIncludeExcludeAssignmentValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SettingsCatalogValidator ¶
SettingsCatalogValidator returns a validator which ensures settings catalog json is valid
func SingleIncludeExcludeAssignment ¶
Factory function
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 ¶
type SingleIncludeExcludeAssignmentValidator ¶
type SingleIncludeExcludeAssignmentValidator struct{}
SingleIncludeExcludeAssignmentValidator ensures only one include and one exclude assignment block exist
func (SingleIncludeExcludeAssignmentValidator) Description ¶
func (v SingleIncludeExcludeAssignmentValidator) Description(ctx context.Context) string
Description of the validator
func (SingleIncludeExcludeAssignmentValidator) MarkdownDescription ¶
func (v SingleIncludeExcludeAssignmentValidator) MarkdownDescription(ctx context.Context) string
MarkdownDescription of the validator
func (SingleIncludeExcludeAssignmentValidator) ValidateList ¶
func (v SingleIncludeExcludeAssignmentValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse)
ValidateList performs the actual validation