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
}
Click to show internal directories.
Click to hide internal directories.