Documentation
¶
Index ¶
- Constants
- type PDFGenerationApplicationService
- func (s *PDFGenerationApplicationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
- func (s *PDFGenerationApplicationService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
- func (s *PDFGenerationApplicationService) GetSupportedEngines() []string
- func (s *PDFGenerationApplicationService) GetSupportedFormats() []string
- func (s *PDFGenerationApplicationService) GetTemplateVariables(templatePath string) ([]string, error)
- func (s *PDFGenerationApplicationService) StopAllWatchModes() error
- func (s *PDFGenerationApplicationService) StopWatchMode(watchID string) error
- func (s *PDFGenerationApplicationService) ValidateTemplate(templatePath string) error
- type PDFOrchestrationService
- func (s *PDFOrchestrationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
- func (s *PDFOrchestrationService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
- func (s *PDFOrchestrationService) GetSupportedEngines() []string
- func (s *PDFOrchestrationService) GetSupportedFormats() []string
- func (s *PDFOrchestrationService) GetTemplateVariables(templatePath string) ([]string, error)
- func (s *PDFOrchestrationService) StopAllWatchModes() error
- func (s *PDFOrchestrationService) StopWatchMode(watchID string) error
- func (s *PDFOrchestrationService) ValidateTemplate(templatePath string) error
- type PDFValidationGuard
- type RequestValidationGuard
- type ValidationGuard
- type WatchModeGuard
- type WatchService
- func (ws *WatchService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
- func (ws *WatchService) IsWatchModeAvailable() bool
- func (ws *WatchService) ShouldStartWatchMode(req generation.PDFGenerationRequest, result generation.PDFGenerationResult) bool
- func (ws *WatchService) StartWatchMode(ctx context.Context, req generation.PDFGenerationRequest) error
- func (ws *WatchService) StopAllWatchModes() error
- func (ws *WatchService) StopWatchMode(watchID string) error
Constants ¶
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 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 ports.Logger, debugEnabled bool, ) *PDFGenerationApplicationService
NewPDFGenerationApplicationService creates a new application service
func (*PDFGenerationApplicationService) GeneratePDF ¶
func (s *PDFGenerationApplicationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
GeneratePDF orchestrates the complete PDF generation workflow
func (*PDFGenerationApplicationService) GetActiveWatchModes ¶
func (s *PDFGenerationApplicationService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
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 ¶
func (s *PDFGenerationApplicationService) StopAllWatchModes() error
StopAllWatchModes stops all active watch modes
func (*PDFGenerationApplicationService) StopWatchMode ¶
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 ¶
type PDFOrchestrationService struct {
// contains filtered or unexported fields
}
PDFOrchestrationService encapsulates all orchestration concerns
func NewPDFOrchestrationService ¶
func NewPDFOrchestrationService( templateService generation.TemplateProcessingService, variableResolver generation.VariableResolver, pdfValidator generation.PDFValidator, externalService generation.PDFGenerationService, watchService watch.WatchService, watchManager generation.WatchModeManager, logger ports.Logger, ) *PDFOrchestrationService
NewPDFOrchestrationService creates a new orchestration service
func (*PDFOrchestrationService) GeneratePDF ¶
func (s *PDFOrchestrationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
GeneratePDF orchestrates the complete PDF generation workflow
func (*PDFOrchestrationService) GetActiveWatchModes ¶
func (s *PDFOrchestrationService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
GetActiveWatchModes returns information about active watch modes
func (*PDFOrchestrationService) GetSupportedEngines ¶
func (s *PDFOrchestrationService) GetSupportedEngines() []string
GetSupportedEngines returns supported LaTeX engines
func (*PDFOrchestrationService) GetSupportedFormats ¶
func (s *PDFOrchestrationService) GetSupportedFormats() []string
GetSupportedFormats returns supported output formats
func (*PDFOrchestrationService) GetTemplateVariables ¶
func (s *PDFOrchestrationService) GetTemplateVariables(templatePath string) ([]string, error)
GetTemplateVariables extracts variables from a template
func (*PDFOrchestrationService) StopAllWatchModes ¶
func (s *PDFOrchestrationService) StopAllWatchModes() error
StopAllWatchModes stops all active watch modes
func (*PDFOrchestrationService) StopWatchMode ¶
func (s *PDFOrchestrationService) StopWatchMode(watchID string) error
StopWatchMode stops a specific watch mode
func (*PDFOrchestrationService) ValidateTemplate ¶
func (s *PDFOrchestrationService) ValidateTemplate(templatePath string) error
ValidateTemplate validates a template file
type PDFValidationGuard ¶
type PDFValidationGuard struct{}
PDFValidationGuard guards PDF validation operations
func NewPDFValidationGuard ¶
func NewPDFValidationGuard() *PDFValidationGuard
NewPDFValidationGuard creates a new PDF validation guard
func (*PDFValidationGuard) ShouldValidatePDF ¶
func (g *PDFValidationGuard) ShouldValidatePDF(result generation.PDFGenerationResult) bool
ShouldValidatePDF determines if PDF should be validated
type RequestValidationGuard ¶
type RequestValidationGuard struct {
// contains filtered or unexported fields
}
RequestValidationGuard validates PDF generation requests
func NewRequestValidationGuard ¶
func NewRequestValidationGuard( templateService generation.TemplateProcessingService, variableResolver generation.VariableResolver, ) *RequestValidationGuard
NewRequestValidationGuard creates a new request validation guard
func (*RequestValidationGuard) Validate ¶
func (g *RequestValidationGuard) Validate(ctx context.Context, req generation.PDFGenerationRequest) error
Validate implements ValidationGuard interface
type ValidationGuard ¶
type ValidationGuard interface {
Validate(ctx context.Context, req generation.PDFGenerationRequest) error
}
ValidationGuard defines the interface for validation guards
type WatchModeGuard ¶
type WatchModeGuard struct {
// contains filtered or unexported fields
}
WatchModeGuard guards watch mode operations
func NewWatchModeGuard ¶
func NewWatchModeGuard(watchManager generation.WatchModeManager) *WatchModeGuard
NewWatchModeGuard creates a new watch mode guard
func (*WatchModeGuard) CanStartWatchMode ¶
func (g *WatchModeGuard) CanStartWatchMode() bool
CanStartWatchMode checks if watch mode can be started
func (*WatchModeGuard) CanStopWatchMode ¶
func (g *WatchModeGuard) CanStopWatchMode() bool
CanStopWatchMode checks if watch mode can be stopped
func (*WatchModeGuard) GuardWatchModeUnavailable ¶
func (g *WatchModeGuard) GuardWatchModeUnavailable() error
GuardWatchModeUnavailable returns error when watch mode is unavailable
func (*WatchModeGuard) ShouldStartWatchMode ¶
func (g *WatchModeGuard) ShouldStartWatchMode(req generation.PDFGenerationRequest, result generation.PDFGenerationResult) bool
ShouldStartWatchMode determines if watch mode should be started based on request and result
type WatchService ¶
type WatchService struct {
// contains filtered or unexported fields
}
WatchService encapsulates all watch-related functionality Implements generation.WatchService interface
func NewWatchService ¶
func NewWatchService( watchService watch.WatchService, watchManager generation.WatchModeManager, ) *WatchService
NewWatchService creates a new watch service
func (*WatchService) GetActiveWatchModes ¶
func (ws *WatchService) GetActiveWatchModes() map[string]generation.WatchInstanceInfo
GetActiveWatchModes returns information about active watch modes
func (*WatchService) IsWatchModeAvailable ¶
func (ws *WatchService) IsWatchModeAvailable() bool
IsWatchModeAvailable checks if watch mode functionality is available
func (*WatchService) ShouldStartWatchMode ¶
func (ws *WatchService) ShouldStartWatchMode(req generation.PDFGenerationRequest, result generation.PDFGenerationResult) bool
ShouldStartWatchMode determines if watch mode should be started
func (*WatchService) StartWatchMode ¶
func (ws *WatchService) StartWatchMode(ctx context.Context, req generation.PDFGenerationRequest) error
StartWatchMode starts file watching for the given request
func (*WatchService) StopAllWatchModes ¶
func (ws *WatchService) StopAllWatchModes() error
StopAllWatchModes stops all active watch modes
func (*WatchService) StopWatchMode ¶
func (ws *WatchService) StopWatchMode(watchID string) error
StopWatchMode stops a specific watch mode