Documentation ¶
Index ¶
- Variables
- func Init(name string) error
- type Backend
- func (self *Backend) BlobIterator() model.Iterator
- func (self *Backend) CountBlobRefs(blobID string) (count int, err error)
- func (self *Backend) CountImageRefs(imageID string) (count int, err error)
- func (self *Backend) DeleteBlob(blob *media.Blob) error
- func (self *Backend) DeleteFile(id string) error
- func (self *Backend) DeleteImage(image *media.Image) error
- func (self *Backend) FileReader(id string) (reader io.ReadCloser, filename, contentType string, err error)
- func (self *Backend) FileWriter(filename, contentType string) (writer io.WriteCloser, id string, err error)
- func (self *Backend) ImageIterator() model.Iterator
- func (self *Backend) Init(gridFSName string)
- func (self *Backend) LoadBlob(id string) (*media.Blob, error)
- func (self *Backend) LoadImage(id string) (*media.Image, error)
- func (self *Backend) RemoveAllBlobRefs(blobID string) (count int, err error)
- func (self *Backend) RemoveAllImageRefs(imageID string) (count int, err error)
- func (self *Backend) SaveBlob(blob *media.Blob) error
- func (self *Backend) SaveImage(image *media.Image) error
- type BlobDoc
- type Configuration
- type ImageDoc
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{
GridFSName: "media",
}
Functions ¶
Types ¶
type Backend ¶
type Backend struct { GridFS *mgo.GridFS Images *mongo.Collection Blobs *mongo.Collection // contains filtered or unexported fields }
func (*Backend) BlobIterator ¶
func (*Backend) CountBlobRefs ¶
func (*Backend) CountImageRefs ¶
func (*Backend) DeleteFile ¶
func (*Backend) FileReader ¶
func (*Backend) FileWriter ¶
func (*Backend) ImageIterator ¶
func (*Backend) RemoveAllBlobRefs ¶
func (*Backend) RemoveAllImageRefs ¶
type BlobDoc ¶
type BlobDoc struct { mongo.DocumentBase `bson:",inline"` media.Blob `bson:",inline"` }
func (*BlobDoc) Init ¶
func (self *BlobDoc) Init(collection *mongo.Collection, embeddingStructPtr interface{})
type Configuration ¶
func (*Configuration) Close ¶
func (self *Configuration) Close() error
func (*Configuration) Init ¶
func (self *Configuration) Init() error
func (*Configuration) Name ¶
func (self *Configuration) Name() string
Click to show internal directories.
Click to hide internal directories.