mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
#23905
- Update with upstream nanomdm changes up to
825f2979a2
- Removed PostgeSQL folder from our nanomdm
- Added nanomdm MySQL test job to our CI
# Checklist for submitter
- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
33 lines
885 B
Go
33 lines
885 B
Go
// Package push defines interfaces, types, etc. related to MDM APNs
|
|
// push notifications.
|
|
package push
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/mdm/nanomdm/mdm"
|
|
)
|
|
|
|
type Response struct {
|
|
Id string
|
|
Err error
|
|
}
|
|
|
|
// Pusher sends MDM APNs notifications to enrollments identified by a string.
|
|
type Pusher interface {
|
|
Push(context.Context, []string) (map[string]*Response, error)
|
|
}
|
|
|
|
// PushProvider can send 'raw' MDM APNs push notifications.
|
|
//
|
|
// The non-error return type maps the string value of the push token
|
|
// (that is, the hex encoding of the bytes) to a pointer to a Response.
|
|
type PushProvider interface {
|
|
Push(context.Context, []*mdm.Push) (map[string]*Response, error)
|
|
}
|
|
|
|
// PushProviderFactory generates a new PushProvider given a tls keypair
|
|
type PushProviderFactory interface {
|
|
NewPushProvider(*tls.Certificate) (PushProvider, error)
|
|
}
|