storage

package module
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 1 Imported by: 0

README

gas/storage

Test Go Reference Go Version License

Part of the Gas monorepo · Documentation · All modules

Object storage for the Gas framework, on AWS S3 and S3-compatible services such as MinIO, LocalStack, and DigitalOcean Spaces.

Implements gas.StorageProvider.

go get github.com/gasmod/gas/storage
gas.WithSingletonService[gas.StorageProvider](s3.New()),

s3.New() needs gas.ConfigProvider and gas.Logger.

Package Provides
storage/s3 AWS S3 and any S3-compatible object store
storage/storagetest Recording mock of gas.StorageProvider

Documentation

The full guide, with configuration, testing, and worked examples, is on the docs site. This README is deliberately a signpost: keeping a second copy here is how the docs drifted before.

License

MIT

Documentation

Overview

Package storage provides object storage for the Gas ecosystem with AWS S3 (and S3-compatible MinIO/LocalStack) backends. Concrete implementations live in the s3 sub-package.

See the module README for usage examples and design rationale.

SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotFound is returned by Download or Head when the
	// requested key does not exist.
	ErrKeyNotFound = errors.New("storage: key not found")

	// ErrClosed is returned when an operation is attempted on a closed
	// storage service.
	ErrClosed = errors.New("storage: service is closed")

	// ErrBucketRequired is returned when an operation is invoked without a
	// bucket configured on the service and without gas.InBucket() supplied
	// in the call options.
	ErrBucketRequired = errors.New("storage: bucket required (set Storage.Bucket or pass gas.InBucket())")
)

Sentinel errors returned by StorageProvider implementations.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package storagetest provides a mock implementation of gas.StorageProvider for use in tests.
Package storagetest provides a mock implementation of gas.StorageProvider for use in tests.

Jump to

Keyboard shortcuts

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