s3

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package s3 is the object-storage source: an S3 or S3-compatible bucket (MinIO, Ceph RGW) listed by poll and read on demand.

Credentials come from the standard AWS chain (environment, shared config, SSO, IRSA, instance profiles) via aws-sdk-go-v2; nothing secret lives in the andino-kb YAML. A custom endpoint plus path-style addressing covers MinIO and friends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts Options) (*Bucket, error)

New builds the source. The client construction is separated behind a small hook so tests can point it at a fake server.

func NewWithClient

func NewWithClient(opts Options, client *awss3.Client) *Bucket

NewWithClient wires a prebuilt client (tests, custom credential setups).

func (*Bucket) List

func (b *Bucket) List(ctx context.Context) ([]source.FileMeta, error)

func (*Bucket) Name

func (b *Bucket) Name() string

func (*Bucket) Read

func (b *Bucket) Read(ctx context.Context, relPath string) (io.ReadCloser, error)

func (*Bucket) Sync

func (b *Bucket) Sync(ctx context.Context) error

Sync is a no-op: every List reflects the bucket's current state.

func (*Bucket) URI

func (b *Bucket) URI(relPath string) string

type Options

type Options struct {
	Name      string
	Bucket    string
	Prefix    string   // key prefix inside the bucket; stripped from RelPath
	Region    string   // optional; the chain's default applies otherwise
	Endpoint  string   // optional custom endpoint (MinIO)
	PathStyle bool     // path-style addressing, required by most MinIO setups
	Paths     []string // doublestar globs over the stripped key; empty = all
	Exts      []string // extractor extension allowlist
}

Jump to

Keyboard shortcuts

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