Documentation
¶
Index ¶
- Variables
- type Inspection
- type Inspector
- type PDFFile
- func (pdf *PDFFile) Exists() bool
- func (pdf *PDFFile) GetErrors() []error
- func (pdf *PDFFile) GetFileSize() (int64, error)
- func (pdf *PDFFile) GetMetadata() (*generation.PDFMetadata, error)
- func (pdf *PDFFile) GetModificationTime() (time.Time, error)
- func (pdf *PDFFile) GetPageCount() (int, error)
- func (pdf *PDFFile) HasErrors() bool
- func (pdf *PDFFile) IsValid() bool
- func (pdf *PDFFile) Path() string
- func (pdf *PDFFile) String() string
- func (pdf *PDFFile) Validate() error
- type PDFFileRepository
- type PDFFileService
Constants ¶
This section is empty.
Variables ¶
var ( ErrInspectorRequired = errors.New("PDF inspector capability is required") ErrPDFNotFound = errors.New("PDF file does not exist") )
Functions ¶
This section is empty.
Types ¶
type Inspection ¶
Inspection is the effect-free evidence used by PDFFile validation.
type Inspector ¶
type Inspector interface {
Inspect(path string) (Inspection, error)
}
Inspector is implemented at an infrastructure boundary that may access files or tools.
type PDFFile ¶
type PDFFile struct {
// contains filtered or unexported fields
}
PDFFile is a domain entity whose rules operate only on injected inspection evidence.
func NewPDFFile ¶
NewPDFFile creates a PDF entity. Supply an Inspector before invoking effectful queries.
func (*PDFFile) GetFileSize ¶
func (*PDFFile) GetMetadata ¶
func (pdf *PDFFile) GetMetadata() (*generation.PDFMetadata, error)