s3

package
v0.12.103 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(credProvider provider.CredProvider, region string) (s3Internal, error)

Types

type Provider

type Provider interface {
	PutObject(string, string, []byte) error
	ListObjects(string, string) ([]string, error)
	GetObject(string, string) ([]byte, error)
	DeleteObject(string, string) error
	PutObjectFromFile(bucket, key, path string) error
	GetObjectToFile(bucket, key, path string, filemode os.FileMode) error
}

func NewS3

func NewS3(credProvider provider.CredProvider, region string) (Provider, error)

type S3

type S3 struct {
	Connect func() (s3Internal, error)
	// contains filtered or unexported fields
}

func (*S3) DeleteObject

func (this *S3) DeleteObject(bucket, key string) error

func (*S3) GetObject

func (this *S3) GetObject(bucket, key string) ([]byte, error)

func (*S3) GetObjectToFile

func (this *S3) GetObjectToFile(bucket, key, path string, fileMode os.FileMode) error

func (*S3) ListObjects

func (this *S3) ListObjects(bucket, prefix string) ([]string, error)

func (*S3) PutObject

func (this *S3) PutObject(bucket, key string, body []byte) error

func (*S3) PutObjectFromFile

func (this *S3) PutObjectFromFile(bucket, key, path string) error

Directories

Path Synopsis
Package mock_s3 is a generated GoMock package.
Package mock_s3 is a generated GoMock package.

Jump to

Keyboard shortcuts

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