pdfengines

package
v8.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pdfengines a way to gather and manage multiple modules that implement the gotenberg.PdfEngine interface.

Index

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.

Jump to

Keyboard shortcuts

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