{"id":19195914,"url":"https://github.com/mercari/datastore","last_synced_at":"2025-04-12T23:41:32.463Z","repository":{"id":26904361,"uuid":"110054108","full_name":"mercari/datastore","owner":"mercari","description":"(AE|Cloud) Datastore Wrapper","archived":false,"fork":false,"pushed_at":"2025-02-17T08:37:22.000Z","size":1035,"stargazers_count":215,"open_issues_count":18,"forks_count":20,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-04T03:08:13.426Z","etag":null,"topics":["appengine","datastore","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/mercari.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2017-11-09T02:00:21.000Z","updated_at":"2024-12-20T07:56:03.000Z","dependencies_parsed_at":"2024-06-18T15:22:39.502Z","dependency_job_id":"dd8dc69e-0822-4eb3-a40f-e55e3dfa9e76","html_url":"https://github.com/mercari/datastore","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercari%2Fdatastore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercari%2Fdatastore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercari%2Fdatastore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercari%2Fdatastore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mercari","download_url":"https://codeload.github.com/mercari/datastore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647254,"owners_count":21139081,"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":["appengine","datastore","golang"],"created_at":"2024-11-09T12:11:58.197Z","updated_at":"2025-04-12T23:41:32.425Z","avatar_url":"https://github.com/mercari.png","language":"Go","readme":"# Datastore Wrapper [![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godoc] [![CI](https://github.com/mercari/datastore/actions/workflows/cicd.yml/badge.svg)](https://github.com/mercari/datastore/actions/workflows/cicd.yml)\n\n[godoc]: https://pkg.go.dev/go.mercari.io/datastore/v2\n\n(AppEngine | Cloud) Datastore wrapper for Go 👉\n\nSimple.\nHappy.\nRespect standard library.\n\n```\n$ go get -u go.mercari.io/datastore/v2\n```\n\nsee [v2 doc](https://pkg.go.dev/go.mercari.io/datastore/v2) at first.\n\n## Feature\n\n### DO\n\n* Wrap `google.golang.org/appengine/datastore` and `cloud.google.com/go/datastore`\n    * keep key behavior\n    * align to `cloud.google.com/go/datastore` first\n* Re-implement datastore package\n* Re-implement datastore.SaveStruct \u0026 LoadStruct\n    * Ignore unmapped property\n    * Add PropertyTranslator interface\n        * Convert types like mytime.Unix to time.Time and reverse it\n        * Rename property like CreatedAt to createdAt or created_at and reverse it\n* Re-implement PropertyLoadSaver\n    * Pass context.Context to Save \u0026 Load method\n* Add retry feature to each RPC\n    * e.g. Retry AllocateID when it failed\n* Add middleware layer\n    * About...\n        * Local Cache\n        * AE Memcache\n        * Logging\n        * Retry\n        * etc...\n    * Easy to ON/OFF switching\n* Add some useful methods\n    * `aedatastore/TransactionContext`\n\n### DON'T\n\n* have utility functions\n* support firestore\n\n## Restriction\n\n* `aedatastore` package\n    * When using slice of struct, MUST specified `datastore:\",flatten\"` option.\n        * original (ae \u0026 cloud) datastore.SaveStruct have different behaviors.\n        * see aeprodtest/main.go `/api/test3`\n\n## Committers\n\n * Masahiro Wakame ([@vvakame](https://github.com/vvakame))\n\n## Contribution\n\nPlease read the CLA below carefully before submitting your contribution.\n\nhttps://www.mercari.com/cla/\n\n### Setup environment \u0026 Run tests\n\n* requirements\n    * [gcloud sdk](https://cloud.google.com/sdk/docs/quickstarts)\n        * `gcloud components install app-engine-go`\n        * `gcloud components install beta cloud-datastore-emulator`\n\n1. Testing in local\n\n```\n$ ./setup.sh # exec once\n$ ./serve.sh # exec in background\n$ ./test.sh\n```\n\n## License\n\nCopyright 2017 Mercari, Inc.\n\nLicensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercari%2Fdatastore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmercari%2Fdatastore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercari%2Fdatastore/lists"}