storage

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UploadDownloader

type UploadDownloader interface {
	// Upload uploads a file to an object storage.
	Upload(ctx context.Context, bucket, key string, file io.Reader) error
	// Download downloads a file from a remote object storage location.
	Download(ctx context.Context, bucket, key string, file io.Writer) error
	// MakeBucket creates a new bucket.
	MakeBucket(ctx context.Context, bucket, location string) error
	// Exists checks whether an object exists.
	Exists(ctx context.Context, bucket, key string) (bool, error)
	// GeneratePresignedURL generates a pre-signed URL for downloading samples.
	GeneratePresignedURL(ctx context.Context, bucket, key string) (string, error)
}

UploadDownloader abstract uploading and download files from different object storage solutions.

func New

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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