Documentation
¶
Overview ¶
Package ddm contains HTTP handlers for the Apple DDM protocol.
Index ¶
- Constants
- Variables
- func DeclarationHandler(store storage.DeclarationRetriever, hLogger log.Logger) http.HandlerFunc
- func ErrorAndLog(w http.ResponseWriter, status int, logger log.Logger, msg string, err error)
- func StatusReportHandler(store storage.StatusStorer, hLogger log.Logger) http.HandlerFunc
- func TokensOrDeclarationItemsHandler(store storage.TokensDeclarationItemsRetriever, tokens bool, hLogger log.Logger) http.HandlerFunc
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 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.
Click to show internal directories.
Click to hide internal directories.