22 lines
393 B
Go
Raw Normal View History

2022-05-09 14:52:18 +02:00
package s3
import (
"context"
"io"
2022-05-10 12:49:34 +02:00
"git.kapelle.org/niklas/s3share/internal/types"
2022-05-09 14:52:18 +02:00
)
type ObjectReader interface {
io.Reader
io.Seeker
io.ReaderAt
io.Closer
}
type S3 interface {
GetObject(ctx context.Context, key string) (ObjectReader, error)
2022-05-09 15:24:42 +02:00
KeyExists(ctx context.Context, key string) (bool, error)
2022-05-10 12:49:34 +02:00
GetObjectMetadata(ctx context.Context, key string) (*types.Metadata, error)
2022-05-09 14:52:18 +02:00
}