{"id":15272434,"url":"https://github.com/eyalgolan/key-value-persistent-store","last_synced_at":"2026-03-03T14:34:06.012Z","repository":{"id":61626064,"uuid":"536027367","full_name":"eyalgolan/key-value-persistent-store","owner":"eyalgolan","description":"A service that exposes a REST API which allows users to create, update, delete and retrieve answers as key-value pairs.","archived":false,"fork":false,"pushed_at":"2023-07-10T17:55:47.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T19:28:50.530Z","etag":null,"topics":["docker","docker-compose","gin","gin-gonic","go","golang","gorm","gorm-orm","key-value","postgres","postgresql","rest","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyalgolan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-13T08:20:38.000Z","updated_at":"2022-09-26T18:47:37.000Z","dependencies_parsed_at":"2024-06-20T14:03:24.013Z","dependency_job_id":"47c81734-fd0b-4e28-84c6-0befe99bef3f","html_url":"https://github.com/eyalgolan/key-value-persistent-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyalgolan%2Fkey-value-persistent-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyalgolan%2Fkey-value-persistent-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyalgolan%2Fkey-value-persistent-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyalgolan%2Fkey-value-persistent-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyalgolan","download_url":"https://codeload.github.com/eyalgolan/key-value-persistent-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244990069,"owners_count":20543614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","gin","gin-gonic","go","golang","gorm","gorm-orm","key-value","postgres","postgresql","rest","rest-api"],"created_at":"2024-09-30T09:06:51.093Z","updated_at":"2025-10-25T13:03:11.632Z","avatar_url":"https://github.com/eyalgolan.png","language":"Go","readme":"# key-value persistent store\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/eyalgolan/key-value-persistent-store)](https://goreportcard.com/report/github.com/eyalgolan/key-value-persistent-store)\n\nA service that exposes a REST API that allows users to create, update, delete, and retrieve answers as key-value pairs.\nThe answers are stored in a Postgres DB, so they can handle service restarts.\n\nAn answer is defined as:\n\n```json\n{\n  \"key\" : \"name\",\n  \"value\" : \"Eyal\"\n}\n```\n\nAn event is defined as:\n```json\n{\n  \"event\" : \"create\",\n  \"data\" : \n  {\n    \"key\": \"name\",\n    \"value\": \"Eyal\"\n  }\n}\n```\n### API\nThe API exposes the following endpoints:\n\n* Get answer for a given key (returns the latest answer for the given key): ```GET /answers/:key```\n* Create answer: ```POST /answers```\n* Update answer: ```PUT /answers```\n* Delete answer: ```DELETE /answers/:key```\n* Get history for a given key (returns an array of events in chronological order):\n```GET /answers/:key/history```\n\n\n### HOW TO RUN\n#### Pre-requisites\n1. Have docker and docker-compose installed and a docker engine running.\n2. Have ports 5432 and 8080 available.\n\nTo first build and run the application, run:\n```bash\nmake install\n```\nFor later runs, use:\n```bash\nmake start\n```\nTo stop the application run:\n```bash\nmake stop\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyalgolan%2Fkey-value-persistent-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyalgolan%2Fkey-value-persistent-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyalgolan%2Fkey-value-persistent-store/lists"}