Documentation
¶
Index ¶
- func LoadToken() (*atlassian.Token, error)
- func SaveToken(token *atlassian.Token) error
- func StripHTML(s string) string
- type Client
- func (c *Client) EnsureAuth(ctx context.Context) error
- func (c *Client) GetPage(ctx context.Context, pageID string) (*Page, error)
- func (c *Client) GetSiteURL() string
- func (c *Client) ListSpaces(ctx context.Context, limit int) ([]Space, error)
- func (c *Client) Search(ctx context.Context, cql string, limit int) (*SearchResult, error)
- type Page
- type SearchResult
- type Space
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnsureAuth ¶
EnsureAuth ensures we have a valid token, refreshing or re-authenticating as needed
func (*Client) GetSiteURL ¶
GetSiteURL returns the browsable Confluence site URL
func (*Client) ListSpaces ¶
ListSpaces lists Confluence spaces
type Page ¶
type Page struct {
ID string `json:"id"`
Status string `json:"status"`
Title string `json:"title"`
SpaceID string `json:"spaceId"`
Body struct {
Storage struct {
Value string `json:"value"`
} `json:"storage"`
} `json:"body"`
Version struct {
Number int `json:"number"`
Message string `json:"message"`
CreatedAt string `json:"createdAt"`
} `json:"version"`
Links struct {
WebUI string `json:"webui"`
} `json:"_links"`
}
Page represents a Confluence page
type SearchResult ¶
type SearchResult struct {
Results []struct {
Content struct {
ID string `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
} `json:"content"`
Excerpt string `json:"excerpt"`
URL string `json:"url"`
LastModified string `json:"lastModified"`
FriendlyLastModified string `json:"friendlyLastModified"`
} `json:"results"`
Start int `json:"start"`
Limit int `json:"limit"`
Size int `json:"size"`
TotalSize int `json:"totalSize"`
}
SearchResult represents a Confluence search result
type Space ¶
type Space struct {
ID string `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
Type string `json:"type"`
Description struct {
Plain struct {
Value string `json:"value"`
} `json:"plain"`
} `json:"description"`
HomepageID string `json:"homepageId"`
}
Space represents a Confluence space
Click to show internal directories.
Click to hide internal directories.