- TempDB is Redis-backed temporary key-value store for Go.
- Useful for storing temporary data such as login codes, authentication tokens, and temporary passwords.
- A Go version of tempDB
go get -u github.com/rafaeljesus/tempdb
Tempdb stores an expiring (or non-expiring) key/value pair in Redis.
import "github.com/rafaeljesus/tempdb"
temp, err := tempdb.New(tempdb.Options{
Addr: "localhost:6379",
Password: "foo",
})
if err = temp.Insert("key", "value", 0); err != nil {
// handle failure insert key
}
if err = temp.Insert("key2", "value", time.Hour); err != nil {
// handle failure insert key
}
if err = temp.Find("key"); err != nil {
// handle failure to get value
}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
GitHub @rafaeljesus · Medium @_jesus_rafael · Twitter @_jesus_rafael