{"id":18721810,"url":"https://github.com/pedro-gutierrez/cmdb","last_synced_at":"2025-11-11T02:30:21.563Z","repository":{"id":111578402,"uuid":"119065337","full_name":"pedro-gutierrez/cmdb","owner":"pedro-gutierrez","description":"A simple KV store written in Go","archived":false,"fork":false,"pushed_at":"2018-01-29T20:40:42.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T11:45:33.808Z","etag":null,"topics":["golang","http","lmdb","rest","s3"],"latest_commit_sha":null,"homepage":null,"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/pedro-gutierrez.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":"2018-01-26T15:04:06.000Z","updated_at":"2018-07-20T13:03:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"710c7574-557b-45a1-9639-953a96a2cd25","html_url":"https://github.com/pedro-gutierrez/cmdb","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/pedro-gutierrez%2Fcmdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-gutierrez%2Fcmdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-gutierrez%2Fcmdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedro-gutierrez%2Fcmdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedro-gutierrez","download_url":"https://codeload.github.com/pedro-gutierrez/cmdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587279,"owners_count":19663892,"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":["golang","http","lmdb","rest","s3"],"created_at":"2024-11-07T13:36:51.145Z","updated_at":"2025-11-11T02:30:21.521Z","avatar_url":"https://github.com/pedro-gutierrez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMDB\n\n* Simple KV store \n* JSON in, JSON out\n* Written in Go\n* LMDB backend.\n* Backup/Restore to/from S3\n\n## Getting started \n\n```\ndocker run \n  -e \"AWS_ACCESS_KEY_ID=xxx\" \\\n  -e \"AWS_ACCESS_KEY_ID=yyy\" \\ \n  -e \"AWS_REGION=zzz\" \\\n  -e \"AWS_BUCKET=backups\" \\\n  -e \"CMDB_MAP_SIZE=10737418240\" \\\n  -e \"CMDB_NAME=countries\" \\\n  -e \"CMDB_PORT=7801\" \\\n  -e \"CMDB_DATA=/data\" \\\n  -v \"/tmp/data:/data\" \\ \n  -n cmdb \\\n  -p 7801:7801 \\\n  pedrogutierrez/cmdb:latest\n```\n\n## Usage\n\nSet a value for key:\n\n```\n$ curl -X POST http://localhost:7801/foo --data \"1\"\n```\n\nGet a single value for a key:\n\n```\n$ curl http://localhost:7801/foo\n\n1\n```\n\nSet multiple values for the same key\n\n```\n$ curl -X POST http://localhost:7801/foo --data \"2\"\n$ curl -X POST http://localhost:7801/foo --data \"3\"\n$ curl -X POST http://localhost:7801/foo --data \"4\"\n\n```\n\nGet multiple values for the same key\n\n```\n$ curl http://localhost:7801/keys/foo?count=2\n\n[1,2]\n```\n\n```\n$ curl http://localhost:7801/keys/foo?count=2\u0026skip=2\n\n[3,4]\n```\n\nUnique keys:\n\n```\n$ curl -X POST -i http://localhost:7801/bar?unique=true --data \"1\"\n\nHTTP/1.1 200 OK\nDate: Mon, 29 Jan 2018 18:43:29 GMT\nContent-Length: 0\nContent-Type: text/plain; charset=utf-8\n\n$ curl -X POST -i http://localhost:7801/bar?unique=true --data \"2\"\n\nHTTP/1.1 409 Conflict\nDate: Mon, 29 Jan 2018 18:44:09 GMT\nContent-Length: 8\nContent-Type: text/plain; charset=utf-8\n\nConflict\n```\n\nDo a backup to S3:\n\n```\n$ curl -X POST http://localhost:7801/backups/new\n\n{\"name\":\"20180126174859\",\"size\":502}\n```\n\nRestore a backup from S3:\n\n```\n$ curl -X POST http://localhost:7801/backups/20180126174859/restore\n\n{ \"size\": 502}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedro-gutierrez%2Fcmdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedro-gutierrez%2Fcmdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedro-gutierrez%2Fcmdb/lists"}