Documentation
¶
Index ¶
- Variables
- type ErrContext
- type ErrCoreRead
- type ErrDir
- type ErrDirChange
- type ErrDirCreate
- type ErrDirRemove
- type ErrDownload
- type ErrEmlDecoder
- type ErrEmlReader
- type ErrExtensionRead
- type ErrExtract
- type ErrFileCopy
- type ErrFileCreate
- type ErrFileNotFound
- type ErrFileOpen
- type ErrImportArchive
- type ErrMetaDecoder
- type ErrMetaReader
- type ErrRepoClone
- type ErrSQLiteConnect
- type ErrSQLiteCreateBinary
- type ErrSQLiteCreateSQL
- type ErrSQLiteExec
- type ErrSQLiteLoadSQL
- type ErrSQLitePragma
- type ErrSQLiteQuery
- type ErrSaveCSV
- type ErrUnknownArchiveType
- type ErrUnknownExt
- type ErrZipCreate
- type Packager
Constants ¶
This section is empty.
Variables ¶
var ErrMetaFileNotFound = errors.New("meta file not found")
ErrMetaFileNotFound is returned when the meta.xml file is not found in the extract directory.
var ErrMultipleMetaFiles = errors.New("multiple meta files found")
ErrMultipleMetaFiles is returned when there are multiple meta.xml files in the extract directory.
Functions ¶
This section is empty.
Types ¶
type ErrContext ¶
type ErrContext struct {
Err error
}
ErrContext is returned when the context is canceled.
func (*ErrContext) Error ¶
func (e *ErrContext) Error() string
type ErrCoreRead ¶
type ErrCoreRead struct {
Err error
}
ErrCoreRead is returned when reading the core file fails.
func (*ErrCoreRead) Error ¶
func (e *ErrCoreRead) Error() string
type ErrDir ¶
type ErrDir struct {
DirPath string
}
ErrDir is returned when the directory is in an unknown state, or is not a directory.
type ErrDirChange ¶
func (*ErrDirChange) Error ¶
func (e *ErrDirChange) Error() string
type ErrDirCreate ¶
func (*ErrDirCreate) Error ¶
func (e *ErrDirCreate) Error() string
type ErrDirRemove ¶
func (*ErrDirRemove) Error ¶
func (e *ErrDirRemove) Error() string
type ErrDownload ¶
func (*ErrDownload) Error ¶
func (e *ErrDownload) Error() string
type ErrEmlDecoder ¶
type ErrEmlDecoder struct {
// Err is the original error.
Err error
}
ErrEmlDecoder is an error type for decoding Eml.xml files.
func (*ErrEmlDecoder) Error ¶
func (e *ErrEmlDecoder) Error() string
type ErrEmlReader ¶
type ErrEmlReader struct {
// Err is the original error.
Err error
}
ErrEmlReader is an error type for reading Eml.xml files.
func (*ErrEmlReader) Error ¶
func (e *ErrEmlReader) Error() string
type ErrExtensionRead ¶
type ErrExtensionRead struct {
Err error
}
func (*ErrExtensionRead) Error ¶
func (e *ErrExtensionRead) Error() string
ErrExtensionRead is returned when reading the extension file fails.
type ErrExtract ¶
ErrExtract is returned when the extraction of the DwCA file fails.
func (*ErrExtract) Error ¶
func (e *ErrExtract) Error() string
type ErrFileCopy ¶
func (*ErrFileCopy) Error ¶
func (e *ErrFileCopy) Error() string
type ErrFileCreate ¶
func (*ErrFileCreate) Error ¶
func (e *ErrFileCreate) Error() string
type ErrFileNotFound ¶
type ErrFileNotFound struct {
File string
}
ErrFileNotFound is returned when the file is not found.
func (*ErrFileNotFound) Error ¶
func (e *ErrFileNotFound) Error() string
type ErrFileOpen ¶
func (*ErrFileOpen) Error ¶
func (e *ErrFileOpen) Error() string
type ErrImportArchive ¶
func (*ErrImportArchive) Error ¶
func (e *ErrImportArchive) Error() string
type ErrMetaDecoder ¶
type ErrMetaDecoder struct {
// Err is the original error.
Err error
}
ErrMetaDecoder is an error type for decoding meta.xml files.
func (*ErrMetaDecoder) Error ¶
func (e *ErrMetaDecoder) Error() string
type ErrMetaReader ¶
type ErrMetaReader struct {
// Err is the original error.
Err error
}
ErrMetaReader is an error type for reading meta.xml files.
func (*ErrMetaReader) Error ¶
func (e *ErrMetaReader) Error() string
type ErrRepoClone ¶
func (*ErrRepoClone) Error ¶
func (e *ErrRepoClone) Error() string
type ErrSQLiteConnect ¶
type ErrSQLiteConnect struct {
Err error
}
func (*ErrSQLiteConnect) Error ¶
func (e *ErrSQLiteConnect) Error() string
type ErrSQLiteCreateBinary ¶
func (*ErrSQLiteCreateBinary) Error ¶
func (e *ErrSQLiteCreateBinary) Error() string
type ErrSQLiteCreateSQL ¶
func (*ErrSQLiteCreateSQL) Error ¶
func (e *ErrSQLiteCreateSQL) Error() string
type ErrSQLiteExec ¶
type ErrSQLiteExec struct {
Err error
}
func (*ErrSQLiteExec) Error ¶
func (e *ErrSQLiteExec) Error() string
type ErrSQLiteLoadSQL ¶
type ErrSQLiteLoadSQL struct {
Err error
}
func (*ErrSQLiteLoadSQL) Error ¶
func (e *ErrSQLiteLoadSQL) Error() string
type ErrSQLitePragma ¶
type ErrSQLitePragma struct {
Err error
}
func (*ErrSQLitePragma) Error ¶
func (e *ErrSQLitePragma) Error() string
type ErrSQLiteQuery ¶
type ErrSQLiteQuery struct {
Err error
}
func (*ErrSQLiteQuery) Error ¶
func (e *ErrSQLiteQuery) Error() string
type ErrSaveCSV ¶
type ErrSaveCSV struct {
Err error
}
func (*ErrSaveCSV) Error ¶
func (e *ErrSaveCSV) Error() string
type ErrUnknownArchiveType ¶
ErrUnknownArchiveType is returned when the file type is not supported.
func (*ErrUnknownArchiveType) Error ¶
func (e *ErrUnknownArchiveType) Error() string
type ErrUnknownExt ¶
type ErrUnknownExt struct {
File string
}
func (*ErrUnknownExt) Error ¶
func (e *ErrUnknownExt) Error() string
type ErrZipCreate ¶
func (*ErrZipCreate) Error ¶
func (e *ErrZipCreate) Error() string
type Packager ¶
type Packager interface {
// Fetch retrieves data from a source path and stores it at a destination
// path.
Fetch(src, dst string) error
// Create generates an empty archive at the given directory. It is the
// dir path internally to use in Export.
Create(dir string) error
// Export writes an archive from the cache to the specified output path. The
// export can be compressed as a zip file if isZip is true.
Export(outputPath string, isZip bool) error
}
Packager defines an interface for managing archive operations, including fetching, creating, and exporting archives.