Help us shape the future of Go! Take the 2026 Go Developer Survey

blob

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT-0 Imports: 12 Imported by: 0

Documentation

Overview

Package blob reads raw messages from S3-compatible object storage.

Index

Constants

This section is empty.

Variables

View Source
var ErrObjectNotFound = errors.New("blob: object not found")

ErrObjectNotFound reports a missing S3 object.

Functions

This section is empty.

Types

type Object

type Object struct {
	Key          string
	Size         int64
	LastModified time.Time
}

Object is one listed S3 object.

type S3

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

S3 reads objects from an S3-compatible bucket. It is safe for concurrent use.

func NewS3

func NewS3(ctx context.Context, cfg config.S3Config) (*S3, error)

NewS3 creates an S3 client from configuration. The endpoint may be empty for AWS S3; for R2, B2, or self-hosted storage it must include the scheme.

func (*S3) Delete

func (s *S3) Delete(ctx context.Context, key string) error

Delete removes one object. It is used only by the explicit gc command.

func (*S3) Get

func (s *S3) Get(ctx context.Context, key string) ([]byte, error)

Get downloads an object. key is the object key as stored in the message's s3_key column, without a bucket prefix.

func (*S3) List

func (s *S3) List(ctx context.Context, prefix string) ([]Object, error)

List returns every object under prefix.

func (*S3) Ping

func (s *S3) Ping(ctx context.Context) error

Ping verifies credentials and bucket access.

Jump to

Keyboard shortcuts

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