s3

package
v0.0.0-...-b702281 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(bucket, key string, timeout time.Duration, w io.WriterAt, client S3ManagerClient) error

DownloadFile downloads a file from s3 and writes it with the writer.

func GetObject

func GetObject(bucket string, key string, client S3Client) (string, error)

func ParseS3ARN

func ParseS3ARN(s3ARN string) (bucket string, key string, err error)

ParseS3ARN parses an s3 ARN.

Types

type S3Client

type S3Client interface {
	GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
}

S3Client interface wraps the generic S3 APIs. Any method that belongs to aws-sdk-go/service/s3 goes here.

type S3ManagerClient

type S3ManagerClient interface {
	DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*s3manager.Downloader)) (n int64, err error)
}

S3ManagerClient interface wraps the S3Manager APIs. Any method that belongs aws-sdk-go/service/s3manager goes here.

Directories

Path Synopsis
mocks
Package mock_factory is a generated GoMock package.
Package mock_factory is a generated GoMock package.
Package mock_s3 is a generated GoMock package.
Package mock_s3 is a generated GoMock package.
s3manager
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