s3wrap

package
v0.0.0-...-72177e3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

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
}

func New

func New(awsAccessKey, awsSecretKey, s3Endpoint string) *Client

func (*Client) DeleteObjects

func (self *Client) DeleteObjects(ctx context.Context, bucket string, keys []string) error

func (*Client) GetObject

func (self *Client) GetObject(ctx context.Context, bucket, key string) (*Object, error)

func (*Client) ListObjects

func (self *Client) ListObjects(ctx context.Context, bucket string, opts ...ListObjectsOption) ([]ObjectMetaData, error)

func (*Client) PutObject

func (self *Client) PutObject(ctx context.Context, bucket, key string, body io.Reader, size int64) error

type ListObjectsOption

type ListObjectsOption func(*s3.ListObjectsV2Input)

func WithPrefix

func WithPrefix(prefix string) ListObjectsOption

type Object

type Object struct {
	Size int64
	Body io.ReadCloser
}

type ObjectMetaData

type ObjectMetaData struct {
	Key       string
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

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