s3

package module
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

S3

An S3 helper library designed for use within Loophole Labs projects

Discord Go Version Go Reference

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/loopholelabs/s3. For more contribution information check out the contribution guide.

License

The S3 project is available as open source under the terms of the Apache License, Version 2.0.

Code of Conduct

Everyone interacting in the S3 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the CNCF Code of Conduct.

Project Managed By:

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDisabled = errors.New("s3 is disabled")
)

Functions

This section is empty.

Types

type Options

type Options struct {
	LogName   string
	Disabled  bool
	Endpoint  string
	Secure    bool
	Region    string
	Bucket    string
	AccessKey string
	SecretKey string
}

type S3 added in v0.1.7

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

S3 is a wrapper for the s3 client

func New

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

func (*S3) Close added in v0.1.7

func (e *S3) Close() error

func (*S3) DeleteObject added in v0.1.7

func (e *S3) DeleteObject(ctx context.Context, prefix string, key string) error

func (*S3) GetObject added in v0.1.7

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

func (*S3) ListObjects added in v0.1.7

func (e *S3) ListObjects(ctx context.Context, prefix string) <-chan minio.ObjectInfo

func (*S3) MakeBucket added in v0.1.7

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

func (*S3) PresignedGetObject added in v0.1.7

func (e *S3) PresignedGetObject(ctx context.Context, prefix string, key string, expires time.Duration) (*url.URL, error)

func (*S3) PutObject added in v0.1.7

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

func (*S3) RemoveBucket added in v0.1.7

func (e *S3) RemoveBucket(ctx context.Context, bucket string) error

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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