Documentation
¶
Overview ¶
Package silo keeps the bytes of the files in Silo, the S3 storage of compose.yaml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotConfigured = errors.New("S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY and S3_BUCKET must be set")
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
Objects map[string][]byte
Written map[string]time.Time // when each key was put; a test moves it back to age an object
// contains filtered or unexported fields
}
Memory is a Store in a map, for the tests.
type Object ¶
Object is what the store keeps under a key, its bytes left out: purgefiles reads Written to leave alone an upload that may still be running.
type Store ¶
type Store interface {
Put(ctx context.Context, key string, data []byte, contentType string) error
Get(ctx context.Context, key string) (io.ReadCloser, error)
Remove(ctx context.Context, key string) error
List(ctx context.Context) ([]Object, error)
}
Store is Silo, or Memory in the tests.