Documentation
¶
Overview ¶
Package s3 provides a dependency-free S3-compatible object backend.
Index ¶
- type Backend
- func (backend *Backend) Delete(ctx context.Context, key string) error
- func (backend *Backend) List(ctx context.Context, list storage.ListRequest) (storage.ListPage, error)
- func (backend *Backend) Open(ctx context.Context, key string) (io.ReadCloser, storage.Object, error)
- func (backend *Backend) Ping(ctx context.Context) error
- func (backend *Backend) Put(ctx context.Context, key string, source io.Reader, size int64, ...) (result error)
- func (backend *Backend) SignedURL(ctx context.Context, key string, ttl time.Duration) (string, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) Ping ¶
Ping verifies bucket reachability and credentials without listing or mutating application objects.
type Config ¶
type Config struct {
Endpoint, Region, Bucket, AccessKey, SecretKey string
Client *http.Client
// AllowInsecureEndpoint explicitly permits plaintext HTTP for local S3
// emulators such as MinIO. Production credentials must use HTTPS.
AllowInsecureEndpoint bool
// MaxSpoolBytes bounds temporary disk use when Put receives a reader that
// cannot be rewound for signing. Zero selects the Ridu upload limit.
MaxSpoolBytes int64
// SpoolDirectory optionally selects the directory for non-seekable Put
// payloads. The operating system temporary directory is used by default.
SpoolDirectory string
}
Click to show internal directories.
Click to hide internal directories.