📦 add dynamodb

This commit is contained in:
Fenny
2020-11-12 20:14:21 +01:00
parent e0f4b3ef34
commit c57c524007
13 changed files with 376 additions and 9 deletions

View File

@@ -111,6 +111,9 @@ func New(config ...Config) *Storage {
// Get value by key
func (s *Storage) Get(key string) ([]byte, error) {
if len(key) <= 0 {
return nil, ErrNotExist
}
res := s.col.FindOne(context.Background(), bson.M{"key": key})
item := s.acquireItem()