A simple key-value store abstraction for Go with implementations for Redis, Consul, etcd, PostgreSQL, MongoDB, and many more.
gokv is a Go library that provides a simple abstraction layer for key-value stores, enabling developers to interact with various databases through a unified interface. It solves the problem of vendor lock-in and reduces boilerplate code by automatically handling serialization and offering implementations for popular backends like Redis, Consul, etcd, and cloud services.
Go developers building applications that require flexible storage backends, package creators who want to support multiple databases without forcing a specific choice, and teams needing to switch between storage solutions for different environments.
Developers choose gokv for its minimal interface, extensive backend support, and automatic marshaling, which simplifies storage integration and allows easy swapping of databases without rewriting application logic.
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Over 20 implementations span embedded, distributed, and cloud databases, enabling seamless switching between environments like Redis for production and in-memory maps for testing.
Accepts any Go type and handles marshaling/unmarshaling with JSON, gob, or protobuf, eliminating boilerplate code compared to raw byte-based libraries.
The Store interface with just Set, Get, Delete, and Close methods simplifies adoption and implementation, as emphasized in the Design Decisions section.
Each backend is a separate Go module, keeping dependencies lean for users who only need specific stores, avoiding unnecessary bloat.
The Project Status section warns of active development and breaking changes until v1.0.0, which can disrupt production code and increase maintenance burden.
Focuses solely on basic CRUD; lacks built-in support for common key-value store features like listings, key expiration, or watchers, requiring workarounds or backend-specific hacks.
Errors are forwarded directly from backend libraries without unification, making error management tricky in storage-agnostic code, as noted in the Design Decisions.