Documentation
¶
Index ¶
- func IsComposeUnsupported(err error) bool
- func IsNoSuchKey(err error) bool
- type Client
- type Config
- type ErrS3Operation
- type MultiReader
- type Object
- type S3Client
- func (c *S3Client) Compose(ctx context.Context, key string, parts []s3lib.CopyPart) (string, error)
- func (c *S3Client) Delete(ctx context.Context, key string) error
- func (c *S3Client) Download(ctx context.Context, key string) ([]byte, error)
- func (c *S3Client) DownloadRange(ctx context.Context, key, etag string, offset, size int64) ([]byte, error)
- func (c *S3Client) List(ctx context.Context, prefix string) iter.Seq2[Object, error]
- func (c *S3Client) Stat(ctx context.Context, key string) (Object, error)
- func (c *S3Client) Upload(ctx context.Context, key string, data []byte) (string, error)
- func (c *S3Client) UploadReader(ctx context.Context, key string, reader io.ReaderAt, size int64) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsComposeUnsupported ¶ added in v0.2.0
func IsNoSuchKey ¶
Types ¶
type Client ¶
type Client interface {
Upload(context.Context, string, []byte) (string, error)
UploadReader(context.Context, string, io.ReaderAt, int64) (string, error)
Download(context.Context, string) ([]byte, error)
DownloadRange(context.Context, string, string, int64, int64) ([]byte, error)
List(context.Context, string) iter.Seq2[Object, error]
Stat(context.Context, string) (Object, error)
Delete(context.Context, string) error
Compose(context.Context, string, []s3lib.CopyPart) (string, error)
}
type ErrS3Operation ¶
func (ErrS3Operation) Error ¶
func (e ErrS3Operation) Error() string
func (ErrS3Operation) Unwrap ¶
func (e ErrS3Operation) Unwrap() error
type MultiReader ¶
type MultiReader struct {
// contains filtered or unexported fields
}
MultiReader implements io.ReaderAt for multiple byte slices concatenated together. This avoids expensive memory allocations and copies when combining multiple data sources.
func NewMultiReader ¶
func NewMultiReader(sections ...[]byte) *MultiReader
NewMultiReader creates a new MultiReaderAt from multiple byte slices.
func (*MultiReader) ReadAt ¶
func (m *MultiReader) ReadAt(p []byte, off int64) (n int, err error)
ReadAt implements io.ReaderAt interface.
func (*MultiReader) Size ¶
func (m *MultiReader) Size() int64
Size returns the total size of all sections combined.
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
func (*S3Client) DownloadRange ¶
Click to show internal directories.
Click to hide internal directories.