application

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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 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

GeneratePDF orchestrates the complete PDF generation workflow

func (*PDFGenerationApplicationService) GetActiveWatchModes

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

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

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

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

Jump to

Keyboard shortcuts

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