Documentation
¶
Overview ¶
Package postprocessors provides document content processing implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDefaults ¶
func RegisterDefaults(r *Registry)
RegisterDefaults registers all built-in processors with the registry. Call this during application initialisation to enable standard processors.
Types ¶
type BuilderFunc ¶
type BuilderFunc func(cfg map[string]any) (driven.PostProcessor, error)
BuilderFunc creates a PostProcessor from generic config. Config is a map of processor-specific settings parsed from user config.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline chains multiple PostProcessors and runs them in order. It implements the PostProcessorPipeline interface.
func NewPipeline ¶
func NewPipeline(processors ...driven.PostProcessor) *Pipeline
NewPipeline creates a new processing pipeline with the given processors. Processors are executed in the order provided.
func (*Pipeline) Add ¶
func (p *Pipeline) Add(processor driven.PostProcessor)
Add appends a processor to the pipeline.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps processor names to their builders. It allows dynamic construction of processors from configuration.
func (*Registry) Build ¶
Build creates a processor by name with the given config. Returns error if the processor name is not registered.
func (*Registry) Register ¶
func (r *Registry) Register(name string, builder BuilderFunc)
Register adds a processor builder to the registry. Name should be unique and match the processor's Name() return value.