bs3test

package
v0.20260804.0 Latest Latest
Warning

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

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

Documentation

Overview

Package bs3test provides an in-memory fake of the S3 client subset provided by the bs3 package, for use in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeS3

type FakeS3 struct {
	Objects map[string]StoredObject
	// contains filtered or unexported fields
}

FakeS3 implements the PutObject/GetObject/Bucket subset of the S3 API used by the tiles package with an in-memory map.

Calling PutObject twice for the same key result in an error.

func New

func New() *FakeS3

func (*FakeS3) Bucket

func (f *FakeS3) Bucket() string

func (*FakeS3) GetObject

func (f *FakeS3) GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)

func (*FakeS3) PutObject

func (f *FakeS3) PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)

type StoredObject

type StoredObject struct {
	Data            []byte
	ContentEncoding *string
}

StoredObject is an object held by a FakeS3.

Jump to

Keyboard shortcuts

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