Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversionOptions ¶
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