openreplay/backend/pkg/objectstorage/objectstorage.go
2025-01-27 15:37:04 +01:00

26 lines
526 B
Go

package objectstorage
import (
"io"
"time"
)
type CompressionType int
const (
NoCompression CompressionType = iota
Gzip
Brotli
Zstd
)
const NoContentEncoding = ""
type ObjectStorage interface {
Upload(reader io.Reader, key string, contentType, contentEncoding string, compression CompressionType) error
Get(key string) (io.ReadCloser, error)
Exists(key string) bool
GetCreationTime(key string) *time.Time
GetPreSignedUploadUrl(key string) (string, error)
GetPreSignedDownloadUrl(key string) (string, error)
}