mirror of
https://github.com/gofiber/storage.git
synced 2025-09-27 04:46:08 +08:00
🎭 stay backwards compatible
This commit is contained in:
@@ -18,6 +18,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
// New creates a new memory storage
|
||||
func New(config ...Config) *Storage {
|
||||
|
@@ -21,6 +21,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
// New creates a new storage
|
||||
func New(config Config) *Storage {
|
||||
|
@@ -19,6 +19,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
// New creates a new storage
|
||||
func New(config ...Config) *Storage {
|
||||
|
@@ -17,6 +17,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
type entry struct {
|
||||
data []byte
|
||||
|
@@ -24,6 +24,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
type item struct {
|
||||
ObjectID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
|
||||
|
@@ -26,6 +26,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
var (
|
||||
dropQuery = "DROP TABLE IF EXISTS %s;"
|
||||
|
@@ -24,9 +24,9 @@ type Storage struct {
|
||||
sqlGC string
|
||||
}
|
||||
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
var (
|
||||
dropQuery = `DROP TABLE IF EXISTS %s;`
|
||||
|
@@ -16,6 +16,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
// New creates a new redis storage
|
||||
func New(config ...Config) *Storage {
|
||||
|
@@ -26,6 +26,7 @@ type Storage struct {
|
||||
|
||||
// ErrNotFound means that a get call did not find the requested key.
|
||||
var ErrNotFound = errors.New("key not found")
|
||||
var ErrKeyNotExist = ErrNotFound
|
||||
|
||||
var (
|
||||
dropQuery = `DROP TABLE IF EXISTS %s;`
|
||||
|
Reference in New Issue
Block a user