s3

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package s3 implements the S3 REST+XML protocol as a server.Handler. Point the real aws-sdk-go-v2 S3 client at a Server registered with this handler and operations work against an in-memory storage driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves S3 REST requests against a storage.Bucket driver.

func New

func New(b driver.Bucket) *Handler

New returns an S3 handler backed by b.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches returns true for requests that look like S3 REST calls: no X-Amz-Target header (that's JSON-RPC services like DynamoDB), no Action= in the URL, and no form-encoded body (that's query-protocol services like EC2).

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP dispatches S3 REST requests based on method and path.

Jump to

Keyboard shortcuts

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