Documentation ¶
Index ¶
- type Client
- func (c *Client) Delete(bucket, filename string) error
- func (c *Client) DeleteWithContext(ctx context.Context, bucket, filename string) error
- func (c *Client) Download(bucket, filename string) ([]byte, error)
- func (c *Client) DownloadByURL(uri url.URL) ([]byte, error)
- func (c *Client) DownloadByURLWithContext(ctx context.Context, uri url.URL) ([]byte, error)
- func (c *Client) DownloadWithContext(ctx context.Context, bucket, filename string) ([]byte, error)
- func (c *Client) Upload(bucket, filename string, data []byte, public bool) (*url.URL, error)
- func (c *Client) UploadWithContext(ctx context.Context, bucket, filename string, data []byte, public bool) (*url.URL, error)
- type Configs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Configs // contains filtered or unexported fields }
func (*Client) DeleteWithContext ¶
func (*Client) DownloadByURLWithContext ¶
func (*Client) DownloadWithContext ¶
type Configs ¶
type Configs struct { S3EndpointURL url.URL `env:"S3_ENDPOINT_URL,required"` S3AccessKey string `env:"S3_ACCESS_KEY,required"` S3SecretKey string `env:"S3_SECRET_KEY,required"` S3Timeout time.Duration `env:"S3_TIMEOUT" envDefault:"5s"` S3MaxRetries int `env:"S3_MAX_RETRIES" envDefault:"3"` S3BufferSize int `env:"S3_BUFFER_SIZE_KB" envDefault:"500"` S3BufferGrowth float64 `env:"S3_BUFFER_GROWTH" envDefault:"1.8"` }
Click to show internal directories.
Click to hide internal directories.