Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetListFromSet ¶
GetListFromSet is a helper function to safely extract a list of interfaces from a *schema.Set stored within a map[string]interface{}. It returns an empty slice if the key is not found or the value is not a *schema.Set.
func MapSetToStructs ¶
func MapSetToStructs[NestedObjectType any, ListItemPrimitiveType comparable](path string, fieldName string, d *schema.ResourceData, outputSlice *[]NestedObjectType) error
MapSetToStructs transforms a schema.Set of primitive values (typically IDs) into a slice of structs by mapping each value to a specified field in a new struct instance.
Type parameters: - NestedObjectType: The target struct type (e.g., PolicySubsetNetworkSegment) - ListItemPrimitiveType: The primitive value type in the set (e.g., int, string)
The function relies on Terraform's schema validation to ensure values are of the correct type. This is typically used to transform schema.Set elements like IDs to API struct objects.
func ParseResourceID ¶
ParseResourceID ensures a value can be safely used as an ID in Jamf Pro resources. Handles int, float64, and string inputs with appropriate logging for conversion issues. Returns the validated integer ID and a success boolean.
Types ¶
This section is empty.