application

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 9 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

View Source
const (
	DefaultContentPreviewLength = 500
	MinTemplatePathLength       = 1
	MinEngineNameLength         = 1
	MinOutputPathLength         = 1
)

Constants for content preview and validation

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentPreviewGuard added in v1.2.2

type ContentPreviewGuard struct{}

ContentPreviewGuard guards content preview operations

func NewContentPreviewGuard added in v1.2.2

func NewContentPreviewGuard() *ContentPreviewGuard

NewContentPreviewGuard creates a new content preview guard

func (*ContentPreviewGuard) GetPreviewLength added in v1.2.2

func (g *ContentPreviewGuard) GetPreviewLength(contentLength int) int

GetPreviewLength calculates appropriate preview length

type PDFGenerationApplicationService

type PDFGenerationApplicationService struct {
	// contains filtered or unexported fields
}

PDFGenerationApplicationService provides a clean interface for PDF generation

func NewPDFGenerationApplicationService

func NewPDFGenerationApplicationService(
	templateService generation.TemplateProcessingService,
	variableResolver generation.VariableResolver,
	pdfValidator generation.PDFValidator,
	externalService generation.PDFGenerationService,
	watchService watch.WatchService,
	watchManager generation.WatchModeManager,
	logger *logger.LoggerAdapter,
	debugEnabled bool,
) *PDFGenerationApplicationService

NewPDFGenerationApplicationService creates a new application service

func (*PDFGenerationApplicationService) GeneratePDF

GeneratePDF orchestrates the complete PDF generation workflow

func (*PDFGenerationApplicationService) GetActiveWatchModes added in v1.2.2

GetActiveWatchModes returns information about active watch modes

func (*PDFGenerationApplicationService) GetSupportedEngines

func (s *PDFGenerationApplicationService) GetSupportedEngines() []string

GetSupportedEngines returns supported LaTeX engines

func (*PDFGenerationApplicationService) GetSupportedFormats

func (s *PDFGenerationApplicationService) GetSupportedFormats() []string

GetSupportedFormats returns supported output formats

func (*PDFGenerationApplicationService) GetTemplateVariables

func (s *PDFGenerationApplicationService) GetTemplateVariables(templatePath string) ([]string, error)

GetTemplateVariables extracts variables from a template

func (*PDFGenerationApplicationService) StopAllWatchModes added in v1.2.2

func (s *PDFGenerationApplicationService) StopAllWatchModes() error

StopAllWatchModes stops all active watch modes

func (*PDFGenerationApplicationService) StopWatchMode added in v1.2.2

func (s *PDFGenerationApplicationService) StopWatchMode(watchID string) error

StopWatchMode stops a specific watch mode

func (*PDFGenerationApplicationService) ValidateTemplate

func (s *PDFGenerationApplicationService) ValidateTemplate(templatePath string) error

ValidateTemplate validates a template file

type PDFOrchestrationService added in v1.2.2

type PDFOrchestrationService struct {
	// contains filtered or unexported fields
}

PDFOrchestrationService encapsulates all orchestration concerns

func NewPDFOrchestrationService added in v1.2.2

func NewPDFOrchestrationService(
	templateService generation.TemplateProcessingService,
	variableResolver generation.VariableResolver,
	pdfValidator generation.PDFValidator,
	externalService generation.PDFGenerationService,
	watchService watch.WatchService,
	watchManager generation.WatchModeManager,
	logger *logger.LoggerAdapter,
) *PDFOrchestrationService

NewPDFOrchestrationService creates a new orchestration service

func (*PDFOrchestrationService) GeneratePDF added in v1.2.2

GeneratePDF orchestrates the complete PDF generation workflow

func (*PDFOrchestrationService) GetActiveWatchModes added in v1.2.2

