Documentation ¶
Index ¶
- Variables
- func Init(name string) error
- type Backend
- func (self *Backend) CountImageRefs(imageID string) (int, error)
- func (self *Backend) DeleteImage(image *media.Image) error
- func (self *Backend) DeleteImageVersion(id string) error
- func (self *Backend) ImageIterator() model.Iterator
- func (self *Backend) ImageVersionReader(id string) (reader io.ReadCloser, ctype string, err error)
- func (self *Backend) ImageVersionWriter(version *media.ImageVersion) (writer io.WriteCloser, err error)
- func (self *Backend) LoadImage(id string) (*media.Image, error)
- func (self *Backend) RemoveAllImageRefs(imageID string) error
- func (self *Backend) SaveImage(image *media.Image) error
- func (self *Backend) TryLoadImage(id string) (*media.Image, bool, error)
- 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 // contains filtered or unexported fields }
func (*Backend) DeleteImageVersion ¶
func (*Backend) ImageIterator ¶
func (*Backend) ImageVersionReader ¶
func (*Backend) ImageVersionWriter ¶
func (self *Backend) ImageVersionWriter(version *media.ImageVersion) (writer io.WriteCloser, err error)
func (*Backend) RemoveAllImageRefs ¶
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
type ImageDoc ¶
type ImageDoc struct { mongo.DocumentBase `bson:",inline"` media.Image `bson:",inline"` }
func (*ImageDoc) GetAndInitImage ¶
func (*ImageDoc) Init ¶
func (self *ImageDoc) Init(collection *mongo.Collection, embeddingStruct interface{})
Click to show internal directories.
Click to hide internal directories.