Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRangeNotSatisfiable = s3.ErrRangeNotSatisfiable
ErrRangeNotSatisfiable reports a ranged read whose byte range falls outside the object, so HTTP handlers can answer 416 instead of 500.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
UploadObject(ctx context.Context, key string, fileType string, content io.Reader) (string, error)
GetObject(ctx context.Context, key string) ([]byte, error)
// GetObjectStream streams an object; a non-empty byteRange is forwarded as
// an HTTP Range header and yields a partial object. byteRange must request at
// most one range because S3 does not support multipart range responses.
GetObjectStream(ctx context.Context, key string, byteRange string) (*ObjectStream, error)
DeleteObject(ctx context.Context, key string) error
}
Driver provides object operations for a configured attachment storage.
type ObjectStream ¶
type ObjectStream = s3.ObjectStream
ObjectStream is object content with the metadata needed to answer HTTP range requests. Aliased so driver consumers never import a concrete backend.
type RangeNotSatisfiableError ¶
type RangeNotSatisfiableError = s3.RangeNotSatisfiableError
RangeNotSatisfiableError carries response metadata for an unsatisfied range.
Click to show internal directories.
Click to hide internal directories.