s3

package
v0.0.0-...-aa1b628 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpDoer

type HttpDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

type Storage

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

func New

func New(client HttpDoer, bucketUrl string, region, awsAccessKeyId, awsSecretAccessKey string) (*Storage, error)

func (*Storage) DeleteBlobs

func (s *Storage) DeleteBlobs(ctx context.Context, projectId, documentId string, blobIds []string) error

func (*Storage) GetBlob

func (s *Storage) GetBlob(ctx context.Context, projectId, documentId, blobId string, dst io.Writer) (blob *storage.BlobIdSizeAndMeta, err error)

func (*Storage) HeadBlob

func (s *Storage) HeadBlob(ctx context.Context, projectId, documentId, blobId string) (blob *storage.BlobIdSizeAndMeta, err error)

func (*Storage) ListBlobs

func (s *Storage) ListBlobs(ctx context.Context, projectId, documentId string) (blobs []storage.BlobIdAndSize, err error)

func (*Storage) ListDocumentIds

func (s *Storage) ListDocumentIds(ctx context.Context, projectId string) (documentIds []string, err error)

func (*Storage) ListProjectIds

func (s *Storage) ListProjectIds(ctx context.Context) (projectIds []string, err error)

func (*Storage) PutBlob

func (s *Storage) PutBlob(ctx context.Context, projectId, documentId, blobId string, meta map[string]string, blob []byte) error

Jump to

Keyboard shortcuts

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