mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
🎨 update signatures
This commit is contained in:
@@ -14,7 +14,14 @@ A Memcache storage driver using [`bradfitz/gomemcache`](https://github.com/bradf
|
|||||||
func New(config ...Config) Storage
|
func New(config ...Config) Storage
|
||||||
|
|
||||||
var ErrNotExist = errors.New("key does not exist")
|
var ErrNotExist = errors.New("key does not exist")
|
||||||
|
|
||||||
|
func (s *Storage) Get(key string) ([]byte, error)
|
||||||
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
|
func (s *Storage) Delete(key string) error
|
||||||
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
Memory is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
Memory is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
```bash
|
```bash
|
||||||
|
@@ -20,6 +20,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
@@ -19,6 +19,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
### Installation
|
### Installation
|
||||||
MongoDB is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
MongoDB is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
|
@@ -19,6 +19,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
### Installation
|
### Installation
|
||||||
MySQL is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
MySQL is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
|
@@ -19,6 +19,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
### Installation
|
### Installation
|
||||||
Postgres is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
Postgres is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
|
@@ -19,6 +19,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
### Installation
|
### Installation
|
||||||
Redis is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
Redis is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
|
@@ -19,6 +19,7 @@ func (s *Storage) Get(key string) ([]byte, error)
|
|||||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||||
func (s *Storage) Delete(key string) error
|
func (s *Storage) Delete(key string) error
|
||||||
func (s *Storage) Reset() error
|
func (s *Storage) Reset() error
|
||||||
|
func (s *Storage) Close() error
|
||||||
```
|
```
|
||||||
### Installation
|
### Installation
|
||||||
SQLite3 is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
SQLite3 is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||||
|
Reference in New Issue
Block a user