r2

package
v0.0.0-...-ca5b8fd Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StagingCORSOrigins = []string{
	"http://localhost:46305",
	"http://127.0.0.1:46305",
	"http://localhost:46306",
	"http://127.0.0.1:46306",
	"http://tauri.localhost",
}

Functions

func RemovalPNG

func RemovalPNG() []byte

Types

type Config

type Config struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	StagingBucket   string
	PublicBucket    string
}

type Store

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

func New

func New(ctx context.Context, configuration Config) (*Store, error)

func (*Store) DeleteStaging

func (s *Store) DeleteStaging(ctx context.Context, reservation domain.UploadReservation) error

func (*Store) InspectStaging

func (s *Store) InspectStaging(ctx context.Context, reservation domain.UploadReservation) (domain.UploadObject, error)

func (*Store) PresignPUT

func (s *Store) PresignPUT(ctx context.Context, reservation domain.UploadReservation) (domain.SignedPUT, error)

func (*Store) Promote

func (s *Store) Promote(ctx context.Context, upload domain.Upload, token string) (string, error)

func (*Store) ReplacePublic

func (s *Store) ReplacePublic(ctx context.Context, upload domain.Upload, body []byte) (string, error)

func (*Store) ValidateCORS

func (s *Store) ValidateCORS(ctx context.Context) error

Jump to

Keyboard shortcuts

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