Documentation ¶
Index ¶
- func NewAuthenticationService(client service.Connector) common.Authentication
- type AnalyticsService
- type AttachmentService
- func (a *AttachmentService) Delete(ctx context.Context, attachmentID string) (*model.ResponseScheme, error)
- func (a *AttachmentService) Get(ctx context.Context, attachmentID string, versionID int, serializeIDs bool) (*model.AttachmentScheme, *model.ResponseScheme, error)
- func (a *AttachmentService) Gets(ctx context.Context, entityID int, entityType string, ...) (*model.AttachmentPageScheme, *model.ResponseScheme, error)
- type AttachmentVersionService
- func (a *AttachmentVersionService) Get(ctx context.Context, attachmentID string, versionID int) (*model.DetailedVersionScheme, *model.ResponseScheme, error)
- func (a *AttachmentVersionService) Gets(ctx context.Context, attachmentID, cursor, sort string, limit int) (*model.AttachmentVersionPageScheme, *model.ResponseScheme, error)
- type AuthenticationService
- func (a *AuthenticationService) GetBasicAuth() (string, string)
- func (a *AuthenticationService) GetBearerToken() string
- func (a *AuthenticationService) GetUserAgent() string
- func (a *AuthenticationService) HasBasicAuth() bool
- func (a *AuthenticationService) HasSetExperimentalFlag() bool
- func (a *AuthenticationService) HasUserAgent() bool
- func (a *AuthenticationService) SetBasicAuth(mail, token string)
- func (a *AuthenticationService) SetBearerToken(token string)
- func (a *AuthenticationService) SetExperimentalFlag()
- func (a *AuthenticationService) SetUserAgent(agent string)
- type ChildrenDescandantsService
- func (c *ChildrenDescandantsService) Children(ctx context.Context, contentID string, expand []string, parentVersion int) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) ChildrenByType(ctx context.Context, contentID, contentType string, parentVersion int, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) CopyHierarchy(ctx context.Context, contentID string, options *model.CopyOptionsScheme) (*model.TaskScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) CopyPage(ctx context.Context, contentID string, expand []string, ...) (*model.ContentScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) Descendants(ctx context.Context, contentID string, expand []string) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) DescendantsByType(ctx context.Context, contentID, contentType, depth string, expand []string, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (c *ChildrenDescandantsService) Move(ctx context.Context, pageID string, position string, targetID string) (*model.ContentMoveScheme, *model.ResponseScheme, error)
- type CommentService
- type ContentAttachmentService
- func (a *ContentAttachmentService) Create(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (a *ContentAttachmentService) CreateOrUpdate(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (a *ContentAttachmentService) Gets(ctx context.Context, contentID string, startAt, maxResults int, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- type ContentLabelService
- func (c *ContentLabelService) Add(ctx context.Context, contentID string, ...) (*model.ContentLabelPageScheme, *model.ResponseScheme, error)
- func (c *ContentLabelService) Gets(ctx context.Context, contentID, prefix string, startAt, maxResults int) (*model.ContentLabelPageScheme, *model.ResponseScheme, error)
- func (c *ContentLabelService) Remove(ctx context.Context, contentID, labelName string) (*model.ResponseScheme, error)
- type ContentService
- func (c *ContentService) Archive(ctx context.Context, payload *model.ContentArchivePayloadScheme) (*model.ContentArchiveResultScheme, *model.ResponseScheme, error)
- func (c *ContentService) Create(ctx context.Context, payload *model.ContentScheme) (*model.ContentScheme, *model.ResponseScheme, error)
- func (c *ContentService) Delete(ctx context.Context, contentID, status string) (*model.ResponseScheme, error)
- func (c *ContentService) Get(ctx context.Context, contentID string, expand []string, version int) (*model.ContentScheme, *model.ResponseScheme, error)
- func (c *ContentService) Gets(ctx context.Context, options *model.GetContentOptionsScheme, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (c *ContentService) History(ctx context.Context, contentID string, expand []string) (*model.ContentHistoryScheme, *model.ResponseScheme, error)
- func (c *ContentService) Search(ctx context.Context, cql, cqlContext string, expand []string, cursor string, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (c *ContentService) Update(ctx context.Context, contentID string, payload *model.ContentScheme) (*model.ContentScheme, *model.ResponseScheme, error)
- type ContentSubServices
- type CustomContentService
- func (c *CustomContentService) Create(ctx context.Context, payload *model.CustomContentPayloadScheme) (*model.CustomContentScheme, *model.ResponseScheme, error)
- func (c *CustomContentService) Delete(ctx context.Context, customContentID int) (*model.ResponseScheme, error)
- func (c *CustomContentService) Get(ctx context.Context, customContentID int, format string, versionID int) (*model.CustomContentScheme, *model.ResponseScheme, error)
- func (c *CustomContentService) Gets(ctx context.Context, typ string, options *model.CustomContentOptionsScheme, ...) (*model.CustomContentPageScheme, *model.ResponseScheme, error)
- func (c *CustomContentService) Update(ctx context.Context, customContentID int, ...) (*model.CustomContentScheme, *model.ResponseScheme, error)
- type LabelService
- type PageService
- func (p *PageService) Bulk(ctx context.Context, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
- func (p *PageService) Create(ctx context.Context, payload *model.PageCreatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error)
- func (p *PageService) Delete(ctx context.Context, pageID int) (*model.ResponseScheme, error)
- func (p *PageService) Get(ctx context.Context, pageID int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error)
- func (p *PageService) Gets(ctx context.Context, options *model.PageOptionsScheme, cursor string, ...) (*model.PageChunkScheme, *model.ResponseScheme, error)
- func (p *PageService) GetsByLabel(ctx context.Context, labelID int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
- func (p *PageService) GetsByParent(ctx context.Context, pageID int, cursor string, limit int) (*model.ChildPageChunkScheme, *model.ResponseScheme, error)
- func (p *PageService) GetsBySpace(ctx context.Context, spaceID int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
- func (p *PageService) Update(ctx context.Context, pageID int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error)
- type PermissionService
- type PropertyService
- func (p *PropertyService) Create(ctx context.Context, contentID string, ...) (*model.ContentPropertyScheme, *model.ResponseScheme, error)
- func (p *PropertyService) Delete(ctx context.Context, contentID, key string) (*model.ResponseScheme, error)
- func (p *PropertyService) Get(ctx context.Context, contentID, key string) (*model.ContentPropertyScheme, *model.ResponseScheme, error)
- func (p *PropertyService) Gets(ctx context.Context, contentID string, expand []string, ...) (*model.ContentPropertyPageScheme, *model.ResponseScheme, error)
- type RestrictionOperationGroupService
- func (r *RestrictionOperationGroupService) Add(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
- func (r *RestrictionOperationGroupService) Get(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
- func (r *RestrictionOperationGroupService) Remove(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
- type RestrictionOperationService
- func (r *RestrictionOperationService) Get(ctx context.Context, contentID, operationKey string, expand []string, ...) (*model.ContentRestrictionScheme, *model.ResponseScheme, error)
- func (r *RestrictionOperationService) Gets(ctx context.Context, contentID string, expand []string) (*model.ContentRestrictionByOperationScheme, *model.ResponseScheme, error)
- type RestrictionOperationUserService
- func (r *RestrictionOperationUserService) Add(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
- func (r *RestrictionOperationUserService) Get(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
- func (r *RestrictionOperationUserService) Remove(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
- type RestrictionService
- func (r *RestrictionService) Add(ctx context.Context, contentID string, ...) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
- func (r *RestrictionService) Delete(ctx context.Context, contentID string, expand []string) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
- func (r *RestrictionService) Gets(ctx context.Context, contentID string, expand []string, ...) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
- func (r *RestrictionService) Update(ctx context.Context, contentID string, ...) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
- type SearchService
- func (s *SearchService) Content(ctx context.Context, cql string, options *model.SearchContentOptions) (*model.SearchPageScheme, *model.ResponseScheme, error)
- func (s *SearchService) Users(ctx context.Context, cql string, start, limit int, expand []string) (*model.SearchPageScheme, *model.ResponseScheme, error)
- type SpacePermissionService
- func (s *SpacePermissionService) Add(ctx context.Context, spaceKey string, ...) (*model.SpacePermissionV2Scheme, *model.ResponseScheme, error)
- func (s *SpacePermissionService) Bulk(ctx context.Context, spaceKey string, ...) (*model.ResponseScheme, error)
- func (s *SpacePermissionService) Remove(ctx context.Context, spaceKey string, permissionID int) (*model.ResponseScheme, error)
- type SpaceService
- func (s *SpaceService) Content(ctx context.Context, spaceKey, depth string, expand []string, ...) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
- func (s *SpaceService) ContentByType(ctx context.Context, spaceKey, contentType, depth string, expand []string, ...) (*model.ContentPageScheme, *model.ResponseScheme, error)
- func (s *SpaceService) Create(ctx context.Context, payload *model.CreateSpaceScheme, private bool) (*model.SpaceScheme, *model.ResponseScheme, error)
- func (s *SpaceService) Delete(ctx context.Context, spaceKey string) (*model.ContentTaskScheme, *model.ResponseScheme, error)
- func (s *SpaceService) Get(ctx context.Context, spaceKey string, expand []string) (*model.SpaceScheme, *model.ResponseScheme, error)
- func (s *SpaceService) Gets(ctx context.Context, options *model.GetSpacesOptionScheme, ...) (result *model.SpacePageScheme, response *model.ResponseScheme, err error)
- func (s *SpaceService) Update(ctx context.Context, spaceKey string, payload *model.UpdateSpaceScheme) (*model.SpaceScheme, *model.ResponseScheme, error)
- type SpaceV2Service
- func (s *SpaceV2Service) Bulk(ctx context.Context, options *model.GetSpacesOptionSchemeV2, cursor string, ...) (*model.SpaceChunkV2Scheme, *model.ResponseScheme, error)
- func (s *SpaceV2Service) Get(ctx context.Context, spaceID int, descriptionFormat string) (*model.SpaceSchemeV2, *model.ResponseScheme, error)
- func (s *SpaceV2Service) Permissions(ctx context.Context, spaceID int, cursor string, limit int) (*model.SpacePermissionPageScheme, *model.ResponseScheme, error)
- type TaskService
- type VersionService
- func (v *VersionService) Delete(ctx context.Context, contentID string, versionNumber int) (*model.ResponseScheme, error)
- func (v *VersionService) Get(ctx context.Context, contentID string, versionNumber int, expand []string) (*model.ContentVersionScheme, *model.ResponseScheme, error)
- func (v *VersionService) Gets(ctx context.Context, contentID string, expand []string, start, limit int) (*model.ContentVersionPageScheme, *model.ResponseScheme, error)
- func (v *VersionService) Restore(ctx context.Context, contentID string, ...) (*model.ContentVersionScheme, *model.ResponseScheme, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthenticationService ¶
func NewAuthenticationService(client service.Connector) common.Authentication
NewAuthenticationService creates a new instance of AuthenticationService. It takes a service.Connector as input and returns a common.Authentication interface.
Types ¶
type AnalyticsService ¶
type AnalyticsService struct {
// contains filtered or unexported fields
}
AnalyticsService provides methods to interact with analytics operations in Confluence.
func NewAnalyticsService ¶
func NewAnalyticsService(client service.Connector) *AnalyticsService
NewAnalyticsService creates a new instance of AnalyticsService. It takes a service.Connector as input and returns a pointer to AnalyticsService.
func (*AnalyticsService) Distinct ¶
func (a *AnalyticsService) Distinct(ctx context.Context, contentID, fromDate string) (*model.ContentViewScheme, *model.ResponseScheme, error)
Distinct get the total number of distinct viewers a piece of content has.
GET /wiki/rest/api/analytics/content/{contentID}/viewers
https://docs.go-atlassian.io/confluence-cloud/analytics#get-viewers
func (*AnalyticsService) Get ¶
func (a *AnalyticsService) Get(ctx context.Context, contentID, fromDate string) (*model.ContentViewScheme, *model.ResponseScheme, error)
Get gets the total number of views a piece of content has.
GET /wiki/rest/api/analytics/content/{contentID}/views
https://docs.go-atlassian.io/confluence-cloud/analytics#get-views
type AttachmentService ¶
type AttachmentService struct { // Version is the service for attachment version-related operations. Version *AttachmentVersionService // contains filtered or unexported fields }
AttachmentService provides methods to interact with attachment operations in Confluence.
func NewAttachmentService ¶
func NewAttachmentService(client service.Connector, version *AttachmentVersionService) *AttachmentService
NewAttachmentService creates a new instance of AttachmentService. It takes a service.Connector and an AttachmentVersionService as inputs and returns a pointer to AttachmentService.
func (*AttachmentService) Delete ¶
func (a *AttachmentService) Delete(ctx context.Context, attachmentID string) (*model.ResponseScheme, error)
Delete deletes an attachment by id.
DELETE /wiki/api/v2/attachments/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/attachments#delete-attachment
func (*AttachmentService) Get ¶
func (a *AttachmentService) Get(ctx context.Context, attachmentID string, versionID int, serializeIDs bool) (*model.AttachmentScheme, *model.ResponseScheme, error)
Get returns a specific attachment.
GET /wiki/api/v2/attachments/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/attachments#get-attachment-by-id
func (*AttachmentService) Gets ¶
func (a *AttachmentService) Gets(ctx context.Context, entityID int, entityType string, options *model.AttachmentParamsScheme, cursor string, limit int) (*model.AttachmentPageScheme, *model.ResponseScheme, error)
Gets returns the attachments of specific entity type.
You can extract the attachments for blog-posts,custom-contents, labels and pages.
Depending on the entity type, the endpoint will change based on the entity type.
Valid entityType values: blogposts, custom-content, labels, pages.
The number of results is limited by the limit parameter and additional results.
(if available) will be available through the next URL present in the Link response header.
GET /wiki/api/v2/{blogposts,custom-content,labels,pages}/{id}/attachments
https://docs.go-atlassian.io/confluence-cloud/v2/attachments#get-attachments-by-type
type AttachmentVersionService ¶
type AttachmentVersionService struct {
// contains filtered or unexported fields
}
AttachmentVersionService provides methods to interact with attachment version operations in Confluence.
func NewAttachmentVersionService ¶
func NewAttachmentVersionService(client service.Connector) *AttachmentVersionService
NewAttachmentVersionService creates a new instance of AttachmentVersionService. It takes a service.Connector as input and returns a pointer to AttachmentVersionService.
func (*AttachmentVersionService) Get ¶
func (a *AttachmentVersionService) Get(ctx context.Context, attachmentID string, versionID int) (*model.DetailedVersionScheme, *model.ResponseScheme, error)
Get retrieves version details for the specified attachment and version number.
GET /wiki/api/v2/attachments/{attachment-id}/versions/{version-number}
https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-version
func (*AttachmentVersionService) Gets ¶
func (a *AttachmentVersionService) Gets(ctx context.Context, attachmentID, cursor, sort string, limit int) (*model.AttachmentVersionPageScheme, *model.ResponseScheme, error)
Gets returns the versions of specific attachment.
GET /wiki/api/v2/attachments/{id}/versions
https://docs.go-atlassian.io/confluence-cloud/v2/attachments/versions#get-attachment-versions
type AuthenticationService ¶
type AuthenticationService struct {
// contains filtered or unexported fields
}
AuthenticationService provides methods to interact with authentication operations.
func (*AuthenticationService) GetBasicAuth ¶
func (a *AuthenticationService) GetBasicAuth() (string, string)
GetBasicAuth returns the basic authentication credentials.
func (*AuthenticationService) GetBearerToken ¶
func (a *AuthenticationService) GetBearerToken() string
GetBearerToken returns the bearer token used for authentication.
func (*AuthenticationService) GetUserAgent ¶
func (a *AuthenticationService) GetUserAgent() string
GetUserAgent returns the user agent string.
func (*AuthenticationService) HasBasicAuth ¶
func (a *AuthenticationService) HasBasicAuth() bool
HasBasicAuth returns true if basic authentication has been provided.
func (*AuthenticationService) HasSetExperimentalFlag ¶
func (a *AuthenticationService) HasSetExperimentalFlag() bool
HasSetExperimentalFlag is a placeholder method that returns false.
func (*AuthenticationService) HasUserAgent ¶
func (a *AuthenticationService) HasUserAgent() bool
HasUserAgent returns true if a user agent has been provided.
func (*AuthenticationService) SetBasicAuth ¶
func (a *AuthenticationService) SetBasicAuth(mail, token string)
SetBasicAuth sets the basic authentication credentials.
func (*AuthenticationService) SetBearerToken ¶
func (a *AuthenticationService) SetBearerToken(token string)
SetBearerToken sets the bearer token for authentication.
func (*AuthenticationService) SetExperimentalFlag ¶
func (a *AuthenticationService) SetExperimentalFlag()
SetExperimentalFlag is a placeholder method for setting an experimental flag.
func (*AuthenticationService) SetUserAgent ¶
func (a *AuthenticationService) SetUserAgent(agent string)
SetUserAgent sets the user agent string.
type ChildrenDescandantsService ¶
type ChildrenDescandantsService struct {
// contains filtered or unexported fields
}
ChildrenDescandantsService provides methods to interact with children and descendants operations in Confluence.
func NewChildrenDescandantsService ¶
func NewChildrenDescandantsService(client service.Connector) *ChildrenDescandantsService
NewChildrenDescandantsService creates a new instance of ChildrenDescandantsService.
func (*ChildrenDescandantsService) Children ¶
func (c *ChildrenDescandantsService) Children(ctx context.Context, contentID string, expand []string, parentVersion int) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
Children returns a map of the direct children of a piece of content.
A piece of content has different types of child content, depending on its type.
These are the default parent-child content type relationships:
page: child content is page, comment, attachment
blogpost: child content is comment, attachment
attachment: child content is comment
comment: child content is attachment
GET /wiki/rest/api/content/{id}/child
https://docs.go-atlassian.io/confluence-cloud/content/children-descendants#get-content-children
func (*ChildrenDescandantsService) ChildrenByType ¶
func (c *ChildrenDescandantsService) ChildrenByType(ctx context.Context, contentID, contentType string, parentVersion int, expand []string, startAt, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
ChildrenByType returns all children of a given type, for a piece of content.
A piece of content has different types of child content ¶
GET /wiki/rest/api/content/{id}/child/{type}
func (*ChildrenDescandantsService) CopyHierarchy ¶
func (c *ChildrenDescandantsService) CopyHierarchy(ctx context.Context, contentID string, options *model.CopyOptionsScheme) (*model.TaskScheme, *model.ResponseScheme, error)
CopyHierarchy copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties,
permissions and attachments. The id path parameter refers to the content id of the page to copy,
and the new parent of this copied page is defined using the destinationPageId in the request body.
The titleOptions object defines the rules of renaming page titles during the copy;
for example, search and replace can be used in conjunction to rewrite the copied page titles.
RESPONSE = Use the /longtask/ REST API to get the copy task status.
POST /wiki/rest/api/content/{id}/pagehierarchy/copy
https://docs.go-atlassian.io/confluence-cloud/content/children-descendants#copy-page-hierarchy
func (*ChildrenDescandantsService) CopyPage ¶
func (c *ChildrenDescandantsService) CopyPage(ctx context.Context, contentID string, expand []string, options *model.CopyOptionsScheme) (*model.ContentScheme, *model.ResponseScheme, error)
CopyPage copies a single page and its associated properties, permissions, attachments, and custom contents.
The id path parameter refers to the content ID of the page to copy.
The target of the page to be copied is defined using the destination in the request body and can be one of the following types.
1. space: page will be copied to the specified space as a root page on the space
2. parent_page: page will be copied as a child of the specified parent page
3. existing_page: page will be copied and replace the specified page
By default, the following objects are expanded: space, history, version.
POST /wiki/rest/api/content/{id}/copy
https://docs.go-atlassian.io/confluence-cloud/content/children-descendants#copy-single-page
func (*ChildrenDescandantsService) Descendants ¶
func (c *ChildrenDescandantsService) Descendants(ctx context.Context, contentID string, expand []string) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
Descendants returns a map of the descendants of a piece of content.
This is similar to Get content children, except that this method returns child pages at all levels,
rather than just the direct child pages.
GET /wiki/rest/api/content/{id}/descendant
https://docs.go-atlassian.io/confluence-cloud/content/children-descendants#get-content-descendants
func (*ChildrenDescandantsService) DescendantsByType ¶
func (c *ChildrenDescandantsService) DescendantsByType(ctx context.Context, contentID, contentType, depth string, expand []string, startAt, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
DescendantsByType returns all descendants of a given type, for a piece of content.
This is similar to Get content children by type,
except that this method returns child pages at all levels, rather than just the direct child pages.
GET /wiki/rest/api/content/{id}/descendant/{type}
func (*ChildrenDescandantsService) Move ¶
func (c *ChildrenDescandantsService) Move(ctx context.Context, pageID string, position string, targetID string) (*model.ContentMoveScheme, *model.ResponseScheme, error)
Move moves a page from its current location in the hierarchy to another.
Position describes where in the hierarchy the page should be moved to in relationship to targetID.
before: page will be a sibling of target but show up just before target in the list of children
after: page will be a sibling of target but show up just after target in the list of children
append: page will be a child of the target and be appended to targets list of children
PUT /wiki/rest/api/content/{pageId}/move/{position}/{targetId}
https://docs.go-atlassian.io/confluence-cloud/content/children-descendants#move
type CommentService ¶
type CommentService struct {
// contains filtered or unexported fields
}
CommentService provides methods to interact with comment operations in Confluence.
func NewCommentService ¶
func NewCommentService(client service.Connector) *CommentService
NewCommentService creates a new instance of CommentService. It takes a service.Connector as input and returns a pointer to CommentService.
func (*CommentService) Gets ¶
func (c *CommentService) Gets(ctx context.Context, contentID string, expand, location []string, startAt, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
Gets returns the comments on a piece of content.
GET /wiki/rest/api/content/{id}/child/comment
https://docs.go-atlassian.io/confluence-cloud/content/comments#get-content-comments
type ContentAttachmentService ¶
type ContentAttachmentService struct {
// contains filtered or unexported fields
}
ContentAttachmentService provides methods to interact with content attachment operations in Confluence.
func NewContentAttachmentService ¶
func NewContentAttachmentService(client service.Connector) *ContentAttachmentService
NewContentAttachmentService creates a new instance of ContentAttachmentService. It takes a service.Connector as input and returns a pointer to ContentAttachmentService.
func (*ContentAttachmentService) Create ¶
func (a *ContentAttachmentService) Create(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (*model.ContentPageScheme, *model.ResponseScheme, error)
Create adds an attachment to a piece of content.
This method only adds a new attachment.
If you want to update an existing attachment, use Create or update attachments.
POST /wiki/rest/api/content/{id}/child/attachment
https://docs.go-atlassian.io/confluence-cloud/content/attachments#create-attachment
func (*ContentAttachmentService) CreateOrUpdate ¶
func (a *ContentAttachmentService) CreateOrUpdate(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (*model.ContentPageScheme, *model.ResponseScheme, error)
CreateOrUpdate adds an attachment to a piece of content.
If the attachment already exists for the content,
then the attachment is updated (i.e. a new version of the attachment is created).
PUT /wiki/rest/api/content/{id}/child/attachment
https://docs.go-atlassian.io/confluence-cloud/content/attachments#create-or-update-attachment
func (*ContentAttachmentService) Gets ¶
func (a *ContentAttachmentService) Gets(ctx context.Context, contentID string, startAt, maxResults int, options *model.GetContentAttachmentsOptionsScheme) (*model.ContentPageScheme, *model.ResponseScheme, error)
Gets returns the attachments for a piece of content.
By default, the following objects are expanded: metadata.
GET /wiki/rest/api/content/{id}/child/attachment
https://docs.go-atlassian.io/confluence-cloud/content/attachments#get-attachments
type ContentLabelService ¶
type ContentLabelService struct {
// contains filtered or unexported fields
}
ContentLabelService provides methods to interact with content label operations in Confluence.
func NewContentLabelService ¶
func NewContentLabelService(client service.Connector) *ContentLabelService
NewContentLabelService creates a new instance of ContentLabelService. It takes a service.Connector as input and returns a pointer to ContentLabelService.
func (*ContentLabelService) Add ¶
func (c *ContentLabelService) Add(ctx context.Context, contentID string, payload []*model.ContentLabelPayloadScheme, want400Response bool) (*model.ContentLabelPageScheme, *model.ResponseScheme, error)
Add adds labels to a piece of content. Does not modify the existing labels.
POST /wiki/rest/api/content/{id}/label
https://docs.go-atlassian.io/confluence-cloud/content/labels#add-labels-to-content
func (*ContentLabelService) Gets ¶
func (c *ContentLabelService) Gets(ctx context.Context, contentID, prefix string, startAt, maxResults int) (*model.ContentLabelPageScheme, *model.ResponseScheme, error)
Gets returns the labels on a piece of content.
GET /wiki/rest/api/content/{id}/label
https://docs.go-atlassian.io/confluence-cloud/content/labels#get-labels-for-content
func (*ContentLabelService) Remove ¶
func (c *ContentLabelService) Remove(ctx context.Context, contentID, labelName string) (*model.ResponseScheme, error)
Remove removes a label from a piece of content
DELETE /wiki/rest/api/content/{id}/label/{label}
https://docs.go-atlassian.io/confluence-cloud/content/labels#remove-label-from-content
type ContentService ¶
type ContentService struct { // Attachment is the service for content attachment operations. Attachment *ContentAttachmentService // ChildrenDescendant is the service for children and descendants operations. ChildrenDescendant *ChildrenDescandantsService // Comment is the service for comment operations. Comment *CommentService // Permission is the service for permission operations. Permission *PermissionService // Label is the service for content label operations. Label *ContentLabelService // Property is the service for content property operations. Property *PropertyService // Restriction is the service for content restriction operations. Restriction *RestrictionService // Version is the service for content version operations. Version *VersionService // contains filtered or unexported fields }
ContentService provides methods to interact with content operations in Confluence.
func NewContentService ¶
func NewContentService(client service.Connector, subServices *ContentSubServices) *ContentService
NewContentService creates a new instance of ContentService. It takes a service.Connector and a ContentSubServices as inputs and returns a pointer to ContentService.
func (*ContentService) Archive ¶
func (c *ContentService) Archive(ctx context.Context, payload *model.ContentArchivePayloadScheme) (*model.ContentArchiveResultScheme, *model.ResponseScheme, error)
Archive archives a list of pages.
The pages to be archived are specified as a list of content IDs.
This API accepts the archival request and returns a task ID. The archival process happens asynchronously.
Use the /longtask/ REST API to get the copy task status.
POST /wiki/rest/api/content/archive
https://docs.go-atlassian.io/confluence-cloud/content#archive-pages
func (*ContentService) Create ¶
func (c *ContentService) Create(ctx context.Context, payload *model.ContentScheme) (*model.ContentScheme, *model.ResponseScheme, error)
Create creates a new piece of content or publishes an existing draft
To publish a draft, add the id and status properties to the body of the request.
Set the id to the ID of the draft and set the status to 'current'.
When the request is sent, a new piece of content will be created and the metadata from the draft will be transferred into it.
POST /wiki/rest/api/content
https://docs.go-atlassian.io/confluence-cloud/content#create-content
func (*ContentService) Delete ¶
func (c *ContentService) Delete(ctx context.Context, contentID, status string) (*model.ResponseScheme, error)
Delete moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status:
If the content's type is page or blogpost and its status is current, it will be trashed.
If the content's type is page or blogpost and its status is trashed, the content will be purged from the trash and deleted permanently.
=== Note, you must also set the status query parameter to trashed in your request. ===
If the content's type is comment or attachment, it will be deleted permanently without being trashed.
DELETE /wiki/rest/api/content/{id}
https://docs.go-atlassian.io/confluence-cloud/content#delete-content
func (*ContentService) Get ¶
func (c *ContentService) Get(ctx context.Context, contentID string, expand []string, version int) (*model.ContentScheme, *model.ResponseScheme, error)
Get returns a single piece of content, like a page or a blog post.
By default, the following objects are expanded: space, history, version.
GET /wiki/rest/api/content/{id}
https://docs.go-atlassian.io/confluence-cloud/content#get-content
func (*ContentService) Gets ¶
func (c *ContentService) Gets(ctx context.Context, options *model.GetContentOptionsScheme, startAt, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
Gets returns all content in a Confluence instance.
GET /wiki/rest/api/content
https://docs.go-atlassian.io/confluence-cloud/content#get-content
func (*ContentService) History ¶
func (c *ContentService) History(ctx context.Context, contentID string, expand []string) (*model.ContentHistoryScheme, *model.ResponseScheme, error)
History returns the most recent update for a piece of content.
GET /wiki/rest/api/content/{id}/history
https://docs.go-atlassian.io/confluence-cloud/content#get-content-history
func (*ContentService) Search ¶
func (c *ContentService) Search(ctx context.Context, cql, cqlContext string, expand []string, cursor string, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
Search returns the list of content that matches a Confluence Query Language (CQL) query
GET /wiki/rest/api/content/search
https://docs.go-atlassian.io/confluence-cloud/content#search-contents-by-cql
func (*ContentService) Update ¶
func (c *ContentService) Update(ctx context.Context, contentID string, payload *model.ContentScheme) (*model.ContentScheme, *model.ResponseScheme, error)
Update updates a piece of content.
Use this method to update the title or body of a piece of content, change the status, change the parent page, and more.
PUT /wiki/rest/api/content/{id}
https://docs.go-atlassian.io/confluence-cloud/content#update-content
type ContentSubServices ¶
type ContentSubServices struct { // Attachment is the service for content attachment operations. Attachment *ContentAttachmentService // ChildrenDescendant is the service for children and descendants operations. ChildrenDescendant *ChildrenDescandantsService // Comment is the service for comment operations. Comment *CommentService // Permission is the service for permission operations. Permission *PermissionService // Label is the service for content label operations. Label *ContentLabelService // Property is the service for content property operations. Property *PropertyService // Restriction is the service for content restriction operations. Restriction *RestrictionService // Version is the service for content version operations. Version *VersionService }
ContentSubServices holds references to various sub-services related to content operations in Confluence.
type CustomContentService ¶
type CustomContentService struct {
// contains filtered or unexported fields
}
CustomContentService provides methods to interact with custom content operations in Confluence.
func NewCustomContentService ¶
func NewCustomContentService(client service.Connector) *CustomContentService
NewCustomContentService creates a new instance of CustomContentService. It takes a service.Connector as input and returns a pointer to CustomContentService.
func (*CustomContentService) Create ¶
func (c *CustomContentService) Create(ctx context.Context, payload *model.CustomContentPayloadScheme) (*model.CustomContentScheme, *model.ResponseScheme, error)
Create creates a new custom content in the given space, page, blogpost or other custom content.
POST /wiki/api/v2/custom-content
https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#create-custom-content
func (*CustomContentService) Delete ¶
func (c *CustomContentService) Delete(ctx context.Context, customContentID int) (*model.ResponseScheme, error)
Delete deletes a custom content by id.
DELETE /wiki/api/v2/custom-content/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#delete-custom-content
func (*CustomContentService) Get ¶
func (c *CustomContentService) Get(ctx context.Context, customContentID int, format string, versionID int) (*model.CustomContentScheme, *model.ResponseScheme, error)
Get returns a specific piece of custom content.
GET /wiki/api/v2/custom-content/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-id
func (*CustomContentService) Gets ¶
func (c *CustomContentService) Gets(ctx context.Context, typ string, options *model.CustomContentOptionsScheme, cursor string, limit int) (*model.CustomContentPageScheme, *model.ResponseScheme, error)
Gets returns all custom content for a given type.
GET /wiki/api/v2/custom-content
https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#get-custom-content-by-type
func (*CustomContentService) Update ¶
func (c *CustomContentService) Update(ctx context.Context, customContentID int, payload *model.CustomContentPayloadScheme) (*model.CustomContentScheme, *model.ResponseScheme, error)
Update updates a custom content by id.
The spaceId is always required and maximum one of pageId, blogPostId,
or customContentId is allowed in the request body
PUT /wiki/api/v2/custom-content/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/custom-content#update-custom-content
type LabelService ¶
type LabelService struct {
// contains filtered or unexported fields
}
LabelService provides methods to interact with label operations in Confluence.
func NewLabelService ¶
func NewLabelService(client service.Connector) *LabelService
NewLabelService creates a new instance of LabelService.
func (*LabelService) Get ¶
func (l *LabelService) Get(ctx context.Context, labelName, labelType string, start, limit int) (*model.LabelDetailsScheme, *model.ResponseScheme, error)
Get returns label information and a list of contents associated with the label.
GET /wiki/rest/api/label
https://docs.go-atlassian.io/confluence-cloud/label#get-label-information
type PageService ¶
type PageService struct {
// contains filtered or unexported fields
}
PageService provides methods to interact with page operations in Confluence.
func NewPageService ¶
func NewPageService(client service.Connector) *PageService
NewPageService creates a new instance of PageService. It takes a service.Connector as input and returns a pointer to PageService.
func (*PageService) Bulk ¶
func (p *PageService) Bulk(ctx context.Context, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
Bulk returns all pages.
Deprecated. Please use Page.Gets() instead.
GET /wiki/api/v2/pages
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages
func (*PageService) Create ¶
func (p *PageService) Create(ctx context.Context, payload *model.PageCreatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error)
Create creates a page in the space.
Pages are created as published by default unless specified as a draft in the status field.
If creating a published page, the title must be specified.
POST /wiki/api/v2/pages
https://docs.go-atlassian.io/confluence-cloud/v2/page#create-page
func (*PageService) Delete ¶
func (p *PageService) Delete(ctx context.Context, pageID int) (*model.ResponseScheme, error)
Delete deletes a page by id.
DELETE /wiki/api/v2/pages/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/page#delete-page
func (*PageService) Get ¶
func (p *PageService) Get(ctx context.Context, pageID int, format string, draft bool, version int) (*model.PageScheme, *model.ResponseScheme, error)
Get returns a specific page.
GET /wiki/api/v2/pages/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-page-by-id
func (*PageService) Gets ¶
func (p *PageService) Gets(ctx context.Context, options *model.PageOptionsScheme, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
Gets returns all pages.
GET /wiki/api/v2/pages
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages
func (*PageService) GetsByLabel ¶
func (p *PageService) GetsByLabel(ctx context.Context, labelID int, sort, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
GetsByLabel returns the pages of specified label.
GET /wiki/api/v2/labels/{id}/pages
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-for-label
func (*PageService) GetsByParent ¶
func (p *PageService) GetsByParent(ctx context.Context, pageID int, cursor string, limit int) (*model.ChildPageChunkScheme, *model.ResponseScheme, error)
GetsByParent returns all children of a page.
The number of results is limited by the limit parameter and additional results (if available)
will be available through the next cursor
GET /wiki/api/v2/pages/{id}/children
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-by-parent
func (*PageService) GetsBySpace ¶
func (p *PageService) GetsBySpace(ctx context.Context, spaceID int, cursor string, limit int) (*model.PageChunkScheme, *model.ResponseScheme, error)
GetsBySpace returns all pages in a space.
The number of results is limited by the limit parameter and additional results (if available)
will be available through the next cursor
GET /wiki/api/v2/spaces/{id}/pages
https://docs.go-atlassian.io/confluence-cloud/v2/page#get-pages-in-space
func (*PageService) Update ¶
func (p *PageService) Update(ctx context.Context, pageID int, payload *model.PageUpdatePayloadScheme) (*model.PageScheme, *model.ResponseScheme, error)
Update updates a page by id.
PUT /wiki/api/v2/pages/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/page#update-page
type PermissionService ¶
type PermissionService struct {
// contains filtered or unexported fields
}
PermissionService provides methods to interact with content permission operations in Confluence.
func NewPermissionService ¶
func NewPermissionService(client service.Connector) *PermissionService
NewPermissionService creates a new instance of PermissionService. It takes a service.Connector as input and returns a pointer to PermissionService.
func (*PermissionService) Check ¶
func (p *PermissionService) Check(ctx context.Context, contentID string, payload *model.CheckPermissionScheme) (*model.PermissionCheckResponseScheme, *model.ResponseScheme, error)
Check if a user or a group can perform an operation to the specified content.
The operation to check must be provided.
The user’s account ID or the ID of the group can be provided in the subject to check permissions against a specified user or group.
The following permission checks are done to make sure that the user or group has the proper access:
1. site permissions
2. space permissions
3. content restrictions
POST /wiki/rest/api/content/{id}/permission/check
https://docs.go-atlassian.io/confluence-cloud/content/permissions#check-content-permissions
type PropertyService ¶
type PropertyService struct {
// contains filtered or unexported fields
}
PropertyService provides methods to interact with content property operations in Confluence.
func NewPropertyService ¶
func NewPropertyService(client service.Connector) *PropertyService
NewPropertyService creates a new instance of PropertyService. It takes a service.Connector as input and returns a pointer to PropertyService.
func (*PropertyService) Create ¶
func (p *PropertyService) Create(ctx context.Context, contentID string, payload *model.ContentPropertyPayloadScheme) (*model.ContentPropertyScheme, *model.ResponseScheme, error)
Create creates a property for an existing piece of content.
POST /wiki/rest/api/content/{id}/property
https://docs.go-atlassian.io/confluence-cloud/content/properties#create-content-property
func (*PropertyService) Delete ¶
func (p *PropertyService) Delete(ctx context.Context, contentID, key string) (*model.ResponseScheme, error)
Delete deletes a content property.
DELETE /wiki/rest/api/content/{id}/property/{key}
https://docs.go-atlassian.io/confluence-cloud/content/properties#delete-content-property
func (*PropertyService) Get ¶
func (p *PropertyService) Get(ctx context.Context, contentID, key string) (*model.ContentPropertyScheme, *model.ResponseScheme, error)
Get returns a content property for a piece of content.
GET /wiki/rest/api/content/{id}/property/{key}
https://docs.go-atlassian.io/confluence-cloud/content/properties#get-content-property
func (*PropertyService) Gets ¶
func (p *PropertyService) Gets(ctx context.Context, contentID string, expand []string, startAt, maxResults int) (*model.ContentPropertyPageScheme, *model.ResponseScheme, error)
Gets returns the properties for a piece of content.
GET /wiki/rest/api/content/{id}/property
https://docs.go-atlassian.io/confluence-cloud/content/properties#get-content-properties
type RestrictionOperationGroupService ¶
type RestrictionOperationGroupService struct {
// contains filtered or unexported fields
}
RestrictionOperationGroupService provides methods to interact with content restriction operations for groups in Confluence.
func NewRestrictionOperationGroupService ¶
func NewRestrictionOperationGroupService(client service.Connector) *RestrictionOperationGroupService
NewRestrictionOperationGroupService creates a new instance of RestrictionOperationGroupService. It takes a service.Connector as input and returns a pointer to RestrictionOperationGroupService.
func (*RestrictionOperationGroupService) Add ¶
func (r *RestrictionOperationGroupService) Add(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
Add adds a group to a content restriction.
That is, grant read or update permission to the group for a piece of content.
PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/byGroupId/{groupId}
func (*RestrictionOperationGroupService) Get ¶
func (r *RestrictionOperationGroupService) Get(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
Get returns whether the specified content restriction applies to a group.
Note that a response of true does not guarantee that the group can view the page,
as it does not account for account-inherited restrictions, space permissions, or even product access.
GET /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/byGroupId/{groupId}
func (*RestrictionOperationGroupService) Remove ¶
func (r *RestrictionOperationGroupService) Remove(ctx context.Context, contentID, operationKey, groupNameOrID string) (*model.ResponseScheme, error)
Remove removes a group from a content restriction.
That is, remove read or update permission for the group for a piece of content.
DELETE /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/byGroupId/{groupId}
type RestrictionOperationService ¶
type RestrictionOperationService struct { // Group is a pointer to RestrictionOperationGroupService for group-related restriction operations. Group *RestrictionOperationGroupService // User is a pointer to RestrictionOperationUserService for user-related restriction operations. User *RestrictionOperationUserService // contains filtered or unexported fields }
RestrictionOperationService provides methods to interact with content restriction operations in Confluence.
func NewRestrictionOperationService ¶
func NewRestrictionOperationService(client service.Connector, group *RestrictionOperationGroupService, user *RestrictionOperationUserService) *RestrictionOperationService
NewRestrictionOperationService creates a new instance of RestrictionOperationService. It takes a service.Connector, a pointer to RestrictionOperationGroupService, and a pointer to RestrictionOperationUserService as input, and returns a pointer to RestrictionOperationService.
func (*RestrictionOperationService) Get ¶
func (r *RestrictionOperationService) Get(ctx context.Context, contentID, operationKey string, expand []string, startAt, maxResults int) (*model.ContentRestrictionScheme, *model.ResponseScheme, error)
Get returns the restrictions on a piece of content for a given operation (read or update).
GET /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}
func (*RestrictionOperationService) Gets ¶
func (r *RestrictionOperationService) Gets(ctx context.Context, contentID string, expand []string) (*model.ContentRestrictionByOperationScheme, *model.ResponseScheme, error)
Gets returns restrictions on a piece of content by operation.
This method is similar to Get restrictions except that the operations are properties ¶
of the return object, rather than items in a results array.
GET /wiki/rest/api/content/{id}/restriction
type RestrictionOperationUserService ¶
type RestrictionOperationUserService struct {
// contains filtered or unexported fields
}
RestrictionOperationUserService provides methods to interact with content restriction operations for users in Confluence.
func NewRestrictionOperationUserService ¶
func NewRestrictionOperationUserService(client service.Connector) *RestrictionOperationUserService
NewRestrictionOperationUserService creates a new instance of RestrictionOperationUserService. It takes a service.Connector as input and returns a pointer to RestrictionOperationUserService.
func (*RestrictionOperationUserService) Add ¶
func (r *RestrictionOperationUserService) Add(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
Add adds a user to a content restriction.
That is, grant read or update permission to the user for a piece of content.
PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user
func (*RestrictionOperationUserService) Get ¶
func (r *RestrictionOperationUserService) Get(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
Get returns whether the specified content restriction applies to a user.
GET /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user
func (*RestrictionOperationUserService) Remove ¶
func (r *RestrictionOperationUserService) Remove(ctx context.Context, contentID, operationKey, accountID string) (*model.ResponseScheme, error)
Remove removes a group from a content restriction.
That is, remove read or update permission for the group for a piece of content.
DELETE /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user
type RestrictionService ¶
type RestrictionService struct { // Operation is a pointer to RestrictionOperationService for additional restriction operations. Operation *RestrictionOperationService // contains filtered or unexported fields }
RestrictionService provides methods to interact with content restriction operations in Confluence.
func NewRestrictionService ¶
func NewRestrictionService(client service.Connector, operation *RestrictionOperationService) *RestrictionService
NewRestrictionService creates a new instance of RestrictionService. It takes a service.Connector and a pointer to RestrictionOperationService as input and returns a pointer to RestrictionService.
func (*RestrictionService) Add ¶
func (r *RestrictionService) Add(ctx context.Context, contentID string, payload *model.ContentRestrictionUpdatePayloadScheme, expand []string) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
Add adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.
POST /wiki/rest/api/content/{id}/restriction
https://docs.go-atlassian.io/confluence-cloud/content/restrictions#add-restrictions
func (*RestrictionService) Delete ¶
func (r *RestrictionService) Delete(ctx context.Context, contentID string, expand []string) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
Delete removes all restrictions (read and update) on a piece of content.
DELETE /wiki/rest/api/content/{id}/restriction
https://docs.go-atlassian.io/confluence-cloud/content/restrictions#delete-restrictions
func (*RestrictionService) Gets ¶
func (r *RestrictionService) Gets(ctx context.Context, contentID string, expand []string, startAt, maxResults int) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
Gets returns the restrictions on a piece of content.
GET /wiki/rest/api/content/{id}/restriction
https://docs.go-atlassian.io/confluence-cloud/content/restrictions#get-restrictions
func (*RestrictionService) Update ¶
func (r *RestrictionService) Update(ctx context.Context, contentID string, payload *model.ContentRestrictionUpdatePayloadScheme, expand []string) (*model.ContentRestrictionPageScheme, *model.ResponseScheme, error)
Update updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the restrictions in the request.
PUT /wiki/rest/api/content/{id}/restriction
https://docs.go-atlassian.io/confluence-cloud/content/restrictions#update-restrictions
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
SearchService provides methods to interact with search operations in Confluence.
func NewSearchService ¶
func NewSearchService(client service.Connector) *SearchService
NewSearchService creates a new instance of SearchService. It takes a service.Connector as input and returns a pointer to SearchService.
func (*SearchService) Content ¶
func (s *SearchService) Content(ctx context.Context, cql string, options *model.SearchContentOptions) (*model.SearchPageScheme, *model.ResponseScheme, error)
Content searches for content using the Confluence Query Language (CQL)
GET /wiki/rest/api/search
https://docs.go-atlassian.io/confluence-cloud/search#search-content
func (*SearchService) Users ¶
func (s *SearchService) Users(ctx context.Context, cql string, start, limit int, expand []string) (*model.SearchPageScheme, *model.ResponseScheme, error)
Users searches for users using user-specific queries from the Confluence Query Language (CQL).
Note that some user fields may be set to null depending on the user's privacy settings.
These are: email, profilePicture, displayName, and timeZone.
GET /wiki/rest/api/search/user
https://docs.go-atlassian.io/confluence-cloud/search#search-users
type SpacePermissionService ¶
type SpacePermissionService struct {
// contains filtered or unexported fields
}
SpacePermissionService provides methods to interact with space permission operations in Confluence.
func NewSpacePermissionService ¶
func NewSpacePermissionService(client service.Connector) *SpacePermissionService
NewSpacePermissionService creates a new instance of SpacePermissionService. It takes a service.Connector as input and returns a pointer to SpacePermissionService.
func (*SpacePermissionService) Add ¶
func (s *SpacePermissionService) Add(ctx context.Context, spaceKey string, payload *model.SpacePermissionPayloadScheme) (*model.SpacePermissionV2Scheme, *model.ResponseScheme, error)
Add adds new permission to space.
If the permission to be added is a group permission, the group can be identified by its group name or group id.
Note: Apps cannot access this REST resource - including when utilizing user impersonation.
POST /wiki/rest/api/space/{spaceKey}/permission
https://docs.go-atlassian.io/confluence-cloud/space/permissions#add-new-permission-to-space
func (*SpacePermissionService) Bulk ¶
func (s *SpacePermissionService) Bulk(ctx context.Context, spaceKey string, payload *model.SpacePermissionArrayPayloadScheme) (*model.ResponseScheme, error)
Bulk adds new custom content permission to space.
If the permission to be added is a group permission, the group can be identified by its group name or group id.
Note: Only apps can access this REST resource and only make changes to the respective app permissions.
POST /wiki/rest/api/space/{spaceKey}/permission/custom-content
func (*SpacePermissionService) Remove ¶
func (s *SpacePermissionService) Remove(ctx context.Context, spaceKey string, permissionID int) (*model.ResponseScheme, error)
Remove removes a space permission.
Note that removing Read Space permission for a user or group will remove all the space permissions for that user or group.
DELETE /wiki/rest/api/space/{spaceKey}/permission/{id}
https://docs.go-atlassian.io/confluence-cloud/space/permissions#remove-a-space-permission
type SpaceService ¶
type SpaceService struct { // Permission is a pointer to SpacePermissionService for additional permission operations. Permission *SpacePermissionService // contains filtered or unexported fields }
SpaceService provides methods to interact with space operations in Confluence.
func NewSpaceService ¶
func NewSpaceService(client service.Connector, permission *SpacePermissionService) *SpaceService
NewSpaceService creates a new instance of SpaceService. It takes a service.Connector and a pointer to SpacePermissionService as input and returns a pointer to SpaceService.
func (*SpaceService) Content ¶
func (s *SpaceService) Content(ctx context.Context, spaceKey, depth string, expand []string, startAt, maxResults int) (*model.ContentChildrenScheme, *model.ResponseScheme, error)
Content returns all content in a space.
The returned content is grouped by type (pages then blogposts), then ordered by content ID in ascending order.
GET /wiki/rest/api/space/{spaceKey}/content
https://docs.go-atlassian.io/confluence-cloud/space#get-content-for-space
func (*SpaceService) ContentByType ¶
func (s *SpaceService) ContentByType(ctx context.Context, spaceKey, contentType, depth string, expand []string, startAt, maxResults int) (*model.ContentPageScheme, *model.ResponseScheme, error)
ContentByType returns all content of a given type, in a space.
The returned content is ordered by content ID in ascending order.
GET /wiki/rest/api/space/{spaceKey}/content/{type}
https://docs.go-atlassian.io/confluence-cloud/space#get-content-by-type-for-space
func (*SpaceService) Create ¶
func (s *SpaceService) Create(ctx context.Context, payload *model.CreateSpaceScheme, private bool) (*model.SpaceScheme, *model.ResponseScheme, error)
Create creates a new space.
Note, currently you cannot set space labels when creating a space.
POST /wiki/rest/api/space
https://docs.go-atlassian.io/confluence-cloud/space#create-space
func (*SpaceService) Delete ¶
func (s *SpaceService) Delete(ctx context.Context, spaceKey string) (*model.ContentTaskScheme, *model.ResponseScheme, error)
Delete deletes a space.
Note, the space will be deleted in a long-running task.
Therefore, the space may not be deleted yet when this method has returned.
Clients should poll the status link that is returned to the response until the task completes.
DELETE /wiki/rest/api/space/{spaceKey}
https://docs.go-atlassian.io/confluence-cloud/space#delete-space
func (*SpaceService) Get ¶
func (s *SpaceService) Get(ctx context.Context, spaceKey string, expand []string) (*model.SpaceScheme, *model.ResponseScheme, error)
Get returns a space.
This includes information like the name, description, and permissions, but not the content in the space.
GET /wiki/rest/api/space/{spaceKey}
https://docs.go-atlassian.io/confluence-cloud/space#get-space
func (*SpaceService) Gets ¶
func (s *SpaceService) Gets(ctx context.Context, options *model.GetSpacesOptionScheme, startAt, maxResults int) (result *model.SpacePageScheme, response *model.ResponseScheme, err error)
Gets returns all spaces.
The returned spaces are ordered alphabetically in ascending order by space key.
GET /wiki/rest/api/space
https://docs.go-atlassian.io/confluence-cloud/space#get-spaces
func (*SpaceService) Update ¶
func (s *SpaceService) Update(ctx context.Context, spaceKey string, payload *model.UpdateSpaceScheme) (*model.SpaceScheme, *model.ResponseScheme, error)
Update updates the name, description, or homepage of a space.
PUT /wiki/rest/api/space/{spaceKey}
https://docs.go-atlassian.io/confluence-cloud/space#update-space
type SpaceV2Service ¶
type SpaceV2Service struct {
// contains filtered or unexported fields
}
SpaceV2Service provides methods to interact with space operations in Confluence V2.
func NewSpaceV2Service ¶
func NewSpaceV2Service(client service.Connector) *SpaceV2Service
func (*SpaceV2Service) Bulk ¶
func (s *SpaceV2Service) Bulk(ctx context.Context, options *model.GetSpacesOptionSchemeV2, cursor string, limit int) (*model.SpaceChunkV2Scheme, *model.ResponseScheme, error)
Bulk returns all spaces.
The results will be sorted by id ascending.
The number of results is limited by the limit parameter and additional results (if available)
will be available through the next URL present in the Link response header.
GET /wiki/api/v2/spaces
https://docs.go-atlassian.io/confluence-cloud/v2/space#get-spaces
func (*SpaceV2Service) Get ¶
func (s *SpaceV2Service) Get(ctx context.Context, spaceID int, descriptionFormat string) (*model.SpaceSchemeV2, *model.ResponseScheme, error)
Get returns a specific space.
GET /wiki/api/v2/spaces/{id}
https://docs.go-atlassian.io/confluence-cloud/v2/space#get-space-by-id
func (*SpaceV2Service) Permissions ¶
func (s *SpaceV2Service) Permissions(ctx context.Context, spaceID int, cursor string, limit int) (*model.SpacePermissionPageScheme, *model.ResponseScheme, error)
Permissions returns space permissions for a specific space.
GET /wiki/api/v2/spaces/{id}/permissions
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
TaskService provides methods to interact with long-running task operations in Confluence.
func NewTaskService ¶
func NewTaskService(client service.Connector) *TaskService
NewTaskService creates a new instance of TaskService. It takes a service.Connector as input and returns a pointer to TaskService.
func (*TaskService) Get ¶
func (t *TaskService) Get(ctx context.Context, taskID string) (*model.LongTaskScheme, *model.ResponseScheme, error)
Get returns information about an active long-running task (e.g. space export), such as how long it has been running
and the percentage of the task that has completed.
GET /wiki/rest/api/longtask/{id}
https://docs.go-atlassian.io/confluence-cloud/long-task#get-long-running-task
func (*TaskService) Gets ¶
func (t *TaskService) Gets(ctx context.Context, start, limit int) (*model.LongTaskPageScheme, *model.ResponseScheme, error)
Gets returns information about all active long-running tasks (e.g. space export),
such as how long each task has been running and the percentage of each task that has completed.
GET /wiki/rest/api/longtask
https://docs.go-atlassian.io/confluence-cloud/long-task#get-long-running-tasks
type VersionService ¶
type VersionService struct {
// contains filtered or unexported fields
}
VersionService provides methods to interact with version operations in Confluence.
func NewVersionService ¶
func NewVersionService(client service.Connector) *VersionService
NewVersionService creates a new instance of VersionService. It takes a service.Connector as input and returns a pointer to VersionService.
func (*VersionService) Delete ¶
func (v *VersionService) Delete(ctx context.Context, contentID string, versionNumber int) (*model.ResponseScheme, error)
Delete deletes a historical version.
This does not delete the changes made to the content in that version, rather the changes for the deleted version ¶
are rolled up into the next version. Note, you cannot delete the current version.
DELETE /wiki/rest/api/content/{id}/version/{versionNumber}
https://docs.go-atlassian.io/confluence-cloud/content/versions#delete-content-version
func (*VersionService) Get ¶
func (v *VersionService) Get(ctx context.Context, contentID string, versionNumber int, expand []string) (*model.ContentVersionScheme, *model.ResponseScheme, error)
Get returns a version for a piece of content.
GET /wiki/rest/api/content/{id}/version/{versionNumber}
https://docs.go-atlassian.io/confluence-cloud/content/versions#get-content-version
func (*VersionService) Gets ¶
func (v *VersionService) Gets(ctx context.Context, contentID string, expand []string, start, limit int) (*model.ContentVersionPageScheme, *model.ResponseScheme, error)
Gets returns the versions for a piece of content in descending order.
GET /wiki/rest/api/content/{id}/version
https://docs.go-atlassian.io/confluence-cloud/content/versions#get-content-versions
func (*VersionService) Restore ¶
func (v *VersionService) Restore(ctx context.Context, contentID string, payload *model.ContentRestorePayloadScheme, expand []string) (*model.ContentVersionScheme, *model.ResponseScheme, error)
Restore restores a historical version to be the latest version.
That is, a new version is created with the content of the historical version.
https://docs.go-atlassian.io/confluence-cloud/content/versions#restore-content-version
Source Files ¶
- analytics_impl.go
- attachment_content_impl.go
- attachment_impl.go
- attachment_version_impl.go
- authentication_impl.go
- children_descendants_content_impl.go
- comment_content_impl.go
- content_impl.go
- custom_content_impl.go
- label_content_impl.go
- label_impl.go
- page_impl.go
- permission_content_impl.go
- permission_space_impl.go
- properties_content_impl.go
- restriction_content_impl.go
- restriction_operation_content_impl.go
- restriction_operation_group_content_impl.go
- restriction_operation_user_content_impl.go
- search_impl.go
- space_impl.go
- space_v2_impl.go
- task_impl.go
- version_content.go