From 0bd8c0a240df3d645d55a167744986955e8ee039 Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sun, 7 Jul 2024 08:45:21 -0700 Subject: [PATCH 1/3] Updating README --- README.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 342bb89..d7bede7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/tarmac-project/hord) [![codecov](https://codecov.io/gh/tarmac-project/hord/branch/main/graph/badge.svg?token=0TTTEWHLVN)](https://codecov.io/gh/tarmac-project/hord) [![Go Report Card](https://goreportcard.com/badge/github.com/tarmac-project/hord)](https://goreportcard.com/report/github.com/tarmac-project/hord) -[![Documentation](https://godoc.org/github.com/tarmac-project/hord?status.svg)](http://godoc.org/github.com/tarmac-project/hord) +[![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord.svg)](https://pkg.go.dev/github.com/tarmac-project/hord) +[![License](https://img.shields.io/github/license/tarmac-project/hord)](https://choosealicense.com/licenses/apache-2.0/) Package hord provides a simple and extensible interface for interacting with various database systems in a uniform way. @@ -24,20 +25,24 @@ Hord is designed to be a database-agnostic library that provides a common interf ## Database Drivers: -| Database | Support | Comments | Protocol Compatible Alternatives | -| -------- | ------- | -------- | -------------------------------- | -| [BoltDB](https://github.com/etcd-io/bbolt) | ✅ | | | -| [Cassandra](https://cassandra.apache.org/) | ✅ | | [ScyllaDB](https://www.scylladb.com/), [YugabyteDB](https://www.yugabyte.com/), [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction) | -| Hashmap | ✅ | Optionally allows storing to YAML or JSON file || -| Mock | ✅ | Mock Database interactions within unit tests || -| [NATS](https://nats.io/) | ✅ | Experimental || -| [Redis](https://redis.io/) | ✅ || [Dragonfly](https://www.dragonflydb.io/), [KeyDB](https://docs.keydb.dev/) | +| Database | Support | Docs | Comments | Protocol Compatible Alternatives | +| -------- | ------- | ---- | -------- | -------------------------------- | +| [BoltDB](https://github.com/etcd-io/bbolt) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/bbolt.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/bbolt) || +| [Cassandra](https://cassandra.apache.org/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/cassandra.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/cassandra) | [ScyllaDB](https://www.scylladb.com/), [YugabyteDB](https://www.yugabyte.com/), [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction) | +| Hashmap | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/hashmap.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/hashmap) | In-memory, Optional storage to YAML or JSON file || +| [Mock](https://pkg.go.dev/github.com/tarmac-project/hord/mock) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/mock)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/mock) | Mock Database interactions within unit tests || +| [NATS](https://nats.io/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/nats)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/nats) | Experimental || +| [Redis](https://redis.io/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/redis)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/redis) || [Dragonfly](https://www.dragonflydb.io/), [KeyDB](https://docs.keydb.dev/) | ## Caching Implementations -| Cache Strategy | Comments | -| -------------- | -------- | -| Look Aside | Cache is checked before database, if not found in cache, database is checked and cache is updated | +[![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/cache)](https://pkg.go.dev/github.com/tarmac-project/hord/cache) + +Hord provides a set of cache implementations that can be used with the Hord interface to allow combining datastores. For example, you can use the Look Aside cache driver to check Redis before fetching from Cassandra. + +| Cache Strategy | Docs | Comments | +| -------------- | ---- | -------- | +| Look Aside | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/cache/lookaside)](https://pkg.go.dev/github.com/tarmac-project/hord/cache/lookaside) | Cache is checked before database, if not found in cache, database is checked and cache is updated | ## Usage @@ -54,7 +59,7 @@ For example, to use the Redis driver: ```go import ( "github.com/tarmac-project/hord" - "github.com/tarmac-project/hord/redis" + "github.com/tarmac-project/hord/drivers/redis" ) func main() { From a5080bd394e07e48cac929a01b92fbb1119c63f6 Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sun, 7 Jul 2024 08:51:17 -0700 Subject: [PATCH 2/3] Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7bede7..ec51106 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Hord is designed to be a database-agnostic library that provides a common interf - **Cache Implementations**: Combine database drivers with pre-defined cache implementations. -## Database Drivers: +## Database Drivers | Database | Support | Docs | Comments | Protocol Compatible Alternatives | | -------- | ------- | ---- | -------- | -------------------------------- | From 58ab53069583286ad1849f91ee4bb1ef31b2159a Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sun, 7 Jul 2024 08:53:46 -0700 Subject: [PATCH 3/3] Fixing table columns --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec51106..60524c5 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ Hord is designed to be a database-agnostic library that provides a common interf | Database | Support | Docs | Comments | Protocol Compatible Alternatives | | -------- | ------- | ---- | -------- | -------------------------------- | -| [BoltDB](https://github.com/etcd-io/bbolt) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/bbolt.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/bbolt) || -| [Cassandra](https://cassandra.apache.org/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/cassandra.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/cassandra) | [ScyllaDB](https://www.scylladb.com/), [YugabyteDB](https://www.yugabyte.com/), [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction) | +| [BoltDB](https://github.com/etcd-io/bbolt) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/bbolt.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/bbolt) | | | +| [Cassandra](https://cassandra.apache.org/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/cassandra.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/cassandra) | | [ScyllaDB](https://www.scylladb.com/), [YugabyteDB](https://www.yugabyte.com/), [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction) | | Hashmap | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/hashmap.svg)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/hashmap) | In-memory, Optional storage to YAML or JSON file || | [Mock](https://pkg.go.dev/github.com/tarmac-project/hord/mock) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/mock)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/mock) | Mock Database interactions within unit tests || | [NATS](https://nats.io/) | ✅ | [![Go Reference](https://pkg.go.dev/badge/github.com/tarmac-project/hord/drivers/nats)](https://pkg.go.dev/github.com/tarmac-project/hord/drivers/nats) | Experimental ||