r2

package
v0.0.0-...-485e05f Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type R2

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

R2 is a struct describing r2 cloudflare storage bucket.

func NewR2

func NewR2(
	accountID string,
	accessKeyID string,
	accessKeySecret string,
	bucket string,
) (*R2, error)

NewR2 creates new R2 struct.

func (*R2) Upload

func (r2 *R2) Upload(ctx context.Context, key string, body []byte) error

Upload uploads given body to given key.

Jump to

Keyboard shortcuts

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