generation

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversionOptions

type ConversionOptions struct {
	Enabled bool
	Formats []string
}

ConversionOptions contains settings for PDF to image conversion

type PDFGenerationOptions

type PDFGenerationOptions struct {
	DoConvert  bool
	DoClean    bool
	Conversion ConversionOptions
	Timeout    time.Duration
	Verbose    bool
	Debug      bool
}

PDFGenerationOptions contains optional settings for PDF generation

type PDFGenerationRequest

type PDFGenerationRequest struct {
	TemplatePath string
	Variables    map[string]interface{}
	Engine       string
	OutputPath   string
	Options      PDFGenerationOptions
}

PDFGenerationRequest represents a request to generate a PDF

type PDFGenerationResult

type PDFGenerationResult struct {
	PDFPath    string
	ImagePaths []string
	Success    bool
	Error      error
	Metadata   PDFMetadata
}

PDFGenerationResult represents the result of PDF generation

type PDFGenerationService

type PDFGenerationService interface {
	Generate(ctx context.Context, req PDFGenerationRequest) (PDFGenerationResult, error)
	ValidateRequest(req PDFGenerationRequest) error
	GetSupportedEngines() []string
	GetSupportedFormats() []string
}

PDFGenerationService defines the interface for PDF generation

type PDFMetadata

type PDFMetadata struct {
	FileSize    int64
	PageCount   int
	GeneratedAt time.Time
	Engine      string
	Template    string
}

PDFMetadata contains metadata about a PDF file

type PDFValidator

type PDFValidator interface {
	Validate(pdfPath string) error
	GetMetadata(pdfPath string) (PDFMetadata, error)
	IsValidPDF(pdfPath string) bool
}

PDFValidator defines the interface for validating generated PDFs

type TemplateProcessingService

type TemplateProcessingService interface {
	Process(ctx context.Context, templatePath string, variables map[string]interface{}) (string, error)
	ValidateTemplate(templatePath string) error
	GetTemplateVariables(templatePath string) ([]string, error)
}

TemplateProcessingService defines the interface for template processing

type VariableResolver

type VariableResolver interface {
	Resolve(variables map[string]interface{}) (map[string]string, error)
	Flatten(variables map[string]interface{}) map[string]string
	Validate(variables map[string]interface{}) error
}

VariableResolver defines the interface for resolving complex variables

Jump to

Keyboard shortcuts

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