CLI: Restore: SharePoint Pages (#2228)
## Description Changes connect SharePoint Pages to restore CLI. <!-- Insert PR description--> ## Does this PR need a docs update or release note? - [x] ⛔ No Arguments are hidden ## 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. --> * related to #2318 * closes #2070 * closes #2168<issue> * closes #2218 ## Test Plan <!-- How will this be tested prior to merging.--> - [x] ⚡ Unit test
This commit is contained in:
parent
89fb764526
commit
67634cbbc1
@ -141,12 +141,12 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
|
||||
|
||||
fs.StringSliceVar(
|
||||
&pageFolders,
|
||||
utils.PageFN, nil,
|
||||
"Select backup data by site ID; accepts '"+utils.Wildcard+"' to select all sites.")
|
||||
utils.PageFolderFN, nil,
|
||||
"Select backup data by folder name; accepts '"+utils.Wildcard+"' to select all folders.")
|
||||
|
||||
fs.StringSliceVar(
|
||||
&page,
|
||||
utils.PageItemFN, nil,
|
||||
utils.PagesFN, nil,
|
||||
"Select backup data by file name; accepts '"+utils.Wildcard+"' to select all pages within the site.",
|
||||
)
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@ import (
|
||||
var (
|
||||
listItems []string
|
||||
listPaths []string
|
||||
pageFolders []string
|
||||
pages []string
|
||||
libraryItems []string
|
||||
libraryPaths []string
|
||||
site []string
|
||||
@ -76,6 +78,18 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
|
||||
utils.ListItemFN, nil,
|
||||
"Restore list items by ID")
|
||||
|
||||
fs.StringSliceVar(
|
||||
&pageFolders,
|
||||
utils.PageFolderFN, nil,
|
||||
"Restore Site pages by page folder name",
|
||||
)
|
||||
|
||||
fs.StringSliceVar(
|
||||
&pages,
|
||||
utils.PagesFN, nil,
|
||||
"Restore site pages by file name(s)",
|
||||
)
|
||||
|
||||
// sharepoint info flags
|
||||
|
||||
// fs.StringVar(
|
||||
@ -131,6 +145,8 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error {
|
||||
ListPaths: listPaths,
|
||||
LibraryItems: libraryItems,
|
||||
LibraryPaths: libraryPaths,
|
||||
PageFolders: pageFolders,
|
||||
Pages: pages,
|
||||
Sites: site,
|
||||
WebURLs: weburl,
|
||||
// FileCreatedAfter: fileCreatedAfter,
|
||||
|
||||
@ -11,8 +11,8 @@ const (
|
||||
LibraryFN = "library"
|
||||
ListItemFN = "list-item"
|
||||
ListFN = "list"
|
||||
PageFN = "page"
|
||||
PageItemFN = "page-item"
|
||||
PageFolderFN = "page-folders"
|
||||
PagesFN = "pages"
|
||||
WebURLFN = "web-url"
|
||||
)
|
||||
|
||||
|
||||
@ -13,8 +13,14 @@ import (
|
||||
|
||||
// BetaClient the main entry point of the SDK, exposes the configuration and the fluent API.
|
||||
// Minimal Beta Connector:
|
||||
// Details on how the Code was generated is present in `kioter-lock.json`.
|
||||
// NOTE: kiota gen file is altered to indicate what files are included in the created
|
||||
// Details on how the Code was generated is within `kioter-lock.json`.
|
||||
//
|
||||
// Beta files use an adapter that allows for ASync() request. This feature
|
||||
// is disabled within the nested directories. Generic Kiota adapters do not support.
|
||||
//
|
||||
// Supported betasdk models are located within the models subdirectory
|
||||
// Supported Call source are located within the sites subdirectory
|
||||
// Specifics on `betaClient.SitesById(siteID).Pages` are located: sites/site_item_request_builder.go
|
||||
//
|
||||
// Changes to Sites Directory:
|
||||
// Access files send requests with an adapter's with ASync() support.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user