ddm

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: 10 Imported by: 0

Documentation

Overview

Package ddm contains HTTP handlers for the Apple DDM protocol.

Index

Constants

View Source
const (
	// EnrollmentIDHeader is the enrollment ID HTTP header handed to us.
	EnrollmentIDHeader = "X-Enrollment-ID"
)

Variables

View Source
var ErrEmptyEnrollmentID = errors.New("empty enrollment ID")

Functions

func DeclarationHandler

func DeclarationHandler(store storage.DeclarationRetriever, hLogger log.Logger) http.HandlerFunc

DeclarationHandler creates a handler that fetches and returns a single declaration. The request URL path is assumed to contain the declaration type and identifier. This probably requires the handler to have the path prefix stripped before use.

func ErrorAndLog

func ErrorAndLog(w http.ResponseWriter, status int, logger log.Logger, msg string, err error)

func StatusReportHandler

func StatusReportHandler(store storage.StatusStorer, hLogger log.Logger) http.HandlerFunc

StatusReportHandler creates a handler that stores the DDM status report.

func TokensOrDeclarationItemsHandler added in v0.4.0

func TokensOrDeclarationItemsHandler(store storage.TokensDeclarationItemsRetriever, tokens bool, hLogger log.Logger) http.HandlerFunc

TokensOrDeclarationItemsHandler creates a handler that fetchs and returns either the tokens or declaration items JSON for an erollment ID depending on tokens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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