s3walker

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Walker

type S3Walker struct {
	// S3 is the S3 client to be used.
	S3 s3iface.S3API
	// Bucket and Prefix name the location of the scan.
	Bucket, Prefix string

	// Admission policy for S3 operations (can be nil).
	Policy admit.Policy

	// Retrier policy for S3 operations.
	Retrier retry.Policy
	// contains filtered or unexported fields
}

S3Walker traverses s3 keys through a prefix scan.

func (*S3Walker) Err

func (w *S3Walker) Err() error

Err returns an error, if any.

func (*S3Walker) Metadata

func (w *S3Walker) Metadata() map[string]*string

Metadata returns the metadata of the last object that was scanned.

func (*S3Walker) Object

func (w *S3Walker) Object() *s3.Object

Object returns the last object that was scanned.

func (*S3Walker) Scan

func (w *S3Walker) Scan(ctx context.Context) bool

Scan scans the next key; it returns false when no more keys can be scanned, or if there was an error.

func (*S3Walker) WithMetadata

func (w *S3Walker) WithMetadata() *S3Walker

WithMetadata returns a new S3Walker configured to make a best-effort attempt to fetch each object's metadata.

Jump to

Keyboard shortcuts

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