Documentation
¶
Index ¶
- type AttributedFile
- type AttributedFilePointer
- func (a AttributedFilePointer) Base() string
- func (a AttributedFilePointer) CopyTo(newLocalPath string) (AttributedFilePointer, error)
- func (a AttributedFilePointer) CopyToDir(newDirPath string) (AttributedFilePointer, error)
- func (a AttributedFilePointer) Delete() error
- func (afp AttributedFilePointer) GetDataPath() (string, error)
- func (a AttributedFilePointer) ReadAttributedFile() (AttributedFile, error)
- type Attribution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributedFile ¶
type AttributedFile interface {
Attributions() []Attribution
Read() ([]byte, error)
ReadString() (string, error)
SHA256() string
// contains filtered or unexported methods
}
func ReadAllAttributedFiles ¶
func ReadAllAttributedFiles(dirPath string) ([]AttributedFile, error)
func ReadAttributedFile ¶
func ReadAttributedFile(filePath string) (AttributedFile, error)
type AttributedFilePointer ¶
type AttributedFilePointer struct {
FilePath string
}
func AttributeLocalFile ¶
func AttributeLocalFile(filePath string, attributions ...Attribution) (AttributedFilePointer, error)
func AttributeRawFile ¶
func AttributeRawFile(filePath, bytes string, attributions ...Attribution) (AttributedFilePointer, error)
func ReadAllAttributedFilePointers ¶
func ReadAllAttributedFilePointers(dirPath string) ([]AttributedFilePointer, error)
func (AttributedFilePointer) Base ¶
func (a AttributedFilePointer) Base() string
func (AttributedFilePointer) CopyTo ¶
func (a AttributedFilePointer) CopyTo(newLocalPath string) (AttributedFilePointer, error)
func (AttributedFilePointer) CopyToDir ¶
func (a AttributedFilePointer) CopyToDir(newDirPath string) (AttributedFilePointer, error)
func (AttributedFilePointer) Delete ¶
func (a AttributedFilePointer) Delete() error
func (AttributedFilePointer) GetDataPath ¶
func (afp AttributedFilePointer) GetDataPath() (string, error)
func (AttributedFilePointer) ReadAttributedFile ¶
func (a AttributedFilePointer) ReadAttributedFile() (AttributedFile, error)
type Attribution ¶
type Attribution struct {
OriginUrl string `xml:"origin_url"`
CollectedAt time.Time `xml:"collected_at"`
OriginalTitle string `xml:"original_title"`
Author string `xml:"author"`
AuthorUrl string `xml:"author_url"`
License string `xml:"license"`
LicenseUrl string `xml:"license_url"`
CreatedAt time.Time `xml:"created_at"`
Context []string `xml:"context"`
ScrapingMethodology string `xml:"scraping_methodology"`
}
Click to show internal directories.
Click to hide internal directories.