Back to godoc.org
github.com/micromdm/micromdm/workflow/webhook

package webhook

v1.7.1
Latest Go to latest
Published: Jun 21, 2020 | License: MIT | Module: github.com/micromdm/micromdm

Index

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"`
}

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 Option

type Option func(*Worker)

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithLogger

func WithLogger(logger log.Logger) Option

type Worker

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

func New

func New(url string, sub pubsub.Subscriber, opts ...Option) *Worker

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) error
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier