Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfluenceAPIPage ¶
type ConfluenceAPIPage struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
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"`
When time.Time `json:"when"`
By struct {
Type string `json:"type"`
AccountID string `json:"accountId"`
DisplayName string `json:"displayName"`
Email string `json:"email"`
} `json:"by"`
} `json:"version"`
Space struct {
Key string `json:"key"`
Name string `json:"name"`
} `json:"space"`
History struct {
CreatedDate time.Time `json:"createdDate"`
CreatedBy struct {
Type string `json:"type"`
AccountID string `json:"accountId"`
DisplayName string `json:"displayName"`
Email string `json:"email"`
} `json:"createdBy"`
} `json:"history"`
Metadata struct {
Labels struct {
Results []struct {
ID string `json:"id"`
Name string `json:"name"`
Prefix string `json:"prefix"`
} `json:"results"`
} `json:"labels"`
} `json:"metadata"`
Children struct {
Attachment struct {
Results []struct {
ID string `json:"id"`
Title string `json:"title"`
Version struct {
Number int `json:"number"`
} `json:"version"`
Extensions struct {
MediaType string `json:"mediaType"`
FileSize int64 `json:"fileSize"`
} `json:"extensions"`
Links struct {
Download string `json:"download"`
} `json:"_links"`
} `json:"results"`
} `json:"attachment"`
} `json:"children"`
}
ConfluenceAPIPage represents the API response structure for a page
type ConfluenceAttachment ¶
type ConfluenceAttachment struct {
ID string `json:"id"`
Title string `json:"title"`
MediaType string `json:"mediaType"`
FileSize int64 `json:"fileSize"`
DownloadLink string `json:"downloadLink"`
Version int `json:"version"`
}
ConfluenceAttachment represents a file attachment on a Confluence page
func (*ConfluenceAttachment) Validate ¶
func (ca *ConfluenceAttachment) Validate() error
Validate validates the ConfluenceAttachment
type ConfluenceContent ¶
type ConfluenceContent struct {
Storage ContentStorage `json:"storage"`
}
ConfluenceContent represents the content structure from Confluence
type ConfluenceErrorResponse ¶
type ConfluenceErrorResponse struct {
StatusCode int `json:"statusCode"`
Message string `json:"message"`
Reason string `json:"reason"`
}
ConfluenceErrorResponse represents an error response from the API
type ConfluenceMetadata ¶
type ConfluenceMetadata struct {
Labels []Label `json:"labels"`
Properties map[string]string `json:"properties"`
}
ConfluenceMetadata contains page metadata from Confluence
type ConfluencePage ¶
type ConfluencePage struct {
ID string `json:"id"`
Title string `json:"title"`
SpaceKey string `json:"spaceKey"`
Version int `json:"version"`
Content ConfluenceContent `json:"body"`
Metadata ConfluenceMetadata `json:"metadata"`
Attachments []ConfluenceAttachment `json:"attachments"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CreatedBy User `json:"createdBy"`
UpdatedBy User `json:"updatedBy"`
}
ConfluencePage represents a page fetched from Confluence API
func ConvertAPIPageToModel ¶
func ConvertAPIPageToModel(apiPage *ConfluenceAPIPage) *ConfluencePage
ConvertAPIPageToModel converts the API response to our domain model
func (*ConfluencePage) GetLabelNames ¶
func (cp *ConfluencePage) GetLabelNames() []string
GetLabelNames returns a slice of label names
func (*ConfluencePage) GetURL ¶
func (cp *ConfluencePage) GetURL(baseURL string) (string, error)
GetURL constructs the Confluence page URL
func (*ConfluencePage) Validate ¶
func (cp *ConfluencePage) Validate() error
Validate validates the ConfluencePage model
type ConfluenceSearchResult ¶
type ConfluenceSearchResult struct {
Results []ConfluenceAPIPage `json:"results"`
Start int `json:"start"`
Limit int `json:"limit"`
Size int `json:"size"`
}
ConfluenceSearchResult represents the API response for search queries
type ConfluenceUser ¶ added in v0.3.0
type ConfluenceUser struct {
Type string `json:"type"`
AccountID string `json:"accountId"`
AccountType string `json:"accountType"`
Email string `json:"email"`
PublicName string `json:"publicName"`
DisplayName string `json:"displayName"`
}
ConfluenceUser represents a Confluence user from the API
type ContentStorage ¶
type ContentStorage struct {
Value string `json:"value"` // HTML content
Representation string `json:"representation"` // Always "storage"
}
ContentStorage represents the storage format of Confluence content
type PageURLInfo ¶
PageURLInfo contains information extracted from a Confluence page URL