Documentation
¶
Overview ¶
Package storage defines the Provider interface for object storage backends.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerFileOpener ¶
type ContainerFileOpener interface {
OpenContainerFile(botID, containerPath string) (io.ReadCloser, error)
}
ContainerFileOpener is an optional interface that providers can implement to open arbitrary files from a bot's container data directory.
type PrefixLister ¶
PrefixLister is an optional interface for providers that can list keys sharing a common prefix (e.g. directory listing on a filesystem backend).
type Provider ¶
type Provider interface {
// Put writes data to storage under the given key.
Put(ctx context.Context, key string, reader io.Reader) error
// Open returns a reader for the given storage key.
Open(ctx context.Context, key string) (io.ReadCloser, error)
// Delete removes the object at key.
Delete(ctx context.Context, key string) error
// AccessPath returns a consumer-accessible reference for a storage key.
// The format depends on the backend (e.g. container path, signed URL).
AccessPath(key string) string
}
Provider abstracts object storage operations.
Directories
¶
| Path | Synopsis |
|---|---|
|
providers
|
|
|
containerfs
Package containerfs implements storage.Provider for bot containers backed by host-side bind mounts.
|
Package containerfs implements storage.Provider for bot containers backed by host-side bind mounts. |
Click to show internal directories.
Click to hide internal directories.