1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2025-07-01 06:48:29 +00:00

dbutil: abstract out the last mongo type

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-04-07 11:56:05 -04:00
parent efa8ac6511
commit b80d34f423
Signed by: vbatts
GPG key ID: 10937E57733F1362
3 changed files with 31 additions and 23 deletions

View file

@ -59,12 +59,12 @@ func (h mongoHandle) Close() error {
}
// pass through for GridFs
func (h mongoHandle) Open(filename string) (file *mgo.GridFile, err error) {
func (h mongoHandle) Open(filename string) (file dbutil.File, err error) {
return h.Gfs.Open(strings.ToLower(filename))
}
// pass through for GridFs
func (h mongoHandle) Create(filename string) (file *mgo.GridFile, err error) {
func (h mongoHandle) Create(filename string) (file dbutil.File, err error) {
return h.Gfs.Create(strings.ToLower(filename))
}