{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/186948228","pull_request_review_id":118626400,"id":186948228,"diff_hunk":"@@ -250,13 +250,13 @@ I'm keeping the API deliberately simple to avoid getting bogged-down in applicat\n     {\"isbn\":\"978-1420931693\",\"title\":\"The Republic\",\"author\":\"Plato\"}\n     ```\n \n-    If you're following along hopefully you've got the same response. Notice how the `book` object we initialized in our Go code has been automatically marshaled to JSON?\n+    如果你一路照着做，你很有可能得到一个相同的响应。注意到了我们在 Go 代码中初始化的 `book` 对象是怎样被自动解析成 JSON 的吗？\n \n-## Hooking it up to DynamoDB\n+## 链接到 DynamoDB\n \n-1.  In this section we're going to add a persistence layer for our data which can be accessed by our lambda function. For this I'll use Amazon DynamoDB (it integrates nicely with AWS lambda and has a generous free-usage tier). If you're not familiar with DynamoDB, there's a decent run down of [the basics here](https://www.tutorialspoint.com/dynamodb/dynamodb_overview.htm).\n+1.  在这一章中要为 lambda 函数存取的数据添加持久层。我将会使用 Amazon DynamoDB（它跟 AWS lambda 结合得很出色，并且免费用量也不小）。如果你对 DynamoDB 不熟悉，[这儿](https://www.tutorialspoint.com/dynamodb/dynamodb_overview.htm)有一个不错的基本纲要。\n \n-    The first thing we need to do is create a `Books` table to hold the book records. DynanmoDB is schema-less, but we do need to define the partion key (a bit like a primary key) on the ISBN field. We can do this in one command like so:\n+    首先要创建一张 `Books` 表来保存 book 记录。DynanmoDB 是没有 schema 的， 但我们需要在 ISBN 字段上定义分区键（有点像主键）。我们只需用以下这个命令：","path":"TODO1/serverless-api-with-go-and-aws-lambda.md","position":240,"original_position":240,"commit_id":"c4b4b209f509f7935e06b905cba758eed6fb7b4f","original_commit_id":"c4b4b209f509f7935e06b905cba758eed6fb7b4f","user":{"login":"luochen1992","id":23700463,"avatar_url":"https://avatars1.githubusercontent.com/u/23700463?v=4","gravatar_id":"","url":"https://api.github.com/users/luochen1992","html_url":"https://github.com/luochen1992","followers_url":"https://api.github.com/users/luochen1992/followers","following_url":"https://api.github.com/users/luochen1992/following{/other_user}","gists_url":"https://api.github.com/users/luochen1992/gists{/gist_id}","starred_url":"https://api.github.com/users/luochen1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luochen1992/subscriptions","organizations_url":"https://api.github.com/users/luochen1992/orgs","repos_url":"https://api.github.com/users/luochen1992/repos","events_url":"https://api.github.com/users/luochen1992/events{/privacy}","received_events_url":"https://api.github.com/users/luochen1992/received_events","type":"User","site_admin":false},"body":"『，』后带有空格。","created_at":"2018-05-09T07:07:22Z","updated_at":"2018-05-09T07:08:44Z","html_url":"https://github.com/xitu/gold-miner/pull/3786#discussion_r186948228","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3786","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/186948228"},"html":{"href":"https://github.com/xitu/gold-miner/pull/3786#discussion_r186948228"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3786"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/3786","id":186651181,"html_url":"https://github.com/xitu/gold-miner/pull/3786","diff_url":"https://github.com/xitu/gold-miner/pull/3786.diff","patch_url":"https://github.com/xitu/gold-miner/pull/3786.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/3786","number":3786,"state":"open","locked":false,"title":"使用 Go 和 AWS Lambda 构建无服务 API","user":{"login":"sisibeloved","id":9612053,"avatar_url":"https://avatars0.githubusercontent.com/u/9612053?v=4","gravatar_id":"","url":"https://api.github.com/users/sisibeloved","html_url":"https://github.com/sisibeloved","followers_url":"https://api.github.com/users/sisibeloved/followers","following_url":"https://api.github.com/users/sisibeloved/following{/other_user}","gists_url":"https://api.github.com/users/sisibeloved/gists{/gist_id}","starred_url":"https://api.github.com/users/sisibeloved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sisibeloved/subscriptions","organizations_url":"https://api.github.com/users/sisibeloved/orgs","repos_url":"https://api.github.com/users/sisibeloved/repos","events_url":"https://api.github.com/users/sisibeloved/events{/privacy}","received_events_url":"https://api.github.com/users/sisibeloved/received_events","type":"User","site_admin":false},"body":"译文翻译完成，resolve #3737 \r\n","created_at":"2018-05-08T14:23:11Z","updated_at":"2018-05-09T07:08:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7d0c9fc9ccb1375d1476d46cdb192b78d210cca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":514335651,"url":"https://api.github.com/repos/xitu/gold-miner/labels/%E5%90%8E%E7%AB%AF","name":"后端","color":"1d76db","default":false},{"id":329563971,"url":"https://api.github.com/repos/xitu/gold-miner/labels/%E6%A0%A1%E5%AF%B9%E8%AE%A4%E9%A2%86","name":"校对认领","color":"ff5722","default":false},{"id":322084033,"url":"https://api.github.com/repos/xitu/gold-miner/labels/%E6%AD%A3%E5%9C%A8%E6%A0%A1%E5%AF%B9","name":"正在校对","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3786/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/3786/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/3786/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/c4b4b209f509f7935e06b905cba758eed6fb7b4f","head":{"label":"sisibeloved:translation/How-to-build-a-Serverless-API-with-Go-and-AWS-Lambda","ref":"translation/How-to-build-a-Serverless-API-with-Go-and-AWS-Lambda","sha":"c4b4b209f509f7935e06b905cba758eed6fb7b4f","user":{"login":"sisibeloved","id":9612053,"avatar_url":"https://avatars0.githubusercontent.com/u/9612053?v=4","gravatar_id":"","url":"https://api.github.com/users/sisibeloved","html_url":"https://github.com/sisibeloved","followers_url":"https://api.github.com/users/sisibeloved/followers","following_url":"https://api.github.com/users/sisibeloved/following{/other_user}","gists_url":"https://api.github.com/users/sisibeloved/gists{/gist_id}","starred_url":"https://api.github.com/users/sisibeloved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sisibeloved/subscriptions","organizations_url":"https://api.github.com/users/sisibeloved/orgs","repos_url":"https://api.github.com/users/sisibeloved/repos","events_url":"https://api.github.com/users/sisibeloved/events{/privacy}","received_events_url":"https://api.github.com/users/sisibeloved/received_events","type":"User","site_admin":false},"repo":{"id":131087816,"name":"gold-miner","full_name":"sisibeloved/gold-miner","owner":{"login":"sisibeloved","id":9612053,"avatar_url":"https://avatars0.githubusercontent.com/u/9612053?v=4","gravatar_id":"","url":"https://api.github.com/users/sisibeloved","html_url":"https://github.com/sisibeloved","followers_url":"https://api.github.com/users/sisibeloved/followers","following_url":"https://api.github.com/users/sisibeloved/following{/other_user}","gists_url":"https://api.github.com/users/sisibeloved/gists{/gist_id}","starred_url":"https://api.github.com/users/sisibeloved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sisibeloved/subscriptions","organizations_url":"https://api.github.com/users/sisibeloved/orgs","repos_url":"https://api.github.com/users/sisibeloved/repos","events_url":"https://api.github.com/users/sisibeloved/events{/privacy}","received_events_url":"https://api.github.com/users/sisibeloved/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sisibeloved/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":true,"url":"https://api.github.com/repos/sisibeloved/gold-miner","forks_url":"https://api.github.com/repos/sisibeloved/gold-miner/forks","keys_url":"https://api.github.com/repos/sisibeloved/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sisibeloved/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sisibeloved/gold-miner/teams","hooks_url":"https://api.github.com/repos/sisibeloved/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/sisibeloved/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/sisibeloved/gold-miner/events","assignees_url":"https://api.github.com/repos/sisibeloved/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/sisibeloved/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/sisibeloved/gold-miner/tags","blobs_url":"https://api.github.com/repos/sisibeloved/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sisibeloved/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sisibeloved/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/sisibeloved/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sisibeloved/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/sisibeloved/gold-miner/languages","stargazers_url":"https://api.github.com/repos/sisibeloved/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/sisibeloved/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/sisibeloved/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/sisibeloved/gold-miner/subscription","commits_url":"https://api.github.com/repos/sisibeloved/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/sisibeloved/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/sisibeloved/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/sisibeloved/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/sisibeloved/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/sisibeloved/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sisibeloved/gold-miner/merges","archive_url":"https://api.github.com/repos/sisibeloved/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sisibeloved/gold-miner/downloads","issues_url":"https://api.github.com/repos/sisibeloved/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/sisibeloved/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/sisibeloved/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/sisibeloved/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sisibeloved/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/sisibeloved/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/sisibeloved/gold-miner/deployments","created_at":"2018-04-26T02:17:23Z","updated_at":"2018-05-04T05:54:48Z","pushed_at":"2018-05-08T14:21:32Z","git_url":"git://github.com/sisibeloved/gold-miner.git","ssh_url":"git@github.com:sisibeloved/gold-miner.git","clone_url":"https://github.com/sisibeloved/gold-miner.git","svn_url":"https://github.com/sisibeloved/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":32182,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xitu:master","ref":"master","sha":"5adf8f55f3a6dc17d9d7b9d7fde7ff123be52e60","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars2.githubusercontent.com/u/10482599?v=4","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"🥇掘金翻译计划，可能是世界最大最好的英译中技术社区，最懂读者和译者的翻译平台：","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2018-05-09T06:21:03Z","pushed_at":"2018-05-09T06:20:59Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"https://juejin.im/tag/掘金翻译计划","size":32294,"stargazers_count":13675,"watchers_count":13675,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2417,"mirror_url":null,"archived":false,"open_issues_count":37,"license":null,"forks":2417,"open_issues":37,"watchers":13675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3786"},"html":{"href":"https://github.com/xitu/gold-miner/pull/3786"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/3786"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/3786/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3786/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/3786/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/c4b4b209f509f7935e06b905cba758eed6fb7b4f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"luochen1992"}}