Versions in this module Expand all Collapse all v1 v1.3.1 Jul 11, 2018 v1.3.0 Jun 10, 2018 Changes in this version + const AuthenticateTopic + const CheckoutTopic + const ConnectTopic + const TokenUpdateTopic + 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, verifier SignatureVerifier, logger log.Logger) + func UnmarshalAcknowledgeEvent(data []byte, e *AcknowledgeEvent) error + func UnmarshalCheckinEvent(data []byte, e *CheckinEvent) error + type AcknowledgeEvent struct + ID string + Params map[string]string + Raw []byte + Response Response + Time time.Time + type CheckinCommand struct + MessageType string + Topic string + UDID string + type CheckinEvent struct + Command CheckinCommand + ID string + Params map[string]string + Raw []byte + Time time.Time + type Endpoints struct + AcknowledgeEndpoint endpoint.Endpoint + CheckinEndpoint endpoint.Endpoint + func MakeServerEndpoints(s Service) Endpoints + type ErrorChainItem struct + ErrorCode int + ErrorDomain string + LocalizedDescription string + USEnglishDescription string + type MDMService struct + func NewService(pub pubsub.Publisher, queue Queue) *MDMService + func (svc *MDMService) Acknowledge(ctx context.Context, req AcknowledgeEvent) (payload []byte, err error) + func (svc *MDMService) Checkin(ctx context.Context, event CheckinEvent) error + type Middleware func(Service) Service + type Queue interface + Next func(context.Context, Response) ([]byte, error) + type Response struct + CommandUUID string + ErrorChain []ErrorChainItem + RequestType string + Status string + UDID string + UserID *string + type Service interface + Acknowledge func(ctx context.Context, event AcknowledgeEvent) (payload []byte, err error) + Checkin func(ctx context.Context, event CheckinEvent) error + type SignatureVerifier interface + VerifySignature func(sig string, message []byte) error