* feat(backend): added zstd compression support to storage service * feat(backend): try to ignore content-encoding for zstd compression
23 lines
426 B
Go
23 lines
426 B
Go
package objectstorage
|
|
|
|
import (
|
|
"io"
|
|
"time"
|
|
)
|
|
|
|
type CompressionType int
|
|
|
|
const (
|
|
NoCompression CompressionType = iota
|
|
Gzip
|
|
Brotli
|
|
Zstd
|
|
)
|
|
|
|
type ObjectStorage interface {
|
|
Upload(reader io.Reader, key string, contentType string, compression CompressionType) error
|
|
Get(key string) (io.ReadCloser, error)
|
|
Exists(key string) bool
|
|
GetCreationTime(key string) *time.Time
|
|
GetPreSignedUploadUrl(key string) (string, error)
|
|
}
|