pdf_validator

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 6 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSPDFInspector

type OSPDFInspector struct{}

OSPDFInspector is the filesystem boundary for PDF inspection.

func (OSPDFInspector) Inspect

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

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

Jump to

Keyboard shortcuts

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