Documentation ¶
Overview ¶
Package activities implements Enduro's workflow activities.
Index ¶
- Constants
- type BundleActivity
- func (a *BundleActivity) Bundle(ctx context.Context, sourcePath string, transferDir string) (string, error)
- func (a *BundleActivity) Copy(ctx context.Context, src, dst string) (string, error)
- func (a *BundleActivity) Execute(ctx context.Context, params *BundleActivityParams) (*BundleActivityResult, error)
- func (a *BundleActivity) SingleFile(ctx context.Context, sourcePath string, transferDir string) (string, error)
- type BundleActivityParams
- type BundleActivityResult
- type ClassifyPackageActivity
- type ClassifyPackageActivityParams
- type ClassifyPackageActivityResult
- type CreateStoragePackageActivity
- type CreateStoragePackageActivityParams
- type CreateStoragePackageActivityResult
- type DeleteOriginalActivity
- type DeleteOriginalActivityResult
- type DisposeOriginalActivity
- type DisposeOriginalActivityResult
- type DownloadActivity
- type DownloadActivityParams
- type DownloadActivityResult
- type MoveToPermanentStorageActivity
- type MoveToPermanentStorageActivityParams
- type MoveToPermanentStorageActivityResult
- type PollMoveToPermanentStorageActivity
- type PollMoveToPermanentStorageActivityParams
- type PollMoveToPermanentStorageActivityResult
- type RejectPackageActivity
- type RejectPackageActivityParams
- type RejectPackageActivityResult
- type UploadActivity
- type UploadActivityParams
- type UploadActivityResult
Constants ¶
View Source
const ( DownloadActivityName = "download-activity" BundleActivityName = "bundle-activity" CleanUpActivityName = "clean-up-activity" DeleteOriginalActivityName = "delete-original-activity" DisposeOriginalActivityName = "dispose-original-activity" CreateStoragePackageActivityName = "create-storage-package-activity" MoveToPermanentStorageActivityName = "move-to-permanent-storage-activity" PollMoveToPermanentStorageActivityName = "poll-move-to-permanent-storage-activity" RejectPackageActivityName = "reject-package-activity" UploadActivityName = "upload-activity" SendToFailedSIPsName = "send-to-failed-sips" SendToFailedPIPsName = "send-to-failed-pips" )
View Source
const ( ModeDir = 0o750 ModeFile = 0o640 )
View Source
const ClassifyPackageActivityName = "classify-package-activity"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleActivity ¶
type BundleActivity struct{}
func NewBundleActivity ¶
func NewBundleActivity() *BundleActivity
func (*BundleActivity) Bundle ¶
func (a *BundleActivity) Bundle( ctx context.Context, sourcePath string, transferDir string, ) (string, error)
Bundle a transfer with the contents found in the archive.
func (*BundleActivity) Copy ¶
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, sourcePath string, transferDir string, ) (string, error)
SingleFile bundles a transfer with the downloaded blob in it.
TODO: Write metadata.csv and checksum files to the metadata dir.
type BundleActivityParams ¶
type BundleActivityParams struct { // SourcePath is the path of the transfer file or directory. SourcePath string // TransferDir is the target directory for the bundled package. TransferDir string // IsDir indicates that the transfer is a local directory when true. If true // the transfer will be copied to TransferDir without modification. IsDir bool }
type BundleActivityResult ¶
type BundleActivityResult struct {
FullPath string // Full path to the transfer in the worker running the session.
}
type ClassifyPackageActivity ¶
type ClassifyPackageActivity struct{}
func NewClassifyPackageActivity ¶
func NewClassifyPackageActivity() *ClassifyPackageActivity
func (*ClassifyPackageActivity) Execute ¶
func (a *ClassifyPackageActivity) Execute( ctx context.Context, params ClassifyPackageActivityParams, ) (*ClassifyPackageActivityResult, error)
type ClassifyPackageActivityParams ¶
type ClassifyPackageActivityParams struct { // Path is the full path of the package. Path string }
type ClassifyPackageActivityResult ¶
type ClassifyPackageActivityResult struct { // Type of the package. Type enums.PackageType }
type CreateStoragePackageActivity ¶
type CreateStoragePackageActivity struct {
// contains filtered or unexported fields
}
func NewCreateStoragePackageActivity ¶
func NewCreateStoragePackageActivity(client storage.Client) *CreateStoragePackageActivity
func (*CreateStoragePackageActivity) Execute ¶
func (a *CreateStoragePackageActivity) Execute( ctx context.Context, params *CreateStoragePackageActivityParams, ) (*CreateStoragePackageActivityResult, error)
type CreateStoragePackageActivityResult ¶
type CreateStoragePackageActivityResult struct {
CreatedAt string
}
type DeleteOriginalActivity ¶
type DeleteOriginalActivity struct {
// contains filtered or unexported fields
}
func NewDeleteOriginalActivity ¶
func NewDeleteOriginalActivity(wsvc watcher.Service) *DeleteOriginalActivity
func (*DeleteOriginalActivity) Execute ¶
func (a *DeleteOriginalActivity) Execute( ctx context.Context, watcherName, key string, ) (*DeleteOriginalActivityResult, error)
type DeleteOriginalActivityResult ¶
type DeleteOriginalActivityResult struct{}
type DisposeOriginalActivity ¶
type DisposeOriginalActivity struct {
// contains filtered or unexported fields
}
func NewDisposeOriginalActivity ¶
func NewDisposeOriginalActivity(wsvc watcher.Service) *DisposeOriginalActivity
func (*DisposeOriginalActivity) Execute ¶
func (a *DisposeOriginalActivity) Execute( ctx context.Context, watcherName, completedDir, key string, ) (*DisposeOriginalActivityResult, error)
type DisposeOriginalActivityResult ¶
type DisposeOriginalActivityResult struct{}
type DownloadActivity ¶
type DownloadActivity struct {
// contains filtered or unexported fields
}
DownloadActivity downloads the blob into the processing directory.
func NewDownloadActivity ¶
func NewDownloadActivity(tracer trace.Tracer, wsvc watcher.Service) *DownloadActivity
func (*DownloadActivity) Execute ¶
func (a *DownloadActivity) Execute( ctx context.Context, params *DownloadActivityParams, ) (*DownloadActivityResult, error)
type DownloadActivityParams ¶
type DownloadActivityResult ¶
type DownloadActivityResult struct {
Path string
}
type MoveToPermanentStorageActivity ¶
type MoveToPermanentStorageActivity struct {
// contains filtered or unexported fields
}
func NewMoveToPermanentStorageActivity ¶
func NewMoveToPermanentStorageActivity(storageClient *goastorage.Client) *MoveToPermanentStorageActivity
func (*MoveToPermanentStorageActivity) Execute ¶
func (a *MoveToPermanentStorageActivity) Execute( ctx context.Context, params *MoveToPermanentStorageActivityParams, ) (*MoveToPermanentStorageActivityResult, error)
type MoveToPermanentStorageActivityResult ¶
type MoveToPermanentStorageActivityResult struct{}
type PollMoveToPermanentStorageActivity ¶
type PollMoveToPermanentStorageActivity struct {
// contains filtered or unexported fields
}
func NewPollMoveToPermanentStorageActivity ¶
func NewPollMoveToPermanentStorageActivity(storageClient *goastorage.Client) *PollMoveToPermanentStorageActivity
func (*PollMoveToPermanentStorageActivity) Execute ¶
func (a *PollMoveToPermanentStorageActivity) Execute( ctx context.Context, params *PollMoveToPermanentStorageActivityParams, ) (*PollMoveToPermanentStorageActivityResult, error)
type PollMoveToPermanentStorageActivityParams ¶
type PollMoveToPermanentStorageActivityParams struct {
AIPID string
}
type PollMoveToPermanentStorageActivityResult ¶
type PollMoveToPermanentStorageActivityResult struct{}
type RejectPackageActivity ¶
type RejectPackageActivity struct {
// contains filtered or unexported fields
}
func NewRejectPackageActivity ¶
func NewRejectPackageActivity(storageClient *goastorage.Client) *RejectPackageActivity
func (*RejectPackageActivity) Execute ¶
func (a *RejectPackageActivity) Execute( ctx context.Context, params *RejectPackageActivityParams, ) (*RejectPackageActivityResult, error)
type RejectPackageActivityParams ¶
type RejectPackageActivityParams struct {
AIPID string
}
type RejectPackageActivityResult ¶
type RejectPackageActivityResult struct{}
type UploadActivity ¶
type UploadActivity struct {
// contains filtered or unexported fields
}
func NewUploadActivity ¶
func NewUploadActivity(storageClient *goastorage.Client) *UploadActivity
func (*UploadActivity) Execute ¶
func (a *UploadActivity) Execute(ctx context.Context, params *UploadActivityParams) (*UploadActivityResult, error)
type UploadActivityParams ¶
type UploadActivityResult ¶
type UploadActivityResult struct{}
Click to show internal directories.
Click to hide internal directories.