confluence

package
v0.99.11 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package confluence implements the Confluence Cloud capability adapter.

Package confluence implements the Confluence Cloud capability.

Index

Constants

View Source
const (
	OpListSpaces     = "list_spaces"
	OpListPages      = "list_pages"
	OpGetPage        = "get_page"
	OpGetPageContent = "get_page_content"
	OpSearchPages    = "search_pages"
	OpCreatePage     = "create_page"
	OpUpdatePage     = "update_page"
	OpDeletePage     = "delete_page"
	OpHealth         = "health"
)

Variables

This section is empty.

Functions

func CatalogSpec

func CatalogSpec() capability.Spec

CatalogSpec returns capability metadata for documentation.

func Register

func Register(app string, svc Service) error

Register registers the confluence capability with hub and invoker registry.

Types

type Adapter

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

Adapter implements Service using the Confluence provider client.

func (*Adapter) CreatePage

func (a *Adapter) CreatePage(ctx context.Context, spaceKey, title, content string) (*capability.ConfluencePage, error)

func (*Adapter) DeletePage

func (a *Adapter) DeletePage(ctx context.Context, pageID string) error

func (*Adapter) GetPage

func (a *Adapter) GetPage(ctx context.Context, pageID string) (*capability.ConfluencePage, error)

func (*Adapter) GetPageContent

func (a *Adapter) GetPageContent(ctx context.Context, pageID string) (string, error)

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)

func (*Adapter) ListPages

func (*Adapter) ListSpaces

func (*Adapter) SearchPages

func (*Adapter) UpdatePage

func (a *Adapter) UpdatePage(ctx context.Context, pageID, title, content string) (*capability.ConfluencePage, error)

type ListQuery

type ListQuery struct {
	Page capability.PageRequest
}

ListQuery wraps pagination for list operations.

type Service

type Service interface {
	ListSpaces(ctx context.Context, q *ListQuery) (*capability.ListResult[capability.ConfluenceSpace], error)
	ListPages(ctx context.Context, spaceKey string, q *ListQuery) (*capability.ListResult[capability.ConfluencePage], error)
	GetPage(ctx context.Context, pageID string) (*capability.ConfluencePage, error)
	GetPageContent(ctx context.Context, pageID string) (string, error)
	SearchPages(ctx context.Context, cql string, q *ListQuery) (*capability.ListResult[capability.ConfluencePage], error)
	CreatePage(ctx context.Context, spaceKey, title, content string) (*capability.ConfluencePage, error)
	UpdatePage(ctx context.Context, pageID, title, content string) (*capability.ConfluencePage, error)
	DeletePage(ctx context.Context, pageID string) error
	HealthCheck(ctx context.Context) (bool, error)
}

Service defines the Confluence capability contract.

func New

func New() Service

New creates an Adapter from provider config. Returns nil when not configured.

func NewWithClient

func NewWithClient(c client) Service

NewWithClient creates an Adapter with the given client.

type Webhook

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

Webhook implements capability.WebhookConverter for Confluence automation webhooks. Configure Confluence Automation to POST JSON with optional fields:

{"event":"page_created","id":"evt-1","page":{"id":"123","title":"..."},"space":{"key":"DEV"}}

func NewWebhook

func NewWebhook() *Webhook

NewWebhook creates a Webhook that reads the query token from provider config.

func (*Webhook) Convert

func (*Webhook) Convert(body []byte, _ map[string]string) ([]types.DataEvent, error)

Convert transforms an automation webhook payload into DataEvent records.

func (*Webhook) VerifySignature

func (w *Webhook) VerifySignature(headers map[string]string, _ []byte) error

VerifySignature validates the webhook token from the query parameter.

func (*Webhook) WebhookPath

func (*Webhook) WebhookPath() string

WebhookPath returns the URL path segment for Confluence webhooks. Full URL: /webhook/provider/confluence/events?token=TOKEN

Jump to

Keyboard shortcuts

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