aws

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(region, accessKey, secretKey, endpoint, bucket string) (types.Client, error)

NewClient is a factory method for S3Client

func NewClientFromConfig

func NewClientFromConfig(config map[string]string) (types.Client, error)

NewClientFromConfig is a factory method for S3Client.

Types

type S3Client

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

func (S3Client) Delete

func (c S3Client) Delete(object string) error

Delete deletes an object. This function does not return an error if the object does not exist.

func (S3Client) Get

func (c S3Client) Get(object string) (types.Object, io.Reader, error)

Get retrieves an object.

Errors:

  • ErrNotFound: if the object is not found.

func (S3Client) Head

func (c S3Client) Head(object string) (types.Object, error)

Head retrieves an object metadata.

Errors:

  • ErrNotFound: if the object is not found.

func (S3Client) List

func (c S3Client) List(prefix string) ([]types.Object, error)

List retrieves a object list in the container.

func (S3Client) Put

func (c S3Client) Put(object string, body io.Reader) error

Put creates an object.

func (S3Client) String

func (c S3Client) String() string

String returns the client information. This is used to logging or debugging.

Jump to

Keyboard shortcuts

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