Files
mtusi2026lab4/internal/attachment/blob.go
T

26 lines
531 B
Go

package attachment
import (
"context"
"errors"
"io"
"time"
)
var ErrObjectMissing = errors.New("object missing")
type Object struct {
Key string
Size int64
Modified time.Time
}
type Blobs interface {
Put(context.Context, string, io.Reader, int64, string) error
Open(context.Context, string) (io.ReadCloser, error)
Stat(context.Context, string) (Object, error)
Copy(context.Context, string, string) error
Delete(context.Context, string) error
List(context.Context, string, string, int) ([]Object, error)
}