Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubIssueNormaliser ¶
type GitHubIssueNormaliser struct{}
GitHubIssueNormaliser handles GitHub issue content. It preserves Markdown formatting while cleaning up issue-specific artifacts.
func (*GitHubIssueNormaliser) Normalise ¶
func (n *GitHubIssueNormaliser) Normalise(content string, mimeType string) string
func (*GitHubIssueNormaliser) Priority ¶
func (n *GitHubIssueNormaliser) Priority() int
func (*GitHubIssueNormaliser) SupportedTypes ¶
func (n *GitHubIssueNormaliser) SupportedTypes() []string
type GitHubPRNormaliser ¶
type GitHubPRNormaliser struct{}
GitHubPRNormaliser handles GitHub pull request content. It preserves Markdown formatting while cleaning up PR-specific artifacts.
func (*GitHubPRNormaliser) Normalise ¶
func (n *GitHubPRNormaliser) Normalise(content string, mimeType string) string
func (*GitHubPRNormaliser) Priority ¶
func (n *GitHubPRNormaliser) Priority() int
func (*GitHubPRNormaliser) SupportedTypes ¶
func (n *GitHubPRNormaliser) SupportedTypes() []string
type HTMLNormaliser ¶
type HTMLNormaliser struct{}
HTMLNormaliser handles HTML content.
func (*HTMLNormaliser) Normalise ¶
func (n *HTMLNormaliser) Normalise(content string, mimeType string) string
func (*HTMLNormaliser) Priority ¶
func (n *HTMLNormaliser) Priority() int
func (*HTMLNormaliser) SupportedTypes ¶
func (n *HTMLNormaliser) SupportedTypes() []string
type MarkdownNormaliser ¶
type MarkdownNormaliser struct{}
MarkdownNormaliser handles Markdown content.
func (*MarkdownNormaliser) Normalise ¶
func (n *MarkdownNormaliser) Normalise(content string, mimeType string) string
func (*MarkdownNormaliser) Priority ¶
func (n *MarkdownNormaliser) Priority() int
func (*MarkdownNormaliser) SupportedTypes ¶
func (n *MarkdownNormaliser) SupportedTypes() []string
type PDFNormaliser ¶ added in v0.2.2
type PDFNormaliser struct{}
PDFNormaliser extracts text content from PDF files using pdftotext-go. Requires poppler-utils >= 22.05.0 to be installed.
func (*PDFNormaliser) Normalise ¶ added in v0.2.2
func (n *PDFNormaliser) Normalise(content string, mimeType string) string
func (*PDFNormaliser) Priority ¶ added in v0.2.2
func (n *PDFNormaliser) Priority() int
func (*PDFNormaliser) SupportedTypes ¶ added in v0.2.2
func (n *PDFNormaliser) SupportedTypes() []string
type PlaintextNormaliser ¶
type PlaintextNormaliser struct{}
PlaintextNormaliser handles plain text content.
func (*PlaintextNormaliser) Normalise ¶
func (n *PlaintextNormaliser) Normalise(content string, mimeType string) string
func (*PlaintextNormaliser) Priority ¶
func (n *PlaintextNormaliser) Priority() int
func (*PlaintextNormaliser) SupportedTypes ¶
func (n *PlaintextNormaliser) SupportedTypes() []string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry implements NormaliserRegistry with priority-based selection. When multiple normalisers match a MIME type, the highest priority one is used.
func DefaultRegistry ¶
func DefaultRegistry() *Registry
DefaultRegistry creates a registry with common normalisers pre-registered.
func (*Registry) Get ¶
func (r *Registry) Get(mimeType string) driven.Normaliser
Get retrieves the best-matching normaliser for a MIME type. Returns nil if no normaliser is registered for the type. When multiple match, the highest priority normaliser is returned.
func (*Registry) GetAll ¶
func (r *Registry) GetAll(mimeType string) []driven.Normaliser
GetAll retrieves all normalisers that match a MIME type, sorted by priority (highest first).
func (*Registry) Register ¶
func (r *Registry) Register(normaliser driven.Normaliser)
Register registers a normaliser. Normalisers are stored and later selected by priority.