s3

package
v1.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 22 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 {
	Client     *minio.Client
	BucketName string
	Endpoint   string
	AccessKey  string
	SecretKey  string
}

Client is used interact with S3 storage

func New

func New(app *cfenv.App) *Client

func (*Client) Delete

func (s *Client) Delete(object string) error

func (*Client) Download

func (s *Client) Download(object string) (io.Reader, error)

func (*Client) DownloadWithContext

func (s *Client) DownloadWithContext(ctx context.Context, object string) (io.ReadCloser, error)

func (*Client) List

func (s *Client) List(folderPath string) ([]minio.ObjectInfo, error)

func (*Client) Stat

func (s *Client) Stat(object string) (*minio.ObjectInfo, error)

func (*Client) Upload

func (s *Client) Upload(object string, reader io.Reader, size int64) error

func (*Client) UploadWithContext

func (s *Client) UploadWithContext(ctx context.Context, object string, reader io.Reader, size int64) error

Jump to

Keyboard shortcuts

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