Documentation
¶
Index ¶
- Constants
- Variables
- func BytesToContactable(bytes []byte) (models.Contactable, error)
- func BytesToEventable(body []byte) (models.Eventable, error)
- func BytesToListable(bytes []byte) (models.Listable, error)
- func BytesToMessageable(body []byte) (models.Messageable, error)
- func BytesToPostable(body []byte) (models.Postable, error)
- func CloneListItem(orig models.ListItemable, columnNames map[string]*columnDetails) models.ListItemable
- func ContactCollisionKey(item models.Contactable) string
- func ContactInfo(contact models.Contactable) *details.ExchangeInfo
- func CreateFromBytes(bytes []byte, createFunc serialization.ParsableFactory) (serialization.Parsable, error)
- func DefaultDriveItemProps() []string
- func DriveItemCollisionKey(item models.DriveItemable) string
- func EvaluateMailboxError(err error) error
- func EventCollisionKey(item models.Eventable) string
- func EventFromMap(ev map[string]any) (models.Eventable, error)
- func EventInfo(evt models.Eventable) *details.ExchangeInfo
- func GetAllDrives(ctx context.Context, pager pagers.NonDeltaHandler[models.Driveable]) ([]models.Driveable, error)
- func GetAttachmentContent(attachment models.Attachmentable) ([]byte, error)
- func GetCancelledEventDateStrings(event models.Eventable) ([]string, error)
- func GetChatMessageAttachmentNames(msg models.ChatMessageable) []string
- func GetChatMessageFrom(msg models.ChatMessageable) string
- func HasAttachments(body models.ItemBodyable) bool
- func InitConcurrencyLimit(ctx context.Context, pst path.ServiceType)
- func IsAnyErrMailboxNotFound(errs []error) bool
- func IsNotSystemMessage(cm models.ChatMessageable) bool
- func IsTeam(ctx context.Context, mg models.Groupable) bool
- func ListCollisionKey(list models.Listable) string
- func ListToSPInfo(lst models.Listable) *details.SharePointInfo
- func MailCollisionKey(item models.Messageable) string
- func MailInfo(msg models.Messageable, size int64) *details.ExchangeInfo
- func NewDriveItem(name string, folder bool) *models.DriveItem
- func NewService(creds account.M365Config, counter *count.Bus, opts ...graph.Option) (*graph.Service, error)
- func OnlyTeams(ctx context.Context, gs []models.Groupable) []models.Groupable
- func SelectProps(ss ...string) []string
- func TeamsChatInfo(chat models.Chatable) *details.TeamsChatsInfo
- func ToListable(orig models.Listable, listName string) (models.Listable, map[string]*columnDetails)
- func URLCacheDriveItemProps() []string
- type Access
- type AutomaticRepliesSettings
- type CalendarDisplayable
- type CallConfig
- type Channels
- func (c Channels) GetChannel(ctx context.Context, teamID, containerID string) (models.Channelable, error)
- func (c Channels) GetChannelByName(ctx context.Context, teamID, containerName string) (models.Channelable, error)
- func (c Channels) GetChannelMessage(ctx context.Context, teamID, channelID, messageID string) (models.ChatMessageable, *details.GroupsInfo, error)
- func (c Channels) GetChannelMessageIDs(ctx context.Context, teamID, channelID, prevDeltaLink string, cc CallConfig) (pagers.AddedAndRemoved, error)
- func (c Channels) GetChannelMessageReplies(ctx context.Context, teamID, channelID, messageID string) ([]models.ChatMessageable, error)
- func (c Channels) GetChannelMessages(ctx context.Context, teamID, channelID string, cc CallConfig) ([]models.ChatMessageable, error)
- func (c Channels) GetChannels(ctx context.Context, teamID string) ([]models.Channelable, error)
- func (c Channels) NewChannelMessageDeltaPager(teamID, channelID, prevDelta string, selectProps ...string) *channelMessageDeltaPageCtrl
- func (c Channels) NewChannelMessagePager(teamID, channelID string, cc CallConfig) *channelMessagePageCtrl
- func (c Channels) NewChannelMessageRepliesPager(teamID, channelID, messageID string, selectProps ...string) *channelMessageRepliesPageCtrl
- func (c Channels) NewChannelPager(teamID string) *channelPageCtrl
- type Chats
- func (c Chats) GetChatByID(ctx context.Context, chatID string, cc CallConfig) (models.Chatable, *details.TeamsChatsInfo, error)
- func (c Chats) GetChatMessageIDs(ctx context.Context, chatID string, cc CallConfig) (pagers.AddedAndRemoved, error)
- func (c Chats) GetChatMessages(ctx context.Context, chatID string, cc CallConfig) ([]models.ChatMessageable, error)
- func (c Chats) GetChats(ctx context.Context, userID string, cc CallConfig) ([]models.Chatable, error)
- func (c Chats) NewChatMessagePager(chatID string, cc CallConfig) *chatMessagePageCtrl
- func (c Chats) NewChatPager(userID string, cc CallConfig) *chatPageCtrl
- type Client
- func (c Client) Access() Access
- func (c Client) Channels() Channels
- func (c Client) Chats() Chats
- func (c Client) Contacts() Contacts
- func (c Client) Conversations() Conversations
- func (c Client) Drives() Drives
- func (c Client) Events() Events
- func (c Client) Get(ctx context.Context, url string, headers map[string]string, requireAuth bool) (*http.Response, error)
- func (c Client) Groups() Groups
- func (c Client) Lists() Lists
- func (c Client) Mail() Mail
- func (c Client) Post(ctx context.Context, url string, headers map[string]string, body io.Reader, ...) (*http.Response, error)
- func (c Client) Service(counter *count.Bus, opts ...graph.Option) (graph.Servicer, error)
- func (c Client) Sites() Sites
- func (c Client) Users() Users
- type Contacts
- func (c Contacts) CreateContainer(ctx context.Context, userID, _, containerName string) (graph.Container, error)
- func (c Contacts) DeleteContainer(ctx context.Context, userID, containerID string) error
- func (c Contacts) DeleteItem(ctx context.Context, userID, itemID string) error
- func (c Contacts) EnumerateContainers(ctx context.Context, userID, baseContainerID string) ([]models.ContactFolderable, error)
- func (c Contacts) GetAddedAndRemovedItemIDs(ctx context.Context, userID, containerID, prevDeltaLink string, ...) (pagers.AddedAndRemoved, error)
- func (c Contacts) GetContainerByID(ctx context.Context, userID, containerID string) (graph.Container, error)
- func (c Contacts) GetContainerByName(ctx context.Context, userID, _, containerName string) (graph.Container, error)
- func (c Contacts) GetItem(ctx context.Context, userID, itemID string, _ *fault.Bus) (serialization.Parsable, *details.ExchangeInfo, error)
- func (c Contacts) GetItemIDsInContainer(ctx context.Context, userID, containerID string) (map[string]struct{}, error)
- func (c Contacts) GetItemsInContainerByCollisionKey(ctx context.Context, userID, containerID string) (map[string]string, error)
- func (c Contacts) NewContactFoldersPager(userID, baseContainerID string, selectProps ...string) pagers.NonDeltaHandler[models.ContactFolderable]
- func (c Contacts) NewContactsDeltaPager(ctx context.Context, userID, containerID, prevDeltaLink string, ...) pagers.DeltaHandler[models.Contactable]
- func (c Contacts) NewContactsPager(userID, containerID string, selectProps ...string) pagers.NonDeltaHandler[models.Contactable]
- func (c Contacts) PatchFolder(ctx context.Context, userID, containerID string, body models.ContactFolderable) error
- func (c Contacts) PostItem(ctx context.Context, userID, containerID string, body models.Contactable) (models.Contactable, error)
- func (c Contacts) Serialize(ctx context.Context, item serialization.Parsable, userID, itemID string) ([]byte, error)
- type Conversations
- func (c Conversations) GetConversationPost(ctx context.Context, groupID, conversationID, threadID, postID string) (models.Postable, *details.GroupsInfo, error)
- func (c Conversations) GetConversationThreadPostIDs(ctx context.Context, groupID, conversationID, threadID string, cc CallConfig) (pagers.AddedAndRemoved, error)
- func (c Conversations) GetConversationThreadPosts(ctx context.Context, groupID, conversationID, threadID string, cc CallConfig) ([]models.Postable, error)
- func (c Conversations) GetConversationThreads(ctx context.Context, groupID, conversationID string, cc CallConfig) ([]models.ConversationThreadable, error)
- func (c Conversations) GetConversations(ctx context.Context, groupID string, cc CallConfig) ([]models.Conversationable, error)
- func (c Conversations) NewConversationThreadPostsPager(groupID, conversationID, threadID string, cc CallConfig) *conversationThreadPostsPageCtrl
- func (c Conversations) NewConversationThreadsPager(groupID, conversationID string, cc CallConfig) *conversationThreadsPageCtrl
- func (c Conversations) NewConversationsPager(groupID string, cc CallConfig) *conversationsPageCtrl
- type DriveItemDeltaPageCtrl
- type DriveItemIDType
- type Drives
- func (c Drives) DeleteItem(ctx context.Context, driveID, itemID string) error
- func (c Drives) DeleteItemPermission(ctx context.Context, driveID, itemID, permissionID string) error
- func (c Drives) EnumerateDriveItemsDelta(ctx context.Context, driveID string, prevDeltaLink string, cc CallConfig) pagers.NextPageResulter[models.DriveItemable]
- func (c Drives) GetFolderByName(ctx context.Context, driveID, parentFolderID, folderName string) (models.DriveItemable, error)
- func (c Drives) GetFolderChildren(ctx context.Context, driveID, folderID string) ([]models.DriveItemable, error)
- func (c Drives) GetItem(ctx context.Context, driveID, itemID string) (models.DriveItemable, error)
- func (c Drives) GetItemIDsInContainer(ctx context.Context, driveID, containerID string) (map[string]DriveItemIDType, error)
- func (c Drives) GetItemPermission(ctx context.Context, driveID, itemID string) (models.PermissionCollectionResponseable, error)
- func (c Drives) GetItemsInContainerByCollisionKey(ctx context.Context, driveID, containerID string) (map[string]DriveItemIDType, error)
- func (c Drives) GetRootFolder(ctx context.Context, driveID string) (models.DriveItemable, error)
- func (c Drives) NewDriveItemPager(driveID, containerID string, selectProps ...string) pagers.NonDeltaHandler[models.DriveItemable]
- func (c Drives) NewItemContentUpload(ctx context.Context, driveID, itemID string) (models.UploadSessionable, error)
- func (c Drives) NewSiteDrivePager(siteID string, fields []string) *siteDrivePager
- func (c Drives) NewUserDrivePager(userID string, fields []string) *userDrivePager
- func (c Drives) PatchItem(ctx context.Context, driveID, itemID string, item models.DriveItemable) error
- func (c Drives) PostItemInContainer(ctx context.Context, driveID, parentFolderID string, ...) (models.DriveItemable, error)
- func (c Drives) PostItemLinkShareUpdate(ctx context.Context, driveID, itemID string, ...) (models.Permissionable, error)
- func (c Drives) PostItemPermissionUpdate(ctx context.Context, driveID, itemID string, ...) (drives.ItemItemsItemInviteResponseable, error)
- func (c Drives) PutItemContent(ctx context.Context, driveID, itemID string, content []byte) error
- type Events
- func (c Events) CreateContainer(ctx context.Context, userID, _, containerName string) (graph.Container, error)
- func (c Events) DeleteAttachment(ctx context.Context, userID, calendarID, eventID, attachmentID string) error
- func (c Events) DeleteContainer(ctx context.Context, userID, containerID string) error
- func (c Events) DeleteItem(ctx context.Context, userID, itemID string) error
- func (c Events) EnumerateContainers(ctx context.Context, userID, _ string) ([]models.Calendarable, error)
- func (c Events) GetAddedAndRemovedItemIDs(ctx context.Context, userID, containerID, prevDeltaLink string, ...) (pagers.AddedAndRemoved, error)
- func (c Events) GetAttachments(ctx context.Context, userID, itemID string) ([]models.Attachmentable, error)
- func (c Events) GetContainerByID(ctx context.Context, userID, containerID string) (graph.Container, error)
- func (c Events) GetContainerByName(ctx context.Context, userID, _, containerName string) (graph.Container, error)
- func (c Events) GetItem(ctx context.Context, userID, itemID string, errs *fault.Bus) (serialization.Parsable, *details.ExchangeInfo, error)
- func (c Events) GetItemIDsInContainer(ctx context.Context, userID, containerID string) (map[string]struct{}, error)
- func (c Events) GetItemInstances(ctx context.Context, userID, itemID, startDate, endDate string) ([]models.Eventable, error)
- func (c Events) GetItemsInContainerByCollisionKey(ctx context.Context, userID, containerID string) (map[string]string, error)
- func (c Events) NewEventCalendarsPager(userID string, selectProps ...string) pagers.NonDeltaHandler[models.Calendarable]
- func (c Events) NewEventsDeltaPager(ctx context.Context, userID, containerID, prevDeltaLink string, ...) pagers.DeltaHandler[models.Eventable]
- func (c Events) NewEventsPager(userID, containerID string, selectProps ...string) pagers.NonDeltaHandler[models.Eventable]
- func (c Events) PatchCalendar(ctx context.Context, userID, containerID string, body models.Calendarable) error
- func (c Events) PatchItem(ctx context.Context, userID, eventID string, body models.Eventable) (models.Eventable, error)
- func (c Events) PostItem(ctx context.Context, userID, containerID string, body models.Eventable) (models.Eventable, error)
- func (c Events) PostLargeAttachment(ctx context.Context, userID, containerID, parentItemID, itemName string, ...) (string, error)
- func (c Events) PostSmallAttachment(ctx context.Context, userID, containerID, parentItemID string, ...) error
- func (c Events) Serialize(ctx context.Context, item serialization.Parsable, userID, itemID string) ([]byte, error)
- type GetAndSerializeItemer
- type GetByIDer
- type GetItemer
- type Getter
- type Groups
- func (c Groups) GetAll(ctx context.Context, errs *fault.Bus) ([]models.Groupable, error)
- func (c Groups) GetAllIDsAndNames(ctx context.Context, errs *fault.Bus) (idname.Cacher, error)
- func (c Groups) GetAllSites(ctx context.Context, identifier string, errs *fault.Bus) ([]models.Siteable, error)
- func (c Groups) GetByID(ctx context.Context, identifier string, _ CallConfig) (models.Groupable, error)
- func (c Groups) GetIDAndName(ctx context.Context, groupID string, cc CallConfig) (string, string, error)
- func (c Groups) GetRootSite(ctx context.Context, identifier string) (models.Siteable, error)
- func (c Groups) GetTeamByID(ctx context.Context, identifier string, _ CallConfig) (models.Teamable, error)
- type Language
- type Lists
- func (c Lists) DeleteList(ctx context.Context, siteID, listID string) error
- func (c Lists) GetCTypesColumns(ctx context.Context, siteID string, listID string, contentTypeID string, ...) ([]models.ColumnDefinitionable, error)
- func (c Lists) GetColumnLinks(ctx context.Context, siteID string, listID string, contentTypeID string, ...) ([]models.ColumnLinkable, error)
- func (c Lists) GetContentTypes(ctx context.Context, siteID string, listID string, cc CallConfig) ([]models.ContentTypeable, error)
- func (c Lists) GetListByID(ctx context.Context, siteID, listID string) (models.Listable, *details.SharePointInfo, error)
- func (c Lists) GetListColumns(ctx context.Context, siteID string, listID string, cc CallConfig) ([]models.ColumnDefinitionable, error)
- func (c Lists) GetListItems(ctx context.Context, siteID string, listID string, cc CallConfig) ([]models.ListItemable, error)
- func (c Lists) GetLists(ctx context.Context, siteID string, cc CallConfig) ([]models.Listable, error)
- func (c Lists) GetListsByCollisionKey(ctx context.Context, siteID string) (map[string]string, error)
- func (c Lists) NewCTypesColumnsPager(siteID string, listID string, contentTypeID string, cc CallConfig) *cTypesColumnsPageCtrl
- func (c Lists) NewColumnLinksPager(siteID string, listID string, contentTypeID string, cc CallConfig) *columnLinksPageCtrl
- func (c Lists) NewColumnsPager(siteID string, listID string, cc CallConfig) *columnsPageCtrl
- func (c Lists) NewContentTypesPager(siteID string, listID string, cc CallConfig) *contentTypesPageCtrl
- func (c Lists) NewListItemsPager(siteID string, listID string, cc CallConfig) *listItemsPageCtrl
- func (c Lists) NewListsPager(siteID string, cc CallConfig) *listsPageCtrl
- func (c Lists) PatchList(ctx context.Context, siteID, listID string, list models.Listable) (models.Listable, error)
- func (c Lists) PostDrive(ctx context.Context, siteID, driveName string) (models.Driveable, error)
- func (c Lists) PostList(ctx context.Context, siteID string, listName string, ...) (models.Listable, error)
- func (c Lists) PostListItems(ctx context.Context, siteID, listID string, listItems []models.ListItemable) error
- type Mail
- func (c Mail) CreateContainer(ctx context.Context, userID, parentContainerID, containerName string) (graph.Container, error)
- func (c Mail) DeleteContainer(ctx context.Context, userID, containerID string) error
- func (c Mail) DeleteItem(ctx context.Context, userID, itemID string) error
- func (c Mail) EnumerateContainers(ctx context.Context, userID, _ string) ([]models.MailFolderable, error)
- func (c Mail) GetAddedAndRemovedItemIDs(ctx context.Context, userID, containerID, prevDeltaLink string, ...) (pagers.AddedAndRemoved, error)
- func (c Mail) GetContainerByID(ctx context.Context, userID, containerID string) (graph.Container, error)
- func (c Mail) GetContainerByName(ctx context.Context, userID, parentContainerID, containerName string) (graph.Container, error)
- func (c Mail) GetContainerChildren(ctx context.Context, userID, containerID string) ([]models.MailFolderable, error)
- func (c Mail) GetItem(ctx context.Context, userID, mailID string, errs *fault.Bus) (serialization.Parsable, *details.ExchangeInfo, error)
- func (c Mail) GetItemIDsInContainer(ctx context.Context, userID, containerID string) (map[string]struct{}, error)
- func (c Mail) GetItemsInContainer(ctx context.Context, userID, containerID string) ([]models.Messageable, error)
- func (c Mail) GetItemsInContainerByCollisionKey(ctx context.Context, userID, containerID string) (map[string]string, error)
- func (c Mail) MoveContainer(ctx context.Context, userID, containerID string, ...) error
- func (c Mail) MoveItem(ctx context.Context, userID, oldContainerID, newContainerID, itemID string) (string, error)
- func (c Mail) NewMailDeltaPager(ctx context.Context, userID, containerID, prevDeltaLink string, ...) pagers.DeltaHandler[models.Messageable]
- func (c Mail) NewMailFoldersPager(userID string, selectProps ...string) pagers.NonDeltaHandler[models.MailFolderable]
- func (c Mail) NewMailPager(userID, containerID string, selectProps ...string) pagers.NonDeltaHandler[models.Messageable]
- func (c Mail) PatchFolder(ctx context.Context, userID, containerID string, body models.MailFolderable) error
- func (c Mail) PostItem(ctx context.Context, userID, containerID string, body models.Messageable) (models.Messageable, error)
- func (c Mail) PostLargeAttachment(ctx context.Context, userID, containerID, parentItemID, itemName string, ...) (string, error)
- func (c Mail) PostSmallAttachment(ctx context.Context, userID, containerID, parentItemID string, ...) error
- func (c Mail) Serialize(ctx context.Context, item serialization.Parsable, user, itemID string) ([]byte, error)
- type MailboxInfo
- type Serializer
- type Sites
- func (c Sites) GetAll(ctx context.Context, errs *fault.Bus) ([]models.Siteable, error)
- func (c Sites) GetByID(ctx context.Context, identifier string, cc CallConfig) (models.Siteable, error)
- func (c Sites) GetDefaultDrive(ctx context.Context, site string) (models.Driveable, error)
- func (c Sites) GetIDAndName(ctx context.Context, siteID string, cc CallConfig) (string, string, error)
- func (c Sites) GetRoot(ctx context.Context, cc CallConfig) (models.Siteable, error)
- type TimeInfo
- type Users
- func (c Users) GetAll(ctx context.Context, errs *fault.Bus) ([]models.Userable, error)
- func (c Users) GetAllIDsAndNames(ctx context.Context, errs *fault.Bus) (idname.Cacher, error)
- func (c Users) GetByID(ctx context.Context, identifier string, cc CallConfig) (models.Userable, error)
- func (c Users) GetDefaultDrive(ctx context.Context, userID string) (models.Driveable, error)
- func (c Users) GetFirstInboxMessage(ctx context.Context, userID, inboxID string) error
- func (c Users) GetIDAndName(ctx context.Context, userID string, cc CallConfig) (string, string, error)
- func (c Users) GetMailInbox(ctx context.Context, userID string) (models.MailFolderable, error)
- func (c Users) GetMailboxSettings(ctx context.Context, userID string) (models.Userable, error)
- type WorkingHours
Constants ¶
const ( DefaultCalendar = "Calendar" DefaultContacts = "Contacts" MailInbox = "Inbox" MsgFolderRoot = "msgfolderroot" )
Well knwon Folder Names Mail Definitions: https://docs.microsoft.com/en-us/graph/api/resources/mailfolder?view=graph-rest-1.0
const ( AttachmentsColumnName = "Attachments" EditColumnName = "Edit" ContentTypeColumnName = "ContentType" CreatedColumnName = "Created" ModifiedColumnName = "Modified" AuthorLookupIDColumnName = "AuthorLookupId" EditorLookupIDColumnName = "EditorLookupId" AppAuthorLookupIDColumnName = "AppAuthorLookupId" TitleColumnName = "Title" ContentTypeColumnDisplayName = "Content Type" AddressKey = "address" CoordinatesKey = "coordinates" DisplayNameKey = "displayName" LocationURIKey = "locationUri" UniqueIDKey = "uniqueId" // entries that are nested within a second layer CityKey = "city" CountryKey = "countryOrRegion" PostalCodeKey = "postalCode" StateKey = "state" StreetKey = "street" LatitudeKey = "latitude" LongitudeKey = "longitude" CountryOrRegionFN = "CountryOrRegion" StateFN = "State" CityFN = "City" PostalCodeFN = "PostalCode" StreetFN = "Street" GeoLocFN = "GeoLoc" DispNameFN = "DispName" HyperlinkDescriptionKey = "Description" HyperlinkURLKey = "Url" LookupIDKey = "LookupId" LookupValueKey = "LookupValue" PersonEmailKey = "Email" MetadataLabelKey = "Label" MetadataTermGUIDKey = "TermGuid" MetadataWssIDKey = "WssId" LinkTitleFieldNamePart = "LinkTitle" ChildCountFieldNamePart = "ChildCount" LookupIDFieldNamePart = "LookupId" ODataTypeFieldNamePart = "@odata.type" ODataTypeFieldNameStringVal = "Collection(Edm.String)" ODataTypeFieldNameIntVal = "Collection(Edm.Int32)" ReadOnlyOrHiddenFieldNamePrefix = "_" DescoratorFieldNamePrefix = "@" WebTemplateExtensionsListTemplate = "webTemplateExtensionsList" // This issue https://github.com/alcionai/corso/issues/4932 // tracks to backup/restore supportability of `documentLibrary` templated lists DocumentLibraryListTemplate = "documentLibrary" SharingLinksListTemplate = "sharingLinks" AccessRequestsListTemplate = "accessRequest" )
const (
ResourceProvisioningOptions = "resourceProvisioningOptions"
)
Variables ¶
var ( ErrMailBoxNotFound = clues.New("mailbox not found") ErrMailBoxSettingsAccessDenied = clues.New("mailbox settings access denied") )
Variables
var ErrFolderNotFound = clues.New("folder not found")
var ErrSkippableListTemplate = clues.New("unable to create lists with skippable templates")
var SkipListTemplates = keys.Set{ WebTemplateExtensionsListTemplate: {}, DocumentLibraryListTemplate: {}, SharingLinksListTemplate: {}, AccessRequestsListTemplate: {}, }
Functions ¶
func BytesToContactable ¶
func BytesToContactable(bytes []byte) (models.Contactable, error)
func BytesToMessageable ¶
func BytesToMessageable(body []byte) (models.Messageable, error)
func CloneListItem ¶
func CloneListItem(orig models.ListItemable, columnNames map[string]*columnDetails) models.ListItemable
CloneListItem creates a new `SharePoint.ListItem` and stores the original item's M365 data into it set fields. - https://learn.microsoft.com/en-us/graph/api/resources/listitem?view=graph-rest-1.0
func ContactCollisionKey ¶
func ContactCollisionKey(item models.Contactable) string
ContactCollisionKey constructs a key from the contactable's creation time and either displayName or given+surname. collision keys are used to identify duplicate item conflicts for handling advanced restoration config.
func ContactInfo ¶
func ContactInfo(contact models.Contactable) *details.ExchangeInfo
func CreateFromBytes ¶
func CreateFromBytes( bytes []byte, createFunc serialization.ParsableFactory, ) (serialization.Parsable, error)
CreateFromBytes generates an m365 object form bytes.
func DefaultDriveItemProps ¶
func DefaultDriveItemProps() []string
func DriveItemCollisionKey ¶
func DriveItemCollisionKey(item models.DriveItemable) string
DriveItemCollisionKeyy constructs a key from the item name. collision keys are used to identify duplicate item conflicts for handling advanced restoration config.
func EvaluateMailboxError ¶
EvaluateMailboxError checks whether the provided error can be interpreted as "user does not have a mailbox", or whether it is some other error. If the former (no mailbox), returns nil, otherwise returns an error.
func EventCollisionKey ¶
EventCollisionKey constructs a key from the eventable's creation time, subject, and organizer. collision keys are used to identify duplicate item conflicts for handling advanced restoration config.
func GetAllDrives ¶
func GetAllDrives( ctx context.Context, pager pagers.NonDeltaHandler[models.Driveable], ) ([]models.Driveable, error)
GetAllDrives fetches all drives for the given pager
func GetAttachmentContent ¶
func GetAttachmentContent(attachment models.Attachmentable) ([]byte, error)
func GetChatMessageAttachmentNames ¶
func GetChatMessageAttachmentNames(msg models.ChatMessageable) []string
func GetChatMessageFrom ¶
func GetChatMessageFrom(msg models.ChatMessageable) string
func HasAttachments ¶
func HasAttachments(body models.ItemBodyable) bool
func InitConcurrencyLimit ¶
func InitConcurrencyLimit(ctx context.Context, pst path.ServiceType)
initConcurrencyLimit ensures that the graph concurrency limiter is initialized, so that calls do not step over graph api's service limits. Limits are derived from the provided servie type. Callers will need to call this func before making api calls an api client.
func IsAnyErrMailboxNotFound ¶
IsAnyErrMailboxNotFound inspects the secondary errors inside MailboxInfo and determines whether the resource has a mailbox.
func IsNotSystemMessage ¶
func IsNotSystemMessage(cm models.ChatMessageable) bool
func ListCollisionKey ¶
Two lists with same name cannot be created, hence going by the displayName itself as the collision key. Only displayName can be set. name is system generated based on displayName.
func ListToSPInfo ¶
func ListToSPInfo(lst models.Listable) *details.SharePointInfo
ListToSPInfo translates models.Listable metadata into searchable content List documentation: https://learn.microsoft.com/en-us/graph/api/resources/list?view=graph-rest-1.0
func MailCollisionKey ¶
func MailCollisionKey(item models.Messageable) string
MailCollisionKey constructs a key from the messageable's subject, sender, and recipients (to, cc, bcc). collision keys are used to identify duplicate item conflicts for handling advanced restoration config.
func MailInfo ¶
func MailInfo(msg models.Messageable, size int64) *details.ExchangeInfo
func NewDriveItem ¶
NewDriveItem initializes a `models.DriveItemable` with either a folder or file entry.
func NewService ¶
func SelectProps ¶
func TeamsChatInfo ¶
func TeamsChatInfo(chat models.Chatable) *details.TeamsChatsInfo
func ToListable ¶
ToListable utility function to encapsulate stored data for restoration. New Listable omits trackable fields such as `id` or `ETag` and other read-only objects that are prevented upon upload. Additionally, read-Only columns are not attached in this method. ListItems are not included in creation of new list, and have to be restored in separate call.
func URLCacheDriveItemProps ¶
func URLCacheDriveItemProps() []string
URL cache only needs to fetch a small subset of item properties
Types ¶
type Access ¶
type Access struct {
Client
}
Access is an interface-compliant provider of the client.
func (Access) GetToken ¶
GetToken retrieves a m365 application auth token using client id and secret credentials. This token is not normally needed in order for corso to function, and is implemented primarily as a way to exercise the validity of those credentials without need of specific permissions.
type CalendarDisplayable ¶
type CalendarDisplayable struct {
models.Calendarable
}
CalendarDisplayable is a wrapper that complies with the models.Calendarable interface with the graph.Container interfaces. Calendars do not have a parentFolderID. Therefore, that value will always return nil.
func (CalendarDisplayable) GetDisplayName ¶
func (c CalendarDisplayable) GetDisplayName() *string
GetDisplayName returns the *string of the models.Calendable variant: calendar.GetName()
func (CalendarDisplayable) GetParentFolderId ¶
func (c CalendarDisplayable) GetParentFolderId() *string
GetParentFolderId returns the default calendar name address EventCalendars have a flat hierarchy and Calendars are rooted at the default
type CallConfig ¶
type CallConfig struct { Expand []string Select []string CanMakeDeltaQueries bool // LimitResults limits the returned results to the given number. If 0, returns // all results. LimitResults int }
CallConfig defines additional parameters to add to the query like field selection and limiting results.
Not all calls may support all options. Check individual implementations to see what's supported and what's not.
type Channels ¶
type Channels struct {
Client
}
Channels is an interface-compliant provider of the client.
func (Channels) GetChannel ¶
func (Channels) GetChannelByName ¶
func (c Channels) GetChannelByName( ctx context.Context, teamID, containerName string, ) (models.Channelable, error)
GetChannelByName fetches a channel by name
func (Channels) GetChannelMessage ¶
func (c Channels) GetChannelMessage( ctx context.Context, teamID, channelID, messageID string, ) (models.ChatMessageable, *details.GroupsInfo, error)
func (Channels) GetChannelMessageIDs ¶
func (c Channels) GetChannelMessageIDs( ctx context.Context, teamID, channelID, prevDeltaLink string, cc CallConfig, ) (pagers.AddedAndRemoved, error)
GetChannelMessageIDs fetches a delta of all messages in the channel. returns two maps: addedItems, deletedItems
func (Channels) GetChannelMessageReplies ¶
func (c Channels) GetChannelMessageReplies( ctx context.Context, teamID, channelID, messageID string, ) ([]models.ChatMessageable, error)
GetChannels fetches the minimum valuable data from each reply in the message
func (Channels) GetChannelMessages ¶
func (c Channels) GetChannelMessages( ctx context.Context, teamID, channelID string, cc CallConfig, ) ([]models.ChatMessageable, error)
GetChannelMessages fetches a delta of all messages in the channel.
func (Channels) GetChannels ¶
GetChannels fetches all channels in the team.
func (Channels) NewChannelMessageDeltaPager ¶
func (Channels) NewChannelMessagePager ¶
func (c Channels) NewChannelMessagePager( teamID, channelID string, cc CallConfig, ) *channelMessagePageCtrl
func (Channels) NewChannelMessageRepliesPager ¶
func (Channels) NewChannelPager ¶
type Chats ¶
type Chats struct {
Client
}
Chats is an interface-compliant provider of the client.
func (Chats) GetChatByID ¶
func (c Chats) GetChatByID( ctx context.Context, chatID string, cc CallConfig, ) (models.Chatable, *details.TeamsChatsInfo, error)
func (Chats) GetChatMessageIDs ¶
func (c Chats) GetChatMessageIDs( ctx context.Context, chatID string, cc CallConfig, ) (pagers.AddedAndRemoved, error)
GetChatMessageIDs fetches a delta of all messages in the chat. returns two maps: addedItems, deletedItems
func (Chats) GetChatMessages ¶
func (c Chats) GetChatMessages( ctx context.Context, chatID string, cc CallConfig, ) ([]models.ChatMessageable, error)
GetChatMessages fetches a delta of all messages in the chat.
func (Chats) GetChats ¶
func (c Chats) GetChats( ctx context.Context, userID string, cc CallConfig, ) ([]models.Chatable, error)
GetChats fetches all chats in the team.
func (Chats) NewChatMessagePager ¶
func (c Chats) NewChatMessagePager( chatID string, cc CallConfig, ) *chatMessagePageCtrl
func (Chats) NewChatPager ¶
func (c Chats) NewChatPager( userID string, cc CallConfig, ) *chatPageCtrl
type Client ¶
type Client struct { Credentials account.M365Config // The Stable service is re-usable for any request. // This allows us to maintain performance across async requests. Stable graph.Servicer // The LargeItem graph servicer is configured specifically for // downloading large items such as drive item content or outlook // mail and event attachments. LargeItem graph.Servicer // The Requester provides a client specifically for calling // arbitrary urls instead of constructing queries using the // graph api client. Requester graph.Requester // contains filtered or unexported fields }
Client is used to fulfill queries that are traditionally backed by GraphAPI. A struct is used in this case, instead of deferring to pure function wrappers, so that the boundary separates the granular implementation of the graphAPI and kiota away from the other packages.
func NewClient ¶
func NewClient( creds account.M365Config, co control.Options, counter *count.Bus, opts ...graph.Option, ) (Client, error)
NewClient produces a new exchange api client. Must be used in place of creating an ad-hoc client struct.
func (Client) Conversations ¶
func (c Client) Conversations() Conversations
func (Client) Get ¶
func (c Client) Get( ctx context.Context, url string, headers map[string]string, requireAuth bool, ) (*http.Response, error)
Get performs an ad-hoc get request using its graph.Requester
func (Client) Post ¶
func (c Client) Post( ctx context.Context, url string, headers map[string]string, body io.Reader, requireAuth bool, ) (*http.Response, error)
Get performs an ad-hoc get request using its graph.Requester
func (Client) Service ¶
Service generates a new graph servicer. New servicers are used for paged and other long-running requests instead of the client's stable service, so that in-flight state within the adapter doesn't get clobbered. Most calls should use the Client.Stable property instead of calling this func, unless it is explicitly necessary.
type Contacts ¶
type Contacts struct {
Client
}
Contacts is an interface-compliant provider of the client.
func (Contacts) CreateContainer ¶
func (c Contacts) CreateContainer( ctx context.Context, userID, _, containerName string, ) (graph.Container, error)
CreateContainer makes a contact folder with the displayName of folderName. If successful, returns the created folder object.
func (Contacts) DeleteContainer ¶
DeleteContainer deletes the ContactFolder associated with the M365 ID if permissions are valid.
func (Contacts) DeleteItem ¶
func (Contacts) EnumerateContainers ¶
func (c Contacts) EnumerateContainers( ctx context.Context, userID, baseContainerID string, ) ([]models.ContactFolderable, error)
EnumerateContainers retrieves all of the user's current contact folders.
func (Contacts) GetAddedAndRemovedItemIDs ¶
func (c Contacts) GetAddedAndRemovedItemIDs( ctx context.Context, userID, containerID, prevDeltaLink string, config CallConfig, ) (pagers.AddedAndRemoved, error)
func (Contacts) GetContainerByID ¶
func (Contacts) GetContainerByName ¶
func (c Contacts) GetContainerByName( ctx context.Context, userID, _, containerName string, ) (graph.Container, error)
GetContainerByName fetches a folder by name
func (Contacts) GetItem ¶
func (c Contacts) GetItem( ctx context.Context, userID, itemID string, _ *fault.Bus, ) (serialization.Parsable, *details.ExchangeInfo, error)
GetItem retrieves a Contactable item.
func (Contacts) GetItemIDsInContainer ¶
func (Contacts) GetItemsInContainerByCollisionKey ¶
func (Contacts) NewContactFoldersPager ¶
func (c Contacts) NewContactFoldersPager( userID, baseContainerID string, selectProps ...string, ) pagers.NonDeltaHandler[models.ContactFolderable]
func (Contacts) NewContactsDeltaPager ¶
func (c Contacts) NewContactsDeltaPager( ctx context.Context, userID, containerID, prevDeltaLink string, selectProps ...string, ) pagers.DeltaHandler[models.Contactable]
func (Contacts) NewContactsPager ¶
func (c Contacts) NewContactsPager( userID, containerID string, selectProps ...string, ) pagers.NonDeltaHandler[models.Contactable]
func (Contacts) PatchFolder ¶
type Conversations ¶
type Conversations struct {
Client
}
Conversations is an interface-compliant provider of the client.
func (Conversations) GetConversationPost ¶
func (c Conversations) GetConversationPost( ctx context.Context, groupID, conversationID, threadID, postID string, ) (models.Postable, *details.GroupsInfo, error)
func (Conversations) GetConversationThreadPostIDs ¶
func (c Conversations) GetConversationThreadPostIDs( ctx context.Context, groupID, conversationID, threadID string, cc CallConfig, ) (pagers.AddedAndRemoved, error)
GetConversations fetches all added and deleted conversation posts in the group.
func (Conversations) GetConversationThreadPosts ¶
func (c Conversations) GetConversationThreadPosts( ctx context.Context, groupID, conversationID, threadID string, cc CallConfig, ) ([]models.Postable, error)
GetConversations fetches all conversation posts in the group.
func (Conversations) GetConversationThreads ¶
func (c Conversations) GetConversationThreads( ctx context.Context, groupID, conversationID string, cc CallConfig, ) ([]models.ConversationThreadable, error)
GetConversations fetches all conversation threads in the group.
func (Conversations) GetConversations ¶
func (c Conversations) GetConversations( ctx context.Context, groupID string, cc CallConfig, ) ([]models.Conversationable, error)
GetConversations fetches all conversations in the group.
func (Conversations) NewConversationThreadPostsPager ¶
func (c Conversations) NewConversationThreadPostsPager( groupID, conversationID, threadID string, cc CallConfig, ) *conversationThreadPostsPageCtrl
func (Conversations) NewConversationThreadsPager ¶
func (c Conversations) NewConversationThreadsPager( groupID, conversationID string, cc CallConfig, ) *conversationThreadsPageCtrl
func (Conversations) NewConversationsPager ¶
func (c Conversations) NewConversationsPager( groupID string, cc CallConfig, ) *conversationsPageCtrl
type DriveItemDeltaPageCtrl ¶
type DriveItemDeltaPageCtrl struct {
// contains filtered or unexported fields
}
func (*DriveItemDeltaPageCtrl) GetPage ¶
func (p *DriveItemDeltaPageCtrl) GetPage( ctx context.Context, ) (pagers.DeltaLinkValuer[models.DriveItemable], error)
func (*DriveItemDeltaPageCtrl) Reset ¶
func (p *DriveItemDeltaPageCtrl) Reset(context.Context)
func (*DriveItemDeltaPageCtrl) SetNextLink ¶
func (p *DriveItemDeltaPageCtrl) SetNextLink(link string)
func (*DriveItemDeltaPageCtrl) ValidModTimes ¶
func (p *DriveItemDeltaPageCtrl) ValidModTimes() bool
type DriveItemIDType ¶
type Drives ¶
type Drives struct {
Client
}
Drives is an interface-compliant provider of the client.
func (Drives) DeleteItem ¶
deletes require unique http clients https://github.com/alcionai/corso/issues/2707
func (Drives) DeleteItemPermission ¶
func (Drives) EnumerateDriveItemsDelta ¶
func (c Drives) EnumerateDriveItemsDelta( ctx context.Context, driveID string, prevDeltaLink string, cc CallConfig, ) pagers.NextPageResulter[models.DriveItemable]
EnumerateDriveItems will enumerate all items in the specified drive and stream them page by page, along with the delta update and any errors, to the provided channel.
func (Drives) GetFolderByName ¶
func (c Drives) GetFolderByName( ctx context.Context, driveID, parentFolderID, folderName string, ) (models.DriveItemable, error)
GetFolderByName will lookup the specified folder by name within the parentFolderID folder.
func (Drives) GetFolderChildren ¶
func (c Drives) GetFolderChildren( ctx context.Context, driveID, folderID string, ) ([]models.DriveItemable, error)
TODO: pagination controller needed for completion.
func (Drives) GetItem ¶
func (c Drives) GetItem( ctx context.Context, driveID, itemID string, ) (models.DriveItemable, error)
generic drive item getter
func (Drives) GetItemIDsInContainer ¶
func (Drives) GetItemPermission ¶
func (Drives) GetItemsInContainerByCollisionKey ¶
func (Drives) GetRootFolder ¶
func (Drives) NewDriveItemPager ¶
func (c Drives) NewDriveItemPager( driveID, containerID string, selectProps ...string, ) pagers.NonDeltaHandler[models.DriveItemable]
func (Drives) NewItemContentUpload ¶
func (Drives) NewSiteDrivePager ¶
NewSiteDrivePager is a constructor for creating a siteDrivePager fields are the associated site drive fields that are desired to be returned in a query. NOTE: Fields are case-sensitive. Incorrect field settings will cause errors during later paging. Available fields: https://learn.microsoft.com/en-us/graph/api/resources/drive?view=graph-rest-1.0
func (Drives) NewUserDrivePager ¶
func (Drives) PostItemInContainer ¶
func (c Drives) PostItemInContainer( ctx context.Context, driveID, parentFolderID string, newItem models.DriveItemable, onCollision control.CollisionPolicy, ) (models.DriveItemable, error)
PostItemInContainer creates a new item in the specified folder
func (Drives) PostItemLinkShareUpdate ¶
func (c Drives) PostItemLinkShareUpdate( ctx context.Context, driveID, itemID string, body *drives.ItemItemsItemCreateLinkPostRequestBody, ) (models.Permissionable, error)
func (Drives) PostItemPermissionUpdate ¶
func (c Drives) PostItemPermissionUpdate( ctx context.Context, driveID, itemID string, body *drives.ItemItemsItemInvitePostRequestBody, ) (drives.ItemItemsItemInviteResponseable, error)
type Events ¶
type Events struct {
Client
}
Events is an interface-compliant provider of the client.
func (Events) CreateContainer ¶
func (c Events) CreateContainer( ctx context.Context, userID, _, containerName string, ) (graph.Container, error)
CreateContainer makes an event Calendar with the name in the user's M365 exchange account Reference: https://docs.microsoft.com/en-us/graph/api/user-post-calendars?view=graph-rest-1.0&tabs=go
func (Events) DeleteAttachment ¶
func (Events) DeleteContainer ¶
DeleteContainer removes a calendar from user's M365 account Reference: https://docs.microsoft.com/en-us/graph/api/calendar-delete?view=graph-rest-1.0&tabs=go
func (Events) DeleteItem ¶
func (Events) EnumerateContainers ¶
func (c Events) EnumerateContainers( ctx context.Context, userID, _ string, ) ([]models.Calendarable, error)
EnumerateContainers retrieves all of the user's current mail folders.
func (Events) GetAddedAndRemovedItemIDs ¶
func (c Events) GetAddedAndRemovedItemIDs( ctx context.Context, userID, containerID, prevDeltaLink string, config CallConfig, ) (pagers.AddedAndRemoved, error)
func (Events) GetAttachments ¶
func (Events) GetContainerByID ¶
func (Events) GetContainerByName ¶
func (c Events) GetContainerByName( ctx context.Context, userID, _, containerName string, ) (graph.Container, error)
GetContainerByName fetches a calendar by name
func (Events) GetItem ¶
func (c Events) GetItem( ctx context.Context, userID, itemID string, errs *fault.Bus, ) (serialization.Parsable, *details.ExchangeInfo, error)
GetItem retrieves an Eventable item.
func (Events) GetItemIDsInContainer ¶
func (Events) GetItemInstances ¶
func (Events) GetItemsInContainerByCollisionKey ¶
func (Events) NewEventCalendarsPager ¶
func (c Events) NewEventCalendarsPager( userID string, selectProps ...string, ) pagers.NonDeltaHandler[models.Calendarable]
func (Events) NewEventsDeltaPager ¶
func (Events) NewEventsPager ¶
func (Events) PatchCalendar ¶
func (Events) PostLargeAttachment ¶
func (Events) PostSmallAttachment ¶
type GetAndSerializeItemer ¶
type GetAndSerializeItemer[INFO any] interface { GetItemer[INFO] Serializer }
type Groups ¶
type Groups struct {
Client
}
Groups is an interface-compliant provider of the client.
func (Groups) GetAllIDsAndNames ¶
GetAllIDsAndNames retrieves all groups in the tenant and returns them in an idname.Cacher
func (Groups) GetAllSites ¶
func (c Groups) GetAllSites( ctx context.Context, identifier string, errs *fault.Bus, ) ([]models.Siteable, error)
GetAllSites gets all the sites that belong to a group. This is necessary as private and shared channels gets their on individual sites. All the other channels make use of the root site.
func (Groups) GetByID ¶
func (c Groups) GetByID( ctx context.Context, identifier string, _ CallConfig, ) (models.Groupable, error)
GetID can look up a group by either its canonical id (a uuid) or by the group's display name. If looking up the display name an error will be returned if more than one group gets returned in the results.
func (Groups) GetIDAndName ¶
func (c Groups) GetIDAndName( ctx context.Context, groupID string, cc CallConfig, ) (string, string, error)
GetIDAndName looks up the group matching the given ID, and returns its canonical ID and the name.
func (Groups) GetRootSite ¶
func (Groups) GetTeamByID ¶
func (c Groups) GetTeamByID( ctx context.Context, identifier string, _ CallConfig, ) (models.Teamable, error)
GetTeamByID can lookup a team by its group id. It will fail if the group is not a Team.
type Lists ¶
type Lists struct {
Client
}
Lists is an interface-compliant provider of the client.
func (Lists) DeleteList ¶
func (Lists) GetCTypesColumns ¶
func (c Lists) GetCTypesColumns( ctx context.Context, siteID string, listID string, contentTypeID string, cc CallConfig, ) ([]models.ColumnDefinitionable, error)
GetCTypesColumns fetches all columns in the content type.
func (Lists) GetColumnLinks ¶
func (c Lists) GetColumnLinks( ctx context.Context, siteID string, listID string, contentTypeID string, cc CallConfig, ) ([]models.ColumnLinkable, error)
GetColumnLinks fetches all column links in the content type.
func (Lists) GetContentTypes ¶
func (c Lists) GetContentTypes( ctx context.Context, siteID string, listID string, cc CallConfig, ) ([]models.ContentTypeable, error)
GetContentTypes fetches all content types in the list.
func (Lists) GetListByID ¶
func (c Lists) GetListByID(ctx context.Context, siteID, listID string, ) (models.Listable, *details.SharePointInfo, error)
GetListById is a utility function to populate a SharePoint.List with objects associated with a given siteID. @param siteID the M365 ID that represents the SharePoint Site Makes additional calls to retrieve the following relationships: - Columns - ContentTypes - List Items
func (Lists) GetListColumns ¶
func (c Lists) GetListColumns( ctx context.Context, siteID string, listID string, cc CallConfig, ) ([]models.ColumnDefinitionable, error)
GetListColumns fetches all list columns in the list.
func (Lists) GetListItems ¶
func (c Lists) GetListItems( ctx context.Context, siteID string, listID string, cc CallConfig, ) ([]models.ListItemable, error)
GetListItems fetches all list items in the list.
func (Lists) GetLists ¶
func (c Lists) GetLists( ctx context.Context, siteID string, cc CallConfig, ) ([]models.Listable, error)
GetLists fetches all lists in the site.
func (Lists) GetListsByCollisionKey ¶
func (Lists) NewCTypesColumnsPager ¶
func (c Lists) NewCTypesColumnsPager( siteID string, listID string, contentTypeID string, cc CallConfig, ) *cTypesColumnsPageCtrl
func (Lists) NewColumnLinksPager ¶
func (c Lists) NewColumnLinksPager( siteID string, listID string, contentTypeID string, cc CallConfig, ) *columnLinksPageCtrl
func (Lists) NewColumnsPager ¶
func (c Lists) NewColumnsPager( siteID string, listID string, cc CallConfig, ) *columnsPageCtrl
func (Lists) NewContentTypesPager ¶
func (c Lists) NewContentTypesPager( siteID string, listID string, cc CallConfig, ) *contentTypesPageCtrl
func (Lists) NewListItemsPager ¶
func (c Lists) NewListItemsPager( siteID string, listID string, cc CallConfig, ) *listItemsPageCtrl
func (Lists) NewListsPager ¶
func (c Lists) NewListsPager( siteID string, cc CallConfig, ) *listsPageCtrl
func (Lists) PostDrive ¶
func (c Lists) PostDrive( ctx context.Context, siteID, driveName string, ) (models.Driveable, error)
PostDrive creates a new list of type drive. Specifically used to create documentLibraries for SharePoint Sites.
func (Lists) PostListItems ¶
type Mail ¶
type Mail struct {
Client
}
Mail is an interface-compliant provider of the client.
func (Mail) CreateContainer ¶
func (Mail) DeleteContainer ¶
DeleteContainer removes a mail folder with the corresponding M365 ID from the user's M365 Exchange account Reference: https://docs.microsoft.com/en-us/graph/api/mailfolder-delete?view=graph-rest-1.0&tabs=http
func (Mail) DeleteItem ¶
func (Mail) EnumerateContainers ¶
func (c Mail) EnumerateContainers( ctx context.Context, userID, _ string, ) ([]models.MailFolderable, error)
EnumerateContainers retrieves all of the user's current mail folders.
func (Mail) GetAddedAndRemovedItemIDs ¶
func (c Mail) GetAddedAndRemovedItemIDs( ctx context.Context, userID, containerID, prevDeltaLink string, config CallConfig, ) (pagers.AddedAndRemoved, error)
func (Mail) GetContainerByID ¶
func (Mail) GetContainerByName ¶
func (c Mail) GetContainerByName( ctx context.Context, userID, parentContainerID, containerName string, ) (graph.Container, error)
GetContainerByName fetches a folder by name
func (Mail) GetContainerChildren ¶
func (c Mail) GetContainerChildren( ctx context.Context, userID, containerID string, ) ([]models.MailFolderable, error)
TODO: needs pager implementation for completion
func (Mail) GetItem ¶
func (c Mail) GetItem( ctx context.Context, userID, mailID string, errs *fault.Bus, ) (serialization.Parsable, *details.ExchangeInfo, error)
GetItem retrieves a Messageable item. If the item contains an attachment, that attachment is also downloaded.
func (Mail) GetItemIDsInContainer ¶
func (Mail) GetItemsInContainer ¶
func (Mail) GetItemsInContainerByCollisionKey ¶
func (Mail) MoveContainer ¶
func (Mail) NewMailDeltaPager ¶
func (c Mail) NewMailDeltaPager( ctx context.Context, userID, containerID, prevDeltaLink string, selectProps ...string, ) pagers.DeltaHandler[models.Messageable]
func (Mail) NewMailFoldersPager ¶
func (c Mail) NewMailFoldersPager( userID string, selectProps ...string, ) pagers.NonDeltaHandler[models.MailFolderable]
func (Mail) NewMailPager ¶
func (c Mail) NewMailPager( userID, containerID string, selectProps ...string, ) pagers.NonDeltaHandler[models.Messageable]
func (Mail) PatchFolder ¶
func (Mail) PostItem ¶
func (c Mail) PostItem( ctx context.Context, userID, containerID string, body models.Messageable, ) (models.Messageable, error)
func (Mail) PostLargeAttachment ¶
func (Mail) PostSmallAttachment ¶
type MailboxInfo ¶
type MailboxInfo struct { Purpose string ArchiveFolder string DateFormat string TimeFormat string DelegateMeetMsgDeliveryOpt string Timezone string AutomaticRepliesSetting AutomaticRepliesSettings Language Language WorkingHours WorkingHours ErrGetMailBoxSetting []error QuotaExceeded bool }
func ParseMailboxSettings ¶
func ParseMailboxSettings( settings models.Userable, mi MailboxInfo, ) MailboxInfo
type Serializer ¶
type Sites ¶
type Sites struct {
Client
}
Sites is an interface-compliant provider of the client.
func (Sites) GetByID ¶
func (c Sites) GetByID( ctx context.Context, identifier string, cc CallConfig, ) (models.Siteable, error)
GetByID looks up the site matching the given identifier. The identifier can be either a canonical site id or a webURL. Assumes the webURL is complete and well formed; eg: https://10rqc2.sharepoint.com/sites/Example
func (Sites) GetDefaultDrive ¶
func (Sites) GetIDAndName ¶
func (c Sites) GetIDAndName( ctx context.Context, siteID string, cc CallConfig, ) (string, string, error)
GetIDAndName looks up the site matching the given ID, and returns its canonical ID and the webURL as the name. Accepts an ID or a WebURL as an ID.
type Users ¶
type Users struct {
Client
}
Users is an interface-compliant provider of the client.
func (Users) GetAllIDsAndNames ¶
GetAllIDsAndNames retrieves all users in the tenant and returns them in an idname.Cacher
func (Users) GetDefaultDrive ¶
func (Users) GetFirstInboxMessage ¶
TODO: This tries to determine if the user has hit their mailbox limit by trying to fetch an item and seeing if we get the quota exceeded error. Ideally(if available) we should convert this to pull the user's usage via an api and compare if they have used up their quota.
func (Users) GetIDAndName ¶
func (c Users) GetIDAndName( ctx context.Context, userID string, cc CallConfig, ) (string, string, error)
GetIDAndName looks up the user matching the given ID, and returns its canonical ID and the PrincipalName as the name.
func (Users) GetMailInbox ¶
Source Files
¶
- access.go
- attachments.go
- channels.go
- channels_pager.go
- client.go
- config.go
- consts.go
- contacts.go
- contacts_pager.go
- conversations.go
- conversations_pager.go
- drive.go
- drive_pager.go
- events.go
- events_pager.go
- groups.go
- interfaces.go
- lists.go
- lists_pager.go
- mail.go
- mail_pager.go
- serialization.go
- sites.go
- teamsChats.go
- teamsChats_pager.go
- user_info.go
- users.go