Documentation
¶
Index ¶
- type PDFFile
- func (pf *PDFFile) Exists() bool
- func (pf *PDFFile) GetErrors() []error
- func (pf *PDFFile) GetFileSize() (int64, error)
- func (pf *PDFFile) GetMetadata() (*generation.PDFMetadata, error)
- func (pf *PDFFile) GetModificationTime() (time.Time, error)
- func (pf *PDFFile) GetPageCount() (int, error)
- func (pf *PDFFile) HasErrors() bool
- func (pf *PDFFile) IsValid() bool
- func (pf *PDFFile) Path() string
- func (pf *PDFFile) String() string
- func (pf *PDFFile) Validate() error
- type PDFFileRepository
- type PDFFileService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PDFFile ¶
type PDFFile struct {
// contains filtered or unexported fields
}
PDFFile represents a PDF file as a domain entity This encapsulates all PDF-related operations and state
func NewPDFFile ¶
NewPDFFile creates a new PDF file entity from a file path
func (*PDFFile) GetFileSize ¶
GetFileSize returns the file size in bytes
func (*PDFFile) GetMetadata ¶
func (pf *PDFFile) GetMetadata() (*generation.PDFMetadata, error)
GetMetadata returns the PDF metadata, loading it if necessary
func (*PDFFile) GetModificationTime ¶
GetModificationTime returns the file modification time
func (*PDFFile) GetPageCount ¶
GetPageCount returns the number of pages in the PDF
type PDFFileRepository ¶
type PDFFileRepository interface {
FindByPath(path string) (*PDFFile, error)
Save(pdf *PDFFile) error
Delete(pdf *PDFFile) error
Exists(path string) bool
}
PDFFileRepository defines the interface for PDF file operations
type PDFFileService ¶
type PDFFileService interface {
CreatePDFFile(path string) (*PDFFile, error)
ValidatePDFFile(pdf *PDFFile) error
GetPDFMetadata(pdf *PDFFile) (*generation.PDFMetadata, error)
ConvertToImages(pdf *PDFFile, formats []string) ([]string, error)
}
PDFFileService defines the interface for PDF file business logic