Documentation ¶
Index ¶
- type PreSignedResultSpec
- type SourceSpec
- type StorageProvider
- func (s *StorageProvider) CleanupStorage(_ context.Context, _ models.InputSource, volume storage.StorageVolume) error
- func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
- func (s *StorageProvider) HasStorageLocally(_ context.Context, _ models.InputSource) (bool, error)
- func (s *StorageProvider) IsInstalled(_ context.Context) (bool, error)
- func (s *StorageProvider) PrepareStorage(ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
- func (s *StorageProvider) Upload(_ context.Context, _ string) (models.SpecConfig, error)
- type StorageProviderParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PreSignedResultSpec ¶ added in v1.4.0
type PreSignedResultSpec struct { SourceSpec PreSignedURL string }
func DecodePreSignedResultSpec ¶ added in v1.4.0
func DecodePreSignedResultSpec(spec *models.SpecConfig) (PreSignedResultSpec, error)
func (PreSignedResultSpec) ToMap ¶ added in v1.4.0
func (c PreSignedResultSpec) ToMap() map[string]interface{}
func (PreSignedResultSpec) Validate ¶ added in v1.4.0
func (c PreSignedResultSpec) Validate() error
type SourceSpec ¶ added in v1.4.0
type SourceSpec struct { Bucket string Key string Filter string Region string Endpoint string VersionID string ChecksumSHA256 string }
func DecodeSourceSpec ¶ added in v1.4.0
func DecodeSourceSpec(spec *models.SpecConfig) (SourceSpec, error)
func (SourceSpec) ToMap ¶ added in v1.4.0
func (c SourceSpec) ToMap() map[string]interface{}
func (SourceSpec) Validate ¶ added in v1.4.0
func (c SourceSpec) Validate() error
type StorageProvider ¶
type StorageProvider struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(getVolumeTimeout time.Duration, provider *s3helper.ClientProvider) *StorageProvider
func (*StorageProvider) CleanupStorage ¶
func (s *StorageProvider) CleanupStorage(_ context.Context, _ models.InputSource, volume storage.StorageVolume) error
func (*StorageProvider) GetVolumeSize ¶
func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
func (*StorageProvider) HasStorageLocally ¶
func (s *StorageProvider) HasStorageLocally(_ context.Context, _ models.InputSource) (bool, error)
HasStorageLocally checks if the requested content is hosted locally.
func (*StorageProvider) IsInstalled ¶
func (s *StorageProvider) IsInstalled(_ context.Context) (bool, error)
IsInstalled checks if the storage provider is installed We assume that the storage provider is installed if the host has AWS credentials configured, which includes: - Configuring the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables - Configuring credentials in ~/.aws/credentials - Configuring credentials in the EC2 instance metadata service, assuming the host is running on EC2
func (*StorageProvider) PrepareStorage ¶
func (s *StorageProvider) PrepareStorage( ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
func (*StorageProvider) Upload ¶
func (s *StorageProvider) Upload(_ context.Context, _ string) (models.SpecConfig, error)
type StorageProviderParams ¶
type StorageProviderParams struct {
ClientProvider *s3helper.ClientProvider
}
Click to show internal directories.
Click to hide internal directories.