storage

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Get retrieves the value for the given key.
	// If no value is not found it returns ErrNotExit error
	Get(key string) ([]byte, error)

	// Set stores the given value for the given key along with a
	// time-to-live expiration value, 0 means live for ever
	// The key must not be "" and the empty values are ignored.
	Set(key string, val []byte, ttl time.Duration) error

	// Delete deletes the stored value for the given key.
	// Deleting a non-existing key-value pair does NOT lead to an error.
	// The key must not be "".
	Delete(key string) error

	// Reset the storage
	Reset() error

	// Close the storage
	Close() error
}

Storage interface that is implemented by storage providers for different middleware packages like cache, limiter, session and csrf

Directories

Path Synopsis
aerospike module
arangodb module
azureblob module
badger module
bbolt module
cassandra module
clickhouse module
cloudflarekv module
coherence module
couchbase module
dynamodb module
etcd module
leveldb module
memcache module
memory module
minio module
mockstorage module
mongodb module
mssql module
mysql module
nats module
neo4j module
pebble module
postgres module
redis module
ristretto module
rueidis module
s3 module
scylladb module
sqlite3 module
surrealdb module
testhelpers
redis module
valkey module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL