Documentation ¶
Overview ¶
Package objaws provides an implementation of 'objstore.Client' for use with AWS S3.
Index ¶
- Constants
- type Client
- func (c *Client) AbortMultipartUpload(ctx context.Context, opts objcli.AbortMultipartUploadOptions) error
- func (c *Client) AppendToObject(ctx context.Context, opts objcli.AppendToObjectOptions) error
- func (c *Client) Close() error
- func (c *Client) CompleteMultipartUpload(ctx context.Context, opts objcli.CompleteMultipartUploadOptions) error
- func (c *Client) CopyObject(ctx context.Context, opts objcli.CopyObjectOptions) error
- func (c *Client) CreateMultipartUpload(ctx context.Context, opts objcli.CreateMultipartUploadOptions) (string, error)
- func (c *Client) DeleteDirectory(ctx context.Context, opts objcli.DeleteDirectoryOptions) error
- func (c *Client) DeleteObjects(ctx context.Context, opts objcli.DeleteObjectsOptions) error
- func (c *Client) GetObject(ctx context.Context, opts objcli.GetObjectOptions) (*objval.Object, error)
- func (c *Client) GetObjectAttrs(ctx context.Context, opts objcli.GetObjectAttrsOptions) (*objval.ObjectAttrs, error)
- func (c *Client) IterateObjects(ctx context.Context, opts objcli.IterateObjectsOptions) error
- func (c *Client) ListParts(ctx context.Context, opts objcli.ListPartsOptions) ([]objval.Part, error)
- func (c *Client) Provider() objval.Provider
- func (c *Client) PutObject(ctx context.Context, opts objcli.PutObjectOptions) error
- func (c *Client) UploadPart(ctx context.Context, opts objcli.UploadPartOptions) (objval.Part, error)
- func (c *Client) UploadPartCopy(ctx context.Context, opts objcli.UploadPartCopyOptions) (objval.Part, error)
- type ClientOptions
Constants ¶
View Source
const ( // PageSize is the default page size used by AWS. PageSize = 1_000 // MaxUploadParts is the maximum number of parts for a multipart upload in AWS. MaxUploadParts = 10_000 // MinUploadSize is the minimum size for a multipart upload in AWS. MinUploadSize = 5 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the 'objcli.Client' interface allowing the creation/management of objects stored in AWS S3.
func NewClient ¶
func NewClient(options ClientOptions) *Client
NewClient returns a new client which uses the given 'serviceAPI', in general this should be the one created using the 's3.New' function exposed by the SDK.
func (*Client) AbortMultipartUpload ¶
func (*Client) AppendToObject ¶
func (*Client) CompleteMultipartUpload ¶
func (*Client) CopyObject ¶
func (*Client) CreateMultipartUpload ¶
func (*Client) DeleteDirectory ¶
DeleteDirectory deletes all objects in a specific directory of a bucket. This does not delete old versions of objects if any.
func (*Client) DeleteObjects ¶
func (*Client) GetObjectAttrs ¶
func (c *Client) GetObjectAttrs(ctx context.Context, opts objcli.GetObjectAttrsOptions) (*objval.ObjectAttrs, error)
func (*Client) IterateObjects ¶
func (*Client) UploadPart ¶
func (*Client) UploadPartCopy ¶
type ClientOptions ¶
type ClientOptions struct { // ServiceAPI is the is the minimal subset of functions that we use from the AWS SDK, this allows for a greatly // reduce surface area for mock generation. // // NOTE: Required ServiceAPI serviceAPI // Logger is the passed logger which implements a custom Log method Logger *slog.Logger }
ClientOptions encapsulates the options for creating a new AWS Client.
Click to show internal directories.
Click to hide internal directories.