s3

package
v0.0.0-...-36298b4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 10 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 {
	Bucket    string
	Region    string
	AccessKey string
	SecretKey string
	Endpoint  string
}

func MakeClient

func MakeClient(remote config.RemoteObject) *Client

func (*Client) DownloadWithWriter

func (c *Client) DownloadWithWriter(hash string, w io.WriterAt) error

func (*Client) GetPresignedUrl

func (c *Client) GetPresignedUrl(key string) (string, error)

func (*Client) List

func (c *Client) List(prefix string, action func(key string)) ([]string, error)

List with a prefix string in S3

func (*Client) UploadWithReader

func (c *Client) UploadWithReader(hash string, r io.Reader, size int64) error

Upload a file to S3

func (*Client) VerifyHash

func (c *Client) VerifyHash(hash string) (bool, error)

Verify the existence of a hash in S3

Jump to

Keyboard shortcuts

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