aws

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT 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 {
	S3     *s3.Client
	Config *Config
}

func New

func New(c *Config) (*Client, error)

func (*Client) CopyObject

func (c *Client) CopyObject(destinationBucket, objectKey string) error

func (*Client) CreateBucket

func (c *Client) CreateBucket(bucket string) error

func (*Client) DeleteBucket

func (c *Client) DeleteBucket() error

func (*Client) DeleteObject

func (c *Client) DeleteObject(objectKey string) error

func (Client) GetBucket

func (c Client) GetBucket() string

func (Client) GetEndpoint

func (c Client) GetEndpoint() string

func (*Client) GetObject

func (c *Client) GetObject(objectKey string) (io.ReadCloser, error)

func (*Client) GetObjectToFile

func (c *Client) GetObjectToFile(objectKey string, filePath string) (err error)

func (*Client) GetObjectURL

func (c *Client) GetObjectURL(objectKey string, expires int64) (string, error)

func (*Client) ListObjects

func (c *Client) ListObjects(prefix string) ([]*gooss.Object, error)

func (*Client) PutObject

func (c *Client) PutObject(objectKey string, filePath string) (err error)

type Config

type Config struct {
	AccessKeyId     string
	AccessKeySecret string
	SessionToken    string
	Region          string
	Bucket          string
	Endpoint        string
}

Jump to

Keyboard shortcuts

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