Discover Packages
github.com/vkuksa/shortly
pkg
storage
redis
package
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: May 23, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
DefaultAddress = "localhost:6379"
)
type Client[V any ] struct {
}
NewClient creates a new Redis client
Close closes the client.
It must be called to release any open resources.
Deletes a key-value pair from a storage
Returns an error if given key is not valid or update operation failed
Retrieves a stored value by a given key
Returns a false, nil if no value have been found for a given key
Returns an error if it occured during retrieving of value
Expects keys that are not ""
Set stores the given value for the given key.
Values are automatically marshalled to JSON
The key must not be ""
type Options struct {
Address string `toml:"address"`
Password string `toml:"password"`
DB int `toml:"db"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.