s3

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

s3

A helper S3 Client designed for use within Loophole Labs projects

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
}

Client is a wrapper for the s3 client

func New

func New(options *Options, logger *zerolog.Logger) (*Client, error)

func (*Client) Close

func (e *Client) Close() error

func (*Client) DeleteObject

func (e *Client) DeleteObject(ctx context.Context, bucket string, key string) error

func (*Client) GetObject

func (e *Client) GetObject(ctx context.Context, bucket string, key string) (io.ReadCloser, error)

func (*Client) MakeBucket added in v0.1.1

func (e *Client) MakeBucket(ctx context.Context, bucket string) error

func (*Client) PutObject

func (e *Client) PutObject(ctx context.Context, bucket string, key string, reader io.Reader, objectSize int64) (minio.UploadInfo, error)

type Options

type Options struct {
	LogName   string
	Endpoint  string
	Region    string
	Prefix    string
	AccessKey string
	SecretKey string
}

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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