func (s *PDFOrchestrationService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo

GetActiveWatchModes returns information about active watch modes

func (*PDFOrchestrationService) GetSupportedEngines added in v1.2.2

func (s *PDFOrchestrationService) GetSupportedEngines() []string

GetSupportedEngines returns supported LaTeX engines

func (*PDFOrchestrationService) GetSupportedFormats added in v1.2.2

func (s *PDFOrchestrationService) GetSupportedFormats() []string

GetSupportedFormats returns supported output formats

func (*PDFOrchestrationService) GetTemplateVariables added in v1.2.2

func (s *PDFOrchestrationService) GetTemplateVariables(templatePath string) ([]string, error)

GetTemplateVariables extracts variables from a template

func (*PDFOrchestrationService) StopAllWatchModes added in v1.2.2

func (s *PDFOrchestrationService) StopAllWatchModes() error

StopAllWatchModes stops all active watch modes

func (*PDFOrchestrationService) StopWatchMode added in v1.2.2

func (s *PDFOrchestrationService) StopWatchMode(watchID string) error

StopWatchMode stops a specific watch mode

func (*PDFOrchestrationService) ValidateTemplate added in v1.2.2

func (s *PDFOrchestrationService) ValidateTemplate(templatePath string) error

ValidateTemplate validates a template file

type PDFValidationGuard added in v1.2.2

type PDFValidationGuard struct{}

PDFValidationGuard guards PDF validation operations

func NewPDFValidationGuard added in v1.2.2

func NewPDFValidationGuard() *PDFValidationGuard

NewPDFValidationGuard creates a new PDF validation guard

func (*PDFValidationGuard) ShouldValidatePDF added in v1.2.2

func (g *PDFValidationGuard) ShouldValidatePDF(result generation.PDFGenerationResult) bool

ShouldValidatePDF determines if PDF should be validated

type RequestValidationGuard added in v1.2.2

type RequestValidationGuard struct {
	// contains filtered or unexported fields
}

RequestValidationGuard validates PDF generation requests

func NewRequestValidationGuard added in v1.2.2

func NewRequestValidationGuard(
	templateService generation.TemplateProcessingService,
	variableResolver generation.VariableResolver,
) *RequestValidationGuard

NewRequestValidationGuard creates a new request validation guard

func (*RequestValidationGuard) Validate added in v1.2.2

Validate implements ValidationGuard interface

type ValidationGuard added in v1.2.2

type ValidationGuard interface {
	Validate(ctx context.Context, req generation.PDFGenerationRequest) error
}

ValidationGuard defines the interface for validation guards

type WatchModeGuard added in v1.2.2

type WatchModeGuard struct {
	// contains filtered or unexported fields
}

WatchModeGuard guards watch mode operations

func NewWatchModeGuard added in v1.2.2

func NewWatchModeGuard(watchManager generation.WatchModeManager) *WatchModeGuard

NewWatchModeGuard creates a new watch mode guard

func (*WatchModeGuard) CanStartWatchMode added in v1.2.2

func (g *WatchModeGuard) CanStartWatchMode() bool

CanStartWatchMode checks if watch mode can be started

func (*WatchModeGuard) CanStopWatchMode added in v1.2.2

func (g *WatchModeGuard) CanStopWatchMode() bool

CanStopWatchMode checks if watch mode can be stopped

func (*WatchModeGuard) GuardWatchModeUnavailable added in v1.2.2

func (g *WatchModeGuard) GuardWatchModeUnavailable() error

GuardWatchModeUnavailable returns error when watch mode is unavailable

func (*WatchModeGuard) ShouldStartWatchMode added in v1.2.2

ShouldStartWatchMode determines if watch mode should be started based on request and result

type WatchService added in v1.2.2

type WatchService struct {
	// contains filtered or unexported fields
}

WatchService encapsulates all watch-related functionality Implements generation.WatchService interface

func NewWatchService added in v1.2.2

func NewWatchService(
	watchService watch.WatchService,
	watchManager generation.WatchModeManager,
) *WatchService

NewWatchService creates a new watch service

func (*WatchService) GetActiveWatchModes added in v1.2.2

func (ws *WatchService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo

GetActiveWatchModes returns information about active watch modes

func (*WatchService) IsWatchModeAvailable added in v1.2.2

func (ws *WatchService) IsWatchModeAvailable() bool

IsWatchModeAvailable checks if watch mode functionality is available

func (*WatchService) ShouldStartWatchMode added in v1.2.2

func (ws *WatchService) ShouldStartWatchMode(req generation.PDFGenerationRequest, result generation.PDFGenerationResult) bool

ShouldStartWatchMode determines if watch mode should be started

func (*WatchService) StartWatchMode added in v1.2.2

func (ws *WatchService) StartWatchMode(ctx context.Context, req generation.PDFGenerationRequest) error

StartWatchMode starts file watching for the given request

func (*WatchService) StopAllWatchModes added in v1.2.2

func (ws *WatchService) StopAllWatchModes() error

StopAllWatchModes stops all active watch modes

func (*WatchService) StopWatchMode added in v1.2.2

func (ws *WatchService) StopWatchMode(watchID string) error

StopWatchMode stops a specific watch mode

Jump to

Keyboard shortcuts

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