s3

package
v1.99.99 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: BSD-3-Clause Imports: 5 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 {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	// contains filtered or unexported fields
}

Client wraps the minio s3 client

func New

func New(endpoint, accessKeyID, secretAccessKey string) *Client

New returns a new Client

func (*Client) Connect

func (c *Client) Connect() error

Connect creates a minio client

func (*Client) DeleteBucket

func (c *Client) DeleteBucket() error

DeleteBucket deletes the main bucket where the client is connected to.

func (*Client) DeleteBucketByName

func (c *Client) DeleteBucketByName(name string) error

DeleteBucketByName deletes the bucket with the specified name

func (*Client) Get

func (c *Client) Get(filename string) (*minio.Object, error)

Get gets a file or returns an error.

func (*Client) ListObjects

func (c *Client) ListObjects() ([]minio.ObjectInfo, error)

ListObjects lists all objects in the bucket

func (*Client) Stat

func (c *Client) Stat(filename string) (minio.ObjectInfo, error)

Stat returns metainformation about an object in the repository.

func (*Client) Upload

func (c *Client) Upload(object UploadObject) error

Upload uploads a io.Reader object to the configured endpoint

type UploadObject

type UploadObject struct {
	ObjectStream io.Reader
	Name         string
}

Jump to

Keyboard shortcuts

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