s3util

package
v0.0.0-...-5fe3b72 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListBucket

func ListBucket(client *http.Client, url string, callback ListBucketCallback) error

func NewSigningRoundTripper

func NewSigningRoundTripper(transport http.RoundTripper, creds *credentials.Credentials, region string) http.RoundTripper

NewSigningRoundTripper augments an http.RoundTripper to sign HTTP requests for a given set of credentials and region.

Types

type DirEntry

type DirEntry struct {
	Prefix string
}

type ListBucketCallback

type ListBucketCallback func(page *ListBucketPage) error

type ListBucketPage

type ListBucketPage struct {
	XMLName             xml.Name `xml:"ListVersionsResult"`
	Name                string
	Prefix              string
	KeyCount            int
	MaxKeys             int
	Version             []ObjectVersion
	CommonPrefixes      []DirEntry
	NextKeyMarker       *string
	NextVersionIdMarker *string
	IsTruncated         bool
}

type ObjectVersion

type ObjectVersion struct {
	Key          string
	LastModified string
	ETag         string
	Size         int64
	StorageClass string
	VersionId    string
	IsLatest     bool
}

func (*ObjectVersion) Modified

func (ov *ObjectVersion) Modified() (time.Time, error)

type S3UploadInput

type S3UploadInput struct {
	Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
	Key    *string `location:"uri" locationName:"Key" type:"string" required:"true"`
	Body   io.Reader
}

type S3UploadOutput

type S3UploadOutput struct {
	Location  string
	VersionID *string
	UploadID  string
	ETag      *string
}

type S3Uploader

type S3Uploader struct {
	PartSize        int64
	Concurrency     int
	MaxUploadParts  int
	ProgressCounter *int64
	S3              s3iface.S3API
}

func NewS3Uploader

func NewS3Uploader(svc s3iface.S3API, options ...func(*S3Uploader)) *S3Uploader

func (S3Uploader) Upload

func (u S3Uploader) Upload(input *S3UploadInput, options ...func(*S3Uploader)) (*S3UploadOutput, error)

func (S3Uploader) UploadWithContext

func (u S3Uploader) UploadWithContext(ctx aws.Context, input *S3UploadInput, opts ...func(*S3Uploader)) (*S3UploadOutput, error)

Jump to

Keyboard shortcuts

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