microwebhook

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package microwebhook provides a MicroMDM-emulating webhook

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgeEvent

type AcknowledgeEvent struct {
	UDID         string            `json:"udid,omitempty"`
	EnrollmentID string            `json:"enrollment_id,omitempty"`
	Status       string            `json:"status"`
	CommandUUID  string            `json:"command_uuid,omitempty"`
	Params       map[string]string `json:"url_params,omitempty"`
	RawPayload   []byte            `json:"raw_payload"`
}

type CheckinEvent

type CheckinEvent struct {
	UDID         string            `json:"udid,omitempty"`
	EnrollmentID string            `json:"enrollment_id,omitempty"`
	Params       map[string]string `json:"url_params"`
	RawPayload   []byte            `json:"raw_payload"`

	// signals which tokenupdate this is to be able to tell whether this
	// is the initial enrollment vs. a following tokenupdate
	TokenUpdateTally *int `json:"token_update_tally,omitempty"`
}

type Event

type Event struct {
	Topic     string    `json:"topic"`
	EventID   string    `json:"event_id"`
	CreatedAt time.Time `json:"created_at"`

	AcknowledgeEvent *AcknowledgeEvent `json:"acknowledge_event,omitempty"`
	CheckinEvent     *CheckinEvent     `json:"checkin_event,omitempty"`
}

type MicroWebhook

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

func New

func (*MicroWebhook) Authenticate

func (w *MicroWebhook) Authenticate(r *mdm.Request, m *mdm.Authenticate) error

func (*MicroWebhook) CheckOut

func (w *MicroWebhook) CheckOut(r *mdm.Request, m *mdm.CheckOut) error

func (*MicroWebhook) CommandAndReportResults

func (w *MicroWebhook) CommandAndReportResults(r *mdm.Request, results *mdm.CommandResults) (*mdm.Command, error)

func (*MicroWebhook) DeclarativeManagement added in v0.3.0

func (w *MicroWebhook) DeclarativeManagement(r *mdm.Request, m *mdm.DeclarativeManagement) ([]byte, error)

func (*MicroWebhook) GetBootstrapToken

func (w *MicroWebhook) GetBootstrapToken(r *mdm.Request, m *mdm.GetBootstrapToken) (*mdm.BootstrapToken, error)

func (*MicroWebhook) SetBootstrapToken

func (w *MicroWebhook) SetBootstrapToken(r *mdm.Request, m *mdm.SetBootstrapToken) error

func (*MicroWebhook) TokenUpdate

func (w *MicroWebhook) TokenUpdate(r *mdm.Request, m *mdm.TokenUpdate) error

func (*MicroWebhook) UserAuthenticate

func (w *MicroWebhook) UserAuthenticate(r *mdm.Request, m *mdm.UserAuthenticate) ([]byte, error)

Jump to

Keyboard shortcuts

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