Documentation ¶
Index ¶
- type Client
- func (c *Client) BucketKeyExists(bucket, key string) (bool, error)
- func (c *Client) DeleteObject(key string) error
- func (c *Client) DownloadFile(key string, dst string) error
- func (c *Client) GetObject(key string, value interface{}) (bool, error)
- func (c *Client) GetPresignedURL(key string, expiration time.Duration) (string, error)
- func (c *Client) GetString(key string) (string, error)
- func (c *Client) KeyExists(key string) (bool, error)
- func (c *Client) List(prefix string) (*s3.ListObjectsV2Output, error)
- func (c *Client) PutContent(key string, body io.ReadSeeker, contentType string) error
- func (c *Client) PutObject(key string, value interface{}) error
- func (c *Client) UploadDirectory(prefix string, dir string) error
- func (c *Client) UploadFile(prefix string, dir string, filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an s3 client
func NewClientWithConfig ¶
NewClientWithConfig creates a new client based on a bucket and config
func NewClientWithSession ¶
NewClientWithSession creates a new client based on a bucket and a session
func (*Client) BucketKeyExists ¶
BucketKeyExists checks if an S3 bucket and key exists
func (*Client) DeleteObject ¶
DeleteObject deletes an object from S3
func (*Client) DownloadFile ¶
DownloadFile downloads a key to a file in a local directory
func (*Client) GetObject ¶
GetObject returns an object from JSON for a key. Return false if key is not found.
func (*Client) GetPresignedURL ¶
GetPresignedURL gets a presigned URL for the specified key
func (*Client) List ¶
func (c *Client) List(prefix string) (*s3.ListObjectsV2Output, error)
List lists bucket keys with an optional prefix filter
func (*Client) PutContent ¶
PutContent writes content to a key
func (*Client) UploadDirectory ¶
UploadDirectory uploads a local directory to s3
Click to show internal directories.
Click to hide internal directories.