s3fake

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package s3fake exposes a local fake S3 service for local clusters.

Package s3fake exposes a lightweight, on-disk fake S3 server suitable for embedding in the local Podplane background server.

It wraps github.com/johannesboyne/gofakes3 with the s3afero MultiBucket backend so tests / dev clusters can read and write a normal filesystem directory as if it were S3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketHandler

func BucketHandler(bucketName, storageDir string) (http.Handler, error)

BucketHandler returns an S3-compatible single-bucket API backed by storageDir.

func Handler

func Handler(storageDir string) (http.Handler, error)

Handler returns an S3-compatible multi-bucket API backed by the supplied storage directory. Buckets are created on first use.

storageDir must exist (or be creatable). If it does not exist it is created with mode 0700.

func WriteObject

func WriteObject(storageDir, bucketName, objectName string, data []byte) error

WriteObject writes one object directly to the fake S3 on-disk storage using the same gofakes3 backend as Handler. It is useful for seeding local buckets before the HTTP server is running while still preserving backend metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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