GitHub PullRequestReviewCommentEvent at 2014-10-29 11:04:06
Repository: macaroon
Actor: rogpeppe
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/comments/19530655","id":19530655,"diff_hunk":"@@ -0,0 +1,174 @@\n+package caveatid\n+\n+import (\n+\t\"bytes\"\n+\t\"crypto/rand\"\n+\t\"encoding/base64\"\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\n+\t\"code.google.com/p/go.crypto/nacl/box\"\n+\n+\t\"github.com/rogpeppe/macaroon/bakery\"\n+)\n+\n+// PublicKeyLocatorFunc defines a function which provides an Ed25519 (256-bit)\n+// public key for the given location string.\n+type PublicKeyLocatorFunc func(loc string) *[KeyLen]byte\n+\n+// MapPublicKeyLocator creates a PublicKeyLocatorFunc which returns the public\n+// key matching the given location, according to the provided mapping.\n+func MapPublicKeyLocator(ref map[string]*[KeyLen]byte) PublicKeyLocatorFunc {\n+\tm := make(map[string]*[KeyLen]byte)\n+\tfor k, vref := range ref {\n+\t\tv := new([KeyLen]byte)\n+\t\tcopy(v[:], vref[:])\n+\t\tm[k] = v\n+\t}\n+\treturn func(loc string) *[KeyLen]byte {\n+\t\treturn m[loc]\n+\t}\n+}\n+\n+// CaveatIdRecord contains the third-party caveat root key and condition.  This","path":"caveatid/codec.go","position":33,"original_position":33,"commit_id":"e3683fbe5d987e3a9b43fa8b32b26c49929d073f","original_commit_id":"e3683fbe5d987e3a9b43fa8b32b26c49929d073f","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=2","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"body":"Do you think this needs to be exported?","created_at":"2014-10-29T11:04:06Z","updated_at":"2014-10-29T11:04:06Z","html_url":"https://github.com/rogpeppe/macaroon/pull/22#discussion_r19530655","pull_request_url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/comments/19530655"},"html":{"href":"https://github.com/rogpeppe/macaroon/pull/22#discussion_r19530655"},"pull_request":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22","id":23506416,"html_url":"https://github.com/rogpeppe/macaroon/pull/22","diff_url":"https://github.com/rogpeppe/macaroon/pull/22.diff","patch_url":"https://github.com/rogpeppe/macaroon/pull/22.patch","issue_url":"https://api.github.com/repos/rogpeppe/macaroon/issues/22","number":22,"state":"open","locked":false,"title":"Refactor third-party caveat encoder/decoder to caveatid package.","user":{"login":"cmars","id":23741,"avatar_url":"https://avatars.githubusercontent.com/u/23741?v=2","gravatar_id":"","url":"https://api.github.com/users/cmars","html_url":"https://github.com/cmars","followers_url":"https://api.github.com/users/cmars/followers","following_url":"https://api.github.com/users/cmars/following{/other_user}","gists_url":"https://api.github.com/users/cmars/gists{/gist_id}","starred_url":"https://api.github.com/users/cmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmars/subscriptions","organizations_url":"https://api.github.com/users/cmars/orgs","repos_url":"https://api.github.com/users/cmars/repos","events_url":"https://api.github.com/users/cmars/events{/privacy}","received_events_url":"https://api.github.com/users/cmars/received_events","type":"User","site_admin":false},"body":"Remove non-public-key third-party caveatid encoding for now (this can always be added\r\nback later as an alternative implementation of bakery.CaveatId{Encoder,Decoder}).\r\nUpdated httpbakery & tests accordingly.","created_at":"2014-10-29T03:26:00Z","updated_at":"2014-10-29T11:04:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1acd85c3d4b3e2ea03658c5668687e5ec426dda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22/commits","review_comments_url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22/comments","review_comment_url":"https://api.github.com/repos/rogpeppe/macaroon/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rogpeppe/macaroon/issues/22/comments","statuses_url":"https://api.github.com/repos/rogpeppe/macaroon/statuses/e3683fbe5d987e3a9b43fa8b32b26c49929d073f","head":{"label":"cmars:cmars-003-caveatid-pkg","ref":"cmars-003-caveatid-pkg","sha":"e3683fbe5d987e3a9b43fa8b32b26c49929d073f","user":{"login":"cmars","id":23741,"avatar_url":"https://avatars.githubusercontent.com/u/23741?v=2","gravatar_id":"","url":"https://api.github.com/users/cmars","html_url":"https://github.com/cmars","followers_url":"https://api.github.com/users/cmars/followers","following_url":"https://api.github.com/users/cmars/following{/other_user}","gists_url":"https://api.github.com/users/cmars/gists{/gist_id}","starred_url":"https://api.github.com/users/cmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmars/subscriptions","organizations_url":"https://api.github.com/users/cmars/orgs","repos_url":"https://api.github.com/users/cmars/repos","events_url":"https://api.github.com/users/cmars/events{/privacy}","received_events_url":"https://api.github.com/users/cmars/received_events","type":"User","site_admin":false},"repo":{"id":20999587,"name":"macaroon","full_name":"cmars/macaroon","owner":{"login":"cmars","id":23741,"avatar_url":"https://avatars.githubusercontent.com/u/23741?v=2","gravatar_id":"","url":"https://api.github.com/users/cmars","html_url":"https://github.com/cmars","followers_url":"https://api.github.com/users/cmars/followers","following_url":"https://api.github.com/users/cmars/following{/other_user}","gists_url":"https://api.github.com/users/cmars/gists{/gist_id}","starred_url":"https://api.github.com/users/cmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmars/subscriptions","organizations_url":"https://api.github.com/users/cmars/orgs","repos_url":"https://api.github.com/users/cmars/repos","events_url":"https://api.github.com/users/cmars/events{/privacy}","received_events_url":"https://api.github.com/users/cmars/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmars/macaroon","description":"A native Go implementation of macaroons","fork":true,"url":"https://api.github.com/repos/cmars/macaroon","forks_url":"https://api.github.com/repos/cmars/macaroon/forks","keys_url":"https://api.github.com/repos/cmars/macaroon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmars/macaroon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmars/macaroon/teams","hooks_url":"https://api.github.com/repos/cmars/macaroon/hooks","issue_events_url":"https://api.github.com/repos/cmars/macaroon/issues/events{/number}","events_url":"https://api.github.com/repos/cmars/macaroon/events","assignees_url":"https://api.github.com/repos/cmars/macaroon/assignees{/user}","branches_url":"https://api.github.com/repos/cmars/macaroon/branches{/branch}","tags_url":"https://api.github.com/repos/cmars/macaroon/tags","blobs_url":"https://api.github.com/repos/cmars/macaroon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmars/macaroon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmars/macaroon/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmars/macaroon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmars/macaroon/statuses/{sha}","languages_url":"https://api.github.com/repos/cmars/macaroon/languages","stargazers_url":"https://api.github.com/repos/cmars/macaroon/stargazers","contributors_url":"https://api.github.com/repos/cmars/macaroon/contributors","subscribers_url":"https://api.github.com/repos/cmars/macaroon/subscribers","subscription_url":"https://api.github.com/repos/cmars/macaroon/subscription","commits_url":"https://api.github.com/repos/cmars/macaroon/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmars/macaroon/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmars/macaroon/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmars/macaroon/issues/comments/{number}","contents_url":"https://api.github.com/repos/cmars/macaroon/contents/{+path}","compare_url":"https://api.github.com/repos/cmars/macaroon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmars/macaroon/merges","archive_url":"https://api.github.com/repos/cmars/macaroon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmars/macaroon/downloads","issues_url":"https://api.github.com/repos/cmars/macaroon/issues{/number}","pulls_url":"https://api.github.com/repos/cmars/macaroon/pulls{/number}","milestones_url":"https://api.github.com/repos/cmars/macaroon/milestones{/number}","notifications_url":"https://api.github.com/repos/cmars/macaroon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmars/macaroon/labels{/name}","releases_url":"https://api.github.com/repos/cmars/macaroon/releases{/id}","created_at":"2014-06-19T12:33:10Z","updated_at":"2014-06-26T02:11:16Z","pushed_at":"2014-10-29T03:24:35Z","git_url":"git://github.com/cmars/macaroon.git","ssh_url":"git@github.com:cmars/macaroon.git","clone_url":"https://github.com/cmars/macaroon.git","svn_url":"https://github.com/cmars/macaroon","homepage":null,"size":252,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rogpeppe:master","ref":"master","sha":"dd2e7169116c5829e323ef61efa027a34d9b4be1","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=2","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"repo":{"id":20922666,"name":"macaroon","full_name":"rogpeppe/macaroon","owner":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=2","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rogpeppe/macaroon","description":"A native Go implementation of macaroons","fork":false,"url":"https://api.github.com/repos/rogpeppe/macaroon","forks_url":"https://api.github.com/repos/rogpeppe/macaroon/forks","keys_url":"https://api.github.com/repos/rogpeppe/macaroon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogpeppe/macaroon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogpeppe/macaroon/teams","hooks_url":"https://api.github.com/repos/rogpeppe/macaroon/hooks","issue_events_url":"https://api.github.com/repos/rogpeppe/macaroon/issues/events{/number}","events_url":"https://api.github.com/repos/rogpeppe/macaroon/events","assignees_url":"https://api.github.com/repos/rogpeppe/macaroon/assignees{/user}","branches_url":"https://api.github.com/repos/rogpeppe/macaroon/branches{/branch}","tags_url":"https://api.github.com/repos/rogpeppe/macaroon/tags","blobs_url":"https://api.github.com/repos/rogpeppe/macaroon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogpeppe/macaroon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogpeppe/macaroon/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogpeppe/macaroon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogpeppe/macaroon/statuses/{sha}","languages_url":"https://api.github.com/repos/rogpeppe/macaroon/languages","stargazers_url":"https://api.github.com/repos/rogpeppe/macaroon/stargazers","contributors_url":"https://api.github.com/repos/rogpeppe/macaroon/contributors","subscribers_url":"https://api.github.com/repos/rogpeppe/macaroon/subscribers","subscription_url":"https://api.github.com/repos/rogpeppe/macaroon/subscription","commits_url":"https://api.github.com/repos/rogpeppe/macaroon/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogpeppe/macaroon/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogpeppe/macaroon/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogpeppe/macaroon/issues/comments/{number}","contents_url":"https://api.github.com/repos/rogpeppe/macaroon/contents/{+path}","compare_url":"https://api.github.com/repos/rogpeppe/macaroon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogpeppe/macaroon/merges","archive_url":"https://api.github.com/repos/rogpeppe/macaroon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogpeppe/macaroon/downloads","issues_url":"https://api.github.com/repos/rogpeppe/macaroon/issues{/number}","pulls_url":"https://api.github.com/repos/rogpeppe/macaroon/pulls{/number}","milestones_url":"https://api.github.com/repos/rogpeppe/macaroon/milestones{/number}","notifications_url":"https://api.github.com/repos/rogpeppe/macaroon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogpeppe/macaroon/labels{/name}","releases_url":"https://api.github.com/repos/rogpeppe/macaroon/releases{/id}","created_at":"2014-06-17T12:38:20Z","updated_at":"2014-10-10T01:47:16Z","pushed_at":"2014-10-23T14:56:29Z","git_url":"git://github.com/rogpeppe/macaroon.git","ssh_url":"git@github.com:rogpeppe/macaroon.git","clone_url":"https://github.com/rogpeppe/macaroon.git","svn_url":"https://github.com/rogpeppe/macaroon","homepage":null,"size":1010,"stargazers_count":14,"watchers_count":14,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22"},"html":{"href":"https://github.com/rogpeppe/macaroon/pull/22"},"issue":{"href":"https://api.github.com/repos/rogpeppe/macaroon/issues/22"},"comments":{"href":"https://api.github.com/repos/rogpeppe/macaroon/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rogpeppe/macaroon/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/rogpeppe/macaroon/statuses/e3683fbe5d987e3a9b43fa8b32b26c49929d073f"}}}}