Documentation
¶
Overview ¶
Package exchange provides support for retrieving M365 Exchange objects from M365 servers using the Graph API. M365 object support centers on the applications: Mail, Contacts, and Calendar.
Index ¶
- Constants
- func BackupHandlers(ac api.Client) map[path.CategoryType]backupHandler
- func CloneMessageableFields(orig, message models.Messageable) models.Messageable
- func CreateCollections(ctx context.Context, bpc inject.BackupProducerConfig, ...) ([]data.BackupCollection, error)
- func CreateDestination(ctx context.Context, ca containerAPI, destination *path.Builder, ...) (string, graph.ContainerResolver, error)
- func DeserializeMetadataFiles(ctx context.Context, colls []data.RestoreCollection) ([]store.MetadataFile, error)
- func FormatAttendees(event models.Eventable, isHTML bool) string
- func NewCollection(bc data.BaseCollection, user string, items itemGetterSerializer, ...) data.BackupCollection
- func NewExportCollection(baseDir string, backingCollection []data.RestoreCollection, backupVersion int, ...) export.Collectioner
- func ParseMetadataCollections(ctx context.Context, colls []data.RestoreCollection) (metadata.CatDeltaPaths, bool, error)
- func RestoreCollection(ctx context.Context, ir itemRestorer, dc data.RestoreCollection, ...) (support.CollectionMetrics, error)
- func RestoreHandlers(ac api.Client) map[path.CategoryType]restoreHandler
Constants ¶
const ( // MailRestorePropertyTag inhibits exchange.Mail.Message from being "resent" through the server. // DEFINED: Section 2.791 PidTagMessageFlags MailRestorePropertyTag = "Integer 0x0E07" // RestoreCanonicalEnableValue marks message as sent via RopSubmitMessage // Defined: https://interoperability.blob.core.windows.net/files/MS-OXCMSG/%5bMS-OXCMSG%5d.pdf // Section: 2.2.1.6 PidTagMessageFlags Property //nolint:lll // Additional Information: https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagmessageflags-canonical-property RestoreCanonicalEnableValue = "4" // MailSendTimeOverrideProperty allows for send time to be updated. // Section: 2.635 PidTagClientSubmitTime MailSendDateTimeOverrideProperty = "SystemTime 0x0039" // MailReceiveDateTimeOverrideProperty allows receive date time to be updated. // Section: 2.789 PidTagMessageDeliveryTime MailReceiveDateTimeOverriveProperty = "SystemTime 0x0E06" )
Legacy Value Tags and constants are used to override certain values within M365 objects. Master Property Value Document:
https://interoperability.blob.core.windows.net/files/MS-OXPROPS/%5bMS-OXPROPS%5d.pdf
Variables ¶
This section is empty.
Functions ¶
func BackupHandlers ¶
func BackupHandlers(ac api.Client) map[path.CategoryType]backupHandler
func CloneMessageableFields ¶
func CloneMessageableFields(orig, message models.Messageable) models.Messageable
CloneMessageableFields places data from original data into new message object. SingleLegacyValueProperty is not populated during this operation
func CreateCollections ¶
func CreateCollections( ctx context.Context, bpc inject.BackupProducerConfig, handlers map[path.CategoryType]backupHandler, tenantID string, scope selectors.ExchangeScope, dps metadata.DeltaPaths, su support.StatusUpdater, counter *count.Bus, errs *fault.Bus, ) ([]data.BackupCollection, error)
func CreateDestination ¶
func CreateDestination( ctx context.Context, ca containerAPI, destination *path.Builder, resourceID string, gcr graph.ContainerResolver, errs *fault.Bus, ) (string, graph.ContainerResolver, error)
CreateDestination creates folders in sequence [root leaf1 leaf2] similar to a linked list. @param directory is the desired path from the root to the container that the items will be restored into.
func DeserializeMetadataFiles ¶
func DeserializeMetadataFiles( ctx context.Context, colls []data.RestoreCollection, ) ([]store.MetadataFile, error)
func FormatAttendees ¶
FormatAttendees returns string representation of an attendee Return Format: - Name <email@example.com>, Accepted | Declined | Tentative | No Response
func NewCollection ¶
func NewCollection( bc data.BaseCollection, user string, items itemGetterSerializer, canSkipFailChecker canSkipItemFailurer, origAdded map[string]time.Time, origRemoved []string, validModTimes bool, statusUpdater support.StatusUpdater, counter *count.Bus, ) data.BackupCollection
NewExchangeDataCollection creates an ExchangeDataCollection. State of the collection is set as an observation of the current and previous paths. If the curr path is nil, the state is assumed to be deleted. If the prev path is nil, it is assumed newly created. If both are populated, then state is either moved (if they differ), or notMoved (if they match).
func NewExportCollection ¶
func NewExportCollection( baseDir string, backingCollection []data.RestoreCollection, backupVersion int, stats *metrics.ExportStats, ) export.Collectioner
func ParseMetadataCollections ¶
func ParseMetadataCollections( ctx context.Context, colls []data.RestoreCollection, ) (metadata.CatDeltaPaths, bool, error)
ParseMetadataCollections produces a map of structs holding delta and path lookup maps.
func RestoreCollection ¶
func RestoreCollection( ctx context.Context, ir itemRestorer, dc data.RestoreCollection, resourceID, destinationID string, collisionKeyToItemID map[string]string, collisionPolicy control.CollisionPolicy, deets *details.Builder, errs *fault.Bus, ctr *count.Bus, ) (support.CollectionMetrics, error)
RestoreCollection handles restoration of an individual collection.
func RestoreHandlers ¶
func RestoreHandlers( ac api.Client, ) map[path.CategoryType]restoreHandler
primary interface controller for all per-cateogry restoration behavior.
Types ¶
This section is empty.
Source Files
¶
- attachment.go
- attendees.go
- backup.go
- cache_container.go
- collection.go
- consts.go
- contacts_backup.go
- contacts_container_cache.go
- contacts_restore.go
- container_resolver.go
- debug.go
- events_backup.go
- events_container_cache.go
- events_instance_restore.go
- events_restore.go
- export.go
- handlers.go
- mail_backup.go
- mail_container_cache.go
- mail_restore.go
- metadata.go
- restore.go
- transform.go