s3

package
v1.4.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

type StorageProviderParams

type StorageProviderParams struct {
	ClientProvider *s3helper.ClientProvider
}

Jump to

Keyboard shortcuts

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