Documentation ¶
Index ¶
- func Provider() terraform.ResourceProvider
- type Attachment
- type AttachmentLinks
- type AttachmentResults
- type Body
- type Client
- func (c *Client) CreateAttachment(attachment *Attachment, data, pageId string) (*Attachment, error)
- func (c *Client) CreateContent(content *Content) (*Content, error)
- func (c *Client) Delete(path string) error
- func (c *Client) DeleteAttachment(id, pageId string) error
- func (c *Client) DeleteContent(id string) error
- func (c *Client) Get(path string, result interface{}) error
- func (c *Client) GetAttachment(id string) (*Attachment, error)
- func (c *Client) GetAttachmentBody(attachment *Attachment) (string, error)
- func (c *Client) GetContent(id string) (*Content, error)
- func (c *Client) GetString(path string) (string, error)
- func (c *Client) Post(path string, body interface{}, result interface{}) error
- func (c *Client) PostForm(path, filename, body string, result interface{}) error
- func (c *Client) Put(path string, body interface{}, result interface{}) error
- func (c *Client) PutForm(path, filename, body string, result interface{}) error
- func (c *Client) URL(path string) string
- func (c *Client) UpdateAttachment(attachment *Attachment, data, pageId string) (*Attachment, error)
- func (c *Client) UpdateContent(content *Content) (*Content, error)
- type Content
- type ContentLinks
- type ErrorResponse
- type Metadata
- type NewClientInput
- type Space
- type Storage
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Provider ¶
func Provider() terraform.ResourceProvider
Provider returns the ResourceProvider for Confluence
Types ¶
type Attachment ¶
type Attachment struct { Id string `json:"id,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Title string `json:"title,omitempty"` // filename Type string `json:"type,omitempty"` // always "attachment" Version *Version `json:"version,omitempty"` Links *AttachmentLinks `json:"_links,omitempty"` }
Attachment is a primary resource in Confluence
type AttachmentLinks ¶
type AttachmentLinks struct { Context string `json:"context,omitempty"` // "/wiki" Download string `json:"download,omitempty"` // prefix with Context }
AttachmentLinks is part of Content
type AttachmentResults ¶
type AttachmentResults struct {
Results []Attachment `json:"results,omitempty"`
}
type Body ¶
type Body struct {
Storage *Storage `json:"storage,omitempty"`
}
Body is part of Content
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a connection to the Confluence API
func NewClient ¶
func NewClient(input *NewClientInput) *Client
NewClient returns an authenticated client ready to use
func (*Client) CreateAttachment ¶
func (c *Client) CreateAttachment(attachment *Attachment, data, pageId string) (*Attachment, error)
func (*Client) DeleteAttachment ¶
func (*Client) DeleteContent ¶
func (*Client) GetAttachment ¶
func (c *Client) GetAttachment(id string) (*Attachment, error)
func (*Client) GetAttachmentBody ¶
func (c *Client) GetAttachmentBody(attachment *Attachment) (string, error)
func (*Client) UpdateAttachment ¶
func (c *Client) UpdateAttachment(attachment *Attachment, data, pageId string) (*Attachment, error)
type Content ¶
type Content struct { Id string `json:"id,omitempty"` Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` Space *Space `json:"space,omitempty"` Version *Version `json:"version,omitempty"` Body *Body `json:"body,omitempty"` Links *ContentLinks `json:"_links,omitempty"` Ancestors []*Content `json:"ancestors,omitempty"` }
Content is a primary resource in Confluence
type ContentLinks ¶
type ContentLinks struct { Context string `json:"context,omitempty"` WebUI string `json:"webui,omitempty"` }
ContentLinks is part of Content
type ErrorResponse ¶
type ErrorResponse struct { StatusCode int `json:"statusCode,omitempty"` Data struct { Authorized bool `json:"authorized,omitempty"` Valid bool `json:"valid,omitempty"` Errors []string `json:"errors,omitempty"` Successful bool `json:"successful,omitempty"` } `json:"data,omitempty"` Message string `json:"message,omitempty"` }
ErrorResponse describes why a request failed
func (*ErrorResponse) String ¶
func (e *ErrorResponse) String() string
type Metadata ¶
type Metadata struct {
MediaType string `json:"mediaType,omitempty"`
}
Metadata is part of an Attachment
type NewClientInput ¶
type NewClientInput struct {
// contains filtered or unexported fields
}
NewClientInput provides information to connect to the Confluence API
Click to show internal directories.
Click to hide internal directories.