storage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotSetupStorage = errors.New("Cannot setup storage")
)

Functions

func NewR2Storage

func NewR2Storage(id string) *r2Storage

func NewS3Storage

func NewS3Storage(id string) *s3Storage

Types

type Storage

type Storage interface {
	UploadFile(ctx context.Context, data []byte, key string, contentType string) (url string, storageName string, err error)
	GetPresignedURL(ctx context.Context, key string, expiration time.Duration) (string, error)
	GetPresignedURLs(ctx context.Context, keys []string, expiration time.Duration) (map[string]string, error)
	DeleteFiles(ctx context.Context, keys []string) error
}

Jump to

Keyboard shortcuts

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