Create dbstream interface
This commit is contained in:
6
db.go
6
db.go
@@ -2,10 +2,16 @@ package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type DBStream interface {
|
||||
GetStream(string, ...string) (io.Reader, error)
|
||||
SetStream(string, io.Reader, ...string) error
|
||||
}
|
||||
|
||||
type DB interface {
|
||||
Get(string, ...string) ([]byte, error)
|
||||
Set(string, []byte, ...string) error
|
||||
|
||||
Reference in New Issue
Block a user