Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMongoHost = errors.New("parameter 'url' is empty")
ErrNoMongoHost is returned if no[[host]:port] combination for MongoDB was provided,
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore represents a filesystem based file Repository.
func (*FileStore) Close ¶
Close satisfies the Repository interface, but is a noop for a filesystem based repo.
func (*FileStore) StreamFrom ¶
StreamFrom statisfies the Retriever interface.
type MongoDBStore ¶
type MongoDBStore struct {
// contains filtered or unexported fields
}
MongoDBStore represents a GridFS based file Repository.
func NewMongoDB ¶
func NewMongoDB(url, user, pass, db, name string) (store *MongoDBStore, err error)
NewMongoDB creates a GridFS based repository.
func (MongoDBStore) Close ¶
func (s MongoDBStore) Close() error
Close satisfies the Repository interface.
func (MongoDBStore) StreamFrom ¶
func (s MongoDBStore) StreamFrom(path string, w io.Writer) (err error)
StreamFrom statisfies the Retriever interface.
Click to show internal directories.
Click to hide internal directories.