26 lines
492 B
Go
Raw Permalink Normal View History

2025-01-06 23:38:49 -08:00
package s3
import (
"context"
"io"
)
type meta struct {
ContentType string `json:"content_type"`
Size int64 `json:"size"`
ExpireAt int64 `json:"expire_at"`
}
type Object struct {
ContentType string
Body io.ReadCloser
Size int64
ExpireAt int64
}
type S3 interface {
Get(ctx context.Context, bucket, key string) (*Object, error)
Put(ctx context.Context, bucket, key string, obj *Object) error
Delete(ctx context.Context, bucket, key string) error
}