Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteFromLocationLocalActivity(ctx context.Context, storagesvc Service, ...) error
- func Download(svc Service, mux goahttp.Muxer, dec func(r *http.Request) goahttp.Decoder) http.HandlerFunc
- func InitStorageMoveWorkflow(ctx context.Context, tc temporalsdk_client.Client, ...) (temporalsdk_client.WorkflowRun, error)
- func InitStorageUploadWorkflow(ctx context.Context, tc temporalsdk_client.Client, ...) (temporalsdk_client.WorkflowRun, error)
- func NewService(logger logr.Logger, config Config, storagePersistence persistence.Storage, ...) (s *serviceImpl, err error)
- func UpdatePackageLocationLocalActivity(ctx context.Context, storagesvc Service, ...) error
- func UpdatePackageStatusLocalActivity(ctx context.Context, storagesvc Service, ...) error
- type Client
- type Config
- type CopyToPermanentLocationActivityParams
- type Database
- type DeleteFromLocationLocalActivityParams
- type Location
- type LocationConfig
- type Service
- type StorageMoveWorkflowRequest
- type StorageUploadWorkflowRequest
- type UpdatePackageLocationLocalActivityParams
- type UpdatePackageStatusLocalActivityParams
- type UploadDoneSignal
Constants ¶
View Source
const ( CopyToPermanentLocationActivityName = "copy-to-permanent-location-activity" DeleteFromLocationActivityName = "delete-from-location-activity" StorageUploadWorkflowName = "storage-upload-workflow" StorageMoveWorkflowName = "storage-move-workflow" UploadDoneSignalName = "upload-done-signal" )
Variables ¶
View Source
var ( ErrForbidden error = goastorage.Forbidden("Forbidden") )
View Source
var SubmitURLExpirationTime = 15 * time.Minute
Functions ¶
func DeleteFromLocationLocalActivity ¶
func DeleteFromLocationLocalActivity( ctx context.Context, storagesvc Service, params *DeleteFromLocationLocalActivityParams, ) error
func Download ¶
func Download(svc Service, mux goahttp.Muxer, dec func(r *http.Request) goahttp.Decoder) http.HandlerFunc
Download returns an HTTP handler that sets the headers for the AIP when it is downloaded. The headers are the Content Type, Content Length, and the Content Disposition. If there is an error with the file download, it will return http-status not found (404).
func InitStorageMoveWorkflow ¶
func InitStorageMoveWorkflow( ctx context.Context, tc temporalsdk_client.Client, req *StorageMoveWorkflowRequest, ) (temporalsdk_client.WorkflowRun, error)
func InitStorageUploadWorkflow ¶
func InitStorageUploadWorkflow( ctx context.Context, tc temporalsdk_client.Client, req *StorageUploadWorkflowRequest, ) (temporalsdk_client.WorkflowRun, error)
func NewService ¶
func NewService( logger logr.Logger, config Config, storagePersistence persistence.Storage, tc temporalsdk_client.Client, tokenVerifier auth.TokenVerifier, rander io.Reader, ) (s *serviceImpl, err error)
func UpdatePackageLocationLocalActivity ¶
func UpdatePackageLocationLocalActivity( ctx context.Context, storagesvc Service, params *UpdatePackageLocationLocalActivityParams, ) error
func UpdatePackageStatusLocalActivity ¶
func UpdatePackageStatusLocalActivity( ctx context.Context, storagesvc Service, params *UpdatePackageStatusLocalActivityParams, ) error
Types ¶
type Client ¶
type Client interface { Submit(context.Context, *goastorage.SubmitPayload) (*goastorage.SubmitResult, error) Create(context.Context, *goastorage.CreatePayload) (*goastorage.Package, error) Update(context.Context, *goastorage.UpdatePayload) error Download(context.Context, *goastorage.DownloadPayload) ([]byte, error) Locations(context.Context, *goastorage.LocationsPayload) (goastorage.LocationCollection, error) AddLocation(context.Context, *goastorage.AddLocationPayload) (*goastorage.AddLocationResult, error) Move(context.Context, *goastorage.MovePayload) error MoveStatus(context.Context, *goastorage.MoveStatusPayload) (*goastorage.MoveStatusResult, error) Reject(context.Context, *goastorage.RejectPayload) error Show(context.Context, *goastorage.ShowPayload) (*goastorage.Package, error) ShowLocation(context.Context, *goastorage.ShowLocationPayload) (*goastorage.Location, error) LocationPackages(context.Context, *goastorage.LocationPackagesPayload) (goastorage.PackageCollection, error) }
type Database ¶
type Database struct { // Driver specifies the database driver (e.g. "mysql" or "sqlite3"). Driver string // DSN (Data Source Name) specifies the database connection information. DSN string // Migrate specifies whether to run migrations (true) to upgrade the // database schema or not (false). Migrate bool }
type Location ¶
func NewInternalLocation ¶
func NewInternalLocation(config *LocationConfig) (Location, error)
func NewLocation ¶
func NewLocation(location *goastorage.Location) (Location, error)
type LocationConfig ¶
type LocationConfig struct { // URL specifies the location's driver and address by URL (e.g. // "s3://my-bucket?region=us-west-1", "file:///tmp/my-bucket"). URL string // S3 compatible location configuration. If URL has a value then these // fields are ignored. Name string Region string Endpoint string PathStyle bool Profile string Key string Secret string Token string Bucket string }
type Service ¶
type Service interface { goastorage.Service // Used from workflow activities. Location(ctx context.Context, locationID uuid.UUID) (Location, error) ReadPackage(ctx context.Context, aipID uuid.UUID) (*goastorage.Package, error) UpdatePackageStatus(ctx context.Context, aipID uuid.UUID, status types.PackageStatus) error UpdatePackageLocationID(ctx context.Context, aipID, locationID uuid.UUID) error Delete(ctx context.Context, aipID uuid.UUID) (err error) // Both. PackageReader(ctx context.Context, pkg *goastorage.Package) (*blob.Reader, error) }
Service provides an interface for persisting storage data.
type UpdatePackageStatusLocalActivityParams ¶
type UpdatePackageStatusLocalActivityParams struct { AIPID uuid.UUID Status types.PackageStatus }
type UploadDoneSignal ¶
type UploadDoneSignal struct{}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package fake is a generated GoMock package.
|
Package fake is a generated GoMock package. |
fake
Package fake is a generated GoMock package.
|
Package fake is a generated GoMock package. |
Package ssblob provides a blob implementation for the Archivematica Storage Service.
|
Package ssblob provides a blob implementation for the Archivematica Storage Service. |
Click to show internal directories.
Click to hide internal directories.