Documentation ¶
Index ¶
- type Attachment
- type AttachmentResults
- type AuthMethod
- type ChildResults
- type Content
- type ContentAncestor
- type ContentResult
- type ResultPagination
- type SearchResults
- type Wiki
- func (w *Wiki) CreateAttachment(contentID string, path string) (*AttachmentResults, error)
- func (w *Wiki) CreateContent(content *Content) (*Content, error)
- func (w *Wiki) DeleteContent(contentID string) error
- func (w *Wiki) GetAttachment(contentID string, filename string) (*AttachmentResults, error)
- func (w *Wiki) GetAttachmentData(contentID string, filename string) ([]byte, error)
- func (w *Wiki) GetContent(contentID string, expand []string) (*Content, error)
- func (w *Wiki) GetContentChildPages(contentID string, expand []string) (*ChildResults, error)
- func (w *Wiki) Search(cql, cqlContext string, expand []string, limit int) (*SearchResults, error)
- func (w *Wiki) SetClient(c *http.Client)
- func (w *Wiki) UpdateAttachment(contentID string, path string, attachmentID string) (*AttachmentResults, error)
- func (w *Wiki) UpdateContent(content *Content) (*Content, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { ID string `json:"id,omitempty"` Title string `json:"title,omitempty"` Links struct { Download string `json:"download,omitempty"` } `json:"_links,omitempty"` }
NOTE: The `_links.download` key is not documented in the Confluence REST API Reference. However,
it is referenced here: https://community.atlassian.com/t5/Answers-Developer-Questions/confluence-pages-get-attached-files-via-REST-API/qaq-p/529873#M67529
type AttachmentResults ¶
type AttachmentResults struct { ResultPagination Results []Attachment `json:"results"` }
type AuthMethod ¶
type AuthMethod interface {
// contains filtered or unexported methods
}
func BasicAuth ¶
func BasicAuth(username, password string) AuthMethod
func TokenAuth ¶
func TokenAuth(tokenkey string) AuthMethod
type ChildResults ¶
type ChildResults struct { ResultPagination Results []Content `json:"results"` }
type Content ¶
type Content struct { ID string `json:"id,omitempty"` Type string `json:"type"` Status string `json:"status,omitempty"` Title string `json:"title"` Body struct { Storage struct { Value string `json:"value"` Representation string `json:"representation"` } `json:"storage"` } `json:"body"` Version struct { Number int `json:"number"` MinorEdit bool `json:"minorEdit"` } `json:"version"` Space struct { Key string `json:"key"` } `json:"space,omitempty"` Ancestors []ContentAncestor `json:"ancestors,omitempty"` }
type ContentAncestor ¶
type ContentAncestor struct {
ID string `json:"id"`
}
type ContentResult ¶
type ContentResult struct { Content Content `json:"content"` Title string `json:"title"` Excerpt string `json:"excerpt"` URL string `json:"url"` ResultGlobalContainer struct { Title string `json:"title"` DisplayURL string `json:"displayUrl"` } // breadcrumbs is ignored EntityType string `json:"entityType"` IconCSSClass string `json:"iconCssClass"` LastModified string `json:"lastModified"` FriendlyLastModified string `json:"friendlyLastModified"` }
type ResultPagination ¶
type SearchResults ¶
type SearchResults struct { ResultPagination Results []ContentResult `json:"results"` TotalSize int `json:"totalSize"` CqlQuery string `json:"cqlQuery"` SearchDuration int `json:"SearchDuration"` }
type Wiki ¶
type Wiki struct {
// contains filtered or unexported fields
}
func (*Wiki) CreateAttachment ¶
func (w *Wiki) CreateAttachment(contentID string, path string) (*AttachmentResults, error)
func (*Wiki) DeleteContent ¶
func (*Wiki) GetAttachment ¶
func (w *Wiki) GetAttachment(contentID string, filename string) (*AttachmentResults, error)
func (*Wiki) GetAttachmentData ¶
func (*Wiki) GetContent ¶
func (*Wiki) GetContentChildPages ¶
func (w *Wiki) GetContentChildPages(contentID string, expand []string) (*ChildResults, error)
func (*Wiki) UpdateAttachment ¶
Click to show internal directories.
Click to hide internal directories.