type
Config
Endpoint, credentials, HTTP transport, and bounded upload-spooling settings.
Properties
| Property | Type | Description |
|---|---|---|
Endpoint | string | The Endpoint value. |
Region | string | The Region value. |
Bucket | string | The Bucket value. |
AccessKey | string | The AccessKey value. |
SecretKey | string | The SecretKey value. |
Client | *http.Client | The Client value. |
PathStyle | bool | PathStyle addresses objects as <endpoint>/<bucket>/<key>. Without it the bucket is a subdomain of the endpoint host, <bucket>.<endpoint>/<key>, the virtual-hosted style that AWS, Tigris (Railway buckets) and Cloudflare R2 accept and that new Railway buckets require. Set it for MinIO and other emulators addressed by IP address or a single host name, and for a bucket whose name contains a dot over HTTPS. |
AllowInsecureEndpoint | bool | AllowInsecureEndpoint explicitly permits plaintext HTTP for local S3 emulators such as MinIO. Production credentials must use HTTPS. |
MaxSpoolBytes | int64 | MaxSpoolBytes bounds temporary disk use when Put receives a reader that cannot be rewound for signing. Zero selects the Ridu upload limit. |
SpoolDirectory | string | SpoolDirectory optionally selects the directory for non-seekable Put payloads. The operating system temporary directory is used by default. |
How it works
HTTPS is required unless AllowInsecureEndpoint explicitly permits a local emulator such as MinIO. Zero MaxSpoolBytes selects Ridu’s upload limit; non-seekable bodies larger than the limit are rejected before reading.
Full signature
type Config struct {
Endpoint, Region, Bucket, AccessKey, SecretKey string
Client *http.Client
// PathStyle addresses objects as <endpoint>/<bucket>/<key>. Without it the
// bucket is a subdomain of the endpoint host, <bucket>.<endpoint>/<key>,
// the virtual-hosted style that AWS, Tigris (Railway buckets) and
// Cloudflare R2 accept and that new Railway buckets require. Set
// it for MinIO and other emulators addressed by IP address or a single
// host name, and for a bucket whose name contains a dot over HTTPS.
PathStyle bool
// 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
}