s3

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

README

s3 extension

This module provides a TreeView constructor for AWS S3 buckets.

Example

	// Create the tree with default options
	tree, err := s3.NewTreeFromS3(context.Background(),  "s3://my-bucket-name",  "default")
	if err != nil {
		log.Fatal(err)
	}
	// Render the tree to a string & print it
	output, _ := tree.Render(context.Background())
	fmt.Println(output)

Contributing

The tests for this module require localstack.

Documentation

Overview

Package s3 provides a treeview.Tree constructor dedicated to AWS S3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTreeFromS3

func NewTreeFromS3(ctx context.Context, path string, profile string,
	opts ...treeview.Option[treeview.FileInfo]) (*treeview.Tree[treeview.FileInfo], error)

NewTreeFromS3 creates a new tree structure based on files fetched from an S3 path, using configurable options. Returns a pointer to a Tree structure or an error if an issue occurs during tree creation.

Supported options: Build options:

  • treeview.WithFilterFunc: Filters items during tree building
  • treeview.WithMaxDepth: Limits tree depth during construction
  • treeview.WithExpandFunc: Sets initial expansion state for nodes
  • treeview.WithTraversalCap: Limits total nodes processed (returns a partial tree + error if exceeded)
  • treeview.WithProgressCallback: Invoked after each filesystem entry is processed (breadth-first per directory)

Types

This section is empty.

Directories

Path Synopsis
internal
config
Package config prepares the AWS configuration that will be used by the AWS services.
Package config prepares the AWS configuration that will be used by the AWS services.
localstack/exec
Package exec provides a set of system-related functions such a Run that runs an application.
Package exec provides a set of system-related functions such a Run that runs an application.
s3

Jump to

Keyboard shortcuts

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