working on List

This commit is contained in:
bel
2019-06-21 17:13:18 -06:00
parent 6ac77d247e
commit ade973d19d
13 changed files with 178 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package storage
import (
"context"
"errors"
"strings"
"time"
@@ -53,6 +54,10 @@ func NewMongo(addr string, auth ...string) (*Mongo, error) {
return &Mongo{db: db}, nil
}
func (mg *Mongo) List(ns []string, limits ...string) ([]string, error) {
return nil, errors.New("not impl")
}
func (mg *Mongo) Get(key string, ns ...string) ([]byte, error) {
namespace := resolveNamespace(ns)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)