Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Delete(ctx context.Context, key string) error
- func (c *Client) Exists(ctx context.Context, key string) (bool, error)
- func (c *Client) Get(ctx context.Context, key string) (io.ReadCloser, int64, error)
- func (c *Client) Head(ctx context.Context, key string) (int64, error)
- func (c *Client) List(ctx context.Context, prefix string) ([]string, error)
- func (c *Client) Put(ctx context.Context, key string, body io.Reader, size int64) error
- func (c *Client) PutLargeFile(ctx context.Context, key, filePath string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when an object does not exist in the store.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps an S3-compatible object store client.
type Config ¶
type Config struct {
Endpoint string
AccessKey string //nolint:gosec // configuration schema field name
SecretKey string //nolint:gosec // configuration schema field name
Bucket string
Region string
Prefix string
Secure bool
}
Config holds S3-compatible object store settings.
func ConfigFromEnv ¶
ConfigFromEnv reads S3-compatible storage settings from the environment. It optionally falls back to ~/.config/epoch/s3.env when values are missing.
Click to show internal directories.
Click to hide internal directories.