Documentation
¶
Overview ¶
Package s3 provides S3-compatible object storage for the TDTP framework.
The client is implemented on net/http alone (SigV4 in sign.go): Put, Get, Head, ListV2, Delete and CreateBucket. No AWS SDK — the exchange here is small packets ("скачать/записать"), the full SDK only added ~4.5 MB of credential-chain and multipart code this driver never uses.
Index ¶
- func EnsureBucket(ctx context.Context, cfg storage.Config) error
- func NewDriver(cfg storage.Config) (storage.ObjectStorage, error)
- type Driver
- func (d *Driver) Close() error
- func (d *Driver) Delete(ctx context.Context, key string) error
- func (d *Driver) Get(ctx context.Context, key string) (io.ReadCloser, error)
- func (d *Driver) List(ctx context.Context, prefix string) ([]storage.ObjectInfo, error)
- func (d *Driver) Put(ctx context.Context, key string, reader io.Reader, meta map[string]string) error
- func (d *Driver) Stat(ctx context.Context, key string) (*storage.ObjectInfo, error)
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureBucket ¶
EnsureBucket creates bucket when missing; an already-owned bucket is OK. Used by test setup and ops tooling — not part of ObjectStorage.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements storage.ObjectStorage over an S3-compatible API.
Click to show internal directories.
Click to hide internal directories.