storage

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway interface {
	Test(ctx context.Context) error

	UploadObject(ctx context.Context, reader io.Reader, size int64, bucket, path, contentType string) (string, uint64, error)
	DownloadObject(ctx context.Context, bucket, path string) (io.ReadSeekCloser, error)

	GetObject(ctx context.Context, bucket, path string) (*storage.Object, error)
	CopyObject(ctx context.Context, dstBucket, dstPath, srcBucket, srcPath string) error
	DeleteObject(ctx context.Context, bucket, path string) error
	ListObjects(ctx context.Context, bucketName, token, prefix,
		startpath, endpath string, recursive bool, limit uint32) (string, iterator.Iterator[*storage.ListObjectsResponse_Result], error)
	ComposeObject(ctx context.Context, bucketName string, dest string, srcs ...string) error

	CreateBucket(ctx context.Context, name, region string) (string, error)
	GetBucket(ctx context.Context, name string) (*storage.Bucket, error)
	DeleteBucket(ctx context.Context, name string) error
	ListBuckets(ctx context.Context) (iterator.Iterator[*storage.Bucket], error)
}

Jump to

Keyboard shortcuts

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