pdfengines

package
v7.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 11 Imported by: 1

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 added in v7.10.0

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 added in v7.10.0

func (mod *PdfEngines) Descriptor() gotenberg.ModuleDescriptor

Descriptor returns a PdfEngines' module descriptor.

func (*PdfEngines) PdfEngine added in v7.10.0

func (mod *PdfEngines) PdfEngine() (gotenberg.PdfEngine, error)

PdfEngine returns a gotenberg.PdfEngine.

func (*PdfEngines) Provision added in v7.10.0

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 added in v7.10.0

func (mod *PdfEngines) Routes() ([]api.Route, error)

Routes returns the HTTP routes.

func (*PdfEngines) SystemMessages added in v7.10.0

func (mod *PdfEngines) SystemMessages() []string

SystemMessages returns one message with the selected gotenberg.PdfEngine modules.

func (*PdfEngines) Validate added in v7.10.0

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