GC: const variables extended to include default container names (#886)

## Description
Moves constants to a file and adds more source definitions and backgrounds to constants.
<!-- Insert PR description-->

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
*closes #823<issue>

## Test Plan
Const variables to be used in future PRs. No tests are available. 
<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Danny 2022-09-23 10:17:59 -04:00 committed by GitHub
parent c4abcd24bc
commit f39a14eda3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 13 deletions

View File

@ -31,7 +31,18 @@ const (
// Default Folder Names
//------------------------
// Mail Definitions: https://docs.microsoft.com/en-us/graph/api/resources/mailfolder?view=graph-rest-1.0
// inbox and root
DefaultMailFolder = "Inbox"
rootFolderAlias = "msgfolderroot"
DefaultContactFolder = "Contacts"
DefaultCalendar = "Calendar"
//---------------------
// Paging
//-----------------
// nextDataLink definition https://docs.microsoft.com/en-us/graph/paging
nextDataLink = "@odata.nextLink"
)
// descendable represents objects that implement msgraph-sdk-go/models.entityable
@ -47,3 +58,9 @@ type displayable interface {
GetId() *string
GetDisplayName() *string
}
// container is an interface that implements both the descendable and displayble interface.
type container interface {
descendable
displayable
}

View File

@ -12,19 +12,6 @@ import (
"github.com/alcionai/corso/src/internal/path"
)
const (
// rootFolderAlias is the per-user root container alias for the exchange email
// hierarchy.
rootFolderAlias = "msgfolderroot"
// nextDataLink is a random map key so we can iterate through delta results.
nextDataLink = "@odata.nextLink"
)
type container interface {
descendable
displayable
}
// cachedContainer is used for local unit tests but also makes it so that this
// code can be broken into generic- and service-specific chunks later on to
// reuse logic in IDToPath.