{"id":37185223,"url":"https://github.com/x-color/docdb-in-go","last_synced_at":"2026-01-14T21:26:04.156Z","repository":{"id":104528183,"uuid":"505021061","full_name":"x-color/docdb-in-go","owner":"x-color","description":"document db in golang","archived":false,"fork":false,"pushed_at":"2022-07-24T08:18:09.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T06:28:57.634Z","etag":null,"topics":["documentdb","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x-color.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-19T05:33:28.000Z","updated_at":"2022-07-24T08:17:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"e060037c-b388-4cd3-8b52-8f60f463f16d","html_url":"https://github.com/x-color/docdb-in-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/x-color/docdb-in-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-color%2Fdocdb-in-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-color%2Fdocdb-in-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-color%2Fdocdb-in-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-color%2Fdocdb-in-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-color","download_url":"https://codeload.github.com/x-color/docdb-in-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-color%2Fdocdb-in-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["documentdb","golang"],"created_at":"2026-01-14T21:26:03.133Z","updated_at":"2026-01-14T21:26:04.138Z","avatar_url":"https://github.com/x-color.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document DB in Go\n\nI created the document DB referring to [the blog](https://notes.eatonphil.com/documentdb.html).\n\n## Usage\n\n```sh\n$ go run main.go\n\n$ curl -X POST \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"id\": \"1\", \"name\": \"bookA\", \"detail\": {\"price\": 100,\"description\": \"this is sample book\"}}' \\\n    http://localhost:8080/docs\n{\"id\":\"c759b15f-131e-41d6-af3c-5680c8f1ea11\"}\n\n$ curl -X POST \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"id\": \"2\", \"name\": \"bookB\", \"detail\": {\"price\": 200,\"description\": \"this is sample book\"}}' \\\n    http://localhost:8080/docs\n{\"id\":\"23a96578-e900-424f-a73f-808ff15d0823\"}\n\n$ curl -s http://localhost:8080/docs/23a96578-e900-424f-a73f-808ff15d0823 | jq\n{\n  \"detail\": {\n    \"description\": \"this is sample book\",\n    \"price\": 200\n  },\n  \"id\": \"2\",\n  \"name\": \"bookB\"\n}\n\n$ curl --get -s http://localhost:8080/docs --data-urlencode 'q=name:\"bookA\"' | jq\n{\n  \"count\": 1,\n  \"documents\": [\n    {\n      \"document\": {\n        \"detail\": {\n          \"description\": \"this is sample book\",\n          \"price\": 100\n        },\n        \"id\": \"1\",\n        \"name\": \"bookA\"\n      },\n      \"id\": \"c759b15f-131e-41d6-af3c-5680c8f1ea11\"\n    }\n  ]\n}\n\n$ curl --get -s http://localhost:8080/docs --data-urlencode 'q=detail.price:\u003e150' | jq\n{\n  \"count\": 1,\n  \"documents\": [\n    {\n      \"document\": {\n        \"detail\": {\n          \"description\": \"this is sample book\",\n          \"price\": 200\n        },\n        \"id\": \"2\",\n        \"name\": \"bookB\"\n      },\n      \"id\": \"23a96578-e900-424f-a73f-808ff15d0823\"\n    }\n  ]\n}\n\n$ curl --get -s http://localhost:8080/docs --data-urlencode 'q=detail.description:\"this is sample book\"' | jq\n{\n  \"count\": 2,\n  \"documents\": [\n    {\n      \"document\": {\n        \"detail\": {\n          \"description\": \"this is sample book\",\n          \"price\": 100\n        },\n        \"id\": \"1\",\n        \"name\": \"bookA\"\n      },\n      \"id\": \"c759b15f-131e-41d6-af3c-5680c8f1ea11\"\n    },\n    {\n      \"document\": {\n        \"detail\": {\n          \"description\": \"this is sample book\",\n          \"price\": 200\n        },\n        \"id\": \"2\",\n        \"name\": \"bookB\"\n      },\n      \"id\": \"23a96578-e900-424f-a73f-808ff15d0823\"\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-color%2Fdocdb-in-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-color%2Fdocdb-in-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-color%2Fdocdb-in-go/lists"}