Documentation
¶
Overview ¶
Package api represents Fluent API for SharePoint object model
Index ¶
- Variables
- func EscapePathURI(s string) string
- func ExtractEntityURI(payload []byte) string
- func HasPermissions(basePermissions BasePermissions, permissionsKind int64) bool
- func NormalizeODataCollection(payload []byte) ([]byte, string)
- func NormalizeODataItem(payload []byte) []byte
- func TrimMultiline(multi string) string
- type AddChunkedOptions
- type AddValidateFieldResult
- type AddValidateResp
- type AssociatedGroups
- type Attachment
- type AttachmentInfo
- type AttachmentResp
- type Attachments
- type AttachmentsResp
- type BasePermissions
- type ChangeInfo
- type ChangeQuery
- type Changes
- func (changes *Changes) Conf(config *RequestConfig) *Changes
- func (changes *Changes) GetChangeType(changeType int) string
- func (changes *Changes) GetChanges(changeQuery *ChangeQuery) (*ChangesResp, error)
- func (changes *Changes) GetCurrentToken() (string, error)
- func (changes *Changes) Top(oDataTop int) *Changes
- type ChangesResp
- type ContentType
- func (contentType *ContentType) Conf(config *RequestConfig) *ContentType
- func (contentType *ContentType) Delete() error
- func (contentType *ContentType) Expand(oDataExpand string) *ContentType
- func (contentType *ContentType) FieldLinks() *FieldLinks
- func (contentType *ContentType) Get() (ContentTypeResp, error)
- func (contentType *ContentType) Select(oDataSelect string) *ContentType
- func (contentType *ContentType) ToURL() string
- func (contentType *ContentType) Update(body []byte) (ContentTypeResp, error)
- type ContentTypeCreationInfo
- type ContentTypeInfo
- type ContentTypeResp
- type ContentTypes
- func (contentTypes *ContentTypes) Add(body []byte) (ContentTypeResp, error)
- func (contentTypes *ContentTypes) Conf(config *RequestConfig) *ContentTypes
- func (contentTypes *ContentTypes) Create(contentTypeInfo *ContentTypeCreationInfo) (string, error)
- func (contentTypes *ContentTypes) Expand(oDataExpand string) *ContentTypes
- func (contentTypes *ContentTypes) Filter(oDataFilter string) *ContentTypes
- func (contentTypes *ContentTypes) Get() (ContentTypesResp, error)
- func (contentTypes *ContentTypes) GetByID(contentTypeID string) *ContentType
- func (contentTypes *ContentTypes) OrderBy(oDataOrderBy string, ascending bool) *ContentTypes
- func (contentTypes *ContentTypes) Select(oDataSelect string) *ContentTypes
- func (contentTypes *ContentTypes) ToURL() string
- func (contentTypes *ContentTypes) Top(oDataTop int) *ContentTypes
- type ContentTypesResp
- type Context
- type ContextInfo
- type CustomAction
- type CustomActionInfo
- type CustomActions
- func (customActions *CustomActions) Add(payload []byte) (*CustomActionInfo, error)
- func (customActions *CustomActions) Conf(config *RequestConfig) *CustomActions
- func (customActions *CustomActions) Filter(oDataFilter string) *CustomActions
- func (customActions *CustomActions) Get() ([]*CustomActionInfo, error)
- func (customActions *CustomActions) GetByID(actionID string) *CustomAction
- func (customActions *CustomActions) OrderBy(oDataOrderBy string, ascending bool) *CustomActions
- func (customActions *CustomActions) Select(oDataSelect string) *CustomActions
- func (customActions *CustomActions) ToURL() string
- func (customActions *CustomActions) Top(oDataTop int) *CustomActions
- type DecodedURL
- type EmailProps
- type EventReceiverInfo
- type EventReceivers
- func (eventReceivers *EventReceivers) Conf(config *RequestConfig) *EventReceivers
- func (eventReceivers *EventReceivers) Filter(oDataFilter string) *EventReceivers
- func (eventReceivers *EventReceivers) Get() ([]*EventReceiverInfo, error)
- func (eventReceivers *EventReceivers) OrderBy(oDataOrderBy string, ascending bool) *EventReceivers
- func (eventReceivers *EventReceivers) Select(oDataSelect string) *EventReceivers
- func (eventReceivers *EventReceivers) ToURL() string
- func (eventReceivers *EventReceivers) Top(oDataTop int) *EventReceivers
- type FeatureInfo
- type Features
- type Field
- func (field *Field) Conf(config *RequestConfig) *Field
- func (field *Field) Delete() error
- func (field *Field) Expand(oDataExpand string) *Field
- func (field *Field) Get() (FieldResp, error)
- func (field *Field) Select(oDataSelect string) *Field
- func (field *Field) ToURL() string
- func (field *Field) Update(body []byte) (FieldResp, error)
- type FieldInfo
- type FieldLink
- type FieldLinkInfo
- type FieldLinkResp
- type FieldLinks
- func (fieldLinks *FieldLinks) Add(name string) (string, error)
- func (fieldLinks *FieldLinks) Conf(config *RequestConfig) *FieldLinks
- func (fieldLinks *FieldLinks) Filter(oDataFilter string) *FieldLinks
- func (fieldLinks *FieldLinks) Get() (FieldLinksResp, error)
- func (fieldLinks *FieldLinks) GetByID(fieldLinkID string) *FieldLink
- func (fieldLinks *FieldLinks) GetFields() (FieldsResp, error)
- func (fieldLinks *FieldLinks) Select(oDataSelect string) *FieldLinks
- func (fieldLinks *FieldLinks) ToURL() string
- func (fieldLinks *FieldLinks) Top(oDataTop int) *FieldLinks
- type FieldLinksResp
- type FieldResp
- type Fields
- func (fields *Fields) Add(body []byte) (FieldResp, error)
- func (fields *Fields) Conf(config *RequestConfig) *Fields
- func (fields *Fields) CreateFieldAsXML(schemaXML string, options int) (FieldResp, error)
- func (fields *Fields) Expand(oDataExpand string) *Fields
- func (fields *Fields) Filter(oDataFilter string) *Fields
- func (fields *Fields) Get() (FieldsResp, error)
- func (fields *Fields) GetByID(fieldID string) *Field
- func (fields *Fields) GetByInternalNameOrTitle(internalName string) *Field
- func (fields *Fields) GetByTitle(title string) *Field
- func (fields *Fields) OrderBy(oDataOrderBy string, ascending bool) *Fields
- func (fields *Fields) Select(oDataSelect string) *Fields
- func (fields *Fields) ToURL() string
- func (fields *Fields) Top(oDataTop int) *Fields
- type FieldsResp
- type File
- func (file *File) CheckIn(comment string, checkInType int) ([]byte, error)
- func (file *File) CheckOut() ([]byte, error)
- func (file *File) Conf(config *RequestConfig) *File
- func (file *File) ContextInfo() (*ContextInfo, error)
- func (file *File) CopyTo(newURL string, overwrite bool) ([]byte, error)
- func (file *File) Delete() error
- func (file *File) Download() ([]byte, error)
- func (file *File) Expand(oDataExpand string) *File
- func (file *File) Get() (FileResp, error)
- func (file *File) GetItem() (*Item, error)
- func (file *File) GetReader() (io.ReadCloser, error)
- func (file *File) ListItemAllFields() (ListItemAllFieldsResp, error)
- func (file *File) MoveTo(newURL string, overwrite bool) ([]byte, error)
- func (file *File) Props() *Properties
- func (file *File) Publish(comment string) ([]byte, error)
- func (file *File) Recycle() error
- func (file *File) Select(oDataSelect string) *File
- func (file *File) SetContent(content []byte) error
- func (file *File) ToURL() string
- func (file *File) UnPublish(comment string) ([]byte, error)
- func (file *File) UndoCheckOut() ([]byte, error)
- type FileInfo
- type FileResp
- type FileUploadProgressData
- type Files
- func (files *Files) Add(name string, content []byte, overwrite bool) (FileResp, error)
- func (files *Files) AddChunked(name string, stream io.Reader, options *AddChunkedOptions) (FileResp, error)
- func (files *Files) Conf(config *RequestConfig) *Files
- func (files *Files) Expand(oDataExpand string) *Files
- func (files *Files) Filter(oDataFilter string) *Files
- func (files *Files) Get() (FilesResp, error)
- func (files *Files) GetByName(fileName string) *File
- func (files *Files) OrderBy(oDataOrderBy string, ascending bool) *Files
- func (files *Files) Select(oDataSelect string) *Files
- func (files *Files) ToURL() string
- func (files *Files) Top(oDataTop int) *Files
- type FilesResp
- type Folder
- func (folder *Folder) Conf(config *RequestConfig) *Folder
- func (folder *Folder) ContextInfo() (*ContextInfo, error)
- func (folder *Folder) Delete() error
- func (folder *Folder) Expand(oDataExpand string) *Folder
- func (folder *Folder) Files() *Files
- func (folder *Folder) Folders() *Folders
- func (folder *Folder) Get() (FolderResp, error)
- func (folder *Folder) GetItem() (*Item, error)
- func (folder *Folder) ListItemAllFields() (ListItemAllFieldsResp, error)
- func (folder *Folder) ParentFolder() *Folder
- func (folder *Folder) Props() *Properties
- func (folder *Folder) Recycle() error
- func (folder *Folder) Select(oDataSelect string) *Folder
- func (folder *Folder) ToURL() string
- func (folder *Folder) Update(body []byte) (FolderResp, error)
- type FolderInfo
- type FolderResp
- type Folders
- func (folders *Folders) Add(folderName string) (FolderResp, error)
- func (folders *Folders) Conf(config *RequestConfig) *Folders
- func (folders *Folders) Expand(oDataExpand string) *Folders
- func (folders *Folders) Filter(oDataFilter string) *Folders
- func (folders *Folders) Get() (FoldersResp, error)
- func (folders *Folders) GetByName(folderName string) *Folder
- func (folders *Folders) OrderBy(oDataOrderBy string, ascending bool) *Folders
- func (folders *Folders) Select(oDataSelect string) *Folders
- func (folders *Folders) ToURL() string
- func (folders *Folders) Top(oDataTop int) *Folders
- type FoldersResp
- type GenericItemInfo
- type Group
- func (group *Group) AddUser(loginName string) error
- func (group *Group) AddUserByID(userID int) error
- func (group *Group) Conf(config *RequestConfig) *Group
- func (group *Group) Expand(oDataExpand string) *Group
- func (group *Group) Get() (GroupResp, error)
- func (group *Group) RemoveUser(loginName string) error
- func (group *Group) RemoveUserByID(userID int) error
- func (group *Group) Select(oDataSelect string) *Group
- func (group *Group) SetOwner(ownerID int) error
- func (group *Group) SetUserAsOwner(userID int) error
- func (group *Group) ToURL() string
- func (group *Group) Update(body []byte) (GroupResp, error)
- func (group *Group) Users() *Users
- type GroupInfo
- type GroupResp
- type Groups
- func (groups *Groups) Add(title string, metadata map[string]interface{}) (GroupResp, error)
- func (groups *Groups) Conf(config *RequestConfig) *Groups
- func (groups *Groups) Expand(oDataExpand string) *Groups
- func (groups *Groups) Filter(oDataFilter string) *Groups
- func (groups *Groups) Get() (GroupsResp, error)
- func (groups *Groups) GetByID(groupID int) *Group
- func (groups *Groups) GetByName(groupName string) *Group
- func (groups *Groups) OrderBy(oDataOrderBy string, ascending bool) *Groups
- func (groups *Groups) RemoveByID(groupID int) error
- func (groups *Groups) RemoveByLoginName(loginName string) error
- func (groups *Groups) Select(oDataSelect string) *Groups
- func (groups *Groups) ToURL() string
- func (groups *Groups) Top(oDataTop int) *Groups
- type GroupsResp
- type HTTPClient
- func (client *HTTPClient) Delete(endpoint string, conf *RequestConfig) ([]byte, error)
- func (client *HTTPClient) Get(endpoint string, conf *RequestConfig) ([]byte, error)
- func (client *HTTPClient) Post(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
- func (client *HTTPClient) ProcessQuery(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
- func (client *HTTPClient) Update(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
- type Item
- func (item *Item) Attachments() *Attachments
- func (item *Item) Conf(config *RequestConfig) *Item
- func (item *Item) ContextInfo() (*ContextInfo, error)
- func (item *Item) Delete() error
- func (item *Item) Expand(oDataExpand string) *Item
- func (item *Item) Get() (ItemResp, error)
- func (item *Item) ParentList() *List
- func (item *Item) Records() *Records
- func (item *Item) Recycle() error
- func (item *Item) Roles() *Roles
- func (item *Item) Select(oDataSelect string) *Item
- func (item *Item) ToURL() string
- func (item *Item) Update(body []byte) (ItemResp, error)
- func (item *Item) UpdateValidate(formValues map[string]string, options *ValidateUpdateOptions) (UpdateValidateResp, error)
- type ItemResp
- type Items
- func (items *Items) Add(body []byte) (ItemResp, error)
- func (items *Items) AddValidate(formValues map[string]string, options *ValidateAddOptions) (AddValidateResp, error)
- func (items *Items) Conf(config *RequestConfig) *Items
- func (items *Items) Expand(oDataExpand string) *Items
- func (items *Items) Filter(oDataFilter string) *Items
- func (items *Items) Get() (ItemsResp, error)
- func (items *Items) GetAll() ([]ItemResp, error)
- func (items *Items) GetByCAML(caml string) (ItemsResp, error)
- func (items *Items) GetByID(itemID int) *Item
- func (items *Items) GetPaged() (*ItemsPage, error)
- func (items *Items) OrderBy(oDataOrderBy string, ascending bool) *Items
- func (items *Items) Select(oDataSelect string) *Items
- func (items *Items) Skip(skipToken string) *Items
- func (items *Items) ToURL() string
- func (items *Items) Top(oDataTop int) *Items
- type ItemsPage
- type ItemsResp
- type List
- func (list *List) Changes() *Changes
- func (list *List) Conf(config *RequestConfig) *List
- func (list *List) ContentTypes() *ContentTypes
- func (list *List) ContextInfo() (*ContextInfo, error)
- func (list *List) Delete() error
- func (list *List) Expand(oDataExpand string) *List
- func (list *List) Fields() *Fields
- func (list *List) Get() (ListResp, error)
- func (list *List) GetEntityType() (string, error)
- func (list *List) Items() *Items
- func (list *List) ParentWeb() *Web
- func (list *List) Recycle() error
- func (list *List) RenderListData(viewXML string) (RenderListDataResp, error)
- func (list *List) ReserveListItemID() (int, error)
- func (list *List) Roles() *Roles
- func (list *List) RootFolder() *Folder
- func (list *List) Select(oDataSelect string) *List
- func (list *List) Subscriptions() *Subscriptions
- func (list *List) ToURL() string
- func (list *List) Update(body []byte) (ListResp, error)
- func (list *List) Views() *Views
- type ListInfo
- type ListItemAllFieldsResp
- type ListResp
- type Lists
- func (lists *Lists) Add(title string, metadata map[string]interface{}) (ListResp, error)
- func (lists *Lists) AddWithURI(title string, uri string, metadata map[string]interface{}) ([]byte, error)
- func (lists *Lists) Conf(config *RequestConfig) *Lists
- func (lists *Lists) Expand(oDataExpand string) *Lists
- func (lists *Lists) Filter(oDataFilter string) *Lists
- func (lists *Lists) Get() (ListsResp, error)
- func (lists *Lists) GetByID(listGUID string) *List
- func (lists *Lists) GetByTitle(listTitle string) *List
- func (lists *Lists) OrderBy(oDataOrderBy string, ascending bool) *Lists
- func (lists *Lists) Select(oDataSelect string) *Lists
- func (lists *Lists) ToURL() string
- func (lists *Lists) Top(oDataTop int) *Lists
- type ListsResp
- type ODataMods
- func (oData *ODataMods) AddExpand(values string) *ODataMods
- func (oData *ODataMods) AddFilter(values string) *ODataMods
- func (oData *ODataMods) AddOrderBy(orderBy string, ascending bool) *ODataMods
- func (oData *ODataMods) AddSelect(values string) *ODataMods
- func (oData *ODataMods) AddSkip(value string) *ODataMods
- func (oData *ODataMods) AddTop(value int) *ODataMods
- func (oData *ODataMods) Get() map[string]string
- type ProfileInfo
- type ProfilePropsInto
- type ProfilePropsResp
- type ProfileResp
- type Profiles
- func (profiles *Profiles) Conf(config *RequestConfig) *Profiles
- func (profiles *Profiles) GetMyProperties() (ProfilePropsResp, error)
- func (profiles *Profiles) GetOwnerUserProfile() (ProfileResp, error)
- func (profiles *Profiles) GetPropertiesFor(loginName string) (ProfilePropsResp, error)
- func (profiles *Profiles) GetUserProfilePropertyFor(loginName string, property string) (string, error)
- func (profiles *Profiles) HideSuggestion(loginName string) ([]byte, error)
- func (profiles *Profiles) SetMultiValuedProfileProperty(loginName string, property string, values []string) error
- func (profiles *Profiles) SetSingleValueProfileProperty(loginName string, property string, value string) error
- func (profiles *Profiles) UserProfile() (ProfileResp, error)
- type Properties
- func (properties *Properties) Conf(config *RequestConfig) *Properties
- func (properties *Properties) Expand(oDataExpand string) *Properties
- func (properties *Properties) Get() (PropsResp, error)
- func (properties *Properties) GetProps(props []string) (map[string]string, error)
- func (properties *Properties) Select(oDataSelect string) *Properties
- func (properties *Properties) Set(prop string, value string) error
- func (properties *Properties) SetProps(props map[string]string) error
- func (properties *Properties) ToURL() string
- type PropsResp
- type Records
- type RecycleBin
- func (recycleBin *RecycleBin) Conf(config *RequestConfig) *RecycleBin
- func (recycleBin *RecycleBin) Expand(oDataExpand string) *RecycleBin
- func (recycleBin *RecycleBin) Filter(oDataFilter string) *RecycleBin
- func (recycleBin *RecycleBin) Get() (RecycleBinResp, error)
- func (recycleBin *RecycleBin) GetByID(itemID string) *RecycleBinItem
- func (recycleBin *RecycleBin) OrderBy(oDataOrderBy string, ascending bool) *RecycleBin
- func (recycleBin *RecycleBin) Select(oDataSelect string) *RecycleBin
- func (recycleBin *RecycleBin) ToURL() string
- func (recycleBin *RecycleBin) Top(oDataTop int) *RecycleBin
- type RecycleBinItem
- type RecycleBinItemInfo
- type RecycleBinItemResp
- type RecycleBinResp
- type RenderListDataInfo
- type RenderListDataResp
- type RequestConfig
- type ResultTable
- type ResultTableCollection
- type RoleAssigment
- type RoleDefInfo
- type RoleDefinitions
- type Roles
- func (permissions *Roles) AddAssigment(principalID int, roleDefID int) error
- func (permissions *Roles) BreakInheritance(copyRoleAssignments bool, clearSubScopes bool) error
- func (permissions *Roles) HasUniqueAssignments() (bool, error)
- func (permissions *Roles) RemoveAssigment(principalID int, roleDefID int) error
- func (permissions *Roles) ResetInheritance() error
- type SP
- func (sp *SP) Conf(config *RequestConfig) *SP
- func (sp *SP) ContextInfo() (*ContextInfo, error)
- func (sp *SP) Metadata() ([]byte, error)
- func (sp *SP) Profiles() *Profiles
- func (sp *SP) Search() *Search
- func (sp *SP) Site() *Site
- func (sp *SP) Taxonomy() *Taxonomy
- func (sp *SP) ToURL() string
- func (sp *SP) Utility() *Utility
- func (sp *SP) Web() *Web
- type Search
- type SearchProperty
- type SearchPropertyValue
- type SearchQuery
- type SearchReorderingRule
- type SearchResp
- type SearchResults
- type SearchSort
- type Site
- func (site *Site) Changes() *Changes
- func (site *Site) Conf(config *RequestConfig) *Site
- func (site *Site) CustomActions() *CustomActions
- func (site *Site) Delete() error
- func (site *Site) EventReceivers() *EventReceivers
- func (site *Site) Expand(oDataExpand string) *Site
- func (site *Site) Features() *Features
- func (site *Site) FromURL(url string) *Site
- func (site *Site) Get() (SiteResp, error)
- func (site *Site) OpenWebByID(webID string) (WebResp, error)
- func (site *Site) Owner() *User
- func (site *Site) RecycleBin() *RecycleBin
- func (site *Site) RootWeb() *Web
- func (site *Site) Select(oDataSelect string) *Site
- func (site *Site) ToURL() string
- func (site *Site) Update(body []byte) (SiteResp, error)
- func (site *Site) WebByID(webID string) (*Web, error)
- type SiteInfo
- type SiteResp
- type StringValue
- type Subscription
- func (subscription *Subscription) Conf(config *RequestConfig) *Subscription
- func (subscription *Subscription) Delete() error
- func (subscription *Subscription) Get() (*SubscriptionInfo, error)
- func (subscription *Subscription) SetClientState(clientState string) (*SubscriptionInfo, error)
- func (subscription *Subscription) SetExpiration(expiration time.Time) (*SubscriptionInfo, error)
- func (subscription *Subscription) SetNotificationURL(notificationURL string) (*SubscriptionInfo, error)
- func (subscription *Subscription) Update(metadata map[string]interface{}) (*SubscriptionInfo, error)
- type SubscriptionInfo
- type Subscriptions
- func (subscriptions *Subscriptions) Add(notificationURL string, expiration time.Time, clientState string) (*SubscriptionInfo, error)
- func (subscriptions *Subscriptions) Conf(config *RequestConfig) *Subscriptions
- func (subscriptions *Subscriptions) Get() ([]*SubscriptionInfo, error)
- func (subscriptions *Subscriptions) GetByID(subscriptionID string) *Subscription
- type Taxonomy
- type Term
- func (term *Term) Delete() error
- func (term *Term) Deprecate(deprecate bool) error
- func (term *Term) Get() (map[string]interface{}, error)
- func (term *Term) Move(termSetGUID string, termGUID string) error
- func (term *Term) Select(props string) *Term
- func (term *Term) Terms() *Terms
- func (term *Term) Update(properties map[string]interface{}) (map[string]interface{}, error)
- type TermGroup
- type TermGroups
- type TermSet
- type TermSets
- func (termSets *TermSets) Add(name string, guid string, lcid int) (map[string]interface{}, error)
- func (termSets *TermSets) Get() ([]map[string]interface{}, error)
- func (termSets *TermSets) GetByID(setGUID string) *TermSet
- func (termSets *TermSets) GetByName(termSetName string, lcid int) ([]map[string]interface{}, error)
- type TermStore
- func (termStore *TermStore) Get() (map[string]interface{}, error)
- func (termStore *TermStore) Groups() *TermGroups
- func (termStore *TermStore) Select(props string) *TermStore
- func (termStore *TermStore) Sets() *TermSets
- func (termStore *TermStore) Terms() *Terms
- func (termStore *TermStore) UpdateCache() error
- type TermStores
- type Terms
- type TypedKeyValue
- type UpdateValidateFieldResult
- type UpdateValidateResp
- type User
- func (user *User) Conf(config *RequestConfig) *User
- func (user *User) Expand(oDataExpand string) *User
- func (user *User) Get() (UserResp, error)
- func (user *User) Groups() *Groups
- func (user *User) Select(oDataSelect string) *User
- func (user *User) ToURL() string
- func (user *User) Update(body []byte) (UserResp, error)
- type UserInfo
- type UserResp
- type Users
- func (users *Users) Conf(config *RequestConfig) *Users
- func (users *Users) Expand(oDataExpand string) *Users
- func (users *Users) Filter(oDataFilter string) *Users
- func (users *Users) Get() (UsersResp, error)
- func (users *Users) GetByEmail(email string) *User
- func (users *Users) GetByID(userID int) *User
- func (users *Users) GetByLoginName(loginName string) *User
- func (users *Users) OrderBy(oDataOrderBy string, ascending bool) *Users
- func (users *Users) Select(oDataSelect string) *Users
- func (users *Users) ToURL() string
- func (users *Users) Top(oDataTop int) *Users
- type UsersResp
- type Utility
- type ValidateAddOptions
- type ValidateUpdateOptions
- type View
- func (view *View) Conf(config *RequestConfig) *View
- func (view *View) Delete() error
- func (view *View) Expand(oDataExpand string) *View
- func (view *View) Get() (ViewResp, error)
- func (view *View) Select(oDataSelect string) *View
- func (view *View) SetViewXML(viewXML string) (ViewResp, error)
- func (view *View) ToURL() string
- func (view *View) Update(body []byte) (ViewResp, error)
- type ViewInfo
- type ViewResp
- type Views
- func (views *Views) Add(body []byte) (ViewResp, error)
- func (views *Views) Conf(config *RequestConfig) *Views
- func (views *Views) DefaultView() *View
- func (views *Views) Expand(oDataExpand string) *Views
- func (views *Views) Filter(oDataFilter string) *Views
- func (views *Views) Get() (ViewsResp, error)
- func (views *Views) GetByID(viewID string) *View
- func (views *Views) GetByTitle(title string) *View
- func (views *Views) OrderBy(oDataOrderBy string, ascending bool) *Views
- func (views *Views) Select(oDataSelect string) *Views
- func (views *Views) ToURL() string
- func (views *Views) Top(oDataTop int) *Views
- type ViewsResp
- type Web
- func (web *Web) AllProps() *Properties
- func (web *Web) AssociatedGroups() *AssociatedGroups
- func (web *Web) AvailableContentTypes() *ContentTypes
- func (web *Web) Changes() *Changes
- func (web *Web) Conf(config *RequestConfig) *Web
- func (web *Web) ContentTypes() *ContentTypes
- func (web *Web) ContextInfo() (*ContextInfo, error)
- func (web *Web) CurrentUser() *User
- func (web *Web) CustomActions() *CustomActions
- func (web *Web) Delete() error
- func (web *Web) EnsureFolder(serverRelativeURL string) (FolderResp, error)
- func (web *Web) EnsureFolderByPath(serverRelativeURL string) (FolderResp, error)
- func (web *Web) EnsureUser(loginName string) (*UserInfo, error)
- func (web *Web) EventReceivers() *EventReceivers
- func (web *Web) Expand(oDataExpand string) *Web
- func (web *Web) Features() *Features
- func (web *Web) Fields() *Fields
- func (web *Web) FromURL(url string) *Web
- func (web *Web) Get() (WebResp, error)
- func (web *Web) GetFile(serverRelativeURL string) *File
- func (web *Web) GetFileByID(uniqueID string) *File
- func (web *Web) GetFileByPath(serverRelativeURL string) *File
- func (web *Web) GetFolder(serverRelativeURL string) *Folder
- func (web *Web) GetFolderByID(uniqueID string) *Folder
- func (web *Web) GetFolderByPath(serverRelativeURL string) *Folder
- func (web *Web) GetList(listURI string) *List
- func (web *Web) Lists() *Lists
- func (web *Web) RecycleBin() *RecycleBin
- func (web *Web) RoleDefinitions() *RoleDefinitions
- func (web *Web) Roles() *Roles
- func (web *Web) RootFolder() *Folder
- func (web *Web) Select(oDataSelect string) *Web
- func (web *Web) SiteGroups() *Groups
- func (web *Web) SiteUsers() *Users
- func (web *Web) ToURL() string
- func (web *Web) Update(body []byte) (WebResp, error)
- func (web *Web) UserInfoList() *List
- func (web *Web) Webs() *Webs
- type WebInfo
- type WebResp
- type WebhookInfo
- type Webs
- func (webs *Webs) Add(title string, url string, metadata map[string]interface{}) (WebResp, error)
- func (webs *Webs) Conf(config *RequestConfig) *Webs
- func (webs *Webs) Expand(oDataExpand string) *Webs
- func (webs *Webs) Filter(oDataFilter string) *Webs
- func (webs *Webs) Get() (WebsResp, error)
- func (webs *Webs) OrderBy(oDataOrderBy string, ascending bool) *Webs
- func (webs *Webs) Select(oDataSelect string) *Webs
- func (webs *Webs) ToURL() string
- func (webs *Webs) Top(oDataTop int) *Webs
- type WebsResp
Constants ¶
This section is empty.
Variables ¶
var CheckInTypes = func() *checkInTypes {
return &checkInTypes{
Minor: 0,
Major: 1,
Overwrite: 2,
}
}()
CheckInTypes - available check in types
var HeadersPresets = struct { Verbose *RequestConfig Minimalmetadata *RequestConfig Nometadata *RequestConfig }{ Verbose: &RequestConfig{ Headers: map[string]string{ "Accept": "application/json;odata=verbose", "Content-Type": "application/json;odata=verbose;charset=utf-8", "Accept-Language": "en-US,en;q=0.9", }, }, Minimalmetadata: &RequestConfig{ Headers: map[string]string{ "Accept": "application/json;odata=minimalmetadata", "Content-Type": "application/json;odata=verbose;charset=utf-8", "Accept-Language": "en-US,en;q=0.9", }, }, Nometadata: &RequestConfig{ Headers: map[string]string{ "Accept": "application/json;odata=nometadata", "Content-Type": "application/json;odata=verbose;charset=utf-8", "Accept-Language": "en-US,en;q=0.9", }, }, }
HeadersPresets : SP REST OData headers presets
var PermissionKind = struct { // Has no permissions on the Site. Not available through the user interface EmptyMask int64 // View items in lists, documents in document libraries, and Web discussion comments ViewListItems int64 // Add items to lists, documents to document libraries, and Web discussion comments AddListItems int64 // Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries EditListItems int64 // Delete items from a list, documents from a document library, and Web discussion comments in documents DeleteListItems int64 // Approve a minor version of a list item or document ApproveItems int64 // View the source of documents with server-side file handlers OpenItems int64 // View past versions of a list item or document ViewVersions int64 // Delete past versions of a list item or document DeleteVersions int64 // Discard or check in a document which is checked out to another user CancelCheckout int64 // Create, change, and delete personal views of lists ManagePersonalViews int64 // Create and delete lists, add or remove columns in a list, and add or remove public views of a list ManageLists int64 // View forms, views, and application pages, and enumerate lists ViewFormPages int64 /** * Make content of a list or document library retrievable for anonymous users through SharePoint search. * The list permissions in the site do not change. */ AnonymousSearchAccessList int64 // Allow users to open a Site, list, or folder to access items inside that container Open int64 // View pages in a Site ViewPages int64 // Add, change, or delete HTML pages or Web Part Pages, and edit the Site using a Windows SharePoint Services compatible editor AddAndCustomizePages int64 // Apply a theme or borders to the entire Site ApplyThemeAndBorder int64 // Apply a style sheet (.css file) to the Site ApplyStyleSheets int64 // View reports on Site usage ViewUsageData int64 // Create a Site using Self-Service Site Creation CreateSSCSite int64 // Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites ManageSubwebs int64 // Create a group of users that can be used anywhere within the site collection CreateGroups int64 // Create and change permission levels on the Site and assign permissions to users and groups ManagePermissions int64 // Enumerate files and folders in a Site using Microsoft Office SharePoint Designer and WebDAV interfaces BrowseDirectories int64 // View information about users of the Site BrowseUserInfo int64 // Add or remove personal Web Parts on a Web Part Page AddDelPrivateWebParts int64 // Update Web Parts to display personalized information UpdatePersonalWebParts int64 /** * Grant the ability to perform all administration tasks for the Site as well as * manage content, activate, deactivate, or edit properties of Site scoped Features * through the object model or through the user interface (UI). When granted on the * root Site of a Site Collection, activate, deactivate, or edit properties of * site collection scoped Features through the object model. To browse to the Site * Collection Features page and activate or deactivate Site Collection scoped Features * through the UI, you must be a Site Collection administrator. */ ManageWeb int64 /** * Content of lists and document libraries in the Web site will be retrievable for anonymous users through * SharePoint search if the list or document library has AnonymousSearchAccessList set */ AnonymousSearchAccessWebLists int64 // Use features that launch client applications. Otherwise, users must work on documents locally and upload changes UseClientIntegration int64 // Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site UseRemoteAPIs int64 // Manage alerts for all users of the Site ManageAlerts int64 // Create e-mail alerts CreateAlerts int64 // Allows a user to change his or her user information, such as adding a picture EditMyUserInfo int64 // Enumerate permissions on Site, list, folder, document, or list item EnumeratePermissions int64 // Has all permissions on the Site. Not available through the user interface FullMask int64 }{ EmptyMask: 0, ViewListItems: 1, AddListItems: 2, EditListItems: 3, DeleteListItems: 4, ApproveItems: 5, OpenItems: 6, ViewVersions: 7, DeleteVersions: 8, CancelCheckout: 9, ManagePersonalViews: 10, ManageLists: 12, ViewFormPages: 13, AnonymousSearchAccessList: 14, Open: 17, ViewPages: 18, AddAndCustomizePages: 19, ApplyThemeAndBorder: 20, ApplyStyleSheets: 21, ViewUsageData: 22, CreateSSCSite: 23, ManageSubwebs: 24, CreateGroups: 25, ManagePermissions: 26, BrowseDirectories: 27, BrowseUserInfo: 28, AddDelPrivateWebParts: 29, UpdatePersonalWebParts: 30, ManageWeb: 31, AnonymousSearchAccessWebLists: 32, UseClientIntegration: 37, UseRemoteAPIs: 38, ManageAlerts: 39, CreateAlerts: 40, EditMyUserInfo: 41, EnumeratePermissions: 63, FullMask: 65, }
PermissionKind enumerator
var RoleTypeKinds = struct { None int Guest int Reader int Contributor int WebDesigner int Administrator int Editor int System int }{ None: 0, Guest: 1, Reader: 2, Contributor: 3, WebDesigner: 4, Administrator: 5, Editor: 6, System: 7, }
RoleTypeKinds defined standard role type kinds
Functions ¶
func EscapePathURI ¶
EscapePathURI escapes URI path for GetFile and GetFolder methods
func ExtractEntityURI ¶
ExtractEntityURI extracts REST entity URI from payload
func HasPermissions ¶
func HasPermissions(basePermissions BasePermissions, permissionsKind int64) bool
HasPermissions checks if base permissions include permissions kind mask permissionsKind is represented with in64 value (use PermissionKind struct helper as enumerator)
func NormalizeODataCollection ¶
NormalizeODataCollection parses OData resp taking care of OData mode
func NormalizeODataItem ¶
NormalizeODataItem parses OData resp taking care of OData mode
func TrimMultiline ¶
TrimMultiline trims multiline string converting to a single line friendly for payloads
Types ¶
type AddChunkedOptions ¶
type AddChunkedOptions struct { Overwrite bool // should overwrite existing file Progress func(data *FileUploadProgressData) bool // on progress callback, execute custom logic on each chunk, if the Progress is used it should return "true" to continue upload otherwise upload is canceled ChunkSize int // chunk size in bytes }
AddChunkedOptions provides optional settings for AddChunked method
type AddValidateFieldResult ¶
type AddValidateFieldResult struct { ErrorCode int ErrorMessage string FieldName string FieldValue string HasException bool ItemID int `json:"ItemId"` }
AddValidateFieldResult field result struct
type AddValidateResp ¶
type AddValidateResp []byte
AddValidateResp - add validate using path response type with helper processor methods
func (*AddValidateResp) Data ¶
func (avResp *AddValidateResp) Data() []AddValidateFieldResult
Data unmarshals AddValidate response
func (*AddValidateResp) ID ¶
func (avResp *AddValidateResp) ID() int
ID gets created item's ID from the response
func (*AddValidateResp) Value ¶
func (avResp *AddValidateResp) Value(fieldName string) string
Value gets created item's value from the response
type AssociatedGroups ¶
type AssociatedGroups struct {
// contains filtered or unexported fields
}
AssociatedGroups web associated groups scope constructor Always use NewAssociatedGroups constructor instead of &AssociatedGroups{}
func NewAssociatedGroups ¶
func NewAssociatedGroups(client *gosip.SPClient, endpoint string, config *RequestConfig) *AssociatedGroups
NewAssociatedGroups - AssociatedGroups struct constructor function
func (*AssociatedGroups) Conf ¶
func (associatedGroups *AssociatedGroups) Conf(config *RequestConfig) *AssociatedGroups
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*AssociatedGroups) Members ¶
func (associatedGroups *AssociatedGroups) Members() *Group
Members gets web associated members group API object
func (*AssociatedGroups) Owners ¶
func (associatedGroups *AssociatedGroups) Owners() *Group
Owners gets web associated owners group API object
func (*AssociatedGroups) Visitors ¶
func (associatedGroups *AssociatedGroups) Visitors() *Group
Visitors gets web associated visitors group API object
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
Attachment represents SharePoint List Items Attachment API queryable object struct Always use NewAttachment constructor instead of &Attachment{}
func NewAttachment ¶
func NewAttachment(client *gosip.SPClient, endpoint string, config *RequestConfig) *Attachment
NewAttachment - Attachment struct constructor function
func (*Attachment) Delete ¶
func (attachment *Attachment) Delete() error
Delete delete an attachment skipping recycle bin
func (*Attachment) Download ¶
func (attachment *Attachment) Download() ([]byte, error)
Download downloads attachment's as byte array
func (*Attachment) Get ¶
func (attachment *Attachment) Get() (AttachmentResp, error)
Get gets attachment data object
func (*Attachment) GetReader ¶
func (attachment *Attachment) GetReader() (io.ReadCloser, error)
GetReader gets attachment body data reader
func (*Attachment) Recycle ¶
func (attachment *Attachment) Recycle() error
Recycle moves an attachment to the recycle bin
type AttachmentInfo ¶
type AttachmentInfo struct { FileName string `json:"FileName"` ServerRelativeURL string `json:"ServerRelativeUrl"` }
AttachmentInfo - attachment API response payload structure
type AttachmentResp ¶
type AttachmentResp []byte
AttachmentResp - attachment response type with helper processor methods
func (*AttachmentResp) Data ¶
func (attachmentResp *AttachmentResp) Data() *AttachmentInfo
Data response helper
func (*AttachmentResp) Normalized ¶
func (attachmentResp *AttachmentResp) Normalized() []byte
Normalized returns normalized body
type Attachments ¶
type Attachments struct {
// contains filtered or unexported fields
}
Attachments represent SharePoint List Items Attachments API queryable collection struct Always use NewAttachments constructor instead of &Attachments{}
func NewAttachments ¶
func NewAttachments(client *gosip.SPClient, endpoint string, config *RequestConfig) *Attachments
NewAttachments - Attachments struct constructor function
func (*Attachments) Add ¶
func (attachments *Attachments) Add(name string, content io.Reader) (AttachmentResp, error)
Add uploads new attachment to the item
func (*Attachments) Get ¶
func (attachments *Attachments) Get() (AttachmentsResp, error)
Get gets attachments collection response
func (*Attachments) GetByName ¶
func (attachments *Attachments) GetByName(fileName string) *Attachment
GetByName gets an attachment by its name
type AttachmentsResp ¶
type AttachmentsResp []byte
AttachmentsResp - attachments response type with helper processor methods
func (*AttachmentsResp) Data ¶
func (attachmentsResp *AttachmentsResp) Data() []AttachmentResp
Data response helper
func (*AttachmentsResp) Normalized ¶
func (attachmentsResp *AttachmentsResp) Normalized() []byte
Normalized returns normalized body
type BasePermissions ¶
BasePermissions - Low/High pair of base permissions
type ChangeInfo ¶
type ChangeInfo struct { ChangeToken *StringValue `json:"ChangeToken"` ChangeType int `json:"ChangeType"` // see more https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/ee543793(v%3Doffice.15) Editor string `json:"Editor"` EditorEmailHint string `json:"EditorEmailHint"` ItemID int `json:"ItemId"` ListID string `json:"ListId"` ServerRelativeURL string `json:"ServerRelativeUrl"` SiteID string `json:"SiteId"` Time time.Time `json:"Time"` UniqueID string `json:"UniqueId"` WebID string `json:"WebId"` }
ChangeInfo - changes API response payload structure
type ChangeQuery ¶
type ChangeQuery struct { ChangeTokenStart string // Specifies the start date and start time for changes that are returned through the query ChangeTokenEnd string // Specifies the end date and end time for changes that are returned through the query Add bool // Specifies whether add changes are included in the query Alert bool // Specifies whether changes to alerts are included in the query ContentType bool // Specifies whether changes to content types are included in the query DeleteObject bool // Specifies whether deleted objects are included in the query Field bool // Specifies whether changes to fields are included in the query File bool // Specifies whether changes to files are included in the query Folder bool // Specifies whether changes to folders are included in the query Group bool // Specifies whether changes to groups are included in the query GroupMembershipAdd bool // Specifies whether adding users to groups is included in the query GroupMembershipDelete bool // Specifies whether deleting users from the groups is included in the query Item bool // Specifies whether general changes to list items are included in the query List bool // Specifies whether changes to lists are included in the query Move bool // Specifies whether move changes are included in the query Rename bool // Specifies whether renaming changes are included in the query Restore bool // Specifies whether restoring items from the recycle bin or from backups is included in the query RoleAssignmentAdd bool // Specifies whether adding role assignments is included in the query RoleAssignmentDelete bool // Specifies whether adding role assignments is included in the query RoleDefinitionAdd bool // Specifies whether adding role assignments is included in the query RoleDefinitionDelete bool // Specifies whether adding role assignments is included in the query RoleDefinitionUpdate bool // Specifies whether adding role assignments is included in the query SecurityPolicy bool // Specifies whether modifications to security policies are included in the query Site bool // Specifies whether changes to site collections are included in the query SystemUpdate bool // Specifies whether updates made using the item SystemUpdate method are included in the query Update bool // Specifies whether update changes are included in the query User bool // Specifies whether changes to users are included in the query View bool // Specifies whether changes to views are included in the query Web bool // Specifies whether changes to Web sites are included in the query }
ChangeQuery ...
type Changes ¶
type Changes struct {
// contains filtered or unexported fields
}
Changes represent SharePoint Changes API queryable collection struct Always use NewChanges constructor instead of &Changes{}
func NewChanges ¶
func NewChanges(client *gosip.SPClient, endpoint string, config *RequestConfig) *Changes
NewChanges - Changes struct constructor function
func (*Changes) Conf ¶
func (changes *Changes) Conf(config *RequestConfig) *Changes
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Changes) GetChangeType ¶
GetChangeType gets verbose change type https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/ee543793(v%3Doffice.15)
func (*Changes) GetChanges ¶
func (changes *Changes) GetChanges(changeQuery *ChangeQuery) (*ChangesResp, error)
GetChanges gets changes in scope of the parent container using provided change query
func (*Changes) GetCurrentToken ¶
GetCurrentToken gets current change token for this parent entity
type ChangesResp ¶
type ChangesResp struct { Data func() []*ChangeInfo // gets change info collection GetNextPage func() (*ChangesResp, error) // gets next page changes collection // contains filtered or unexported fields }
ChangesResp - changes response type with helper processor methods
type ContentType ¶
type ContentType struct {
// contains filtered or unexported fields
}
ContentType represents SharePoint Content Types API queryable object struct Always use NewContentType constructor instead of &ContentType{}
func NewContentType ¶
func NewContentType(client *gosip.SPClient, endpoint string, config *RequestConfig) *ContentType
NewContentType - ContentType struct constructor function
func (*ContentType) Conf ¶
func (contentType *ContentType) Conf(config *RequestConfig) *ContentType
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*ContentType) Delete ¶
func (contentType *ContentType) Delete() error
Delete deletes a content type skipping recycle bin
func (*ContentType) Expand ¶
func (contentType *ContentType) Expand(oDataExpand string) *ContentType
Expand adds $expand OData modifier
func (*ContentType) FieldLinks ¶
func (contentType *ContentType) FieldLinks() *FieldLinks
FieldLinks gets FieldLinks API instance queryable collection
func (*ContentType) Get ¶
func (contentType *ContentType) Get() (ContentTypeResp, error)
Get gets content type data object
func (*ContentType) Select ¶
func (contentType *ContentType) Select(oDataSelect string) *ContentType
Select adds $select OData modifier
func (*ContentType) ToURL ¶
func (contentType *ContentType) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*ContentType) Update ¶
func (contentType *ContentType) Update(body []byte) (ContentTypeResp, error)
Update updates Content Types's metadata with properties provided in `body` parameter where `body` is byte array representation of JSON string payload relevant to SP.ContentType object
type ContentTypeCreationInfo ¶
type ContentTypeCreationInfo struct { ID string // Content type ID, e.g. 0x010000BE397685D43B428513CD9CC1E75CE4, optional is ParentContentTypeID is provided Name string // Content type display name Group string // Content type group name Description string // Description text ParentContentTypeID string // Parent content type ID, e.g. 0x01, optional is ID is provided }
ContentTypeCreationInfo new content type metadata
type ContentTypeInfo ¶
type ContentTypeInfo struct { Description string `json:"Description"` Group string `json:"Group"` Hidden bool `json:"Hidden"` JSLink string `json:"JSLink"` Name string `json:"Name"` ReadOnly bool `json:"Read"` SchemaXML string `json:"SchemaXml"` Scope string `json:"Scope"` Sealed bool `json:"Sealed"` ID string `json:"StringId"` }
ContentTypeInfo - content type API response payload structure
type ContentTypeResp ¶
type ContentTypeResp []byte
ContentTypeResp - content type response type with helper processor methods
func (*ContentTypeResp) Data ¶
func (contentTypeResp *ContentTypeResp) Data() *ContentTypeInfo
Data response helper
func (*ContentTypeResp) Normalized ¶
func (contentTypeResp *ContentTypeResp) Normalized() []byte
Normalized returns normalized body
type ContentTypes ¶
type ContentTypes struct {
// contains filtered or unexported fields
}
ContentTypes represent SharePoint Content Types API queryable collection struct Always use NewContentTypes constructor instead of &ContentTypes{}
func NewContentTypes ¶
func NewContentTypes(client *gosip.SPClient, endpoint string, config *RequestConfig) *ContentTypes
NewContentTypes - ContentTypes struct constructor function
func (*ContentTypes) Add ¶
func (contentTypes *ContentTypes) Add(body []byte) (ContentTypeResp, error)
Add adds Content Types with properties provided in `body` parameter where `body` is byte array representation of JSON string payload relevant to SP.ContentType object
func (*ContentTypes) Conf ¶
func (contentTypes *ContentTypes) Conf(config *RequestConfig) *ContentTypes
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*ContentTypes) Create ¶
func (contentTypes *ContentTypes) Create(contentTypeInfo *ContentTypeCreationInfo) (string, error)
Create adds Content Type using CSOM polyfill as REST's Add method is limited (https://github.com/pnp/pnpjs/issues/457)
func (*ContentTypes) Expand ¶
func (contentTypes *ContentTypes) Expand(oDataExpand string) *ContentTypes
Expand adds $expand OData modifier
func (*ContentTypes) Filter ¶
func (contentTypes *ContentTypes) Filter(oDataFilter string) *ContentTypes
Filter adds $filter OData modifier
func (*ContentTypes) Get ¶
func (contentTypes *ContentTypes) Get() (ContentTypesResp, error)
Get gets content typed queryable collection response
func (*ContentTypes) GetByID ¶
func (contentTypes *ContentTypes) GetByID(contentTypeID string) *ContentType
GetByID gets a content type by its ID (GUID)
func (*ContentTypes) OrderBy ¶
func (contentTypes *ContentTypes) OrderBy(oDataOrderBy string, ascending bool) *ContentTypes
OrderBy adds $orderby OData modifier
func (*ContentTypes) Select ¶
func (contentTypes *ContentTypes) Select(oDataSelect string) *ContentTypes
Select adds $select OData modifier
func (*ContentTypes) ToURL ¶
func (contentTypes *ContentTypes) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*ContentTypes) Top ¶
func (contentTypes *ContentTypes) Top(oDataTop int) *ContentTypes
Top adds $top OData modifier
type ContentTypesResp ¶
type ContentTypesResp []byte
ContentTypesResp - content types response type with helper processor methods
func (*ContentTypesResp) Data ¶
func (contentTypesResp *ContentTypesResp) Data() []ContentTypeResp
Data response helper
func (*ContentTypesResp) Normalized ¶
func (contentTypesResp *ContentTypesResp) Normalized() []byte
Normalized returns normalized body
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents SharePoint Content Info API object struct Always use NewContext constructor instead of &Context{}
func NewContext ¶
func NewContext(client *gosip.SPClient, endpoint string, config *RequestConfig) *Context
NewContext - Context struct constructor function
func (*Context) Get ¶
func (context *Context) Get() (*ContextInfo, error)
Get gets context info data object
type ContextInfo ¶
type ContextInfo struct { FormDigestTimeoutSeconds int `json:"FormDigestTimeoutSeconds"` FormDigestValue string `json:"FormDigestValue"` LibraryVersion string `json:"LibraryVersion"` // "16.0.19520.12058", SiteFullURL string `json:"SiteFullUrl"` SupportedSchemaVersions []string `json:"SupportedSchemaVersions"` WebFullURL string `json:"WebFullUrl"` }
ContextInfo - context info response payload structure
type CustomAction ¶
type CustomAction struct {
// contains filtered or unexported fields
}
CustomAction represent SharePoint CustomAction API object Always use NewCustomAction constructor instead of &CustomAction{}
func NewCustomAction ¶
func NewCustomAction(client *gosip.SPClient, endpoint string, config *RequestConfig) *CustomAction
NewCustomAction - CustomActions struct constructor function
func (*CustomAction) Delete ¶
func (customAction *CustomAction) Delete() error
Delete deletes this custom action
func (*CustomAction) Get ¶
func (customAction *CustomAction) Get() (*CustomActionInfo, error)
Get gets this action metadata
type CustomActionInfo ¶
type CustomActionInfo struct { ClientSideComponentID string `json:"ClientSideComponentId"` ClientSideComponentProperties string `json:"ClientSideComponentProperties"` CommandUIExtension string `json:"CommandUIExtension"` Description string `json:"Description"` Group string `json:"Group"` HostProperties string `json:"HostProperties"` ID string `json:"Id"` ImageURL string `json:"ImageUrl"` Location string `json:"Location"` Name string `json:"Name"` RegistrationID string `json:"RegistrationId"` RegistrationType int `json:"RegistrationType"` Scope int `json:"Scope"` ScriptBlock string `json:"ScriptBlock"` ScriptSrc string `json:"ScriptSrc"` Sequence int `json:"Sequence"` Title string `json:"Title"` URL string `json:"Url"` VersionOfUserCustomAction string `json:"VersionOfUserCustomAction"` Rights *BasePermissions `json:"Rights"` }
CustomActionInfo - user custom actions API response payload structure
type CustomActions ¶
type CustomActions struct {
// contains filtered or unexported fields
}
CustomActions represent SharePoint CustomActions API queryable collection struct Always use NewCustomActions constructor instead of &CustomActions{}
func NewCustomActions ¶
func NewCustomActions(client *gosip.SPClient, endpoint string, config *RequestConfig) *CustomActions
NewCustomActions - CustomActions struct constructor function
func (*CustomActions) Add ¶
func (customActions *CustomActions) Add(payload []byte) (*CustomActionInfo, error)
Add register new user custom action
func (*CustomActions) Conf ¶
func (customActions *CustomActions) Conf(config *RequestConfig) *CustomActions
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*CustomActions) Filter ¶
func (customActions *CustomActions) Filter(oDataFilter string) *CustomActions
Filter adds $filter OData modifier
func (*CustomActions) Get ¶
func (customActions *CustomActions) Get() ([]*CustomActionInfo, error)
Get gets event customActions collection
func (*CustomActions) GetByID ¶
func (customActions *CustomActions) GetByID(actionID string) *CustomAction
GetByID gets action API object by ID (GUID)
func (*CustomActions) OrderBy ¶
func (customActions *CustomActions) OrderBy(oDataOrderBy string, ascending bool) *CustomActions
OrderBy adds $orderby OData modifier
func (*CustomActions) Select ¶
func (customActions *CustomActions) Select(oDataSelect string) *CustomActions
Select adds $select OData modifier
func (*CustomActions) ToURL ¶
func (customActions *CustomActions) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*CustomActions) Top ¶
func (customActions *CustomActions) Top(oDataTop int) *CustomActions
Top adds $top OData modifier
type DecodedURL ¶
type DecodedURL struct {
DecodedURL string `json:"DecodedUrl"`
}
DecodedURL decode URL prop type
type EmailProps ¶
type EmailProps struct { Subject string // Email subject Body string // Email text or HTML body To []string // Slice of To email addresses to whom Email is intended to be sent CC []string // Slice of CC email addresses (optional) BCC []string // Slice of BCC email addresses (optional) From string // Sender email addresses (optional) }
EmailProps struct for SendEmail method parameters
type EventReceiverInfo ¶
type EventReceiverInfo struct { EventType int `json:"EventType"` ReceiverAssembly string `json:"ReceiverAssembly"` ReceiverClass string `json:"ReceiverClass"` ReceiverID string `json:"ReceiverId"` ReceiverName string `json:"ReceiverName"` ReceiverURL string `json:"ReceiverUrl"` SequenceNumber int `json:"SequenceNumber"` Synchronization int `json:"Synchronization"` }
EventReceiverInfo - event receivers API response payload structure
type EventReceivers ¶
type EventReceivers struct {
// contains filtered or unexported fields
}
EventReceivers represent SharePoint EventReceivers API queryable collection struct Always use NewEventReceivers constructor instead of &EventReceivers{}
func NewEventReceivers ¶
func NewEventReceivers(client *gosip.SPClient, endpoint string, config *RequestConfig) *EventReceivers
NewEventReceivers - EventReceivers struct constructor function
func (*EventReceivers) Conf ¶
func (eventReceivers *EventReceivers) Conf(config *RequestConfig) *EventReceivers
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*EventReceivers) Filter ¶
func (eventReceivers *EventReceivers) Filter(oDataFilter string) *EventReceivers
Filter adds $filter OData modifier
func (*EventReceivers) Get ¶
func (eventReceivers *EventReceivers) Get() ([]*EventReceiverInfo, error)
Get gets event receivers collection
func (*EventReceivers) OrderBy ¶
func (eventReceivers *EventReceivers) OrderBy(oDataOrderBy string, ascending bool) *EventReceivers
OrderBy adds $orderby OData modifier
func (*EventReceivers) Select ¶
func (eventReceivers *EventReceivers) Select(oDataSelect string) *EventReceivers
Select adds $select OData modifier
func (*EventReceivers) ToURL ¶
func (eventReceivers *EventReceivers) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*EventReceivers) Top ¶
func (eventReceivers *EventReceivers) Top(oDataTop int) *EventReceivers
Top adds $top OData modifier
type FeatureInfo ¶
type FeatureInfo struct {
DefinitionID string `json:"DefinitionId"`
}
FeatureInfo - features API response payload structure
type Features ¶
type Features struct {
// contains filtered or unexported fields
}
Features represent SharePoint Webs & Site Features API queryable collection struct Always use NewFeatures constructor instead of &Features{}
func NewFeatures ¶
func NewFeatures(client *gosip.SPClient, endpoint string, config *RequestConfig) *Features
NewFeatures - Features struct constructor function
func (*Features) Add ¶
Add activates a feature by its ID (GUID) in the parent container (Site or Web)
func (*Features) Get ¶
func (features *Features) Get() ([]*FeatureInfo, error)
Get gets features collection (IDs)
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field represents SharePoint Field (Site Column) API queryable object struct Always use NewField constructor instead of &Field{}
func NewField ¶
func NewField(client *gosip.SPClient, endpoint string, config *RequestConfig) *Field
NewField - Field struct constructor function
func (*Field) Conf ¶
func (field *Field) Conf(config *RequestConfig) *Field
Conf receives custom request config definition, e.g. custom headers, custom OData mod
type FieldInfo ¶
type FieldInfo struct { AutoIndexed bool `json:"AutoIndexed"` CanBeDeleted bool `json:"CanBeDeleted"` DefaultValue string `json:"DefaultValue"` Description string `json:"Description"` EnforceUniqueValues bool `json:"EnforceUniqueValues"` EntityPropertyName string `json:"EntityPropertyName"` FieldTypeKind int `json:"FieldTypeKind"` Filterable bool `json:"Filterable"` FromBaseType bool `json:"FromBaseType"` Group string `json:"Group"` Hidden bool `json:"Hidden"` ID string `json:"Id"` IndexStatus int `json:"IndexStatus"` Indexed bool `json:"Indexed"` InternalName string `json:"InternalName"` JSLink string `json:"JSLink"` LookupField string `json:"LookupField"` LookupList string `json:"LookupList"` LookupWebID string `json:"LookupWebId"` ReadOnlyField bool `json:"ReadOnlyField"` Required bool `json:"Required"` SchemaXML string `json:"SchemaXml"` Scope string `json:"Scope"` Sealed bool `json:"Sealed"` ShowInFiltersPane int `json:"ShowInFiltersPane"` Sortable bool `json:"Sortable"` StaticName string `json:"StaticName"` Title string `json:"Title"` TypeAsString string `json:"TypeAsString"` TypeDisplayName string `json:"TypeDisplayName"` TypeShortDescription string `json:"TypeShortDescription"` }
FieldInfo - generic field API response payload structure
type FieldLink ¶
type FieldLink struct {
// contains filtered or unexported fields
}
FieldLink represent SharePoint content type FieldLink API Always use NewFieldLink constructor instead of &FieldLink{}
func NewFieldLink ¶
func NewFieldLink(client *gosip.SPClient, endpoint string, config *RequestConfig) *FieldLink
NewFieldLink - FieldLink struct constructor function
type FieldLinkInfo ¶
type FieldLinkInfo struct { ID string `json:"Id"` Name string `json:"Name"` FieldInternalName string `json:"FieldInternalName"` Hidden bool `json:"Hidden"` Required bool `json:"Required"` }
FieldLinkInfo field link info
type FieldLinkResp ¶
type FieldLinkResp []byte
FieldLinkResp - fieldLinks response type with helper processor methods
func (*FieldLinkResp) Data ¶
func (fieldLinkResp *FieldLinkResp) Data() *FieldLinkInfo
Data response helper
func (*FieldLinkResp) Normalized ¶
func (fieldLinkResp *FieldLinkResp) Normalized() []byte
Normalized returns normalized body
type FieldLinks ¶
type FieldLinks struct {
// contains filtered or unexported fields
}
FieldLinks represent SharePoint content type FieldLinks API queryable collection struct Always use NewFieldLinks constructor instead of &FieldLinks{}
func NewFieldLinks ¶
func NewFieldLinks(client *gosip.SPClient, endpoint string, config *RequestConfig) *FieldLinks
NewFieldLinks - FieldLinks struct constructor function
func (*FieldLinks) Add ¶
func (fieldLinks *FieldLinks) Add(name string) (string, error)
Add adds field link
func (*FieldLinks) Conf ¶
func (fieldLinks *FieldLinks) Conf(config *RequestConfig) *FieldLinks
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*FieldLinks) Filter ¶
func (fieldLinks *FieldLinks) Filter(oDataFilter string) *FieldLinks
Filter adds $filter OData modifier
func (*FieldLinks) Get ¶
func (fieldLinks *FieldLinks) Get() (FieldLinksResp, error)
Get gets fields response collection
func (*FieldLinks) GetByID ¶
func (fieldLinks *FieldLinks) GetByID(fieldLinkID string) *FieldLink
GetByID gets a field link by its ID (GUID)
func (*FieldLinks) GetFields ¶
func (fieldLinks *FieldLinks) GetFields() (FieldsResp, error)
GetFields gets fields response collection
func (*FieldLinks) Select ¶
func (fieldLinks *FieldLinks) Select(oDataSelect string) *FieldLinks
Select adds $select OData modifier
func (*FieldLinks) ToURL ¶
func (fieldLinks *FieldLinks) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*FieldLinks) Top ¶
func (fieldLinks *FieldLinks) Top(oDataTop int) *FieldLinks
Top adds $top OData modifier
type FieldLinksResp ¶
type FieldLinksResp []byte
FieldLinksResp - fieldLinks response type with helper processor methods
func (*FieldLinksResp) Data ¶
func (fieldLinksResp *FieldLinksResp) Data() []FieldLinkResp
Data response helper
func (*FieldLinksResp) Normalized ¶
func (fieldLinksResp *FieldLinksResp) Normalized() []byte
Normalized returns normalized body
type FieldResp ¶
type FieldResp []byte
FieldResp - field response type with helper processor methods
func (*FieldResp) Normalized ¶
Normalized returns normalized body
type Fields ¶
type Fields struct {
// contains filtered or unexported fields
}
Fields represent SharePoint Fields (Site Columns) API queryable collection struct Always use NewFields constructor instead of &Fields{}
func NewFields ¶
func NewFields(client *gosip.SPClient, endpoint string, config *RequestConfig, entity string) *Fields
NewFields - Fields struct constructor function
func (*Fields) Add ¶
Add adds field with properties provided in `body` parameter where `body` is byte array representation of JSON string payload relevant to SP.Field object
func (*Fields) Conf ¶
func (fields *Fields) Conf(config *RequestConfig) *Fields
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Fields) CreateFieldAsXML ¶
CreateFieldAsXML creates a field using XML schema definition `options` parameter (https://github.com/pnp/pnpjs/blob/version-2/packages/sp/fields/types.ts#L553) is only relevant for adding fields in list instances
func (*Fields) Get ¶
func (fields *Fields) Get() (FieldsResp, error)
Get gets fields response collection
func (*Fields) GetByInternalNameOrTitle ¶
GetByInternalNameOrTitle gets a field by its Internal or Display name
func (*Fields) GetByTitle ¶
GetByTitle gets a field by its Display Name
type FieldsResp ¶
type FieldsResp []byte
FieldsResp - fields response type with helper processor methods
func (*FieldsResp) Normalized ¶
func (fieldsResp *FieldsResp) Normalized() []byte
Normalized returns normalized body
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents SharePoint File API queryable object struct Always use NewFile constructor instead of &File{}
func NewFile ¶
func NewFile(client *gosip.SPClient, endpoint string, config *RequestConfig) *File
NewFile - File struct constructor function
func (*File) Conf ¶
func (file *File) Conf(config *RequestConfig) *File
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*File) GetReader ¶
func (file *File) GetReader() (io.ReadCloser, error)
GetReader gets file io.ReadCloser
func (*File) ListItemAllFields ¶
func (file *File) ListItemAllFields() (ListItemAllFieldsResp, error)
ListItemAllFields gets this file Item data object metadata
func (*File) Props ¶
func (file *File) Props() *Properties
Props gets Properties API instance queryable collection for this File
func (*File) SetContent ¶
SetContent updates file content
func (*File) UndoCheckOut ¶
UndoCheckOut undoes file check out
type FileInfo ¶
type FileInfo struct { CheckInComment string `json:"CheckInComment"` CheckOutType int `json:"CheckOutType"` ContentTag string `json:"ContentTag"` CustomizedPageStatus int `json:"CustomizedPageStatus"` ETag string `json:"ETag"` Exists bool `json:"Exists"` IrmEnabled bool `json:"IrmEnabled"` Length int `json:"Length,string"` Level int `json:"Level"` LinkingURI string `json:"LinkingUri"` LinkingURL string `json:"LinkingUrl"` MajorVersion int `json:"MajorVersion"` MinorVersion int `json:"MinorVersion"` Name string `json:"Name"` ServerRelativeURL string `json:"ServerRelativeUrl"` TimeCreated time.Time `json:"TimeCreated"` TimeLastModified time.Time `json:"TimeLastModified"` Title string `json:"Title"` UIVersion int `json:"UIVersion"` UIVersionLabel string `json:"UIVersionLabel"` UniqueID string `json:"UniqueId"` }
FileInfo - file API response payload structure
type FileResp ¶
type FileResp []byte
FileResp - file response type with helper processor methods
func (*FileResp) Normalized ¶
Normalized returns normalized body
type FileUploadProgressData ¶
type FileUploadProgressData struct { UploadID string Stage string ChunkSize int BlockNumber int FileOffset int }
FileUploadProgressData describes Progress callback options
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
Files represent SharePoint Files API queryable collection struct Always use NewFiles constructor instead of &Files{}
func NewFiles ¶
func NewFiles(client *gosip.SPClient, endpoint string, config *RequestConfig) *Files
NewFiles - Files struct constructor function
func (*Files) AddChunked ¶
func (files *Files) AddChunked(name string, stream io.Reader, options *AddChunkedOptions) (FileResp, error)
AddChunked uploads a file in chunks (streaming), is a good fit for large files. Supported starting from SharePoint 2016.
func (*Files) Conf ¶
func (files *Files) Conf(config *RequestConfig) *Files
Conf receives custom request config definition, e.g. custom headers, custom OData mod
type FilesResp ¶
type FilesResp []byte
FilesResp - files response type with helper processor methods
func (*FilesResp) Normalized ¶
Normalized returns normalized body
type Folder ¶
type Folder struct {
// contains filtered or unexported fields
}
Folder represents SharePoint Lists & Document Libraries Folder API queryable object struct Always use NewFolder constructor instead of &Folder{}
func NewFolder ¶
func NewFolder(client *gosip.SPClient, endpoint string, config *RequestConfig) *Folder
NewFolder ...
func (*Folder) Conf ¶
func (folder *Folder) Conf(config *RequestConfig) *Folder
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Folder) ContextInfo ¶
func (folder *Folder) ContextInfo() (*ContextInfo, error)
ContextInfo gets current Context Info object data
func (*Folder) Get ¶
func (folder *Folder) Get() (FolderResp, error)
Get gets this folder data object
func (*Folder) ListItemAllFields ¶
func (folder *Folder) ListItemAllFields() (ListItemAllFieldsResp, error)
ListItemAllFields gets this folder Item data object metadata
func (*Folder) ParentFolder ¶
ParentFolder gets parent folder of this folder
func (*Folder) Props ¶
func (folder *Folder) Props() *Properties
Props gets Properties API instance queryable collection for this Folder
type FolderInfo ¶
type FolderInfo struct { Exists bool `json:"Exists"` IsWOPIEnabled bool `json:"IsWOPIEnabled"` ItemCount int `json:"ItemCount"` Name string `json:"Name"` ProgID string `json:"ProgID"` ServerRelativeURL string `json:"ServerRelativeUrl"` TimeCreated time.Time `json:"TimeCreated"` TimeLastModified time.Time `json:"TimeLastModified"` UniqueID string `json:"UniqueId"` WelcomePage string `json:"WelcomePage"` }
FolderInfo - folder API response payload structure
type FolderResp ¶
type FolderResp []byte
FolderResp - folder response type with helper processor methods
func (*FolderResp) Normalized ¶
func (folderResp *FolderResp) Normalized() []byte
Normalized returns normalized body
type Folders ¶
type Folders struct {
// contains filtered or unexported fields
}
Folders represent SharePoint Lists & Document Libraries Folders API queryable collection struct Always use NewFolders constructor instead of &Folders{}
func NewFolders ¶
func NewFolders(client *gosip.SPClient, endpoint string, config *RequestConfig) *Folders
NewFolders - Folders struct constructor function
func (*Folders) Add ¶
func (folders *Folders) Add(folderName string) (FolderResp, error)
Add created a folder with specified name in this folder
func (*Folders) Conf ¶
func (folders *Folders) Conf(config *RequestConfig) *Folders
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Folders) Get ¶
func (folders *Folders) Get() (FoldersResp, error)
Get gets folders collection response in this folder
type FoldersResp ¶
type FoldersResp []byte
FoldersResp - folders response type with helper processor methods
func (*FoldersResp) Normalized ¶
func (foldersResp *FoldersResp) Normalized() []byte
Normalized returns normalized body
type GenericItemInfo ¶
type GenericItemInfo struct { ID int `json:"Id"` Title string `json:"Title"` ContentTypeID string `json:"ContentTypeId"` Attachments bool `json:"Attachments"` AuthorID int `json:"AuthorId"` EditorID int `json:"EditorId"` Created time.Time `json:"Created"` Modified time.Time `json:"Modified"` }
GenericItemInfo - list's generic item response payload structure
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group represents SharePoint Site Groups API queryable object struct Always use NewGroup constructor instead of &Group{}
func NewGroup ¶
func NewGroup(client *gosip.SPClient, endpoint string, config *RequestConfig) *Group
NewGroup - Group struct constructor function
func (*Group) AddUserByID ¶
AddUserByID adds a user by ID to this group
func (*Group) Conf ¶
func (group *Group) Conf(config *RequestConfig) *Group
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Group) RemoveUser ¶
RemoveUser removes a user from group
func (*Group) RemoveUserByID ¶
RemoveUserByID removes a user from group
func (*Group) SetUserAsOwner ¶
SetUserAsOwner sets a user as owner (available only in SPO)
type GroupInfo ¶
type GroupInfo struct { AllowMembersEditMembership bool `json:"AllowMembersEditMembership"` AllowRequestToJoinLeave bool `json:"AllowRequestToJoinLeave"` AutoAcceptRequestToJoinLeave bool `json:"AutoAcceptRequestToJoinLeave"` Description string `json:"Description"` ID int `json:"Id"` IsHiddenInUI bool `json:"IsHiddenInUI"` LoginName string `json:"LoginName"` OnlyAllowMembersViewMembership bool `json:"OnlyAllowMembersViewMembership"` OwnerTitle string `json:"OwnerTitle"` PrincipalType int `json:"PrincipalType"` RequestToJoinLeaveEmailSetting bool `json:"RequestToJoinLeaveEmailSetting"` Title string `json:"Title"` }
GroupInfo - site group API response payload structure
type GroupResp ¶
type GroupResp []byte
GroupResp - group response type with helper processor methods
func (*GroupResp) Normalized ¶
Normalized returns normalized body
type Groups ¶
type Groups struct {
// contains filtered or unexported fields
}
Groups represent SharePoint Site Groups API queryable collection struct Always use NewGroups constructor instead of &Groups{}
func NewGroups ¶
func NewGroups(client *gosip.SPClient, endpoint string, config *RequestConfig) *Groups
NewGroups - Groups struct constructor function
func (*Groups) Add ¶
Add creates new group with a specified name. Additional metadata can optionally be provided as string map object. `metadata` should correspond to SP.Group type.
func (*Groups) Conf ¶
func (groups *Groups) Conf(config *RequestConfig) *Groups
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Groups) Get ¶
func (groups *Groups) Get() (GroupsResp, error)
Get gets site Groups response - a collection of GroupInfo
func (*Groups) RemoveByID ¶
RemoveByID deletes a group object by its ID
func (*Groups) RemoveByLoginName ¶
RemoveByLoginName deletes a group object by its login name
type GroupsResp ¶
type GroupsResp []byte
GroupsResp - groups response type with helper processor methods
func (*GroupsResp) Normalized ¶
func (groupsResp *GroupsResp) Normalized() []byte
Normalized returns normalized body
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient HTTP methods helper
func NewHTTPClient ¶
func NewHTTPClient(spClient *gosip.SPClient) *HTTPClient
NewHTTPClient creates an instance of httpClient
func (*HTTPClient) Delete ¶
func (client *HTTPClient) Delete(endpoint string, conf *RequestConfig) ([]byte, error)
Delete - generic DELETE request wrapper
func (*HTTPClient) Get ¶
func (client *HTTPClient) Get(endpoint string, conf *RequestConfig) ([]byte, error)
Get - generic GET request wrapper
func (*HTTPClient) Post ¶
func (client *HTTPClient) Post(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
Post - generic POST request wrapper
func (*HTTPClient) ProcessQuery ¶
func (client *HTTPClient) ProcessQuery(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
ProcessQuery - CSOM requests helper
func (*HTTPClient) Update ¶
func (client *HTTPClient) Update(endpoint string, body io.Reader, conf *RequestConfig) ([]byte, error)
Update - generic MERGE request wrapper
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item represents SharePoint Lists & Document Libraries Items API queryable object struct Always use NewItem constructor instead of &Item{}
func NewItem ¶
func NewItem(client *gosip.SPClient, endpoint string, config *RequestConfig) *Item
NewItem - Item struct constructor function
func (*Item) Attachments ¶
func (item *Item) Attachments() *Attachments
Attachments gets attachments collection for this Item
func (*Item) Conf ¶
func (item *Item) Conf(config *RequestConfig) *Item
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Item) ContextInfo ¶
func (item *Item) ContextInfo() (*ContextInfo, error)
ContextInfo gets current context information
func (*Item) ParentList ¶
ParentList gets this Item's Lists API object
func (*Item) Records ¶
Records gets Records API instance object for this Item (inplace records manipulation)
func (*Item) Update ¶
Update updates item's metadata. `body` parameter is byte array representation of JSON string payload relevant to item metadata object.
func (*Item) UpdateValidate ¶
func (item *Item) UpdateValidate(formValues map[string]string, options *ValidateUpdateOptions) (UpdateValidateResp, error)
UpdateValidate updates an item in this list using ValidateUpdateListItem method. formValues fingerprints https://github.com/koltyakov/sp-sig-20180705-demo/blob/master/src/03-pnp/FieldTypes.md#field-data-types-fingerprints-sample
type ItemResp ¶
type ItemResp []byte
ItemResp - item response type with helper processor methods
func (*ItemResp) Normalized ¶
Normalized returns normalized body
type Items ¶
type Items struct {
// contains filtered or unexported fields
}
Items represent SharePoint Lists & Document Libraries Items API queryable collection struct Always use NewItems constructor instead of &Items{}
func NewItems ¶
func NewItems(client *gosip.SPClient, endpoint string, config *RequestConfig) *Items
NewItems - Items struct constructor function
func (*Items) Add ¶
Add adds new item in this list. `body` parameter is byte array representation of JSON string payload relevant to item metadata object.
func (*Items) AddValidate ¶
func (items *Items) AddValidate(formValues map[string]string, options *ValidateAddOptions) (AddValidateResp, error)
AddValidate adds new item in this list using AddValidateUpdateItemUsingPath method. formValues fingerprints https://github.com/koltyakov/sp-sig-20180705-demo/blob/master/src/03-pnp/FieldTypes.md#field-data-types-fingerprints-sample
func (*Items) Conf ¶
func (items *Items) Conf(config *RequestConfig) *Items
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Items) GetAll ¶
GetAll gets all items in a list using internal page helper. The use case of the method is getting all the content from large lists. Method ignores custom sorting and filtering as not supported for the large lists due to throttling limitations.
type ItemsPage ¶
type ItemsPage struct { Items ItemsResp HasNextPage func() bool GetNextPage func() (*ItemsPage, error) }
ItemsPage - paged items
type ItemsResp ¶
type ItemsResp []byte
ItemsResp - items response type with helper processor methods
func (*ItemsResp) HasNextPage ¶
HasNextPage returns is true if next page exists
func (*ItemsResp) NextPageURL ¶
NextPageURL gets next page OData collection
func (*ItemsResp) Normalized ¶
Normalized returns normalized body
type List ¶
type List struct {
// contains filtered or unexported fields
}
List represents SharePoint List API queryable object struct Always use NewList constructor instead of &List{}
func NewList ¶
func NewList(client *gosip.SPClient, endpoint string, config *RequestConfig) *List
NewList - List struct constructor function
func (*List) Conf ¶
func (list *List) Conf(config *RequestConfig) *List
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*List) ContentTypes ¶
func (list *List) ContentTypes() *ContentTypes
ContentTypes gets list's Content Types API instance queryable collection
func (*List) ContextInfo ¶
func (list *List) ContextInfo() (*ContextInfo, error)
ContextInfo gets context info for a web of current list
func (*List) GetEntityType ¶
GetEntityType gets list's ListItemEntityTypeFullName
func (*List) RenderListData ¶
func (list *List) RenderListData(viewXML string) (RenderListDataResp, error)
RenderListData renders lists content using CAML
func (*List) ReserveListItemID ¶
ReserveListItemID reserves item's ID in this list
func (*List) RootFolder ¶
RootFolder gets list's root folder object
func (*List) Subscriptions ¶
func (list *List) Subscriptions() *Subscriptions
Subscriptions gets list's subscriptions API instance queryable collection
type ListInfo ¶
type ListInfo struct { ID string `json:"Id"` Title string `json:"Title"` AllowContentTypes bool `json:"AllowContentTypes"` BaseTemplate int `json:"BaseTemplate"` BaseType int `json:"BaseType"` ContentTypesEnabled bool `json:"ContentTypesEnabled"` CrawlNonDefaultViews bool `json:"CrawlNonDefaultViews"` Created time.Time `json:"Created"` DefaultContentApprovalWorkflowID string `json:"DefaultContentApprovalWorkflowId"` DefaultItemOpenUseListSetting bool `json:"DefaultItemOpenUseListSetting"` Description string `json:"Description"` Direction string `json:"Direction"` DisableGridEditing bool `json:"DisableGridEditing"` DocumentTemplateURL string `json:"DocumentTemplateUrl"` DraftVersionVisibility int `json:"DraftVersionVisibility"` EnableAttachments bool `json:"EnableAttachments"` EnableFolderCreation bool `json:"EnableFolderCreation"` EnableMinorVersions bool `json:"EnableMinorVersions"` EnableModeration bool `json:"EnableModeration"` EnableRequestSignOff bool `json:"EnableRequestSignOff"` EnableVersioning bool `json:"EnableVersioning"` EntityTypeName string `json:"EntityTypeName"` FileSavePostProcessingEnabled bool `json:"FileSavePostProcessingEnabled"` ForceCheckout bool `json:"ForceCheckout"` HasExternalDataSource bool `json:"HasExternalDataSource"` Hidden bool `json:"Hidden"` ImageURL string `json:"ImageUrl"` IrmEnabled bool `json:"IrmEnabled"` IrmExpire bool `json:"IrmExpire"` IrmReject bool `json:"IrmReject"` IsApplicationList bool `json:"IsApplicationList"` IsCatalog bool `json:"IsCatalog"` IsPrivate bool `json:"IsPrivate"` ItemCount int `json:"ItemCount"` LastItemDeletedDate time.Time `json:"LastItemDeletedDate"` LastItemModifiedDate time.Time `json:"LastItemModifiedDate"` LastItemUserModifiedDate time.Time `json:"LastItemUserModifiedDate"` ListExperienceOptions int `json:"ListExperienceOptions"` ListItemEntityTypeFullName string `json:"ListItemEntityTypeFullName"` MajorVersionLimit int `json:"MajorVersionLimit"` MajorWithMinorVersionsLimit int `json:"MajorWithMinorVersionsLimit"` MultipleDataList bool `json:"MultipleDataList"` NoCrawl bool `json:"NoCrawl"` ParentWebURL string `json:"ParentWebUrl"` ParserDisabled bool `json:"ParserDisabled"` ServerTemplateCanCreateFolders bool `json:"ServerTemplateCanCreateFolders"` TemplateFeatureID string `json:"TemplateFeatureId"` ParentWebPath *DecodedURL `json:"ParentWebPath"` ImagePath *DecodedURL `json:"ImagePath"` CurrentChangeToken *StringValue `json:"CurrentChangeToken"` }
ListInfo - list instance response payload structure
type ListItemAllFieldsResp ¶
type ListItemAllFieldsResp []byte
ListItemAllFieldsResp - item fields response type with helper processor methods
type ListResp ¶
type ListResp []byte
ListResp - list response type with helper processor methods
func (*ListResp) Normalized ¶
Normalized returns normalized body
type Lists ¶
type Lists struct {
// contains filtered or unexported fields
}
Lists represent SharePoint Lists API queryable collection struct Always use NewLists constructor instead of &Lists{}
func NewLists ¶
func NewLists(client *gosip.SPClient, endpoint string, config *RequestConfig) *Lists
NewLists - Lists struct constructor function
func (*Lists) Add ¶
Add creates new list on this web with a provided `title`. Along with title additional metadata can be provided in optional `metadata` string map object. `metadata` props should correspond to `SP.List` API type. Some props have defaults as BaseTemplate (100), AllowContentTypes (false), etc.
func (*Lists) AddWithURI ¶
func (lists *Lists) AddWithURI(title string, uri string, metadata map[string]interface{}) ([]byte, error)
AddWithURI creates new list on this web with a provided `title` and `uri`. `url` stands for a system friendly URI (e.g. `custom-list`) while `title` is a human friendly name (e.g. `Custom List`). Along with uri and title additional metadata can be provided in optional `metadata` string map object. `metadata` props should correspond to `SP.List` API type. Some props have defaults as BaseTemplate (100), AllowContentTypes (false), etc.
func (*Lists) Conf ¶
func (lists *Lists) Conf(config *RequestConfig) *Lists
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Lists) GetByTitle ¶
GetByTitle gets a list by its Display Name (Title)
type ListsResp ¶
type ListsResp []byte
ListsResp - lists response type with helper processor methods
func (*ListsResp) Normalized ¶
Normalized returns normalized body
type ODataMods ¶
type ODataMods struct {
// contains filtered or unexported fields
}
ODataMods - REST OData Modifiers struct
func (*ODataMods) AddOrderBy ¶
AddOrderBy adds $orderby OData modifier
type ProfileInfo ¶
type ProfileInfo struct { AccountName string `json:"AccountName"` DisplayName string `json:"DisplayName"` FollowPersonalSiteURL string `json:"FollowPersonalSiteUrl"` IsDefaultDocumentLibraryBlocked bool `json:"IsDefaultDocumentLibraryBlocked"` IsPeopleListPublic bool `json:"IsPeopleListPublic"` IsPrivacySettingOn bool `json:"IsPrivacySettingOn"` IsSelf bool `json:"IsSelf"` JobTitle string `json:"JobTitle"` MySiteFirstRunExperience int `json:"MySiteFirstRunExperience"` MySiteHostURL string `json:"MySiteHostUrl"` O15FirstRunExperience int `json:"O15FirstRunExperience"` PersonalSiteCapabilities int `json:"PersonalSiteCapabilities"` PersonalSiteFirstCreationError string `json:"PersonalSiteFirstCreationError"` PersonalSiteFirstCreationTime string `json:"PersonalSiteFirstCreationTime"` PersonalSiteInstantiationState int `json:"PersonalSiteInstantiationState"` PersonalSiteLastCreationTime string `json:"PersonalSiteLastCreationTime"` PersonalSiteNumberOfRetries int `json:"PersonalSiteNumberOfRetries"` PictureImportEnabled bool `json:"PictureImportEnabled"` PictureURL string `json:"PictureUrl"` PublicURL string `json:"PublicUrl"` SipAddress string `json:"SipAddress"` URLToCreatePersonalSite string `json:"UrlToCreatePersonalSite"` }
ProfileInfo - user profile API response payload structure
type ProfilePropsInto ¶
type ProfilePropsInto struct { AccountName string `json:"AccountName"` DirectReports []string `json:"DirectReports"` DisplayName string `json:"DisplayName"` Email string `json:"Email"` ExtendedManagers []string `json:"ExtendedManagers"` ExtendedReports []string `json:"ExtendedReports"` Peers []string `json:"Peers"` IsFollowed bool `json:"IsFollowed"` PersonalSiteHostURL string `json:"PersonalSiteHostUrl"` PersonalURL string `json:"PersonalUrl"` PictureURL string `json:"PictureUrl"` Title string `json:"Title"` UserURL string `json:"UserUrl"` UserProfileProperties []*TypedKeyValue `json:"UserProfileProperties"` }
ProfilePropsInto ...
type ProfilePropsResp ¶
type ProfilePropsResp []byte
ProfilePropsResp - user profile props response type with helper processor methods
func (*ProfilePropsResp) Data ¶
func (profilePropsResp *ProfilePropsResp) Data() *ProfilePropsInto
Data : to get typed data
func (*ProfilePropsResp) Normalized ¶
func (profilePropsResp *ProfilePropsResp) Normalized() []byte
Normalized returns normalized body
type ProfileResp ¶
type ProfileResp []byte
ProfileResp - user profile response type with helper processor methods
func (*ProfileResp) Data ¶
func (profileResp *ProfileResp) Data() *ProfileInfo
Data : to get typed data
func (*ProfileResp) Normalized ¶
func (profileResp *ProfileResp) Normalized() []byte
Normalized returns normalized body
type Profiles ¶
type Profiles struct {
// contains filtered or unexported fields
}
Profiles represent SharePoint User Profiles API queryable collection struct Always use NewProfiles constructor instead of &Profiles{}
func NewProfiles ¶
func NewProfiles(client *gosip.SPClient, endpoint string, config *RequestConfig) *Profiles
NewProfiles - Profiles struct constructor function
func (*Profiles) Conf ¶
func (profiles *Profiles) Conf(config *RequestConfig) *Profiles
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Profiles) GetMyProperties ¶
func (profiles *Profiles) GetMyProperties() (ProfilePropsResp, error)
GetMyProperties gets current context user profile properties
func (*Profiles) GetOwnerUserProfile ¶
func (profiles *Profiles) GetOwnerUserProfile() (ProfileResp, error)
GetOwnerUserProfile gets owner's user profile
func (*Profiles) GetPropertiesFor ¶
func (profiles *Profiles) GetPropertiesFor(loginName string) (ProfilePropsResp, error)
GetPropertiesFor gets properties of a specified user profile (by user login name)
func (*Profiles) GetUserProfilePropertyFor ¶
func (profiles *Profiles) GetUserProfilePropertyFor(loginName string, property string) (string, error)
GetUserProfilePropertyFor gets specific property of a specified user profile (by user login name)
func (*Profiles) HideSuggestion ¶
HideSuggestion removes the specified user from the user's list of suggested people to follow
func (*Profiles) SetMultiValuedProfileProperty ¶
func (profiles *Profiles) SetMultiValuedProfileProperty(loginName string, property string, values []string) error
SetMultiValuedProfileProperty sets a multi value property for the profile by its email
func (*Profiles) SetSingleValueProfileProperty ¶
func (profiles *Profiles) SetSingleValueProfileProperty(loginName string, property string, value string) error
SetSingleValueProfileProperty sets a single value property for the profile by its email
func (*Profiles) UserProfile ¶
func (profiles *Profiles) UserProfile() (ProfileResp, error)
UserProfile gets current context user profile object
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties represent SharePoint Property Bags API queryable collection struct Always use NewProperties constructor instead of &Properties{}
func NewProperties ¶
func NewProperties(client *gosip.SPClient, endpoint string, config *RequestConfig, entity string) *Properties
NewProperties - Properties struct constructor function
func (*Properties) Conf ¶
func (properties *Properties) Conf(config *RequestConfig) *Properties
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Properties) Expand ¶
func (properties *Properties) Expand(oDataExpand string) *Properties
Expand adds $expand OData modifier
func (*Properties) Get ¶
func (properties *Properties) Get() (PropsResp, error)
Get gets properties collection
func (*Properties) GetProps ¶
func (properties *Properties) GetProps(props []string) (map[string]string, error)
GetProps gets specific props values
func (*Properties) Select ¶
func (properties *Properties) Select(oDataSelect string) *Properties
Select adds $select OData modifier
func (*Properties) Set ¶
func (properties *Properties) Set(prop string, value string) error
Set sets a single property (CSOM helper)
func (*Properties) SetProps ¶
func (properties *Properties) SetProps(props map[string]string) error
SetProps sets multiple properties defined in string map object (CSOM helper)
func (*Properties) ToURL ¶
func (properties *Properties) ToURL() string
ToURL gets endpoint with modificators raw URL
type PropsResp ¶
type PropsResp []byte
PropsResp - property bags response type with helper processor methods
func (*PropsResp) Normalized ¶
Normalized returns normalized body
type Records ¶
type Records struct {
// contains filtered or unexported fields
}
Records represents SharePoint Item Records via REST+CSOM API object struct Always use NewRecords constructor instead of &Records{}
func NewRecords ¶
NewRecords - Records struct constructor function
func (*Records) DeclareWithDate ¶
DeclareWithDate declares this item as a record with record declaration date (CSOM helper)
func (*Records) RecordDate ¶
RecordDate checks record declaration date of this item
type RecycleBin ¶
type RecycleBin struct {
// contains filtered or unexported fields
}
RecycleBin represents SharePoint Recycle Bin API queryable collection struct Always use NewRecycleBin constructor instead of &RecycleBin{}
func NewRecycleBin ¶
func NewRecycleBin(client *gosip.SPClient, endpoint string, config *RequestConfig) *RecycleBin
NewRecycleBin - RecycleBin struct constructor function
func (*RecycleBin) Conf ¶
func (recycleBin *RecycleBin) Conf(config *RequestConfig) *RecycleBin
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*RecycleBin) Expand ¶
func (recycleBin *RecycleBin) Expand(oDataExpand string) *RecycleBin
Expand adds $expand OData modifier
func (*RecycleBin) Filter ¶
func (recycleBin *RecycleBin) Filter(oDataFilter string) *RecycleBin
Filter adds $filter OData modifier
func (*RecycleBin) Get ¶
func (recycleBin *RecycleBin) Get() (RecycleBinResp, error)
Get gets recycled items queryable collection
func (*RecycleBin) GetByID ¶
func (recycleBin *RecycleBin) GetByID(itemID string) *RecycleBinItem
GetByID gets a recycled item by its ID
func (*RecycleBin) OrderBy ¶
func (recycleBin *RecycleBin) OrderBy(oDataOrderBy string, ascending bool) *RecycleBin
OrderBy adds $orderby OData modifier
func (*RecycleBin) Select ¶
func (recycleBin *RecycleBin) Select(oDataSelect string) *RecycleBin
Select adds $select OData modifier
func (*RecycleBin) ToURL ¶
func (recycleBin *RecycleBin) ToURL() string
ToURL gets endpoint with modificators raw URL
func (*RecycleBin) Top ¶
func (recycleBin *RecycleBin) Top(oDataTop int) *RecycleBin
Top adds $top OData modifier
type RecycleBinItem ¶
type RecycleBinItem struct {
// contains filtered or unexported fields
}
RecycleBinItem represent SharePoint Recycle Bin Item API queryable object struct Always use NewRecycleBinItem constructor instead of &RecycleBinItem{}
func NewRecycleBinItem ¶
func NewRecycleBinItem(client *gosip.SPClient, endpoint string, config *RequestConfig) *RecycleBinItem
NewRecycleBinItem - RecycleBinItem struct constructor function
func (*RecycleBinItem) Get ¶
func (recycleBinItem *RecycleBinItem) Get() (RecycleBinItemResp, error)
Get gets this recycle item data object
func (*RecycleBinItem) Restore ¶
func (recycleBinItem *RecycleBinItem) Restore() error
Restore restores this recycled item
type RecycleBinItemInfo ¶
type RecycleBinItemInfo struct { AuthorEmail string `json:"AuthorEmail"` AuthorName string `json:"AuthorName"` DeletedByEmail string `json:"DeletedByEmail"` DeletedByName string `json:"DeletedByName"` DeletedDate time.Time `json:"DeletedDate"` DeletedDateLocalFormatted string `json:"DeletedDateLocalFormatted"` DirName string `json:"DirName"` ID string `json:"Id"` ItemState int `json:"ItemState"` ItemType int `json:"ItemType"` LeafName string `json:"LeafName"` Size int `json:"Size"` Title string `json:"Title"` LeafNamePath *DecodedURL `json:"LeafNamePath"` DirNamePath *DecodedURL `json:"DirNamePath"` }
RecycleBinItemInfo ...
type RecycleBinItemResp ¶
type RecycleBinItemResp []byte
RecycleBinItemResp - recycle bin item response type with helper processor methods
func (*RecycleBinItemResp) Data ¶
func (recycleBinItemResp *RecycleBinItemResp) Data() *RecycleBinItemInfo
Data response helper
func (*RecycleBinItemResp) Normalized ¶
func (recycleBinItemResp *RecycleBinItemResp) Normalized() []byte
Normalized returns normalized body
type RecycleBinResp ¶
type RecycleBinResp []byte
RecycleBinResp - recycle bin response type with helper processor methods
func (*RecycleBinResp) Data ¶
func (recycleBinResp *RecycleBinResp) Data() []RecycleBinItemResp
Data response helper
func (*RecycleBinResp) Normalized ¶
func (recycleBinResp *RecycleBinResp) Normalized() []byte
Normalized returns normalized body
type RenderListDataInfo ¶
type RenderListDataInfo struct { Row []map[string]interface{} `json:"Row"` FirstRow int `json:"FirstRow"` FolderPermissions string `json:"FolderPermissions"` LastRow int `json:"LastRow"` RowLimit int `json:"RowLimit"` FilterLink string `json:"FilterLink"` ForceNoHierarchy string `json:"ForceNoHierarchy"` HierarchyHasIndention string `json:"HierarchyHasIndention"` CurrentFolderSpItemURL string `json:"CurrentFolderSpItemUrl"` }
RenderListDataInfo ...
type RenderListDataResp ¶
type RenderListDataResp []byte
RenderListDataResp - renderListData method response type with helper processor methods
func (*RenderListDataResp) Data ¶
func (listData *RenderListDataResp) Data() *RenderListDataInfo
Data : to get typed data
type RequestConfig ¶
RequestConfig struct
type ResultTable ¶
type ResultTable struct { GroupTemplateID string `json:"GroupTemplateId"` ItemTemplateID string `json:"ItemTemplateId"` ResultTitle string `json:"ResultTitle"` ResultTitleURL string `json:"ResultTitleUrl"` RowCount int `json:"RowCount"` TableType string `json:"TableType"` TotalRows int `json:"TotalRows"` TotalRowsIncludingDuplicates int `json:"TotalRowsIncludingDuplicates"` Properties []*TypedKeyValue `json:"Properties"` Table *struct { Rows []*struct { Cells []*TypedKeyValue `json:"Cells"` } `json:"Rows"` } `json:"Table"` Refiners []*struct { Name string `json:"Name"` Entries []*struct { RefinementCount string `json:"RefinementCount"` RefinementName string `json:"RefinementName"` RefinementToken string `json:"RefinementToken"` RefinementValue string `json:"RefinementValue"` } `json:"Entries"` } `json:"Refiners"` }
ResultTable - search result table type
type ResultTableCollection ¶
type ResultTableCollection struct { QueryErrors map[string]interface{} `json:"QueryErrors"` QueryID string `json:"QueryId"` QueryRuleID string `json:"QueryRuleId"` CustomResults *ResultTable `json:"CustomResults"` RefinementResults *ResultTable `json:"RefinementResults"` RelevantResults *ResultTable `json:"RelevantResults"` SpecialTermResults *ResultTable `json:"SpecialTermResults"` }
ResultTableCollection - search results table collection type
type RoleAssigment ¶
type RoleAssigment struct { Member *struct { LoginName string PrincipalType int } RoleDefinitionBindings []*RoleDefInfo }
RoleAssigment role assignments model
type RoleDefInfo ¶
type RoleDefInfo struct { BasePermissions *BasePermissions `json:"BasePermissions"` Description string `json:"Description"` Hidden bool `json:"Hidden"` ID int `json:"Id"` Name string `json:"Name"` Order int `json:"Order"` RoleTypeKind int `json:"RoleTypeKind"` }
RoleDefInfo - permissions role definition API response payload structure
type RoleDefinitions ¶
type RoleDefinitions struct {
// contains filtered or unexported fields
}
RoleDefinitions represents SharePoint permissions Role Definitions API queryable object struct Always use NewRoleDefinitions constructor instead of &RoleDefinitions{}
func NewRoleDefinitions ¶
func NewRoleDefinitions(client *gosip.SPClient, endpoint string, config *RequestConfig) *RoleDefinitions
NewRoleDefinitions - RoleDefinitions struct constructor function
func (*RoleDefinitions) Get ¶
func (def *RoleDefinitions) Get() ([]*RoleDefInfo, error)
Get gets a collection of available role definitions
func (*RoleDefinitions) GetByID ¶
func (def *RoleDefinitions) GetByID(roleDefID int) (*RoleDefInfo, error)
GetByID gets a role definition by its ID
func (*RoleDefinitions) GetByName ¶
func (def *RoleDefinitions) GetByName(roleDefName string) (*RoleDefInfo, error)
GetByName gets a role definition by its Name
func (*RoleDefinitions) GetByType ¶
func (def *RoleDefinitions) GetByType(roleTypeKind int) (*RoleDefInfo, error)
GetByType gets a role definition by its RoleTypeKinds
type Roles ¶
type Roles struct {
// contains filtered or unexported fields
}
Roles represent SharePoint Permissions Roles API queryable collection struct Always use NewRoles constructor instead of &Roles{}
func NewRoles ¶
func NewRoles(client *gosip.SPClient, endpoint string, config *RequestConfig) *Roles
NewRoles - Roles struct constructor function
func (*Roles) AddAssigment ¶
AddAssigment adds role assigment for this securable object. Relevant only for the objects after breaking inheritance. `principalID` - Principal ID - numeric ID from User information list - user or group ID `roleDefID` - Role definition ID, use RoleDefinitions API for getting roleDefID
func (*Roles) BreakInheritance ¶
BreakInheritance breaks permissions inheritance for this securable object `copyRoleAssignments` - if true the permissions are copied from the current parent scope `clearSubScopes` - true to make all child securable objects inherit role assignments from the current object
func (*Roles) HasUniqueAssignments ¶
HasUniqueAssignments checks is a securable object has unique permissions
func (*Roles) RemoveAssigment ¶
RemoveAssigment removes specified role assigment for a principal for this securable object. `principalID` - Principal ID - numeric ID from User information list - user or group ID `roleDefID` - Role definition ID, use RoleDefinitions API for getting roleDefID
func (*Roles) ResetInheritance ¶
ResetInheritance resets permissions inheritance for this securable object
type SP ¶
type SP struct {
// contains filtered or unexported fields
}
SP represents SharePoint REST+ API root struct Always use NewSP constructor instead of &SP{}
func (*SP) Conf ¶
func (sp *SP) Conf(config *RequestConfig) *SP
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*SP) ContextInfo ¶
func (sp *SP) ContextInfo() (*ContextInfo, error)
ContextInfo gets current Context Info object data
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
Search represents SharePoint Search API object struct Always use NewSearch constructor instead of &Search{}
func NewSearch ¶
func NewSearch(client *gosip.SPClient, endpoint string, config *RequestConfig) *Search
NewSearch - Search struct constructor function
func (*Search) PostQuery ¶
func (search *Search) PostQuery(query *SearchQuery) (SearchResp, error)
PostQuery gets search results based on a `query`
type SearchProperty ¶
type SearchProperty struct { Name string `json:"Name"` Value SearchPropertyValue `json:"Value"` }
SearchProperty - search property type
type SearchPropertyValue ¶
type SearchPropertyValue struct { StrVal string `json:"StrVal"` BoolVal bool `json:"BoolVal"` IntVal int `json:"IntVal"` StrArray []string `json:"StrArray"` QueryPropertyValueTypeIndex int `json:"QueryPropertyValueTypeIndex"` // None = 0, StringType = 1, Int32Type = 2, BooleanType = 3, StringArrayType = 4, UnSupportedType = 5 }
SearchPropertyValue - search property value type
type SearchQuery ¶
type SearchQuery struct { QueryText string `json:"Querytext"` // A string that contains the text for the search query QueryTemplate string `json:"QueryTemplate"` // A string that contains the text that replaces the query text, as part of a query transform EnableInterleaving bool `json:"EnableInterleaving"` // A Boolean value that specifies whether the result tables that are returned for the result block are mixed with the result tables that are returned for the original query EnableStemming bool `json:"EnableStemming"` // A Boolean value that specifies whether stemming is enabled TrimDuplicates bool `json:"TrimDuplicates"` // A Boolean value that specifies whether duplicate items are removed from the results EnableNicknames bool `json:"EnableNicknames"` // A Boolean value that specifies whether the exact terms in the search query are used to find matches, or if nicknames are used also EnableFQL bool `json:"EnableFQL"` // A Boolean value that specifies whether the query uses the FAST Query Language (FQL) EnablePhonetic bool `json:"EnablePhonetic"` // A Boolean value that specifies whether the phonetic forms of the query terms are used to find matches BypassResultTypes bool `json:"BypassResultTypes"` // A Boolean value that specifies whether to perform result type processing for the query ProcessBestBets bool `json:"ProcessBestBets"` // A Boolean value that specifies whether to return best bet results for the query. This parameter is used only when EnableQueryRules is set to true, otherwise it is ignored. EnableQueryRules bool `json:"EnableQueryRules"` // A Boolean value that specifies whether to enable query rules for the query EnableSorting bool `json:"EnableSorting"` // A Boolean value that specifies whether to sort search results GenerateBlockRankLog bool `json:"GenerateBlockRankLog"` // Specifies whether to return block rank log information in the BlockRankLog property of the interleaved result table. A block rank log contains the textual information on the block score and the documents that were de-duplicated. SourceID string `json:"SourceId"` // The result source ID to use for executing the search query RankingModelID string `json:"RankingModelId"` // The ID of the ranking model to use for the query StartRow int `json:"StartRow"` // The first row that is included in the search results that are returned. You use this parameter when you want to implement paging for search results. RowLimit int `json:"RowLimit"` // The maximum number of rows overall that are returned in the search results. Compared to RowsPerPage, RowLimit is the maximum number of rows returned overall. RowsPerPage int `json:"RowsPerPage"` // The maximum number of rows to return per page. Compared to RowLimit, RowsPerPage refers to the maximum number of rows to return per page, and is used primarily when you want to implement paging for search results. SelectProperties []string `json:"SelectProperties"` // The managed properties to return in the search results Culture int `json:"Culture"` // The locale ID (LCID) for the query RefinementFilters []string `json:"RefinementFilters"` // The set of refinement filters used when issuing a refinement query (FQL) Refiners string `json:"Refiners"` // The set of refiners to return in a search result HiddenConstraints string `json:"HiddenConstraints"` // The additional query terms to append to the query Timeout int `json:"Timeout"` // The amount of time in milliseconds before the query request times out HitHighlightedProperties []string `json:"HitHighlightedProperties"` // The properties to highlight in the search result summary when the property value matches the search terms entered by the user ClientType string `json:"ClientType"` // The type of the client that issued the query PersonalizationData string `json:"PersonalizationData"` // The GUID for the user who submitted the search query ResultsURL string `json:"ResultsUrl"` // The URL for the search results page QueryTag string `json:"QueryTag"` // Custom tags that identify the query. You can specify multiple query tags ProcessPersonalFavorites bool `json:"ProcessPersonalFavorites"` // A Boolean value that specifies whether to return personal favorites with the search results QueryTemplatePropertiesURL string `json:"QueryTemplatePropertiesUrl"` // The location of the queryparametertemplate.xml file. This file is used to enable anonymous users to make Search REST queries HitHighlightedMultivaluePropertyLimit int `json:"HitHighlightedMultivaluePropertyLimit"` // The number of properties to show hit highlighting for in the search results EnableOrderingHitHighlightedProperty bool `json:"EnableOrderingHitHighlightedProperty"` // A Boolean value that specifies whether the hit highlighted properties can be ordered CollapseSpecification string `json:"CollapseSpecification"` // The managed properties that are used to determine how to collapse individual search results. Results are collapsed into one or a specified number of results if they match any of the individual collapse specifications. In a collapse specification, results are collapsed if their properties match all individual properties in the collapse specification. UIlanguage int `json:"UIlanguage"` // The locale identifier (LCID) of the user interface DesiredSnippetLength int `json:"DesiredSnippetLength"` // The preferred number of characters to display in the hit-highlighted summary generated for a search result MaxSnippetLength int `json:"MaxSnippetLength"` // The maximum number of characters to display in the hit-highlighted summary generated for a search result SummaryLength int `json:"SummaryLength"` // The number of characters to display in the result summary for a search result SortList []*SearchSort `json:"SortList"` // The list of properties by which the search results are ordered Properties []*SearchProperty `json:"Properties"` // Properties to be used to configure the search query ReorderingRules []*SearchReorderingRule `json:"ReorderingRules"` // Special rules for reordering search results. These rules can specify that documents matching certain conditions are ranked higher or lower in the results. This property applies only when search results are sorted based on rank. }
SearchQuery - strongly typed struct for search method parameters
type SearchReorderingRule ¶
type SearchReorderingRule struct { MatchValue string `json:"MatchValue"` Boost int `json:"Boost"` MatchType int `json:"MatchType"` // ResultContainsKeyword = 0, TitleContainsKeyword = 1, TitleMatchesKeyword = 2, UrlStartsWith = 3, UrlExactlyMatches = 4, ContentTypeIs = 5, FileExtensionMatches = 6, ResultHasTag = 7, ManualCondition = 8 }
SearchReorderingRule - search reordering rule type
type SearchResp ¶
type SearchResp []byte
SearchResp - search response type with helper processor methods
func (*SearchResp) Data ¶
func (searchResp *SearchResp) Data() *SearchResults
Data : to get typed data
func (*SearchResp) Normalized ¶
func (searchResp *SearchResp) Normalized() []byte
Normalized returns normalized body
func (*SearchResp) Results ¶
func (searchResp *SearchResp) Results() []map[string]string
Results : to get typed data
type SearchResults ¶
type SearchResults struct { ElapsedTime int `json:"ElapsedTime"` PrimaryQueryResult *ResultTableCollection `json:"PrimaryQueryResult"` Properties []*TypedKeyValue `json:"Properties"` SecondaryQueryResults []*ResultTableCollection `json:"SecondaryQueryResults"` SpellingSuggestion string `json:"SpellingSuggestion"` TriggeredRules []interface{} `json:"TriggeredRules"` }
SearchResults - search results response type
type SearchSort ¶
type SearchSort struct { Property string `json:"Property"` Direction int `json:"Direction"` // Ascending = 0, Descending = 1, FQLFormula = 2 }
SearchSort - search sort property type
type Site ¶
type Site struct {
// contains filtered or unexported fields
}
Site represents SharePoint Site API queryable object struct Always use NewSite constructor instead of &Site{}
func NewSite ¶
func NewSite(client *gosip.SPClient, endpoint string, config *RequestConfig) *Site
NewSite - Site struct constructor function
func (*Site) Conf ¶
func (site *Site) Conf(config *RequestConfig) *Site
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Site) CustomActions ¶
func (site *Site) CustomActions() *CustomActions
CustomActions gets CustomActions API scoped object
func (*Site) EventReceivers ¶
func (site *Site) EventReceivers() *EventReceivers
EventReceivers gets EventReceivers API scoped object
func (*Site) OpenWebByID ¶
OpenWebByID gets a Web data object by its ID (GUID)
func (*Site) RecycleBin ¶
func (site *Site) RecycleBin() *RecycleBin
RecycleBin gets RecycleBin API instance object for this Site
type SiteInfo ¶
type SiteInfo struct { AllowCreateDeclarativeWorkflow bool `json:"AllowCreateDeclarativeWorkflow"` AllowDesigner bool `json:"AllowDesigner"` AllowMasterPageEditing bool `json:"AllowMasterPageEditing"` AllowRevertFromTemplate bool `json:"AllowRevertFromTemplate"` AllowSaveDeclarativeWorkflowAsTemplate bool `json:"AllowSaveDeclarativeWorkflowAsTemplate"` AllowSavePublishDeclarativeWorkflow bool `json:"AllowSavePublishDeclarativeWorkflow"` AllowSelfServiceUpgrade bool `json:"AllowSelfServiceUpgrade"` AllowSelfServiceUpgradeEvaluation bool `json:"AllowSelfServiceUpgradeEvaluation"` AuditLogTrimmingRetention int `json:"AuditLogTrimmingRetention"` CompatibilityLevel int `json:"CompatibilityLevel"` CurrentChangeToken *StringValue `json:"CurrentChangeToken"` DisableAppViews bool `json:"DisableAppViews"` DisableCompanyWideSharingLinks bool `json:"DisableCompanyWideSharingLinks"` DisableFlows bool `json:"DisableFlows"` ExternalSharingTipsEnabled bool `json:"ExternalSharingTipsEnabled"` GeoLocation string `json:"GeoLocation"` GroupID string `json:"GroupId"` HubSiteID string `json:"HubSiteId"` ID string `json:"Id"` IsHubSite bool `json:"IsHubSite"` MaxItemsPerThrottledOperation int `json:"MaxItemsPerThrottledOperation"` NeedsB2BUpgrade bool `json:"NeedsB2BUpgrade"` PrimaryURI string `json:"PrimaryUri"` ReadOnly bool `json:"ReadOnly"` RequiredDesignerVersion string `json:"RequiredDesignerVersion"` ResourcePath *DecodedURL `json:"ResourcePath"` SandboxedCodeActivationCapability int `json:"SandboxedCodeActivationCapability"` SensitivityLabel string `json:"SensitivityLabel"` SensitivityLabelID string `json:"SensitivityLabelId"` ServerRelativeURL string `json:"ServerRelativeUrl"` ShowURLStructure bool `json:"ShowUrlStructure"` TrimAuditLog bool `json:"TrimAuditLog"` UIVersionConfigurationEnabled bool `json:"UIVersionConfigurationEnabled"` UpgradeReminderDate string `json:"UpgradeReminderDate"` // time.Time UpgradeScheduled bool `json:"UpgradeScheduled"` UpgradeScheduledDate string `json:"UpgradeScheduledDate"` // time.Time Upgrading bool `json:"Upgrading"` URL string `json:"Url"` }
SiteInfo - site API response payload structure
type SiteResp ¶
type SiteResp []byte
SiteResp - site response type with helper processor methods
func (*SiteResp) Normalized ¶
Normalized returns normalized body
type StringValue ¶
type StringValue struct {
StringValue string `json:"StringValue"`
}
StringValue single value prop type
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription represent SharePoint lists Subscription API Always use NewSubscription constructor instead of &Subscription{}
func NewSubscription ¶
func NewSubscription(client *gosip.SPClient, endpoint string, config *RequestConfig) *Subscription
NewSubscription - subscription struct constructor function
func (*Subscription) Conf ¶
func (subscription *Subscription) Conf(config *RequestConfig) *Subscription
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Subscription) Delete ¶
func (subscription *Subscription) Delete() error
Delete deletes a subscription by its ID (GUID)
func (*Subscription) Get ¶
func (subscription *Subscription) Get() (*SubscriptionInfo, error)
Get gets subscription info
func (*Subscription) SetClientState ¶
func (subscription *Subscription) SetClientState(clientState string) (*SubscriptionInfo, error)
SetClientState sets new client state
func (*Subscription) SetExpiration ¶
func (subscription *Subscription) SetExpiration(expiration time.Time) (*SubscriptionInfo, error)
SetExpiration sets new expiration datetime
func (*Subscription) SetNotificationURL ¶
func (subscription *Subscription) SetNotificationURL(notificationURL string) (*SubscriptionInfo, error)
SetNotificationURL sets new notification URL state
func (*Subscription) Update ¶
func (subscription *Subscription) Update(metadata map[string]interface{}) (*SubscriptionInfo, error)
Update updates a subscription
type SubscriptionInfo ¶
type SubscriptionInfo struct { ID string `json:"id"` // The service URL to send notifications to NotificationURL string `json:"notificationUrl"` // The date the notification will expire and be deleted ExpirationDateTime time.Time `json:"expirationDateTime"` // The URL of the list to receive notifications from Resource string `json:"resource"` // Optional. Opaque string passed back to the client on all notifications. // You can use this for validating notifications or tagging different subscriptions. ClientState string `json:"clientState"` ResourceData string `json:"resourceData"` }
SubscriptionInfo list subscription info
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
Subscriptions represent SharePoint lists Subscriptions API queryable collection struct Always use NewSubscriptions constructor instead of &Subscriptions{}
func NewSubscriptions ¶
func NewSubscriptions(client *gosip.SPClient, endpoint string, config *RequestConfig) *Subscriptions
NewSubscriptions - Subscriptions struct constructor function
func (*Subscriptions) Add ¶
func (subscriptions *Subscriptions) Add(notificationURL string, expiration time.Time, clientState string) (*SubscriptionInfo, error)
Add adds/updates new subscription to a list
func (*Subscriptions) Conf ¶
func (subscriptions *Subscriptions) Conf(config *RequestConfig) *Subscriptions
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Subscriptions) Get ¶
func (subscriptions *Subscriptions) Get() ([]*SubscriptionInfo, error)
Get gets list subscriptions response collection
func (*Subscriptions) GetByID ¶
func (subscriptions *Subscriptions) GetByID(subscriptionID string) *Subscription
GetByID gets list subscription by its ID (GUID)
type Taxonomy ¶
type Taxonomy struct {
// contains filtered or unexported fields
}
Taxonomy session struct
func NewTaxonomy ¶
func NewTaxonomy(client *gosip.SPClient, siteURL string, config *RequestConfig) *Taxonomy
NewTaxonomy - taxonomy struct constructor function
func (*Taxonomy) Stores ¶
func (taxonomy *Taxonomy) Stores() *TermStores
Stores gets term stores collection object
type Term ¶
type Term struct {
// contains filtered or unexported fields
}
Term struct
func (*Term) Move ¶
Move moves a term to a new location use empty `termGUID` to move to a root term store level
type TermGroup ¶
type TermGroup struct {
// contains filtered or unexported fields
}
TermGroup term group struct
type TermGroups ¶
type TermGroups struct {
// contains filtered or unexported fields
}
TermGroups term groups struct
func (*TermGroups) Add ¶
func (termGroups *TermGroups) Add(name string, guid string) (map[string]interface{}, error)
Add creates new group
func (*TermGroups) Get ¶
func (termGroups *TermGroups) Get() ([]map[string]interface{}, error)
Get gets term groups metadata
func (*TermGroups) GetByID ¶
func (termGroups *TermGroups) GetByID(groupGUID string) *TermGroup
GetByID gets term group object by its GUID
type TermSet ¶
type TermSet struct {
// contains filtered or unexported fields
}
TermSet term set struct
func (*TermSet) GetAllTerms ¶
GetAllTerms gets all terms collection metadata
type TermSets ¶
type TermSets struct {
// contains filtered or unexported fields
}
TermSets term sets struct
type TermStore ¶
type TermStore struct {
// contains filtered or unexported fields
}
TermStore term store struct
func (*TermStore) Groups ¶
func (termStore *TermStore) Groups() *TermGroups
Groups gets term groups object
func (*TermStore) UpdateCache ¶
UpdateCache updates store cache
type TermStores ¶
type TermStores struct {
// contains filtered or unexported fields
}
TermStores term stores struct
func (*TermStores) Default ¶
func (termStores *TermStores) Default() *TermStore
Default gets default site collection term store object
func (*TermStores) GetByID ¶
func (termStores *TermStores) GetByID(storeGUID string) *TermStore
GetByID gets term store object by ID
func (*TermStores) GetByName ¶
func (termStores *TermStores) GetByName(storeName string) *TermStore
GetByName gets term store object by Name
type Terms ¶
type Terms struct {
// contains filtered or unexported fields
}
Terms struct
type TypedKeyValue ¶
type TypedKeyValue struct { Key string `json:"Key"` Value string `json:"Value"` ValueType string `json:"ValueType"` }
TypedKeyValue typed key value prop type
type UpdateValidateFieldResult ¶
type UpdateValidateFieldResult struct { ErrorCode int ErrorMessage string FieldName string FieldValue string HasException bool ItemID int `json:"ItemId"` }
UpdateValidateFieldResult field result struct
type UpdateValidateResp ¶
type UpdateValidateResp []byte
UpdateValidateResp - update validate response type with helper processor methods
func (*UpdateValidateResp) Data ¶
func (uvResp *UpdateValidateResp) Data() []UpdateValidateFieldResult
Data unmarshals UpdateValidate response
func (*UpdateValidateResp) Value ¶
func (uvResp *UpdateValidateResp) Value(fieldName string) string
Value gets updated item's value from the response
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents SharePoint Site User API queryable object struct Always use NewUser constructor instead of &User{}
func NewUser ¶
func NewUser(client *gosip.SPClient, endpoint string, config *RequestConfig) *User
NewUser - User struct constructor function
func (*User) Conf ¶
func (user *User) Conf(config *RequestConfig) *User
Conf receives custom request config definition, e.g. custom headers, custom OData mod
type UserInfo ¶
type UserInfo struct { Email string `json:"Email"` ID int `json:"Id"` IsHiddenInUI bool `json:"IsHiddenInUI"` IsSiteAdmin bool `json:"IsSiteAdmin"` LoginName string `json:"LoginName"` PrincipalType int `json:"PrincipalType"` Title string `json:"Title"` }
UserInfo - site user API response payload structure
type UserResp ¶
type UserResp []byte
UserResp - site user response type with helper processor methods
func (*UserResp) Normalized ¶
Normalized returns normalized body
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users represent SharePoint Site Users API queryable collection struct Always use NewUsers constructor instead of &Users{}
func NewUsers ¶
func NewUsers(client *gosip.SPClient, endpoint string, config *RequestConfig) *Users
NewUsers - Users struct constructor function
func (*Users) Conf ¶
func (users *Users) Conf(config *RequestConfig) *Users
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Users) GetByEmail ¶
GetByEmail gets a user by his/her email address
func (*Users) GetByLoginName ¶
GetByLoginName gets a user by his/her login name
type UsersResp ¶
type UsersResp []byte
UsersResp - site users response type with helper processor methods
func (*UsersResp) Normalized ¶
Normalized returns normalized body
type Utility ¶
type Utility struct {
// contains filtered or unexported fields
}
Utility represents SharePoint Utilities namespace API object struct Always use NewUtility constructor instead of &Utility{}
func NewUtility ¶
func NewUtility(client *gosip.SPClient, endpoint string, config *RequestConfig) *Utility
NewUtility - Utility struct constructor function
func (*Utility) SendEmail ¶
func (utility *Utility) SendEmail(options *EmailProps) error
SendEmail sends an email via REST API due to the provided EmailProps options
type ValidateAddOptions ¶
ValidateAddOptions AddValidateUpdateItemUsingPath method options
type ValidateUpdateOptions ¶
ValidateUpdateOptions ValidateUpdateListItem request options
type View ¶
type View struct {
// contains filtered or unexported fields
}
View represents SharePoint List View API queryable object struct Always use NewView constructor instead of &View{}
func NewView ¶
func NewView(client *gosip.SPClient, endpoint string, config *RequestConfig) *View
NewView - View struct constructor function
func (*View) Conf ¶
func (view *View) Conf(config *RequestConfig) *View
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*View) SetViewXML ¶
SetViewXML updates view XML
type ViewInfo ¶
type ViewInfo struct { BaseViewID string `json:"BaseViewId"` DefaultView bool `json:"DefaultView"` DefaultViewForContentType bool `json:"DefaultViewForContentType"` EditorModified bool `json:"EditorModified"` Hidden bool `json:"Hidden"` HTMLSchemaXML string `json:"HtmlSchemaXml"` ID string `json:"Id"` ImageURL string `json:"ImageUrl"` IncludeRootFolder bool `json:"IncludeRootFolder"` JSLink string `json:"JSLink"` ListViewXML string `json:"ListViewXml"` MobileDefaultView bool `json:"MobileDefaultView"` MobileView bool `json:"MobileView"` OrderedView bool `json:"OrderedView"` Paged bool `json:"Paged"` PersonalView bool `json:"PersonalView"` ReadOnlyView bool `json:"ReadOnlyView"` RequiresClientIntegration bool `json:"RequiresClientIntegration"` RowLimit int `json:"RowLimit"` Scope int `json:"Scope"` ServerRelativeURL string `json:"ServerRelativeUrl"` TabularView bool `json:"TabularView"` Threaded bool `json:"Threaded"` Title string `json:"Title"` ViewQuery string `json:"ViewQuery"` ViewType string `json:"ViewType"` ViewData string `json:"ViewData"` }
ViewInfo - list view API response payload structure
type ViewResp ¶
type ViewResp []byte
ViewResp - list view response type with helper processor methods
func (*ViewResp) Normalized ¶
Normalized returns normalized body
type Views ¶
type Views struct {
// contains filtered or unexported fields
}
Views represent SharePoint List Views API queryable collection struct Always use NewViews constructor instead of &Views{}
func NewViews ¶
func NewViews(client *gosip.SPClient, endpoint string, config *RequestConfig) *Views
NewViews - Views struct constructor function
func (*Views) Add ¶
Add adds view with properties provided in `body` parameter where `body` is byte array representation of JSON string payload relevant to SP.View object
func (*Views) Conf ¶
func (views *Views) Conf(config *RequestConfig) *Views
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Views) DefaultView ¶
DefaultView gets list's default view
func (*Views) GetByTitle ¶
GetByTitle gets a view by its Display Name (Title)
type ViewsResp ¶
type ViewsResp []byte
ViewsResp - list views response type with helper processor methods
func (*ViewsResp) Normalized ¶
Normalized returns normalized body
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
Web represents SharePoint Web API queryable object struct Always use NewWeb constructor instead of &Web{}
func NewWeb ¶
func NewWeb(client *gosip.SPClient, endpoint string, config *RequestConfig) *Web
NewWeb - Web struct constructor function
func (*Web) AllProps ¶
func (web *Web) AllProps() *Properties
AllProps gets Properties API instance queryable collection for this Web
func (*Web) AssociatedGroups ¶
func (web *Web) AssociatedGroups() *AssociatedGroups
AssociatedGroups gets associated groups scoped constructor
func (*Web) AvailableContentTypes ¶
func (web *Web) AvailableContentTypes() *ContentTypes
AvailableContentTypes gets ContentTypes API instance queryable collection for this Web
func (*Web) Conf ¶
func (web *Web) Conf(config *RequestConfig) *Web
Conf receives custom request config definition, e.g. custom headers, custom OData mod
func (*Web) ContentTypes ¶
func (web *Web) ContentTypes() *ContentTypes
ContentTypes gets ContentTypes API instance queryable collection for this Web
func (*Web) ContextInfo ¶
func (web *Web) ContextInfo() (*ContextInfo, error)
ContextInfo gets Context info object for this Web
func (*Web) CurrentUser ¶
CurrentUser gets current User API instance object
func (*Web) CustomActions ¶
func (web *Web) CustomActions() *CustomActions
CustomActions gets CustomActions API scoped object
func (*Web) EnsureFolder ¶
func (web *Web) EnsureFolder(serverRelativeURL string) (FolderResp, error)
EnsureFolder is a helper to ensure a folder by its relevant URI, when there was no folder it's created
func (*Web) EnsureFolderByPath ¶
func (web *Web) EnsureFolderByPath(serverRelativeURL string) (FolderResp, error)
EnsureFolderByPath is a helper to ensure a folder by its relevant URI, when there was no folder it's created
func (*Web) EnsureUser ¶
EnsureUser ensures a user by a `loginName` parameter and returns UserInfo
func (*Web) EventReceivers ¶
func (web *Web) EventReceivers() *EventReceivers
EventReceivers gets EventReceivers API scoped object
func (*Web) Fields ¶
Fields gets Fields API instance queryable collection for this Web (Site Columns)
func (*Web) GetFile ¶
GetFile gets File API instance object by its relevant URI File URI can be host relevant (e.g. `/sites/site/lib/folder/file.txt`) or web relevant (e.g. `lib/folder/file.txt`, with web relevant URI there should be no slash at the beginning) A wrapper of `GetFileByServerRelativeUrl`
func (*Web) GetFileByID ¶
GetFileByID gets File API instance object by its unique ID Supported only in modern SharePoint
func (*Web) GetFileByPath ¶
GetFileByPath gets File API instance object by its relevant URI File URI can be host relevant (e.g. `/sites/site/lib/folder/file.txt`) or web relevant (e.g. `lib/folder/file.txt`, with web relevant URI there should be no slash at the beginning) A wrapper of `GetFileByServerRelativePath` Supported only in modern SharePoint, differs from GetFile with its capability of dealing with special chars in path
func (*Web) GetFolder ¶
GetFolder gets a folder by its relevant URI, URI can be host relevant (e.g. `/sites/site/lib/folder`) or web relevant (e.g. `lib/folder`, with web relevant URI there should be no slash at the beginning) A wrapper of `GetFolderByServerRelativeUrl`
func (*Web) GetFolderByID ¶
GetFolderByID gets Folder API instance object by its unique ID Supported only in modern SharePoint
func (*Web) GetFolderByPath ¶
GetFolderByPath gets a folder by its relevant URI, URI can be host relevant (e.g. `/sites/site/lib/folder`) or web relevant (e.g. `lib/folder`, with web relevant URI there should be no slash at the beginning) A wrapper of `GetFolderByServerRelativePath` Supported only in modern SharePoint, differs from GetFile with its capability of dealing with special chars in path
func (*Web) GetList ¶
GetList gets Lists API instance queryable collection for this Web (Web's Lists)
func (*Web) RecycleBin ¶
func (web *Web) RecycleBin() *RecycleBin
RecycleBin gets RecycleBin API instance object for this Web
func (*Web) RoleDefinitions ¶
func (web *Web) RoleDefinitions() *RoleDefinitions
RoleDefinitions gets RoleDefinitions API instance queryable collection for this Web
func (*Web) RootFolder ¶
RootFolder gets web's root folder object
func (*Web) SiteGroups ¶
SiteGroups gets Groups API instance queryable collection for this Web (Site Groups)
func (*Web) SiteUsers ¶
SiteUsers gets Users API instance queryable collection for this Web (Site Users)
func (*Web) Update ¶
Update updates Web's metadata with properties provided in `body` parameter where `body` is byte array representation of JSON string payload relevant to SP.Web object
func (*Web) UserInfoList ¶
UserInfoList gets site UIL (User Information List) API instance
type WebInfo ¶
type WebInfo struct { ID string `json:"Id"` Title string `json:"Title"` AllowRssFeeds bool `json:"AllowRssFeeds"` AlternateCSSURL string `json:"AlternateCssUrl"` AppInstanceID string `json:"AppInstanceId"` ClassicWelcomePage string `json:"ClassicWelcomePage"` Configuration int `json:"Configuration"` Created string `json:"Created"` // time.Time CustomMasterURL string `json:"CustomMasterUrl"` Description string `json:"Description"` DesignPackageID string `json:"DesignPackageId"` EnableMinimalDownload bool `json:"EnableMinimalDownload"` HeaderEmphasis int `json:"HeaderEmphasis"` HeaderLayout int `json:"HeaderLayout"` HorizontalQuickLaunch bool `json:"HorizontalQuickLaunch"` IsHomepageModernized bool `json:"IsHomepageModernized"` IsMultilingual bool `json:"IsMultilingual"` IsRevertHomepageLinkHidden bool `json:"IsRevertHomepageLinkHidden"` Language int `json:"Language"` LastItemModifiedDate string `json:"LastItemModifiedDate"` // time.Time LastItemUserModifiedDate string `json:"LastItemUserModifiedDate"` // time.Time MasterURL string `json:"MasterUrl"` MegaMenuEnabled bool `json:"MegaMenuEnabled"` NoCrawl bool `json:"NoCrawl"` ObjectCacheEnabled bool `json:"ObjectCacheEnabled"` OverwriteTranslationsOnChange bool `json:"OverwriteTranslationsOnChange"` QuickLaunchEnabled bool `json:"QuickLaunchEnabled"` RecycleBinEnabled bool `json:"RecycleBinEnabled"` SearchScope int `json:"SearchScope"` ServerRelativeURL string `json:"ServerRelativeUrl"` SiteLogoURL string `json:"SiteLogoUrl"` SyndicationEnabled bool `json:"SyndicationEnabled"` TreeViewEnabled bool `json:"TreeViewEnabled"` UIVersion int `json:"UIVersion"` UIVersionConfigurationEnabled bool `json:"UIVersionConfigurationEnabled"` URL string `json:"Url"` WebTemplate string `json:"WebTemplate"` WelcomePage string `json:"WelcomePage"` CurrentChangeToken *StringValue `json:"CurrentChangeToken"` ResourcePath *DecodedURL `json:"ResourcePath"` }
WebInfo - web API response payload structure
type WebResp ¶
type WebResp []byte
WebResp - web response type with helper processor methods
func (*WebResp) Normalized ¶
Normalized returns normalized body
type WebhookInfo ¶
type WebhookInfo struct { SubscriptionID string `json:"subscriptionId"` // :"1111111111-3ef7-4917-ada1-xxxxxxxxxxxxx", ClientState string `json:"clientState"` // :null, Expiration time.Time `json:"expirationDateTime"` // :"2020-06-14T16:22:51.2160000Z", Resource string `json:"resource"` // :"xxxxxx-c0ba-4063-a078-xxxxxxxxx", TenantID string `json:"tenantId"` // :"4e2a1952-1ed1-4da3-85a6-xxxxxxxxxx", SiteURL string `json:"siteUrl"` // :"/sites/webhooktest", WebID string `json:"webId"` // :"xxxxx-3a7c-417b-964e-39f421c55d59" }
WebhookInfo represents webhook payload object structure
type Webs ¶
type Webs struct {
// contains filtered or unexported fields
}
Webs represent SharePoint Webs API queryable collection struct Always use NewWebs constructor instead of &Webs{}
func NewWebs ¶
func NewWebs(client *gosip.SPClient, endpoint string, config *RequestConfig) *Webs
NewWebs - Webs struct constructor function
func (*Webs) Add ¶
Add creates a sub web for a parent web with provided `title` and `url`. `url` stands for a system friendly URI (e.g. `finances`) while `title` is a human friendly name (e.g. `Financial Department`). Along with title and url additional metadata can be provided in optional `metadata` string map object. `metadata` props should correspond to `SP.WebCreationInformation` API type. Some props have defaults as Language (1033), WebTemplate (STS), etc.
func (*Webs) Conf ¶
func (webs *Webs) Conf(config *RequestConfig) *Webs
Conf receives custom request config definition, e.g. custom headers, custom OData mod
Source Files
¶
- associatedGroups.go
- associatedGroups_gen.go
- attachment_gen.go
- attachments.go
- attachments_gen.go
- changes.go
- changes_gen.go
- contentType.go
- contentType_gen.go
- contentTypes.go
- contentTypes_gen.go
- context.go
- customActions.go
- customActions_gen.go
- eventReceivers.go
- eventReceivers_gen.go
- features.go
- field.go
- fieldLink_gen.go
- fieldLinks.go
- fieldLinks_gen.go
- field_gen.go
- fields.go
- fields_gen.go
- file.go
- file_gen.go
- files.go
- filesChunked.go
- files_gen.go
- folder.go
- folder_gen.go
- folders.go
- folders_gen.go
- group.go
- group_gen.go
- groups.go
- groups_gen.go
- http.go
- item.go
- item_gen.go
- items.go
- items_gen.go
- items_vadd.go
- items_vupd.go
- list.go
- list_gen.go
- lists.go
- lists_gen.go
- misc.go
- mmd.go
- mmd_groups.go
- mmd_sets.go
- mmd_stores.go
- mmd_terms.go
- odata.go
- permissions.go
- profiles.go
- profiles_gen.go
- properties.go
- properties_gen.go
- records.go
- recycleBin.go
- recycleBinItem_gen.go
- recycleBin_gen.go
- roleDef.go
- roles.go
- search.go
- site.go
- site_gen.go
- sp.go
- sp_gen.go
- subscription_gen.go
- subscriptions.go
- subscriptions_gen.go
- user.go
- user_gen.go
- users.go
- users_gen.go
- utility.go
- utils.go
- view.go
- view_gen.go
- views.go
- views_gen.go
- web.go
- web_gen.go
- webhooks.go
- webs.go
- webs_gen.go