Documentation ¶
Overview ¶
Package activities implements Enduro's workflow activities.
Index ¶
- Constants
- type AcquirePipelineActivity
- type BundleActivity
- func (a *BundleActivity) Bundle(ctx context.Context, unar archiver.Unarchiver, ...) (string, string, error)
- func (a *BundleActivity) Copy(ctx context.Context, src, dst string, stripTopLevelDir bool, ...) (string, string, error)
- func (a *BundleActivity) Execute(ctx context.Context, params *BundleActivityParams) (*BundleActivityResult, error)
- func (a *BundleActivity) SingleFile(ctx context.Context, transferDir, key, tempFile string) (string, error)
- func (a *BundleActivity) Unarchiver(key, filename string) archiver.Unarchiver
- type BundleActivityParams
- type BundleActivityResult
- type CleanUpActivity
- type CleanUpActivityParams
- type DeleteOriginalActivity
- type DisposeOriginalActivity
- type DownloadActivity
- type HidePackageActivity
- type PollIngestActivity
- type PollIngestActivityParams
- type PollTransferActivity
- type PollTransferActivityParams
- type PopulateMetadataActivity
- type PopulateMetadataActivityParams
- type TransferActivity
- type TransferActivityParams
- type TransferActivityResponse
- type ValidateTransferActivity
- type ValidateTransferActivityParams
Constants ¶
const ( AcquirePipelineActivityName = "acquire-pipeline-activity" DownloadActivityName = "download-activity" BundleActivityName = "bundle-activity" TransferActivityName = "transfer-activity" PollTransferActivityName = "poll-transfer-activity" PollIngestActivityName = "poll-ingest-activity" CleanUpActivityName = "clean-up-activity" HidePackageActivityName = "hide-package-activity" DeleteOriginalActivityName = "delete-original-activity" DisposeOriginalActivityName = "dispose-original-activity" ValidateTransferActivityName = "validate-transfer-activity" PopulateMetadataActivityName = "populate-metadata-activity" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquirePipelineActivity ¶ added in v0.17.0
type AcquirePipelineActivity struct {
// contains filtered or unexported fields
}
AcquirePipelineActivity acquires a lock in the weighted semaphore associated to a particular pipeline.
func NewAcquirePipelineActivity ¶ added in v0.17.0
func NewAcquirePipelineActivity(pipelineRegistry *pipeline.Registry) *AcquirePipelineActivity
type BundleActivity ¶
type BundleActivity struct {
// contains filtered or unexported fields
}
func NewBundleActivity ¶
func NewBundleActivity(m *manager.Manager) *BundleActivity
func (*BundleActivity) Bundle ¶
func (a *BundleActivity) Bundle(ctx context.Context, unar archiver.Unarchiver, transferDir, key, tempFile string, stripTopLevelDir bool) (string, string, error)
Bundle a transfer with the contents found in the archive.
func (*BundleActivity) Copy ¶ added in v0.30.0
func (a *BundleActivity) Copy(ctx context.Context, src, dst string, stripTopLevelDir bool, excludeHiddenFiles bool) (string, string, error)
Copy a transfer in the given destination using an intermediate temp. directory.
func (*BundleActivity) Execute ¶
func (a *BundleActivity) Execute(ctx context.Context, params *BundleActivityParams) (*BundleActivityResult, error)
func (*BundleActivity) SingleFile ¶
func (a *BundleActivity) SingleFile(ctx context.Context, transferDir, key, tempFile string) (string, error)
SingleFile bundles a transfer with the downloaded blob in it.
func (*BundleActivity) Unarchiver ¶
func (a *BundleActivity) Unarchiver(key, filename string) archiver.Unarchiver
Unarchiver returns the unarchiver suited for the archival format.
type BundleActivityParams ¶
type BundleActivityResult ¶
type CleanUpActivity ¶
type CleanUpActivity struct {
// contains filtered or unexported fields
}
CleanUpActivity removes the contents that we've created in the TS location.
func NewCleanUpActivity ¶
func NewCleanUpActivity(m *manager.Manager) *CleanUpActivity
func (*CleanUpActivity) Execute ¶
func (a *CleanUpActivity) Execute(ctx context.Context, params *CleanUpActivityParams) error
type CleanUpActivityParams ¶
type CleanUpActivityParams struct {
FullPath string
}
type DeleteOriginalActivity ¶
type DeleteOriginalActivity struct {
// contains filtered or unexported fields
}
func NewDeleteOriginalActivity ¶
func NewDeleteOriginalActivity(m *manager.Manager) *DeleteOriginalActivity
type DisposeOriginalActivity ¶ added in v0.34.0
type DisposeOriginalActivity struct {
// contains filtered or unexported fields
}
func NewDisposeOriginalActivity ¶ added in v0.34.0
func NewDisposeOriginalActivity(m *manager.Manager) *DisposeOriginalActivity
type DownloadActivity ¶
type DownloadActivity struct {
// contains filtered or unexported fields
}
DownloadActivity downloads the blob into the pipeline processing directory.
func NewDownloadActivity ¶
func NewDownloadActivity(m *manager.Manager) *DownloadActivity
type HidePackageActivity ¶
type HidePackageActivity struct {
// contains filtered or unexported fields
}
func NewHidePackageActivity ¶
func NewHidePackageActivity(m *manager.Manager) *HidePackageActivity
type PollIngestActivity ¶
type PollIngestActivity struct {
// contains filtered or unexported fields
}
func NewPollIngestActivity ¶
func NewPollIngestActivity(pipelineRegistry *pipeline.Registry) *PollIngestActivity
func (*PollIngestActivity) Execute ¶
func (a *PollIngestActivity) Execute(ctx context.Context, params *PollIngestActivityParams) (time.Time, error)
type PollTransferActivity ¶
type PollTransferActivity struct {
// contains filtered or unexported fields
}
PollTransferActivity polls the Transfer Status API repeatedly until processing completes or when an error is considered non permanent.
It is expected to deliver at least on heartbeat per minute.
func NewPollTransferActivity ¶
func NewPollTransferActivity(pipelineRegistry *pipeline.Registry) *PollTransferActivity
func (*PollTransferActivity) Execute ¶
func (a *PollTransferActivity) Execute(ctx context.Context, params *PollTransferActivityParams) (string, error)
type PopulateMetadataActivity ¶ added in v0.41.0
type PopulateMetadataActivity struct {
// contains filtered or unexported fields
}
PopulateMetadataActivity populates the DC identifier in the transfer metadata CSV document.
func NewPopulateMetadataActivity ¶ added in v0.41.0
func NewPopulateMetadataActivity(pipelineRegistry *pipeline.Registry) *PopulateMetadataActivity
func (*PopulateMetadataActivity) Execute ¶ added in v0.41.0
func (a *PopulateMetadataActivity) Execute(ctx context.Context, params *PopulateMetadataActivityParams) error
type PopulateMetadataActivityParams ¶ added in v0.41.0
type TransferActivity ¶
type TransferActivity struct {
// contains filtered or unexported fields
}
TransferActivity submits the transfer to Archivematica and returns its ID.
This is our first interaction with Archivematica. The workflow ends here after authentication errors.
func NewTransferActivity ¶
func NewTransferActivity(m *manager.Manager) *TransferActivity
func (*TransferActivity) Execute ¶
func (a *TransferActivity) Execute(ctx context.Context, params *TransferActivityParams) (*TransferActivityResponse, error)
type TransferActivityParams ¶
type ValidateTransferActivity ¶ added in v0.29.0
type ValidateTransferActivity struct{}
func NewValidateTransferActivity ¶ added in v0.29.0
func NewValidateTransferActivity() *ValidateTransferActivity
func (*ValidateTransferActivity) Execute ¶ added in v0.29.0
func (a *ValidateTransferActivity) Execute(ctx context.Context, params *ValidateTransferActivityParams) error
type ValidateTransferActivityParams ¶ added in v0.29.0
type ValidateTransferActivityParams struct { Config validation.Config Path string }