Documentation ¶
Index ¶
- type ApiErrorResponseDataScheme
- type ApiErrorResponseScheme
- type AuthenticationService
- type Client
- type ContentAttachmentService
- func (c *ContentAttachmentService) Create(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (c *ContentAttachmentService) CreateOrUpdate(ctx context.Context, attachmentID, status, fileName string, file io.Reader) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (c *ContentAttachmentService) Gets(ctx context.Context, contentID string, startAt, maxResults int, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- type ContentChildrenDescendantService
- func (c *ContentChildrenDescendantService) Children(ctx context.Context, contentID string, expand []string, parentVersion int) (result *model.ContentChildrenScheme, response *ResponseScheme, err error)
- func (c *ContentChildrenDescendantService) ChildrenByType(ctx context.Context, contentID, contentType string, parentVersion int, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (c *ContentChildrenDescendantService) CopyHierarchy(ctx context.Context, contentID string, options *model.CopyOptionsScheme) (result *model.TaskScheme, response *ResponseScheme, err error)
- func (c *ContentChildrenDescendantService) CopyPage(ctx context.Context, contentID string, expand []string, ...) (result *model.ContentScheme, response *ResponseScheme, err error)
- func (c *ContentChildrenDescendantService) Descendants(ctx context.Context, contentID string, expand []string) (result *model.ContentChildrenScheme, response *ResponseScheme, err error)
- func (c *ContentChildrenDescendantService) DescendantsByType(ctx context.Context, contentID, contentType, depth string, expand []string, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- type ContentCommentService
- type ContentLabelService
- func (c *ContentLabelService) Add(ctx context.Context, contentID string, ...) (result *model.ContentLabelPageScheme, response *ResponseScheme, err error)
- func (c *ContentLabelService) Gets(ctx context.Context, contentID, prefix string, startAt, maxResults int) (result *model.ContentLabelPageScheme, response *ResponseScheme, err error)
- func (c *ContentLabelService) Remove(ctx context.Context, contentID, labelName string) (response *ResponseScheme, err error)
- type ContentPermissionService
- type ContentPropertyService
- func (c *ContentPropertyService) Create(ctx context.Context, contentID string, ...) (result *model.ContentPropertyScheme, response *ResponseScheme, err error)
- func (c *ContentPropertyService) Delete(ctx context.Context, contentID, key string) (response *ResponseScheme, err error)
- func (c *ContentPropertyService) Get(ctx context.Context, contentID, key string) (result *model.ContentPropertyScheme, response *ResponseScheme, err error)
- func (c *ContentPropertyService) Gets(ctx context.Context, contentID string, expand []string, ...) (result *model.ContentPropertyPageScheme, response *ResponseScheme, err error)
- type ContentRestrictionOperationGroupService
- func (c *ContentRestrictionOperationGroupService) Add(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error)
- func (c *ContentRestrictionOperationGroupService) Get(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error)
- func (c *ContentRestrictionOperationGroupService) Remove(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error)
- type ContentRestrictionOperationService
- func (c *ContentRestrictionOperationService) Get(ctx context.Context, contentID, operationKey string, expand []string, ...) (result *models.ContentRestrictionScheme, response *ResponseScheme, err error)
- func (c *ContentRestrictionOperationService) Gets(ctx context.Context, contentID string, expand []string) (result *models.ContentRestrictionByOperationScheme, response *ResponseScheme, ...)
- type ContentRestrictionOperationUserService
- func (c *ContentRestrictionOperationUserService) Add(ctx context.Context, contentID, operationKey, accountID string) (response *ResponseScheme, err error)
- func (c *ContentRestrictionOperationUserService) Get(ctx context.Context, contentID, operationKey, accountID string) (response *ResponseScheme, err error)
- func (c *ContentRestrictionOperationUserService) Remove(ctx context.Context, contentID, operationKey, accountID string) (response *ResponseScheme, err error)
- type ContentRestrictionService
- func (c *ContentRestrictionService) Add(ctx context.Context, contentID string, ...) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, ...)
- func (c *ContentRestrictionService) Delete(ctx context.Context, contentID string, expand []string) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, ...)
- func (c *ContentRestrictionService) Gets(ctx context.Context, contentID string, expand []string, ...) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, ...)
- func (c *ContentRestrictionService) Update(ctx context.Context, contentID string, ...) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, ...)
- type ContentService
- func (c *ContentService) Archive(ctx context.Context, payload *model.ContentArchivePayloadScheme) (result *model.ContentArchiveResultScheme, response *ResponseScheme, err error)
- func (c *ContentService) Create(ctx context.Context, payload *model.ContentScheme) (result *model.ContentScheme, response *ResponseScheme, err error)
- func (c *ContentService) Delete(ctx context.Context, contentID, status string) (response *ResponseScheme, err error)
- func (c *ContentService) Get(ctx context.Context, contentID string, expand []string, version int) (result *model.ContentScheme, response *ResponseScheme, err error)
- func (c *ContentService) Gets(ctx context.Context, options *model.GetContentOptionsScheme, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (c *ContentService) History(ctx context.Context, contentID string, expand []string) (result *model.ContentHistoryScheme, response *ResponseScheme, err error)
- func (c *ContentService) Search(ctx context.Context, cql, cqlContext string, expand []string, cursor string, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (c *ContentService) Update(ctx context.Context, contentID string, payload *model.ContentScheme) (result *model.ContentScheme, response *ResponseScheme, err error)
- type ContentVersionService
- func (c *ContentVersionService) Delete(ctx context.Context, contentID string, versionNumber int) (response *ResponseScheme, err error)
- func (c *ContentVersionService) Get(ctx context.Context, contentID string, versionNumber int, expand []string) (result *models.ContentVersionScheme, response *ResponseScheme, err error)
- func (c *ContentVersionService) Gets(ctx context.Context, contentID string, expand []string, start, limit int) (result *models.ContentVersionPageScheme, response *ResponseScheme, err error)
- func (c *ContentVersionService) Restore(ctx context.Context, contentID string, ...) (result *models.ContentVersionScheme, response *ResponseScheme, err error)
- type LabelService
- type LongTaskService
- type ResponseScheme
- type SearchService
- func (s *SearchService) Content(ctx context.Context, cql string, options *models.SearchContentOptions) (result *models.SearchPageScheme, response *ResponseScheme, err error)
- func (s *SearchService) Users(ctx context.Context, cql string, start, limit int, expand []string) (result *models.SearchPageScheme, response *ResponseScheme, err error)
- type SpacePermissionService
- func (s *SpacePermissionService) Add(ctx context.Context, spaceKey string, ...) (result *models.SpacePermissionV2Scheme, response *ResponseScheme, err error)
- func (s *SpacePermissionService) Bulk(ctx context.Context, spaceKey string, ...) (response *ResponseScheme, err error)
- func (s *SpacePermissionService) Remove(ctx context.Context, spaceKey string, permissionId int) (response *ResponseScheme, err error)
- type SpaceService
- func (s *SpaceService) Content(ctx context.Context, spaceKey, depth string, expand []string, ...) (result *model.ContentChildrenScheme, response *ResponseScheme, err error)
- func (s *SpaceService) ContentByType(ctx context.Context, spaceKey, contentType, depth string, expand []string, ...) (result *model.ContentPageScheme, response *ResponseScheme, err error)
- func (s *SpaceService) Create(ctx context.Context, payload *model.CreateSpaceScheme, private bool) (result *model.SpaceScheme, response *ResponseScheme, err error)
- func (s *SpaceService) Delete(ctx context.Context, spaceKey string) (result *model.ContentTaskScheme, response *ResponseScheme, err error)
- func (s *SpaceService) Get(ctx context.Context, spaceKey string, expand []string) (result *model.SpaceScheme, response *ResponseScheme, err error)
- func (s *SpaceService) Gets(ctx context.Context, options *model.GetSpacesOptionScheme, ...) (result *model.SpacePageScheme, response *ResponseScheme, err error)
- func (s *SpaceService) Update(ctx context.Context, spaceKey string, payload *model.UpdateSpaceScheme) (result *model.SpaceScheme, response *ResponseScheme, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiErrorResponseScheme ¶
type ApiErrorResponseScheme struct { StatusCode int `json:"statusCode"` Message string `json:"message"` Data *ApiErrorResponseDataScheme `json:"data"` }
type AuthenticationService ¶
type AuthenticationService struct {
// contains filtered or unexported fields
}
func (*AuthenticationService) SetBasicAuth ¶
func (a *AuthenticationService) SetBasicAuth(mail, token string)
func (*AuthenticationService) SetUserAgent ¶
func (a *AuthenticationService) SetUserAgent(agent string)
type Client ¶
type Client struct { HTTP *http.Client Site *url.URL Auth *AuthenticationService Content *ContentService Space *SpaceService Label *LabelService Search *SearchService LongTask *LongTaskService }
type ContentAttachmentService ¶
type ContentAttachmentService struct {
// contains filtered or unexported fields
}
func (*ContentAttachmentService) Create ¶
func (c *ContentAttachmentService) Create(ctx context.Context, attachmentID, status, fileName string, file io.Reader) ( result *model.ContentPageScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content/attachments#create-attachment
func (*ContentAttachmentService) CreateOrUpdate ¶
func (c *ContentAttachmentService) CreateOrUpdate(ctx context.Context, attachmentID, status, fileName string, file io.Reader) ( result *model.ContentPageScheme, response *ResponseScheme, err 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). Docs: https://docs.go-atlassian.io/confluence-cloud/content/attachments#create-or-update-attachment
func (*ContentAttachmentService) Gets ¶
func (c *ContentAttachmentService) Gets(ctx context.Context, contentID string, startAt, maxResults int, options *model.GetContentAttachmentsOptionsScheme) (result *model.ContentPageScheme, response *ResponseScheme, err error)
Gets returns the attachments for a piece of content. By default, the following objects are expanded: metadata. Docs: https://docs.go-atlassian.io/confluence-cloud/content/attachments#get-attachments
type ContentChildrenDescendantService ¶
type ContentChildrenDescendantService struct {
// contains filtered or unexported fields
}
func (*ContentChildrenDescendantService) Children ¶
func (c *ContentChildrenDescendantService) Children(ctx context.Context, contentID string, expand []string, parentVersion int) (result *model.ContentChildrenScheme, response *ResponseScheme, err 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
func (*ContentChildrenDescendantService) ChildrenByType ¶
func (c *ContentChildrenDescendantService) ChildrenByType(ctx context.Context, contentID, contentType string, parentVersion int, expand []string, startAt, maxResults int) (result *model.ContentPageScheme, response *ResponseScheme, err error)
ChildrenByType returns all children of a given type, for a piece of content. A piece of content has different types of child content
func (*ContentChildrenDescendantService) CopyHierarchy ¶
func (c *ContentChildrenDescendantService) CopyHierarchy(ctx context.Context, contentID string, options *model.CopyOptionsScheme) (result *model.TaskScheme, response *ResponseScheme, err 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.
func (*ContentChildrenDescendantService) CopyPage ¶
func (c *ContentChildrenDescendantService) CopyPage(ctx context.Context, contentID string, expand []string, options *model.CopyOptionsScheme) (result *model.ContentScheme, response *ResponseScheme, err 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.
func (*ContentChildrenDescendantService) Descendants ¶
func (c *ContentChildrenDescendantService) Descendants(ctx context.Context, contentID string, expand []string, ) (result *model.ContentChildrenScheme, response *ResponseScheme, err 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.
func (*ContentChildrenDescendantService) DescendantsByType ¶
func (c *ContentChildrenDescendantService) DescendantsByType(ctx context.Context, contentID, contentType, depth string, expand []string, startAt, maxResults int) (result *model.ContentPageScheme, response *ResponseScheme, err 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.
type ContentCommentService ¶
type ContentCommentService struct {
// contains filtered or unexported fields
}
func (*ContentCommentService) Gets ¶
func (c *ContentCommentService) Gets(ctx context.Context, contentID string, expand, location []string, startAt, maxResults int) (result *model.ContentPageScheme, response *ResponseScheme, err error)
Gets returns the comments on a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/comments#get-content-comments
type ContentLabelService ¶
type ContentLabelService struct {
// contains filtered or unexported fields
}
func (*ContentLabelService) Add ¶
func (c *ContentLabelService) Add(ctx context.Context, contentID string, payload []*model.ContentLabelPayloadScheme, want400Response bool) ( result *model.ContentLabelPageScheme, response *ResponseScheme, err error)
Add adds labels to a piece of content. Does not modify the existing labels. Docs: 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) (result *model.ContentLabelPageScheme, response *ResponseScheme, err error)
Gets returns the labels on a piece of content. Docs: 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) (response *ResponseScheme, err error)
Remove removes a label from a piece of content Docs: https://docs.go-atlassian.io/confluence-cloud/content/labels#remove-label-from-content
type ContentPermissionService ¶
type ContentPermissionService struct {
// contains filtered or unexported fields
}
func (*ContentPermissionService) Check ¶
func (c *ContentPermissionService) Check(ctx context.Context, contentID string, payload *model.CheckPermissionScheme) (result *model.PermissionCheckResponseScheme, response *ResponseScheme, err 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 Docs: https://docs.go-atlassian.io/confluence-cloud/content/permissions#check-content-permissions
type ContentPropertyService ¶
type ContentPropertyService struct {
// contains filtered or unexported fields
}
func (*ContentPropertyService) Create ¶
func (c *ContentPropertyService) Create(ctx context.Context, contentID string, payload *model.ContentPropertyPayloadScheme) ( result *model.ContentPropertyScheme, response *ResponseScheme, err error)
Create creates a property for an existing piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/properties#create-content-property
func (*ContentPropertyService) Delete ¶
func (c *ContentPropertyService) Delete(ctx context.Context, contentID, key string) (response *ResponseScheme, err error)
Delete deletes a content property. Docs: https://docs.go-atlassian.io/confluence-cloud/content/properties#delete-content-property
func (*ContentPropertyService) Get ¶
func (c *ContentPropertyService) Get(ctx context.Context, contentID, key string) (result *model.ContentPropertyScheme, response *ResponseScheme, err error)
Get returns a content property for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/properties#get-content-property
func (*ContentPropertyService) Gets ¶
func (c *ContentPropertyService) Gets(ctx context.Context, contentID string, expand []string, startAt, maxResults int) ( result *model.ContentPropertyPageScheme, response *ResponseScheme, err error)
Gets returns the properties for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/properties#get-content-properties
type ContentRestrictionOperationGroupService ¶
type ContentRestrictionOperationGroupService struct {
// contains filtered or unexported fields
}
func (*ContentRestrictionOperationGroupService) Add ¶
func (c *ContentRestrictionOperationGroupService) Add(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error)
Add adds a group to a content restriction. That is, grant read or update permission to the group for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#add-group-to-content-restriction
func (*ContentRestrictionOperationGroupService) Get ¶
func (c *ContentRestrictionOperationGroupService) Get(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#get-content-restriction-status-for-group
func (*ContentRestrictionOperationGroupService) Remove ¶
func (c *ContentRestrictionOperationGroupService) Remove(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error)
Remove removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#remove-group-from-content-restriction
type ContentRestrictionOperationService ¶
type ContentRestrictionOperationService struct { Group *ContentRestrictionOperationGroupService User *ContentRestrictionOperationUserService // contains filtered or unexported fields }
func (*ContentRestrictionOperationService) Get ¶
func (c *ContentRestrictionOperationService) Get(ctx context.Context, contentID, operationKey string, expand []string, startAt, maxResults int) (result *models.ContentRestrictionScheme, response *ResponseScheme, err error)
Get returns the restrictions on a piece of content for a given operation (read or update). Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations#get-restrictions-for-operation
func (*ContentRestrictionOperationService) Gets ¶
func (c *ContentRestrictionOperationService) Gets(ctx context.Context, contentID string, expand []string) ( result *models.ContentRestrictionByOperationScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations#get-restrictions-by-operation
type ContentRestrictionOperationUserService ¶
type ContentRestrictionOperationUserService struct {
// contains filtered or unexported fields
}
func (*ContentRestrictionOperationUserService) Add ¶
func (c *ContentRestrictionOperationUserService) Add(ctx context.Context, contentID, operationKey, accountID string) ( response *ResponseScheme, err error)
Add adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/user#add-user-to-content-restriction
func (*ContentRestrictionOperationUserService) Get ¶
func (c *ContentRestrictionOperationUserService) Get(ctx context.Context, contentID, operationKey, accountID string) ( response *ResponseScheme, err error)
Get returns whether the specified content restriction applies to a user. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/user#get-content-restriction-status-for-user
func (*ContentRestrictionOperationUserService) Remove ¶
func (c *ContentRestrictionOperationUserService) Remove(ctx context.Context, contentID, operationKey, accountID string) ( response *ResponseScheme, err error)
Remove removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/user#remove-user-from-content-restriction
type ContentRestrictionService ¶
type ContentRestrictionService struct { Operation *ContentRestrictionOperationService // contains filtered or unexported fields }
func (*ContentRestrictionService) Add ¶
func (c *ContentRestrictionService) Add(ctx context.Context, contentID string, payload *models.ContentRestrictionUpdatePayloadScheme, expand []string) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error)
Add adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#add-restrictions
func (*ContentRestrictionService) Delete ¶
func (c *ContentRestrictionService) Delete(ctx context.Context, contentID string, expand []string) ( result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error)
Delete removes all restrictions (read and update) on a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#delete-restrictions
func (*ContentRestrictionService) Gets ¶
func (c *ContentRestrictionService) Gets(ctx context.Context, contentID string, expand []string, startAt, maxResults int) ( result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error)
Gets returns the restrictions on a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#get-restrictions
func (*ContentRestrictionService) Update ¶
func (c *ContentRestrictionService) Update(ctx context.Context, contentID string, payload *models.ContentRestrictionUpdatePayloadScheme, expand []string) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error)
Update updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the restrictions in the request. Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#update-restrictions
type ContentService ¶
type ContentService struct { Attachment *ContentAttachmentService ChildrenDescendant *ContentChildrenDescendantService Comment *ContentCommentService Permission *ContentPermissionService Label *ContentLabelService Property *ContentPropertyService Restriction *ContentRestrictionService Version *ContentVersionService // contains filtered or unexported fields }
func (*ContentService) Archive ¶
func (c *ContentService) Archive(ctx context.Context, payload *model.ContentArchivePayloadScheme) (result *model.ContentArchiveResultScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content#archive-pages
func (*ContentService) Create ¶
func (c *ContentService) Create(ctx context.Context, payload *model.ContentScheme) (result *model.ContentScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content#create-content
func (*ContentService) Delete ¶
func (c *ContentService) Delete(ctx context.Context, contentID, status string) (response *ResponseScheme, err 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. Docs: 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) (result *model.ContentScheme, response *ResponseScheme, err 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. Docs: 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) ( result *model.ContentPageScheme, response *ResponseScheme, err error)
Gets returns all content in a Confluence instance.
func (*ContentService) History ¶
func (c *ContentService) History(ctx context.Context, contentID string, expand []string) (result *model.ContentHistoryScheme, response *ResponseScheme, err error)
History returns the most recent update for a piece of content. Docs: 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) ( result *model.ContentPageScheme, response *ResponseScheme, err error)
Search returns the list of content that matches a Confluence Query Language (CQL) query Docs: 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) (result *model.ContentScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content#update-content
type ContentVersionService ¶
type ContentVersionService struct {
// contains filtered or unexported fields
}
func (*ContentVersionService) Delete ¶
func (c *ContentVersionService) Delete(ctx context.Context, contentID string, versionNumber int) (response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content/versions#delete-content-version
func (*ContentVersionService) Get ¶
func (c *ContentVersionService) Get(ctx context.Context, contentID string, versionNumber int, expand []string) ( result *models.ContentVersionScheme, response *ResponseScheme, err error)
Get returns a version for a piece of content. Docs: https://docs.go-atlassian.io/confluence-cloud/content/versions#get-content-version
func (*ContentVersionService) Gets ¶
func (c *ContentVersionService) Gets(ctx context.Context, contentID string, expand []string, start, limit int) ( result *models.ContentVersionPageScheme, response *ResponseScheme, err error)
Gets returns the versions for a piece of content in descending order. Docs: https://docs.go-atlassian.io/confluence-cloud/content/versions#get-content-versions
func (*ContentVersionService) Restore ¶
func (c *ContentVersionService) Restore(ctx context.Context, contentID string, payload *models.ContentRestorePayloadScheme, expand []string) (result *models.ContentVersionScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/content/versions#restore-content-version
type LabelService ¶
type LabelService struct {
// contains filtered or unexported fields
}
func (*LabelService) Get ¶
func (l *LabelService) Get(ctx context.Context, labelName, labelType string, start, limit int) (result *models.LabelDetailsScheme, response *ResponseScheme, err error)
Get returns label information and a list of contents associated with the label. Docs: https://docs.go-atlassian.io/confluence-cloud/label#get-label-information
type LongTaskService ¶
type LongTaskService struct {
// contains filtered or unexported fields
}
func (*LongTaskService) Get ¶
func (l *LongTaskService) Get(ctx context.Context, taskID string) (result *models.LongTaskScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/long-task#get-long-running-task
func (*LongTaskService) Gets ¶
func (l *LongTaskService) Gets(ctx context.Context, start, limit int) (result *models.LongTaskPageScheme, response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/long-task#get-long-running-tasks
type ResponseScheme ¶
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
func (*SearchService) Content ¶
func (s *SearchService) Content(ctx context.Context, cql string, options *models.SearchContentOptions) (result *models.SearchPageScheme, response *ResponseScheme, err error)
Content searches for content using the Confluence Query Language (CQL) Docs: 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) (result *models.SearchPageScheme, response *ResponseScheme, err error)
Users searches for users using user-specific queries from the Confluence Query Language (CQL). Docs: Searches for users using user-specific queries from the Confluence Query Language (CQL).
type SpacePermissionService ¶
type SpacePermissionService struct {
// contains filtered or unexported fields
}
func (*SpacePermissionService) Add ¶
func (s *SpacePermissionService) Add(ctx context.Context, spaceKey string, payload *models.SpacePermissionPayloadScheme) ( result *models.SpacePermissionV2Scheme, response *ResponseScheme, err 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. Docs: 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 *models.SpacePermissionArrayPayloadScheme) (response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/space/permissions#add-new-custom-content-permission-to-space
func (*SpacePermissionService) Remove ¶
func (s *SpacePermissionService) Remove(ctx context.Context, spaceKey string, permissionId int) (response *ResponseScheme, err 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. Docs: https://docs.go-atlassian.io/confluence-cloud/space/permissions#remove-a-space-permission
type SpaceService ¶
type SpaceService struct { Permission *SpacePermissionService // contains filtered or unexported fields }
func (*SpaceService) Content ¶
func (s *SpaceService) Content(ctx context.Context, spaceKey, depth string, expand []string, startAt, maxResults int) ( result *model.ContentChildrenScheme, response *ResponseScheme, err 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. Docs: 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) (result *model.ContentPageScheme, response *ResponseScheme, err error)
ContentByType returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order. Docs: 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) ( result *model.SpaceScheme, response *ResponseScheme, err error)
Create creates a new space. Note, currently you cannot set space labels when creating a space. Docs: https://docs.go-atlassian.io/confluence-cloud/space#create-space
func (*SpaceService) Delete ¶
func (s *SpaceService) Delete(ctx context.Context, spaceKey string) (result *model.ContentTaskScheme, response *ResponseScheme, err 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 in the response until the task completes. Docs: https://docs.go-atlassian.io/confluence-cloud/space#delete-space
func (*SpaceService) Get ¶
func (s *SpaceService) Get(ctx context.Context, spaceKey string, expand []string) (result *model.SpaceScheme, response *ResponseScheme, err error)
Get returns a space. This includes information like the name, description, and permissions, but not the content in the space. Docs: 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 *ResponseScheme, err error)
Gets returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key. Docs: 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) (result *model.SpaceScheme, response *ResponseScheme, err error)
Update updates the name, description, or homepage of a space. Docs: https://docs.go-atlassian.io/confluence-cloud/space#update-space
Source Files ¶
- auth.go
- confluence.go
- content.go
- contentAttachments.go
- contentChildrenDescendants.go
- contentComment.go
- contentLabels.go
- contentPermission.go
- contentProperties.go
- contentRestriction.go
- contentRestrictionOperationGroup.go
- contentRestrictionOperationUser.go
- contentRestrictionsOperation.go
- contentVersion.go
- label.go
- longTask.go
- search.go
- space.go
- spacePermission.go