type

Config

Endpoint, credentials, HTTP transport, and bounded upload-spooling settings.

Properties

PropertyTypeDescription
EndpointstringThe Endpoint value.
RegionstringThe Region value.
BucketstringThe Bucket value.
AccessKeystringThe AccessKey value.
SecretKeystringThe SecretKey value.
Client*http.ClientThe Client value.
PathStyleboolPathStyle 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.
AllowInsecureEndpointboolAllowInsecureEndpoint explicitly permits plaintext HTTP for local S3 emulators such as MinIO. Production credentials must use HTTPS.
MaxSpoolBytesint64MaxSpoolBytes bounds temporary disk use when Put receives a reader that cannot be rewound for signing. Zero selects the Ridu upload limit.
SpoolDirectorystringSpoolDirectory 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 }

Source adapters/storage/s3/s3.go:28