attachments

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	Resolve(page *model.ConfluencePage, filename string, revision int) (string, error)
	DownloadAttachment(page *model.ConfluencePage, filename string, revision int) (*model.ConfluenceAttachment, []byte, error)
}

Resolver provides attachment content for macros such as mermaid.

type Service

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

Service implements Resolver using a Confluence content downloader.

func NewService

func NewService(client confluence.Client) *Service

NewService constructs a new attachment service.

func (*Service) DownloadAttachment

func (s *Service) DownloadAttachment(page *model.ConfluencePage, filename string, revision int) (*model.ConfluenceAttachment, []byte, error)

DownloadAttachment retrieves attachment bytes for the given filename and optional revision.

func (*Service) Resolve

func (s *Service) Resolve(page *model.ConfluencePage, filename string, revision int) (string, error)

Resolve locates the best matching attachment on the given page and returns its content.

Directories

Path Synopsis
Package mock_attachments is a generated GoMock package.
Package mock_attachments is a generated GoMock package.

Jump to

Keyboard shortcuts

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