{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/93437325","pull_request_review_id":13964008,"id":93437325,"diff_hunk":"@@ -0,0 +1,136 @@\n+// -*- Mode: Go; indent-tabs-mode: t -*-\n+\n+/*\n+ * Copyright (C) 2016 Canonical Ltd\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 3 as\n+ * published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+package builtin\n+\n+import (\n+\t\"bytes\"\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\t\"github.com/snapcore/snapd/interfaces\"\n+)\n+\n+// OvermountInterface allows customizing the userspace exposed to the snap\n+type OvermountInterface struct{}\n+\n+func (iface *OvermountInterface) Name() string {\n+\treturn \"overmount\"\n+}\n+\n+func (iface *OvermountInterface) SanitizeSlot(slot *interfaces.Slot) error {\n+\tif iface.Name() != slot.Interface {\n+\t\tpanic(fmt.Sprintf(\"slot is not of interface %q\", iface))\n+\t}\n+\n+\treturn nil\n+}\n+\n+func (iface *OvermountInterface) SanitizePlug(plug *interfaces.Plug) error {\n+\tif iface.Name() != plug.Interface {\n+\t\tpanic(fmt.Sprintf(\"plug is not of interface %q\", iface))\n+\t}\n+\n+\t// check that we both a source and a destination\n+\tsource, destination, err := iface.getAttribs(plug.Attrs)","path":"interfaces/builtin/overmount.go","position":51,"original_position":51,"commit_id":"bb0bae9a35b192454b3c1c6b99cf3eda9c9f42f6","original_commit_id":"bb0bae9a35b192454b3c1c6b99cf3eda9c9f42f6","user":{"login":"zyga","id":784262,"avatar_url":"https://avatars.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"body":"I think this should be a list of source, destination pairs.","created_at":"2016-12-21T13:30:44Z","updated_at":"2016-12-21T13:33:27Z","html_url":"https://github.com/snapcore/snapd/pull/2524#discussion_r93437325","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/2524","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/93437325"},"html":{"href":"https://github.com/snapcore/snapd/pull/2524#discussion_r93437325"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2524"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/2524","id":98932489,"html_url":"https://github.com/snapcore/snapd/pull/2524","diff_url":"https://github.com/snapcore/snapd/pull/2524.diff","patch_url":"https://github.com/snapcore/snapd/pull/2524.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/2524","number":2524,"state":"open","locked":false,"title":"Overmount","user":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-21T13:27:37Z","updated_at":"2016-12-21T13:33:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ada8a3a81caeb5511eb5b5eed9f6587a565e25f9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/2524/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/2524/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/2524/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/bb0bae9a35b192454b3c1c6b99cf3eda9c9f42f6","head":{"label":"kalikiana:overmount","ref":"overmount","sha":"bb0bae9a35b192454b3c1c6b99cf3eda9c9f42f6","user":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"repo":{"id":71438052,"name":"snapd","full_name":"kalikiana/snapd","owner":{"login":"kalikiana","id":1204189,"avatar_url":"https://avatars.githubusercontent.com/u/1204189?v=3","gravatar_id":"","url":"https://api.github.com/users/kalikiana","html_url":"https://github.com/kalikiana","followers_url":"https://api.github.com/users/kalikiana/followers","following_url":"https://api.github.com/users/kalikiana/following{/other_user}","gists_url":"https://api.github.com/users/kalikiana/gists{/gist_id}","starred_url":"https://api.github.com/users/kalikiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalikiana/subscriptions","organizations_url":"https://api.github.com/users/kalikiana/orgs","repos_url":"https://api.github.com/users/kalikiana/repos","events_url":"https://api.github.com/users/kalikiana/events{/privacy}","received_events_url":"https://api.github.com/users/kalikiana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kalikiana/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/kalikiana/snapd","forks_url":"https://api.github.com/repos/kalikiana/snapd/forks","keys_url":"https://api.github.com/repos/kalikiana/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kalikiana/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kalikiana/snapd/teams","hooks_url":"https://api.github.com/repos/kalikiana/snapd/hooks","issue_events_url":"https://api.github.com/repos/kalikiana/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/kalikiana/snapd/events","assignees_url":"https://api.github.com/repos/kalikiana/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/kalikiana/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/kalikiana/snapd/tags","blobs_url":"https://api.github.com/repos/kalikiana/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kalikiana/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kalikiana/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/kalikiana/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kalikiana/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/kalikiana/snapd/languages","stargazers_url":"https://api.github.com/repos/kalikiana/snapd/stargazers","contributors_url":"https://api.github.com/repos/kalikiana/snapd/contributors","subscribers_url":"https://api.github.com/repos/kalikiana/snapd/subscribers","subscription_url":"https://api.github.com/repos/kalikiana/snapd/subscription","commits_url":"https://api.github.com/repos/kalikiana/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/kalikiana/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/kalikiana/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/kalikiana/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/kalikiana/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/kalikiana/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kalikiana/snapd/merges","archive_url":"https://api.github.com/repos/kalikiana/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kalikiana/snapd/downloads","issues_url":"https://api.github.com/repos/kalikiana/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/kalikiana/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/kalikiana/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/kalikiana/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kalikiana/snapd/labels{/name}","releases_url":"https://api.github.com/repos/kalikiana/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/kalikiana/snapd/deployments","created_at":"2016-10-20T07:49:13Z","updated_at":"2016-10-20T07:49:15Z","pushed_at":"2016-12-15T15:19:14Z","git_url":"git://github.com/kalikiana/snapd.git","ssh_url":"git@github.com:kalikiana/snapd.git","clone_url":"https://github.com/kalikiana/snapd.git","svn_url":"https://github.com/kalikiana/snapd","homepage":"","size":41187,"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":"snapcore:master","ref":"master","sha":"c79d353f9433a9908fa205249deef73c9fd31261","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-12-19T02:39:56Z","pushed_at":"2016-12-21T13:30:55Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":41583,"stargazers_count":460,"watchers_count":460,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":60,"forks":137,"open_issues":60,"watchers":460,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2524"},"html":{"href":"https://github.com/snapcore/snapd/pull/2524"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2524"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2524/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2524/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2524/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/bb0bae9a35b192454b3c1c6b99cf3eda9c9f42f6"}}}}
{"actor":{"display_login":"zyga"}}