Documentation ¶
Index ¶
- Constants
- func DeviceCertificateFromContext(ctx context.Context) (*x509.Certificate, error)
- func MakeAcknowledgeEndpoint(svc Service) endpoint.Endpoint
- func MakeCheckinEndpoint(svc Service) endpoint.Endpoint
- func MarshalAcknowledgeEvent(e *AcknowledgeEvent) ([]byte, error)
- func MarshalCheckinEvent(e *CheckinEvent) ([]byte, error)
- func RegisterHTTPHandlers(r *mux.Router, e Endpoints, logger log.Logger)
- func UnmarshalAcknowledgeEvent(data []byte, e *AcknowledgeEvent) error
- func UnmarshalCheckinEvent(data []byte, e *CheckinEvent) error
- type AcknowledgeEvent
- type BootstrapToken
- type BootstrapTokenRetriever
- type CheckinCommand
- type CheckinEvent
- type Endpoints
- type ErrorChainItem
- type MDMService
- type Middleware
- type Queue
- type Response
- type Service
Constants ¶
View Source
const ( ContextKeyDeviceCertificate contextKey = iota ContextKeyDeviceCertificateVerifyError )
View Source
const ( ConnectTopic = "mdm.Connect" AuthenticateTopic = "mdm.Authenticate" TokenUpdateTopic = "mdm.TokenUpdate" CheckoutTopic = "mdm.CheckOut" GetBootstrapTokenTopic = "mdm.GetBootstrapToken" SetBootstrapTokenTopic = "mdm.SetBootstrapToken" )
Variables ¶
This section is empty.
Functions ¶
func DeviceCertificateFromContext ¶
func DeviceCertificateFromContext(ctx context.Context) (*x509.Certificate, error)
func MakeAcknowledgeEndpoint ¶
func MakeCheckinEndpoint ¶
func MarshalAcknowledgeEvent ¶
func MarshalAcknowledgeEvent(e *AcknowledgeEvent) ([]byte, error)
func MarshalCheckinEvent ¶
func MarshalCheckinEvent(e *CheckinEvent) ([]byte, error)
MarshalCheckinEvent serializes an event to a protocol buffer wire format.
func RegisterHTTPHandlers ¶
func UnmarshalAcknowledgeEvent ¶
func UnmarshalAcknowledgeEvent(data []byte, e *AcknowledgeEvent) error
func UnmarshalCheckinEvent ¶
func UnmarshalCheckinEvent(data []byte, e *CheckinEvent) error
UnmarshalCheckinEvent parses a protocol buffer representation of data into the Event.
Types ¶
type AcknowledgeEvent ¶
type BootstrapToken ¶
type BootstrapToken struct {
BootstrapToken []byte
}
BootstrapToken holds MDM Bootstrap Token data
type BootstrapTokenRetriever ¶
type BootstrapTokenRetriever interface { // GetBootstrapToken returns the Bootstrap Token for the device by udid GetBootstrapToken(ctx context.Context, udid string) ([]byte, error) }
BootBootstrapTokenRetriever retrieves BootStrap Tokens for devices
type CheckinCommand ¶
type CheckinCommand struct { // MessageType can be either // Authenticate, CheckOut, TokenUpdate, // GetBootstrapToken, or SetBootstrapToken MessageType string Topic string UDID string EnrollmentID string // contains filtered or unexported fields }
CheckinRequest represents an MDM checkin command struct.
type CheckinEvent ¶
type Endpoints ¶
func MakeServerEndpoints ¶
type ErrorChainItem ¶
type MDMService ¶
type MDMService struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(pub pubsub.Publisher, queue Queue, dev BootstrapTokenRetriever) *MDMService
func (*MDMService) Acknowledge ¶
func (svc *MDMService) Acknowledge(ctx context.Context, req AcknowledgeEvent) (payload []byte, err error)
func (*MDMService) Checkin ¶
func (svc *MDMService) Checkin(ctx context.Context, event CheckinEvent) ([]byte, error)
type Middleware ¶
type Queue ¶
type Queue interface { Next(context.Context, Response) ([]byte, error) Clear(context.Context, CheckinEvent) error }
Queue is an MDM Command Queue.
type Response ¶
type Response struct { RequestType string `json:"request_type,omitempty" plist:",omitempty"` UDID string UserID *string `json:"user_id,omitempty" plist:"UserID,omitempty"` EnrollmentID *string `json:"enrollment_id,omitempty" plist:"EnrollmentID,omitempty"` Status string CommandUUID string ErrorChain []ErrorChainItem `json:"error_chain" plist:",omitempty"` }
type Service ¶
type Service interface { // Checkin is called for all checkin messages (such as Authenticate // and TokenUpdate). Checkin messages return a response to the // client in payload. Checkin(ctx context.Context, event CheckinEvent) (payload []byte, err error) // Acknowledge is called when a client reports a command result and // fetches the next command. Acknowledge calls return a command in // payload. Acknowledge(ctx context.Context, event AcknowledgeEvent) (payload []byte, err error) }
Service describes the core MDM protocol interactions with clients.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
package appmanifest provides utilities for managing app manifest files used by MDM InstallApplication commands.
|
package appmanifest provides utilities for managing app manifest files used by MDM InstallApplication commands. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.