Documentation ¶
Overview ¶
Package pdfengines a way to gather and manage multiple modules that implement the gotenberg.PdfEngine interface.
Index ¶
- type PdfEngines
- func (mod *PdfEngines) Descriptor() gotenberg.ModuleDescriptor
- func (mod *PdfEngines) PdfEngine() (gotenberg.PdfEngine, error)
- func (mod *PdfEngines) Provision(ctx *gotenberg.Context) error
- func (mod *PdfEngines) Routes() ([]api.Route, error)
- func (mod *PdfEngines) SystemMessages() []string
- func (mod *PdfEngines) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PdfEngines ¶
type PdfEngines struct {
// contains filtered or unexported fields
}
PdfEngines acts as an aggregator and manager for multiple PDF engine modules. It enables the selection and ordering of PDF engines based on user preferences passed via command-line flags. The PdfEngines module also implements the gotenberg.PdfEngine interface, providing a unified approach to PDF processing across the various engines it manages.
When processing PDFs, PdfEngines will attempt to use the engines in the order they were defined. If the primary engine encounters an error, PdfEngines can fall back to the next available engine. It also implements the api.Router interface to expose relevant PDF processing routes if enabled.
func (*PdfEngines) Descriptor ¶
func (mod *PdfEngines) Descriptor() gotenberg.ModuleDescriptor
Descriptor returns a PdfEngines' module descriptor.
func (*PdfEngines) PdfEngine ¶
func (mod *PdfEngines) PdfEngine() (gotenberg.PdfEngine, error)
PdfEngine returns a gotenberg.PdfEngine.
func (*PdfEngines) Provision ¶
func (mod *PdfEngines) Provision(ctx *gotenberg.Context) error
Provision gets either all gotenberg.PdfEngine modules or the modules selected by the user thanks to the "engines" flag.
func (*PdfEngines) Routes ¶
func (mod *PdfEngines) Routes() ([]api.Route, error)
Routes returns the HTTP routes.
func (*PdfEngines) SystemMessages ¶
func (mod *PdfEngines) SystemMessages() []string
SystemMessages returns one message with the selected gotenberg.PdfEngine modules.
func (*PdfEngines) Validate ¶
func (mod *PdfEngines) Validate() error
Validate validates there is at least one gotenberg.PdfEngine module available. It also validates that selected gotenberg.PdfEngine modules actually exist.