Files
mtusi2026lab5/backend/internal/domain/storage.go
T

22 lines
488 B
Go

package domain
import (
"context"
"io"
"time"
)
type ObjectInfo struct {
Key string
LastModified time.Time
Size int64
}
type ObjectStorage interface {
Ping(ctx context.Context) error
Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
Get(ctx context.Context, key string) (io.ReadCloser, int64, string, error)
Delete(ctx context.Context, key string) error
List(ctx context.Context, prefix string) ([]ObjectInfo, error)
}