Documentation ¶
Index ¶
- type Backend
- func (backend *Backend) BlobIterator() model.Iterator
- func (backend *Backend) CountBlobRefs(blobID string) (count int, err error)
- func (backend *Backend) CountImageRefs(imageID string) (count int, err error)
- func (backend *Backend) DeleteBlob(blob *media.Blob) error
- func (backend *Backend) DeleteFile(id string) error
- func (backend *Backend) DeleteImage(image *media.Image) error
- func (backend *Backend) FileReader(id string) (reader io.ReadCloser, filename, contentType string, err error)
- func (backend *Backend) FileWriter(filename, contentType string) (writer io.WriteCloser, id string, err error)
- func (backend *Backend) ImageIterator() model.Iterator
- func (backend *Backend) LoadBlob(id string) (*media.Blob, error)
- func (backend *Backend) LoadImage(id string) (*media.Image, error)
- func (backend *Backend) RemoveAllBlobRefs(blobID string) (count int, err error)
- func (backend *Backend) RemoveAllImageRefs(imageID string) (count int, err error)
- func (backend *Backend) SaveBlob(blob *media.Blob) error
- func (backend *Backend) SaveImage(image *media.Image) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
BaseDir string
}
func (*Backend) BlobIterator ¶
BlobIterator returns an iterator that iterates all blobs as Blob structs.
func (*Backend) CountBlobRefs ¶
CountBlobRefs counts all BlobRef occurrences with blobID in all known databases.
func (*Backend) CountImageRefs ¶
CountImageRefs counts all ImageRef occurrences with imageID in all known databases.
func (*Backend) DeleteBlob ¶
DeleteBlob does not delete the file associated with it, also use DeleteFile().
func (*Backend) DeleteFile ¶
Returns ErrNotFound if no file with id is found.
func (*Backend) FileReader ¶
func (backend *Backend) FileReader(id string) (reader io.ReadCloser, filename, contentType string, err error)
Returns ErrNotFound if no file with id is found.
func (*Backend) FileWriter ¶
func (*Backend) ImageIterator ¶
ImageIterator returns an iterator that iterates all images as Image structs.
func (*Backend) RemoveAllBlobRefs ¶
RemoveAllBlobRefs removes all BlobRef occurrences with blobID in all known databases.
func (*Backend) RemoveAllImageRefs ¶
RemoveAllImageRefs removes all ImageRef occurrences with imageID in all known databases.