r2

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package r2 plans a bucket and the two settings that decide whether a browser can actually use it.

Both are invisible from the application's side. A bucket with public access off still accepts uploads and then serves nothing; a bucket with the wrong CORS rule fails the preflight, so the request never leaves the page and the error the app sees is indistinguishable from a bad credential.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plan

func Plan(ctx context.Context, api API, r config.R2) (plan.Plan, error)

Plan diffs the declared bucket against the live one.

Types

type API

type API interface {
	Do(ctx context.Context, method, path string, body, result any) error
}

API is the transport, narrowed so tests can supply their own.

Jump to

Keyboard shortcuts

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