tempdb
CategoryDatabase
SubcategoryDatabases Implemented in Go
Stars0
Key-value store for temporary items
About tempdb
Tempdb
- 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
Installation
go get -u github.com/rafaeljesus/tempdb
Usage
Tempdb stores an expiring (or non-expiring) key/value pair in Redis.
Tempdb
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
}
Contributing
- 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
Badges
GitHub @rafaeljesus · Medium @_jesus_rafael · Twitter @_jesus_rafael
Frequently Asked Questions
What is tempdb?
tempdb is a Database library for the Go programming language. Key-value store for temporary items
How do I install tempdb?
Install tempdb with the Go module system using `go get rafaeljesus/tempdb`. Check the repository for the current installation instructions.
What category does tempdb belong to?
tempdb is listed under Database, specifically Databases Implemented in Go.