Documentation
¶
Index ¶
- type OSPDFInspector
- type PDFValidatorAdapter
- func (pva *PDFValidatorAdapter) GetFileModTime(pdfPath string) (time.Time, error)
- func (pva *PDFValidatorAdapter) GetFileSize(pdfPath string) (int64, error)
- func (pva *PDFValidatorAdapter) GetMetadata(pdfPath string) (generation.PDFMetadata, error)
- func (pva *PDFValidatorAdapter) GetPageCount(pdfPath string) (int, error)
- func (pva *PDFValidatorAdapter) IsValidPDF(pdfPath string) bool
- func (pva *PDFValidatorAdapter) Validate(pdfPath string) error
- func (pva *PDFValidatorAdapter) ValidatePDFStructure(pdfPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSPDFInspector ¶ added in v1.3.3
type OSPDFInspector struct{}
OSPDFInspector is the filesystem boundary for PDF inspection.
func (OSPDFInspector) Inspect ¶ added in v1.3.3
func (OSPDFInspector) Inspect(path string) (file.Inspection, error)
type PDFValidatorAdapter ¶
type PDFValidatorAdapter struct {
// contains filtered or unexported fields
}
PDFValidatorAdapter implements domain.PDFValidator
func NewPDFValidatorAdapter ¶
func NewPDFValidatorAdapter() *PDFValidatorAdapter
NewPDFValidatorAdapter creates a new PDF validator adapter
func NewPDFValidatorAdapterWithInspector ¶ added in v1.3.3
func NewPDFValidatorAdapterWithInspector(inspector file.Inspector) *PDFValidatorAdapter
NewPDFValidatorAdapterWithInspector injects a custom inspection boundary.
func (*PDFValidatorAdapter) GetFileModTime ¶
func (pva *PDFValidatorAdapter) GetFileModTime(pdfPath string) (time.Time, error)
GetFileModTime returns the file modification time using the PDFFile domain entity
func (*PDFValidatorAdapter) GetFileSize ¶
func (pva *PDFValidatorAdapter) GetFileSize(pdfPath string) (int64, error)
GetFileSize returns the file size using the PDFFile domain entity
func (*PDFValidatorAdapter) GetMetadata ¶
func (pva *PDFValidatorAdapter) GetMetadata(pdfPath string) (generation.PDFMetadata, error)
GetMetadata extracts metadata from a PDF file using the PDFFile domain entity
func (*PDFValidatorAdapter) GetPageCount ¶
func (pva *PDFValidatorAdapter) GetPageCount(pdfPath string) (int, error)
GetPageCount returns the page count using the PDFFile domain entity
func (*PDFValidatorAdapter) IsValidPDF ¶
func (pva *PDFValidatorAdapter) IsValidPDF(pdfPath string) bool
IsValidPDF checks if a file is a valid PDF using the PDFFile domain entity
func (*PDFValidatorAdapter) Validate ¶
func (pva *PDFValidatorAdapter) Validate(pdfPath string) error
Validate validates a PDF file using the PDFFile domain entity
func (*PDFValidatorAdapter) ValidatePDFStructure ¶
func (pva *PDFValidatorAdapter) ValidatePDFStructure(pdfPath string) error
ValidatePDFStructure performs basic structural validation using the PDFFile domain entity