s3wrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 12 Imported by: 0

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(ctx context.Context, forcePathStyle bool) (*Client, error)

func (*Client) DeleteObjects

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

func (*Client) GetObject

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

func (*Client) GetPresignedGetURL

func (client *Client) GetPresignedGetURL(ctx context.Context, bucket, key string, expires time.Duration) (string, error)

func (*Client) GetPresignedPutURL

func (client *Client) GetPresignedPutURL(ctx context.Context, bucket, key string, expires time.Duration) (string, error)

func (*Client) ListObjects

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

func (*Client) PutObject

func (client *Client) PutObject(ctx context.Context, bucket, key string, body io.ReadSeeker, 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