s3

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3Client

func NewS3Client(
	ctx context.Context,
	cfg *config.S3Config,
) (*s3.Client, error)

Types

type FolderRepositoryRepository

type FolderRepositoryRepository struct {
	// contains filtered or unexported fields
}

func NewFolderRepositoryRepository

func NewFolderRepositoryRepository(client *s3.Client, bucket string) *FolderRepositoryRepository

func (FolderRepositoryRepository) CreateConfig

func (f FolderRepositoryRepository) CreateConfig(ctx context.Context, repositoryPath string, c *repository.Config) error

func (FolderRepositoryRepository) CreateFolder

func (f FolderRepositoryRepository) CreateFolder(ctx context.Context, _ string) error

func (FolderRepositoryRepository) Exists

func (f FolderRepositoryRepository) Exists(ctx context.Context, repositoryPath string) (bool, error)

func (FolderRepositoryRepository) GetConfig

func (f FolderRepositoryRepository) GetConfig(ctx context.Context, repositoryPath string) (*repository.Config, error)

type ManifestRepository

type ManifestRepository struct {
	// contains filtered or unexported fields
}

func NewManifestRepository

func NewManifestRepository(client *s3.Client, bucket, repositoryPath string) *ManifestRepository

func (ManifestRepository) Get

func (r ManifestRepository) Get(ctx context.Context, snapshotID string) (*snapshot.Manifest, error)

func (ManifestRepository) List

func (ManifestRepository) Save

type ObjectRepository

type ObjectRepository struct {
	// contains filtered or unexported fields
}

func NewObjectRepository

func NewObjectRepository(client *s3.Client, bucket, repositoryPath string) *ObjectRepository

func (ObjectRepository) AbortRekey added in v1.10.0

func (o ObjectRepository) AbortRekey(ctx context.Context, generation uint64) error

func (ObjectRepository) AlreadyExists

func (o ObjectRepository) AlreadyExists(ctx context.Context, hash string, symmetricKey []byte, generation uint64) (bool, error)

func (ObjectRepository) DeleteEncryptedGeneration added in v1.10.0

func (o ObjectRepository) DeleteEncryptedGeneration(ctx context.Context, generation uint64) error

func (ObjectRepository) ListEncryptedObjects added in v1.10.0

func (o ObjectRepository) ListEncryptedObjects(ctx context.Context, generation uint64) ([]string, error)

func (ObjectRepository) ReadEncryptedObject added in v1.10.0

func (o ObjectRepository) ReadEncryptedObject(ctx context.Context, hash string, generation uint64, key []byte) (io.ReadCloser, error)

func (ObjectRepository) ReadObject

func (o ObjectRepository) ReadObject(ctx context.Context, hash string, symmetricKey []byte, generation uint64) (io.ReadCloser, error)

func (ObjectRepository) RestoreObject

func (o ObjectRepository) RestoreObject(ctx context.Context, comp *repository.Compression, obj *snapshot.File, symmetricKey []byte, generation uint64) error

func (ObjectRepository) Save

func (o ObjectRepository) Save(ctx context.Context, filePath, hash string, comp *repository.Compression, symmetricKey []byte, generation uint64) error

func (ObjectRepository) SaveChunk added in v1.9.0

func (o ObjectRepository) SaveChunk(ctx context.Context, filePath, hash string, offset, size int64, comp *repository.Compression, key []byte, generation uint64) error

func (ObjectRepository) SaveRekeyedObject added in v1.10.0

func (o ObjectRepository) SaveRekeyedObject(ctx context.Context, hash string, source io.Reader, generation uint64, key []byte) error

type Storage

type Storage struct {
	Bucket, Prefix string
}

func ParseS3URL

func ParseS3URL(rawURL string) (storage *Storage, err error)

Jump to

Keyboard shortcuts

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