s3

package
v2.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package s3 implements a very thin wrapper around the AWS S3 client. It only exists to enable stubbing of the AWS S3 client in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around the AWS S3 client.

func NewClient

func NewClient(region string) (*Client, error)

NewClient creates a new AWS S3 client.

func (Client) GetObject

func (c Client) GetObject(ctx context.Context, bucket, key, versionID, sseCustomerAlgorithm, sseCustomerKey, sseCustomerKeyMD5 string) (*s3.GetObjectOutput, error)

GetObject returns the object with the given key from the given bucket. If a versionID is given, the specific version of the object is returned.

func (Client) PutObject

func (c Client) PutObject(ctx context.Context, bucket, key, tags, contentType, objectLockLegalHoldStatus, objectLockMode, sseCustomerAlgorithm, sseCustomerKey, sseCustomerKeyMD5 string, objectLockRetainUntilDate time.Time, metadata map[string]string, body []byte) (*s3.PutObjectOutput, error)

PutObject creates a new object in the given bucket with the given key and body. Various optional parameters can be set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL