Documentation ¶
Index ¶
- type Bundler
- func (b *Bundler) Bundle() error
- func (b *Bundler) ChecksumMD5(name, sum string)
- func (b *Bundler) ChecksumSHA1(name, sum string)
- func (b *Bundler) ChecksumSHA256(name, sum string)
- func (b *Bundler) Create(name string) (afero.File, error)
- func (b *Bundler) Describe(field, value string)
- func (b *Bundler) DescribeFile(name, field, value string)
- func (b *Bundler) Destroy() error
- func (b *Bundler) FullBaseFsPath() string
- func (b *Bundler) Write(name string, r io.Reader) error
- type ChecksumSet
- type MetadataSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundler ¶
type Bundler struct {
// contains filtered or unexported fields
}
Bundler helps create Archivematica transfers in the filesystem.
It is a simpler alternative to amclient.TransferSession that does not concern with the submission of the transfer.
func NewBundlerWithTempDir ¶
NewBundlerWithTempDir returns a bundler based on a temporary directory created under the path given.
func (*Bundler) ChecksumMD5 ¶
ChecksumMD5 registers a MD5 checksum for a file.
func (*Bundler) ChecksumSHA1 ¶
ChecksumSHA1 registers a SHA1 checksum for a file.
func (*Bundler) ChecksumSHA256 ¶
ChecksumSHA256 registers a SHA256 checksum for a file.
func (*Bundler) Describe ¶
Describe registers metadata of the whole dataset/transfer. It causes the transfer to include a `metadata.json` file with the metadata included.
func (*Bundler) DescribeFile ¶
DescribeFile registers metadata of a file. It causes the transfer to include a `metadata.json` file with the metadata of each file described.
func (*Bundler) FullBaseFsPath ¶
type ChecksumSet ¶
type ChecksumSet struct {
// contains filtered or unexported fields
}
ChecksumSet holds the checksums of the files for a sum algorithm.
func NewChecksumSet ¶
func NewChecksumSet(sumType string, fs afero.Fs) *ChecksumSet
func (*ChecksumSet) Add ¶
func (c *ChecksumSet) Add(name, sum string)
func (*ChecksumSet) Write ¶
func (c *ChecksumSet) Write() error
type MetadataSet ¶
type MetadataSet struct {
// contains filtered or unexported fields
}
MetadataSet holds the metadata entries of the transfer.
func NewMetadataSet ¶
func NewMetadataSet(fs afero.Fs) *MetadataSet
NewMetadataSet returns a new MetadataSet.
func (*MetadataSet) Add ¶
func (m *MetadataSet) Add(name, field, value string)
func (*MetadataSet) Entries ¶
func (m *MetadataSet) Entries() map[string][][2]string
Entries returns all entries that were created.
func (*MetadataSet) Write ¶
func (m *MetadataSet) Write() error