Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface { // Add adds the binary file and metadata into state, replacing existing // metadata if any exists with the specified version. Add(io.Reader, Metadata) error // Open returns the Metadata and binary file contents for the specified // version if it exists, else an error satisfying errors.IsNotFound. Open(version string) (Metadata, io.ReadCloser, error) // AllMetadata returns metadata for the full list of binary files in the // catalogue. AllMetadata() ([]Metadata, error) // Metadata returns the Metadata for the specified version if it exists, // else an error satisfying errors.IsNotFound. Metadata(version string) (Metadata, error) }
Storage provides methods for storing and retrieving binary files by version.
func New ¶
func New( modelUUID string, managedStorage blobstore.ManagedStorage, metadataCollection mongo.Collection, runner jujutxn.Runner, ) Storage
New constructs a new Storage that stores binary files in the provided ManagedStorage, and metadata in the provided collection using the provided transaction runner.
func NewLayeredStorage ¶
NewLayeredStorage wraps multiple Storages such all of their metadata can be listed and fetched. The later entries in the list have lower precedence than the earlier ones. The first entry in the list is always used for mutating operations.
type StorageCloser ¶
StorageCloser extends the Storage interface with a Close method.
Click to show internal directories.
Click to hide internal directories.