๐Ÿ“š tempdb - Awesome Go Library for Database

Go Gopher mascot for tempdb

Key-value store for temporary items.

๐Ÿท๏ธ Database
๐Ÿ“‚ Data stores with expiring records, in-memory distributed data stores, or in-memory subsets of file-based databases.
โญ 19 stars
View on GitHub ๐Ÿ”—

Detailed Description of 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

Build Status Go Report Card Go Doc


GitHub @rafaeljesus ย ยทย  Medium @_jesus_rafael ย ยทย  Twitter @_jesus_rafael