api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PushHandler

func PushHandler(pusher push.Pusher, logger log.Logger) http.HandlerFunc

PushHandler sends APNs push notifications to MDM enrollments.

Note the whole URL path is used as the identifier to push to. This probably necessitates stripping the URL prefix before using. Also note we expose Go errors to the output as this is meant for "API" users.

func RawCommandEnqueueHandler

func RawCommandEnqueueHandler(enqueuer storage.CommandEnqueuer, pusher push.Pusher, logger log.Logger) http.HandlerFunc

RawCommandEnqueueHandler enqueues a raw MDM command plist and sends push notifications to MDM enrollments.

Note the whole URL path is used as the identifier to enqueue (and push to. This probably necessitates stripping the URL prefix before using. Also note we expose Go errors to the output as this is meant for "API" users.

func StorePushCertHandler

func StorePushCertHandler(storage storage.PushCertStore, logger log.Logger) http.HandlerFunc

StorePushCertHandler reads a PEM-encoded certificate and private key from the HTTP body and saves it to storage. This effectively enables us to do something like: "% cat push.pem push.key | curl -T - http://api.example.com/" to upload our push certs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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