Documentation
¶
Overview ¶
Package aws fornece a implementação da interface de armazenamento para Amazon S3
Index ¶
- type Client
- func (c *Client) BucketExists(ctx context.Context, bucketName string) (bool, error)
- func (c *Client) Close() error
- func (c *Client) DeleteObject(ctx context.Context, bucketName, objectName string) error
- func (c *Client) EnsureBucketExists(ctx context.Context, bucketName string) error
- func (c *Client) GetObject(ctx context.Context, bucketName, objectName string) (*interfaces.ObjectInfo, io.ReadCloser, error)
- func (c *Client) ListObjects(ctx context.Context, bucketName string) (map[string]*interfaces.ObjectInfo, error)
- func (c *Client) UploadObject(ctx context.Context, bucketName, objectName string, reader io.Reader, ...) (*interfaces.UploadInfo, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implementa a interface StorageProvider para AWS S3
func (*Client) BucketExists ¶
BucketExists verifica se um bucket existe no S3
func (*Client) DeleteObject ¶
DeleteObject remove um objeto do S3
func (*Client) EnsureBucketExists ¶
EnsureBucketExists garante que um bucket existe, criando-o se necessário
func (*Client) GetObject ¶
func (c *Client) GetObject(ctx context.Context, bucketName, objectName string) (*interfaces.ObjectInfo, io.ReadCloser, error)
GetObject obtém um objeto armazenado no S3
func (*Client) ListObjects ¶
func (c *Client) ListObjects(ctx context.Context, bucketName string) (map[string]*interfaces.ObjectInfo, error)
ListObjects lista todos os objetos em um bucket específico
func (*Client) UploadObject ¶
func (c *Client) UploadObject(ctx context.Context, bucketName, objectName string, reader io.Reader, size int64, contentType string) (*interfaces.UploadInfo, error)
UploadObject faz upload de um objeto para o S3
Click to show internal directories.
Click to hide internal directories.