exchange

package
v0.0.0-...-1b842a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

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

View Source
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

func FormatAttendees(event models.Eventable, isHTML bool) string

FormatAttendees returns string representation of an attendee Return Format: - Name <[email protected]>, 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL