Documentation
¶
Index ¶
- Constants
- type ContentPreviewGuard
- 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 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 ¶
func (s *PDFGenerationApplicationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
GeneratePDF orchestrates the complete PDF generation workflow
func (*PDFGenerationApplicationService) GetActiveWatchModes ¶ added in v1.2.2
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 ¶ 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
func (s *PDFOrchestrationService) GeneratePDF(ctx context.Context, req generation.PDFGenerationRequest) (generation.PDFGenerationResult, error)
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
func (g *RequestValidationGuard) Validate(ctx context.Context, req generation.PDFGenerationRequest) error
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
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 ¶ 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