utils

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePayloads added in v1.6.6

func ComparePayloads(payloads1, payloads2 []map[string]interface{}) bool

ComparePayloads compares two sets of payload-specific fields and returns true if they are equal

func FilterPayloadSpecificFields added in v1.6.6

func FilterPayloadSpecificFields(profile *ConfigurationProfile) []map[string]interface{}

FilterPayloadSpecificFields extracts and returns only the payload-specific fields from the profile

Types

type ConfigurationProfile

type ConfigurationProfile struct {
	PayloadContent     []PayloadContentListItem
	PayloadDisplayName string
	PayloadIdentifier  string
	PayloadType        string
	PayloadUuid        string
	PayloadVersion     int
	UnexpectedValues   map[string]interface{} `mapstructure:",remain"`
}

Struct to mirror MacOS .plist configuration profile data with bucket for unexpected values

func ConfigurationFilePlistToStructFromFile

func ConfigurationFilePlistToStructFromFile(filepath string) (*ConfigurationProfile, error)

ConfigurationFilePlistToStructFromFile takes filepath of MacOS Configuration Profile .plist file and returns &ConfigurationProfile

func ConfigurationProfilePlistToStructFromString

func ConfigurationProfilePlistToStructFromString(plistData string) (*ConfigurationProfile, error)

ConfigurationProfilePlistToStructFromString takes xml of MacOS Configuration Profile .plist file and returns &ConfigurationProfile

type PayloadContentListItem

type PayloadContentListItem struct {
	PayloadDisplayName    string
	PayloadIdentifier     string
	PayloadType           string
	PayloadUuid           string
	PayloadVersion        int
	PayloadSpecificValues map[string]interface{} `mapstructure:",remain"`
}

Struct to mirror xml payload item with key for all dynamic values

Jump to

Keyboard shortcuts

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