r2

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBucketNotFound = Err(errPrefix + "bucket not found")

Functions

This section is empty.

Types

type Bucket

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

func NewEdge

func NewEdge(binding string) (*Bucket, error)

NewEdge obtains the bucket from the binding declared in wrangler (e.g. "FILES").

func (*Bucket) Delete

func (b *Bucket) Delete(key string) error

func (*Bucket) Get

func (b *Bucket) Get(key string) ([]byte, string, error)

func (*Bucket) List

func (b *Bucket) List(prefix string) ([]ObjectInfo, error)

func (*Bucket) Put

func (b *Bucket) Put(key string, data []byte, contentType string) error

type ObjectInfo

type ObjectInfo struct {
	Key         string
	Size        int64
	ContentType string
}

Jump to

Keyboard shortcuts

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