Path: Add category --> Pages. (#2109)
## Description Adds path.Category `Pages` for SharePoint pages data type <!-- Insert PR description--> ## Does this PR need a docs update or release note? - [x] ⛔ No ## Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🌻 Feature ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * closes #2108 #<issue> ## Test Plan - [z] ⚡ Unit test
This commit is contained in:
parent
7829c07079
commit
53c5828caa
@ -15,12 +15,13 @@ func _() {
|
|||||||
_ = x[FilesCategory-4]
|
_ = x[FilesCategory-4]
|
||||||
_ = x[ListsCategory-5]
|
_ = x[ListsCategory-5]
|
||||||
_ = x[LibrariesCategory-6]
|
_ = x[LibrariesCategory-6]
|
||||||
_ = x[DetailsCategory-7]
|
_ = x[PagesCategory-7]
|
||||||
|
_ = x[DetailsCategory-8]
|
||||||
}
|
}
|
||||||
|
|
||||||
const _CategoryType_name = "UnknownCategoryemailcontactseventsfileslistslibrariesdetails"
|
const _CategoryType_name = "UnknownCategoryemailcontactseventsfileslistslibrariespagesdetails"
|
||||||
|
|
||||||
var _CategoryType_index = [...]uint8{0, 15, 20, 28, 34, 39, 44, 53, 60}
|
var _CategoryType_index = [...]uint8{0, 15, 20, 28, 34, 39, 44, 53, 58, 65}
|
||||||
|
|
||||||
func (i CategoryType) String() string {
|
func (i CategoryType) String() string {
|
||||||
if i < 0 || i >= CategoryType(len(_CategoryType_index)-1) {
|
if i < 0 || i >= CategoryType(len(_CategoryType_index)-1) {
|
||||||
|
|||||||
@ -65,6 +65,7 @@ const (
|
|||||||
FilesCategory // files
|
FilesCategory // files
|
||||||
ListsCategory // lists
|
ListsCategory // lists
|
||||||
LibrariesCategory // libraries
|
LibrariesCategory // libraries
|
||||||
|
PagesCategory // pages
|
||||||
DetailsCategory // details
|
DetailsCategory // details
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,6 +83,8 @@ func ToCategoryType(category string) CategoryType {
|
|||||||
return LibrariesCategory
|
return LibrariesCategory
|
||||||
case ListsCategory.String():
|
case ListsCategory.String():
|
||||||
return ListsCategory
|
return ListsCategory
|
||||||
|
case PagesCategory.String():
|
||||||
|
return PagesCategory
|
||||||
case DetailsCategory.String():
|
case DetailsCategory.String():
|
||||||
return DetailsCategory
|
return DetailsCategory
|
||||||
default:
|
default:
|
||||||
@ -103,6 +106,7 @@ var serviceCategories = map[ServiceType]map[CategoryType]struct{}{
|
|||||||
SharePointService: {
|
SharePointService: {
|
||||||
LibrariesCategory: {},
|
LibrariesCategory: {},
|
||||||
ListsCategory: {},
|
ListsCategory: {},
|
||||||
|
PagesCategory: {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,6 +116,13 @@ var (
|
|||||||
return pb.ToDataLayerSharePointPath(tenant, site, path.ListsCategory, isItem)
|
return pb.ToDataLayerSharePointPath(tenant, site, path.ListsCategory, isItem)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
service: path.SharePointService,
|
||||||
|
category: path.PagesCategory,
|
||||||
|
pathFunc: func(pb *path.Builder, tenant, site string, isItem bool) (path.Path, error) {
|
||||||
|
return pb.ToDataLayerSharePointPath(tenant, site, path.PagesCategory, isItem)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -300,6 +307,13 @@ func (suite *DataLayerResourcePath) TestToServiceCategoryMetadataPath() {
|
|||||||
expectedService: path.SharePointMetadataService,
|
expectedService: path.SharePointMetadataService,
|
||||||
check: assert.NoError,
|
check: assert.NoError,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Passes",
|
||||||
|
service: path.SharePointService,
|
||||||
|
category: path.PagesCategory,
|
||||||
|
expectedService: path.SharePointMetadataService,
|
||||||
|
check: assert.NoError,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range table {
|
for _, test := range table {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user