Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface { // Get returns an io.ReadCloser for data at path, namespaced to the // model. // // If the data is still being uploaded and is not fully written yet, a // blobstore.ErrUploadPending error is returned. This means the path is // valid but the caller should try again later to retrieve the data. Get(path string) (r io.ReadCloser, length int64, err error) // Put stores data from reader at path, namespaced to the model. Put(path string, r io.Reader, length int64) error // PutAndCheckHash stores data from reader at path, namespaced to // the model. It also ensures the stored data has the correct // hash. PutAndCheckHash(path string, r io.Reader, length int64, hash string) error // Remove removes data at path, namespaced to the model. Remove(path string) error }
Storage is an interface providing methods for storing and retrieving data by path.
func NewStorage ¶
NewStorage returns a Storage for the model with the specified UUID.
Click to show internal directories.
Click to hide internal directories.