Documentation
¶
Overview ¶
Package confluence imports Confluence Server/Data Center and Cloud spaces as Markdown.
Index ¶
- type Connector
- func (c *Connector) FetchAll(ctx context.Context, ds *types.DataSourceConfig, resourceIDs []string) ([]types.FetchedItem, error)
- func (c *Connector) FetchFullStream(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, ...) (*types.SyncCursor, error)
- func (c *Connector) FetchIncremental(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor) ([]types.FetchedItem, *types.SyncCursor, error)
- func (c *Connector) FetchStream(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, ...) (*types.SyncCursor, error)
- func (c *Connector) ListResources(ctx context.Context, ds *types.DataSourceConfig, parentID string) ([]types.Resource, error)
- func (c *Connector) ResolveResourceAncestors(ctx context.Context, ds *types.DataSourceConfig, resourceIDs []string) ([]string, error)
- func (*Connector) Type() string
- func (c *Connector) Validate(ctx context.Context, ds *types.DataSourceConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector implements datasource.StreamingConnector for Confluence.
func (*Connector) FetchAll ¶
func (c *Connector) FetchAll( ctx context.Context, ds *types.DataSourceConfig, resourceIDs []string, ) ([]types.FetchedItem, error)
FetchAll syncs every selected space. Deletion reconciliation needs FetchStream.
func (*Connector) FetchFullStream ¶
func (c *Connector) FetchFullStream( ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, h datasource.StreamHandler, ) (*types.SyncCursor, error)
FetchFullStream forces every page to be re-fetched while retaining old solely as a complete baseline for deletion reconciliation. Mid-run checkpoints keep that baseline plus the pages already re-fetched so Asynq retries resume instead of starting over.
func (*Connector) FetchIncremental ¶
func (c *Connector) FetchIncremental( ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, ) ([]types.FetchedItem, *types.SyncCursor, error)
FetchIncremental syncs pages whose versions changed since the last cursor.
func (*Connector) FetchStream ¶
func (c *Connector) FetchStream( ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, h datasource.StreamHandler, ) (*types.SyncCursor, error)
FetchStream is the one sync engine. A version enters its cursor only after its Markdown has been fetched and Emit has succeeded, making checkpoints safe.
func (*Connector) ListResources ¶
func (c *Connector) ListResources( ctx context.Context, ds *types.DataSourceConfig, parentID string, ) ([]types.Resource, error)
ListResources exposes a lazy Space → Page tree. It never scans a whole space merely to render the picker.
func (*Connector) ResolveResourceAncestors ¶
func (c *Connector) ResolveResourceAncestors( ctx context.Context, ds *types.DataSourceConfig, resourceIDs []string, ) ([]string, error)
ResolveResourceAncestors expands only the O(depth) path required to reveal persisted page selections in the lazy picker. Resolution is best effort: a deleted page, an unavailable space, or a malformed id skips just its own reveal path instead of failing every saved selection; the sync path keeps its strict validation in buildSyncPlan.