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:
parent
efa8ac6511
commit
b80d34f423
3 changed files with 31 additions and 23 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue