Data is a library for the Go Programming Language. It defines interfaces shared by other packages that implement data storages.
- Store interface for objects that store expirable values.
- memstore.Store type to store expirable values in-memory.
- mongostore.Store type to store expirable values in MongoDB.
This library provides two Store Implementations: in-memory and MongoDB.
To install in-memory implementation of Store run the following command:
go get gopkg.in/raiqub/data.v0/memstore
To import this package, add the following line to your code:
import "gopkg.in/raiqub/data.v0/memstore"
To install MongoDB implementation of Store run the following command:
go get gopkg.in/raiqub/data.v0/mongostore
To import this package, add the following line to your code:
import "gopkg.in/raiqub/data.v0/memstore"
Examples can be found on library documentation.
The tests can be run via the provided Bash script:
./test.sh
raiqub/data is made available under the Apache Version 2.0 License.