package objectstore

import (
	"context"
	"io"
	"time"
)

type PutOptions struct {
	ContentType     string
	ContentEncoding string
	Metadata        map[string]string
}

type ObjectInfo struct {
	Key          string
	ETag         string
	Size         int64
	LastModified *time.Time
	Metadata     map[string]string
}

type Store interface {
	Put(ctx context.Context, key string, body io.Reader, opts PutOptions) (ObjectInfo, error)
	Get(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error)
	Head(ctx context.Context, key string) (ObjectInfo, bool, error)
	List(ctx context.Context, prefix string) ([]ObjectInfo, error)
}
