Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Etcd | 42,932 | 4,048 | 2,314 | a day ago | 396 | April 24, 2022 | 235 | apache-2.0 | Go | |
Distributed reliable key-value store for the most critical data of a distributed system | ||||||||||
Arangodb | 12,853 | 21 hours ago | 240 | May 23, 2018 | 772 | apache-2.0 | C++ | |||
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. | ||||||||||
Badger | 12,026 | 754 | 3 days ago | 48 | August 25, 2021 | 21 | apache-2.0 | Go | ||
Fast key-value DB in Go. | ||||||||||
Zookeeper | 11,149 | 6 days ago | 1 | December 18, 2019 | 222 | apache-2.0 | Java | |||
Apache ZooKeeper | ||||||||||
Bolt | 10,662 | 4,057 | 1,084 | 5 years ago | 8 | July 17, 2017 | 84 | mit | Go | |
An embedded key/value database for Go. | ||||||||||
Immudb | 8,121 | 15 | 2 days ago | 130 | August 25, 2022 | 143 | apache-2.0 | Go | ||
immudb - immutable database based on zero trust, SQL and Key-Value, tamperproof, data change history | ||||||||||
Buntdb | 3,838 | 73 | 229 | 7 months ago | 28 | August 19, 2022 | 14 | mit | Go | |
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support | ||||||||||
Rosedb | 3,581 | 2 months ago | 54 | June 16, 2022 | 13 | apache-2.0 | Go | |||
🚀 A high performance NoSQL database based on bitcask, supports string, list, hash, set, and sorted set. | ||||||||||
Hive | 3,455 | 21 | 75 | 10 days ago | 52 | June 30, 2022 | 457 | apache-2.0 | Dart | |
Lightweight and blazing fast key-value database written in pure Dart. | ||||||||||
Immortaldb | 3,011 | 3 | 2 | 3 months ago | 4 | August 20, 2020 | 38 | mit | JavaScript | |
:nut_and_bolt: A relentless key-value store for the browser. |
The goal of ystore's is to provide flexible access to your data.
GetString("node.sub.key")
)Store
splitting and mergingmap
valuesAt it's core, ystore is a simple key-value store. You can easily
create a simple Store
like so:
store := NewStore()
store.Set("color", "red")
store.Set("length", 100)
fmt.Printf("The item is %s and the length is %d.\n",
store.GetString("color"), store.GetInt("length"))
// Output: The item is red and the length is 100.
You can also implement your store with default values using a the map
initializer:
store := NewStoreFromMap(map[string]interface{}{
"color" : green,
"length" : 80,
})
fmt.Printf("The item is %s and the length is %d.\n",
store.GetString("color"), store.GetInt("length"))
// Output: The item is green and the length is 80.
Let's assume we have a .toml
file that looks like this:
[item]
name="First Item"
colors=["red", "green", "blue"]
numbers=[5, 2, 1, 6, 5]
We can load the file by creating a Store
and then using the ReadFile
function. Note: You will need to pass the absolute file path to ReadFile
.
filename, fileErr := filepath.Abs("./config.toml")
if fileErr != nil {
// handle the path error
return
}
store := NewStore()
if readErr := store.ReadFile(filename); readErr != nil {
// handle store load error
return
}
name := store.GetString("item.name")
numbers := store.GetIntSlice("item.numbers")
fmt.Printf("The item name is '%s' and the numbers slice has %d element(s).\n", name, len(numbers))
// Output: The item name is 'First Item' and the numbers slice has 5 element(s).
You could, but it may not be the best solution. Our goal is to provide a super flexible data management solution for a variety of application data and to not be a full scale database. A quick search on Google will find a variety of great solutions if you need to embed a database.
First up, Viper is fantastic and super useful. ystore isn't trying to compete with viper.
The overall intent of ystore is to offer a more generic data mechanism, to allow files/formats to be used interchangeably, and to make it simple to just parse a bunch of it at the same time. Viper is more suited for application configuration specific task. You can still use ystore for application configuration (it works great!) but you may end up needing to do a few additional tasks yourself.
Viper - Go configuration with fangs
ystore is released under a modified MIT license. See LICENSE for details.
Portions of the code are derived from other works. Please see NOTICE for details on usage and their associated licenses.