notifier

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Code generated by "admgencmd"; DO NOT EDIT. Source: declarativemanagement.yaml Options: no-shared=true,no-depend=true,no-responses=true

Package notifier notifies enrollments of changed declarations.

Index

Constants

View Source
const DeclarativeManagementRequestType = "DeclarativeManagement"

Variables

This section is empty.

Functions

func MakeCommand added in v0.4.0

func MakeCommand(uuid string, tokensJSON []byte) ([]byte, error)

MakeCommand returns a raw MDM command in plist form using uuid and optionally tokensJSON.

Types

type DeclarativeManagementCommand added in v0.2.0

type DeclarativeManagementCommand struct {
	Command     DeclarativeManagementPayload
	CommandUUID string
}

DeclarativeManagementCommand is the top-level structure for the "DeclarativeManagement" Apple MDM command.

func NewDeclarativeManagementCommand added in v0.2.0

func NewDeclarativeManagementCommand(uuid string) *DeclarativeManagementCommand

NewDeclarativeManagementCommand creates a new "DeclarativeManagement" Apple MDM command.

type DeclarativeManagementPayload added in v0.2.0

type DeclarativeManagementPayload struct {
	Data                         *[]byte `plist:",omitempty"`
	RequestType                  string  // supported value: DeclarativeManagement
	RequestRequiresNetworkTether *bool   `plist:",omitempty"`
}

DeclarativeManagementPayload is the "inner" command-specific payload for the "DeclarativeManagement" Apple MDM command.

type Enqueuer added in v0.4.0

type Enqueuer interface {
	// EnqueueDMCommand enqueues a DeclarativeManagement command to ids optionally using tokensJSON.
	EnqueueDMCommand(ctx context.Context, ids []string, tokensJSON []byte) error
}

type EnrollmentIDFinder

type EnrollmentIDFinder interface {
	storage.TokensJSONRetriever
	storage.EnrollmentIDRetriever
}

EnrollmentIDFinder is the interface we use to fetch enrollment IDs.

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier enqueues DM commands to enrollments based on changes.

func New

func New(enqueuer Enqueuer, store EnrollmentIDFinder, opts ...Option) (*Notifier, error)

func (*Notifier) Changed added in v0.4.0

func (n *Notifier) Changed(ctx context.Context, declarations []string, sets []string, idsIn []string) error

Change notifies (enqueues the DM command to) enrollments for which the changes apply to.

type Option added in v0.2.0

type Option func(n *Notifier)

func WithLogger added in v0.2.0

func WithLogger(logger log.Logger) Option

Directories

Path Synopsis
Package foss implements communication with with Free/Open Source MDM servers.
Package foss implements communication with with Free/Open Source MDM servers.

Jump to

Keyboard shortcuts

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