Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectInfo ¶ added in v0.18.0
ObjectInfo describes one stored object. Modified is zero when storage did not report it: treat that as unknown, never as old. Size is 0 when storage did not report it, so it is not proof of an empty object.
type S3ServiceInterface ¶
type S3ServiceInterface interface {
// ListObjects calls page with each page of the objects under prefix, which
// must be non-empty and end with "/"; it stops at the first error page returns.
ListObjects(ctx context.Context, prefix string, page func([]ObjectInfo) error) error
GenerateUploadPayload(ctx context.Context, data []byte, s3Path, filename string, metadata map[string]string) (*s3.PutObjectInput, error)
BulkUploadFiles(ctx context.Context, payloads []*s3.PutObjectInput) ([]string, error)
// BulkDeleteFiles returns how many deletes failed.
BulkDeleteFiles(ctx context.Context, uploadedKeys []string) int
// DeleteKeys deletes every key (missing keys count as deleted); an error means some are left.
DeleteKeys(ctx context.Context, keys []string) error
// DeletePrefix deletes every object under prefix, which must end with "/".
DeletePrefix(ctx context.Context, prefix string) error
// GeneratePresignedURL generates a short-lived GET URL for a given S3 key.
// s3Key is the full object key (path + filename already joined).
GeneratePresignedURL(ctx context.Context, s3Key string, expiry time.Duration) (string, error)
}
S3ServiceInterface defines the interface for S3 operations
Click to show internal directories.
Click to hide internal directories.