walk

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: BSD-3-Clause Imports: 5 Imported by: 8

Documentation

Overview

package walk provides methods for iterating (walking) over files in a bucket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkBucket

func WalkBucket(ctx context.Context, bucket *blob.Bucket, cb WalkBucketCallback) error

WalkBucket will crawl 'bucket' and invoke 'cb' for each file (each `blob.ListObject`) it encounters.

func WalkBucketWithIter added in v0.6.1

func WalkBucketWithIter(ctx context.Context, bucket *blob.Bucket, prefix string) iter.Seq2[*blob.ListObject, error]

WalkBucketWithIter will iterate 'bucket' for files parented by 'prefix' and yield an `iter.Seq2[*blob.ListObject, error]` instance for each file it encounters.

func WalkBucketWithPrefix added in v0.6.1

func WalkBucketWithPrefix(ctx context.Context, bucket *blob.Bucket, prefix string, cb WalkBucketCallback) error

WalkBucketWithPrefix will crawl 'bucket' for files parented by 'prefix' and invoke 'cb' for each file (each `blob.ListObject`) it encounters.

Types

type WalkBucketCallback

type WalkBucketCallback func(context.Context, *blob.ListObject) error

WalkBucketCallback is a custom function for processing a `blob.ListObject` instance, used by the `WalkBucket` method.

Jump to

Keyboard shortcuts

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