Documentation
¶
Overview ¶
Package confluence is a minimal Confluence Cloud client scoped to what whodar ingests: pages and the people who wrote them. Credentials are held only in memory, never serialized, and never logged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRateLimited = errors.New("confluence: rate limited")
ErrRateLimited indicates the API rate limit was exhausted.
View Source
var ErrStatus = errors.New("confluence: unexpected status")
ErrStatus indicates an unexpected HTTP status.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client calls the Confluence Cloud REST API.
type Doer ¶
type Doer interface {
// Do performs the request and returns the response.
Do(req *http.Request) (*http.Response, error)
}
Doer performs an HTTP request. *http.Client satisfies it; tests inject a stub.
type Page ¶
type Page struct {
// Title is the page title.
Title string `json:"title"`
// Space is the page's space.
Space struct {
// Key is the space key.
Key string `json:"key"`
// Name is the space name.
Name string `json:"name"`
} `json:"space"`
// Metadata holds the page labels.
Metadata struct {
// Labels are the page labels.
Labels struct {
// Results is the label list.
Results []label `json:"results"`
} `json:"labels"`
} `json:"metadata"`
// History holds the page creator.
History struct {
// CreatedBy is the page's creator.
CreatedBy *User `json:"createdBy"`
} `json:"history"`
// Version holds the last editor and edit time.
Version struct {
// By is the last editor.
By *User `json:"by"`
// When is the last edit time.
When time.Time `json:"when"`
} `json:"version"`
}
Page is the subset of a content page whodar reads.
func (Page) LabelNames ¶
LabelNames returns the page's label names.
type User ¶
type User struct {
// AccountID is the stable account identifier.
AccountID string `json:"accountId"`
// DisplayName is the user's display name.
DisplayName string `json:"displayName"`
// Email is the user's email, present when visible to the token.
Email string `json:"email"`
}
User is the subset of a Confluence user whodar reads.
Click to show internal directories.
Click to hide internal directories.