confluence

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package confluence implements DocsAdapter using the Confluence REST API v2.

Outbound: converts spec markdown to Confluence storage format (XHTML) and publishes the full page. Inserts <!-- spec-section: slug --> markers for reliable inbound re-mapping.

Inbound: fetches the Confluence page, parses XHTML storage format back to markdown sections keyed by slug. The conversion is lossy for complex formatting but faithful for the structured content in spec sections (prose paragraphs, bullet lists, tables, code blocks, headings).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements adapter.DocsAdapter using the Confluence REST API.

func NewClient

func NewClient(baseURL, spaceKey, email, token string) *Client

NewClient creates a Confluence DocsAdapter. baseURL should include the /wiki path, e.g. "https://myorg.atlassian.net/wiki".

func (*Client) FetchSections

func (c *Client) FetchSections(ctx context.Context, specID string) (map[string]string, error)

FetchSections retrieves the spec page from Confluence and returns section content keyed by slug. Sections are identified by <!-- spec-section: slug --> markers inserted during outbound push, or by heading-based slug derivation.

func (*Client) PageURL

func (c *Client) PageURL(ctx context.Context, specID string) (string, error)

PageURL returns the URL of the spec's Confluence page.

func (*Client) PushFull

func (c *Client) PushFull(ctx context.Context, specID string, content string) error

PushFull publishes the complete spec to Confluence. Creates the page if it doesn't exist, or updates it if it does.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL