Documentation
¶
Overview ¶
Package s3 is the minio-go implementation of storage.Backend. It is the only concrete backend; it talks to MinIO, AWS S3, or any S3-compatible store, differing only by Options.
Index ¶
- type Backend
- func (b *Backend) Delete(ctx context.Context, key string) error
- func (b *Backend) Get(ctx context.Context, key string) (io.ReadCloser, error)
- func (b *Backend) GetRange(ctx context.Context, key string, offset, length int64) (io.ReadCloser, error)
- func (b *Backend) List(ctx context.Context, fn func(storage.StoredObject) error) error
- func (b *Backend) PresignGet(ctx context.Context, key string, ttl time.Duration) (string, error)
- func (b *Backend) PresignPut(ctx context.Context, key string, ttl time.Duration) (string, error)
- func (b *Backend) Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
- func (b *Backend) Stat(ctx context.Context, key string) (storage.ObjectInfo, error)
- type Options
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
}
Backend is an S3-compatible object store backed by minio-go. presign is a signing-only client bound to the public endpoint; it never performs I/O, so the public host need not be reachable from the service.
func (*Backend) PresignGet ¶
func (*Backend) PresignPut ¶
type Options ¶
type Options struct {
Endpoint string // host:port for service-side I/O, no scheme
PublicEndpoint string // host:port for presigned URLs; empty = same as Endpoint
Region string
AccessKey string
SecretKey string
Bucket string
UseSSL bool
PublicUseSSL bool
}
Options configures the backend. It mirrors config.Storage but lives here so the storage layer never imports config (composition root maps between them).
Click to show internal directories.
Click to hide internal directories.