bagcreate

package
v0.0.0-...-bc4a9d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

README

bagcreate

Work in progress.

Documentation

Index

Constants

View Source
const (
	Name = "bag-create"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Activity

func (*Activity) Execute

func (a *Activity) Execute(ctx context.Context, params *Params) (*Result, error)

Execute creates a BagIt Bag containing the files at SourcePath.

If BagPath is set in the parameters, then the Bag will be created at BagPath. If BagPath is empty, then the Bag will be created at SourcePath, replacing the original directory contents. In either case the path of the Bag is returned.

type Config

type Config struct {
	// ChecksumAlgorithm specifies the hashing algorithm used to generate file
	// checksums. Valid values are "md5", "sha1", "sha256", "sha512" (default)
	ChecksumAlgorithm string
}

func (*Config) Validate

func (c *Config) Validate() error

type Params

type Params struct {
	// SourcePath is the path of the files to be added to the created Bag.
	SourcePath string

	// BagPath is the path where the Bag should be created. If BagPath is empty,
	// then the Bag will be created at SourcePath, replacing the original
	// directory contents.
	BagPath string
}

type Result

type Result struct {
	// BagPath of the path to the created Bag.
	BagPath string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL