s3

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New(cfg *storage.S3Config) (*Storage, error)

func (*Storage) ComposeObject

func (s *Storage) ComposeObject(ctx context.Context, bucketName string, dest string, srcs ...string) error

func (*Storage) CopyObject

func (s *Storage) CopyObject(ctx context.Context, dstBucket, dstPath, srcBucket, srcPath string) error

func (*Storage) CreateBucket

func (s *Storage) CreateBucket(ctx context.Context, name, region string) (string, error)

func (*Storage) DeleteBucket

func (s *Storage) DeleteBucket(ctx context.Context, name string) error

func (*Storage) DeleteObject

func (s *Storage) DeleteObject(ctx context.Context, bucket, path string) error

func (*Storage) DownloadObject

func (s *Storage) DownloadObject(ctx context.Context, bucket, path string) (io.ReadSeekCloser, error)

func (*Storage) GetBucket

func (s *Storage) GetBucket(ctx context.Context, name string) (*storage.Bucket, error)

func (*Storage) GetObject

func (s *Storage) GetObject(ctx context.Context, bucketName, path string) (*storage.Object, error)

func (*Storage) ListBuckets

func (s *Storage) ListBuckets(ctx context.Context) (iterator.Iterator[*storage.Bucket], error)

func (*Storage) ListObjects

func (s *Storage) ListObjects(ctx context.Context, bucketName, token, prefix,
	startpath, endpath string, recursive bool, limit uint32,
) (string, iterator.Iterator[*storage.ListObjectsResponse_Result], error)

func (*Storage) Test

func (s *Storage) Test(ctx context.Context) error

Test checks if the s3 client is able to connect.

func (*Storage) UploadObject

func (s *Storage) UploadObject(ctx context.Context, reader io.Reader, size int64, bucket, path, contentType string) (string, uint64, error)

Jump to

Keyboard shortcuts

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