{"action":"created","comment":{"url":"https://api.github.com/repos/vinxi/plugin/pulls/comments/59993611","id":59993611,"diff_hunk":"@@ -0,0 +1,22 @@\n+package plugin\n+\n+// Plugin represents the required interface implemented by plugins.\n+type Plugin interface {\n+\t// Name is used to retrieve the plugin name identifier.\n+\tName() string\n+\t// Description is used to retrieve a human friendly\n+\t// description of what the plugin does.\n+\tDescription() string\n+\t// Enable is used to enable the current plugin.\n+\t// If the plugin has been already enabled, the call is no-op.\n+\tEnable()\n+\t// Disable is used to disable the current plugin.\n+\tDisable()","path":"interface.go","position":14,"original_position":14,"commit_id":"a033024faca6c9157a96914550fe84178ca0b91e","original_commit_id":"a033024faca6c9157a96914550fe84178ca0b91e","user":{"login":"groyoh","id":7434196,"avatar_url":"https://avatars.githubusercontent.com/u/7434196?v=3","gravatar_id":"","url":"https://api.github.com/users/groyoh","html_url":"https://github.com/groyoh","followers_url":"https://api.github.com/users/groyoh/followers","following_url":"https://api.github.com/users/groyoh/following{/other_user}","gists_url":"https://api.github.com/users/groyoh/gists{/gist_id}","starred_url":"https://api.github.com/users/groyoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groyoh/subscriptions","organizations_url":"https://api.github.com/users/groyoh/orgs","repos_url":"https://api.github.com/users/groyoh/repos","events_url":"https://api.github.com/users/groyoh/events{/privacy}","received_events_url":"https://api.github.com/users/groyoh/received_events","type":"User","site_admin":false},"body":"Yeah, that was actually clear. I meant from a code point of view. What would be the code to write to disable a specfic plugin. Let's say you register a certain plugin for a certain route, how do you disable the plugin only for this route? Can plugins actually be route specific or are they global?","created_at":"2016-04-17T21:41:36Z","updated_at":"2016-04-17T21:41:36Z","html_url":"https://github.com/vinxi/plugin/pull/2#discussion_r59993611","pull_request_url":"https://api.github.com/repos/vinxi/plugin/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/comments/59993611"},"html":{"href":"https://github.com/vinxi/plugin/pull/2#discussion_r59993611"},"pull_request":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/vinxi/plugin/pulls/2","id":66176913,"html_url":"https://github.com/vinxi/plugin/pull/2","diff_url":"https://github.com/vinxi/plugin/pull/2.diff","patch_url":"https://github.com/vinxi/plugin/pull/2.patch","issue_url":"https://api.github.com/repos/vinxi/plugin/issues/2","number":2,"state":"open","locked":false,"title":"feat: add initial plugin interface (proposal)","user":{"login":"h2non","id":63402,"avatar_url":"https://avatars.githubusercontent.com/u/63402?v=3","gravatar_id":"","url":"https://api.github.com/users/h2non","html_url":"https://github.com/h2non","followers_url":"https://api.github.com/users/h2non/followers","following_url":"https://api.github.com/users/h2non/following{/other_user}","gists_url":"https://api.github.com/users/h2non/gists{/gist_id}","starred_url":"https://api.github.com/users/h2non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2non/subscriptions","organizations_url":"https://api.github.com/users/h2non/orgs","repos_url":"https://api.github.com/users/h2non/repos","events_url":"https://api.github.com/users/h2non/events{/privacy}","received_events_url":"https://api.github.com/users/h2non/received_events","type":"User","site_admin":false},"body":"This is just an interface proposal, not working code.\r\n\r\nPlugin layer is an important part of the vinxi architecture in order to built featured proxy layers with dynamic configuration at runtime.\r\n\r\nThis PR is mostly for design discussion and share different ideas. ","created_at":"2016-04-12T15:22:53Z","updated_at":"2016-04-17T21:41:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad1bbdafaa9113f191d3ed7fed93701fc2d6752c","assignee":{"login":"groyoh","id":7434196,"avatar_url":"https://avatars.githubusercontent.com/u/7434196?v=3","gravatar_id":"","url":"https://api.github.com/users/groyoh","html_url":"https://github.com/groyoh","followers_url":"https://api.github.com/users/groyoh/followers","following_url":"https://api.github.com/users/groyoh/following{/other_user}","gists_url":"https://api.github.com/users/groyoh/gists{/gist_id}","starred_url":"https://api.github.com/users/groyoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groyoh/subscriptions","organizations_url":"https://api.github.com/users/groyoh/orgs","repos_url":"https://api.github.com/users/groyoh/repos","events_url":"https://api.github.com/users/groyoh/events{/privacy}","received_events_url":"https://api.github.com/users/groyoh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/vinxi/plugin/pulls/2/commits","review_comments_url":"https://api.github.com/repos/vinxi/plugin/pulls/2/comments","review_comment_url":"https://api.github.com/repos/vinxi/plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vinxi/plugin/issues/2/comments","statuses_url":"https://api.github.com/repos/vinxi/plugin/statuses/a033024faca6c9157a96914550fe84178ca0b91e","head":{"label":"vinxi:feat/layer","ref":"feat/layer","sha":"a033024faca6c9157a96914550fe84178ca0b91e","user":{"login":"vinxi","id":16838440,"avatar_url":"https://avatars.githubusercontent.com/u/16838440?v=3","gravatar_id":"","url":"https://api.github.com/users/vinxi","html_url":"https://github.com/vinxi","followers_url":"https://api.github.com/users/vinxi/followers","following_url":"https://api.github.com/users/vinxi/following{/other_user}","gists_url":"https://api.github.com/users/vinxi/gists{/gist_id}","starred_url":"https://api.github.com/users/vinxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinxi/subscriptions","organizations_url":"https://api.github.com/users/vinxi/orgs","repos_url":"https://api.github.com/users/vinxi/repos","events_url":"https://api.github.com/users/vinxi/events{/privacy}","received_events_url":"https://api.github.com/users/vinxi/received_events","type":"Organization","site_admin":false},"repo":{"id":55292589,"name":"plugin","full_name":"vinxi/plugin","owner":{"login":"vinxi","id":16838440,"avatar_url":"https://avatars.githubusercontent.com/u/16838440?v=3","gravatar_id":"","url":"https://api.github.com/users/vinxi","html_url":"https://github.com/vinxi","followers_url":"https://api.github.com/users/vinxi/followers","following_url":"https://api.github.com/users/vinxi/following{/other_user}","gists_url":"https://api.github.com/users/vinxi/gists{/gist_id}","starred_url":"https://api.github.com/users/vinxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinxi/subscriptions","organizations_url":"https://api.github.com/users/vinxi/orgs","repos_url":"https://api.github.com/users/vinxi/repos","events_url":"https://api.github.com/users/vinxi/events{/privacy}","received_events_url":"https://api.github.com/users/vinxi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vinxi/plugin","description":"[WIP] Plugin layer for vinxi ecosystem ","fork":false,"url":"https://api.github.com/repos/vinxi/plugin","forks_url":"https://api.github.com/repos/vinxi/plugin/forks","keys_url":"https://api.github.com/repos/vinxi/plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinxi/plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinxi/plugin/teams","hooks_url":"https://api.github.com/repos/vinxi/plugin/hooks","issue_events_url":"https://api.github.com/repos/vinxi/plugin/issues/events{/number}","events_url":"https://api.github.com/repos/vinxi/plugin/events","assignees_url":"https://api.github.com/repos/vinxi/plugin/assignees{/user}","branches_url":"https://api.github.com/repos/vinxi/plugin/branches{/branch}","tags_url":"https://api.github.com/repos/vinxi/plugin/tags","blobs_url":"https://api.github.com/repos/vinxi/plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinxi/plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinxi/plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinxi/plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinxi/plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/vinxi/plugin/languages","stargazers_url":"https://api.github.com/repos/vinxi/plugin/stargazers","contributors_url":"https://api.github.com/repos/vinxi/plugin/contributors","subscribers_url":"https://api.github.com/repos/vinxi/plugin/subscribers","subscription_url":"https://api.github.com/repos/vinxi/plugin/subscription","commits_url":"https://api.github.com/repos/vinxi/plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinxi/plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinxi/plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinxi/plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinxi/plugin/contents/{+path}","compare_url":"https://api.github.com/repos/vinxi/plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinxi/plugin/merges","archive_url":"https://api.github.com/repos/vinxi/plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinxi/plugin/downloads","issues_url":"https://api.github.com/repos/vinxi/plugin/issues{/number}","pulls_url":"https://api.github.com/repos/vinxi/plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/vinxi/plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/vinxi/plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinxi/plugin/labels{/name}","releases_url":"https://api.github.com/repos/vinxi/plugin/releases{/id}","deployments_url":"https://api.github.com/repos/vinxi/plugin/deployments","created_at":"2016-04-02T12:08:56Z","updated_at":"2016-04-14T16:40:59Z","pushed_at":"2016-04-12T15:22:54Z","git_url":"git://github.com/vinxi/plugin.git","ssh_url":"git@github.com:vinxi/plugin.git","clone_url":"https://github.com/vinxi/plugin.git","svn_url":"https://github.com/vinxi/plugin","homepage":"","size":3,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"vinxi:master","ref":"master","sha":"1810c238d66f382a46604ef5a906605f3a77a965","user":{"login":"vinxi","id":16838440,"avatar_url":"https://avatars.githubusercontent.com/u/16838440?v=3","gravatar_id":"","url":"https://api.github.com/users/vinxi","html_url":"https://github.com/vinxi","followers_url":"https://api.github.com/users/vinxi/followers","following_url":"https://api.github.com/users/vinxi/following{/other_user}","gists_url":"https://api.github.com/users/vinxi/gists{/gist_id}","starred_url":"https://api.github.com/users/vinxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinxi/subscriptions","organizations_url":"https://api.github.com/users/vinxi/orgs","repos_url":"https://api.github.com/users/vinxi/repos","events_url":"https://api.github.com/users/vinxi/events{/privacy}","received_events_url":"https://api.github.com/users/vinxi/received_events","type":"Organization","site_admin":false},"repo":{"id":55292589,"name":"plugin","full_name":"vinxi/plugin","owner":{"login":"vinxi","id":16838440,"avatar_url":"https://avatars.githubusercontent.com/u/16838440?v=3","gravatar_id":"","url":"https://api.github.com/users/vinxi","html_url":"https://github.com/vinxi","followers_url":"https://api.github.com/users/vinxi/followers","following_url":"https://api.github.com/users/vinxi/following{/other_user}","gists_url":"https://api.github.com/users/vinxi/gists{/gist_id}","starred_url":"https://api.github.com/users/vinxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinxi/subscriptions","organizations_url":"https://api.github.com/users/vinxi/orgs","repos_url":"https://api.github.com/users/vinxi/repos","events_url":"https://api.github.com/users/vinxi/events{/privacy}","received_events_url":"https://api.github.com/users/vinxi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vinxi/plugin","description":"[WIP] Plugin layer for vinxi ecosystem ","fork":false,"url":"https://api.github.com/repos/vinxi/plugin","forks_url":"https://api.github.com/repos/vinxi/plugin/forks","keys_url":"https://api.github.com/repos/vinxi/plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinxi/plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinxi/plugin/teams","hooks_url":"https://api.github.com/repos/vinxi/plugin/hooks","issue_events_url":"https://api.github.com/repos/vinxi/plugin/issues/events{/number}","events_url":"https://api.github.com/repos/vinxi/plugin/events","assignees_url":"https://api.github.com/repos/vinxi/plugin/assignees{/user}","branches_url":"https://api.github.com/repos/vinxi/plugin/branches{/branch}","tags_url":"https://api.github.com/repos/vinxi/plugin/tags","blobs_url":"https://api.github.com/repos/vinxi/plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinxi/plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinxi/plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinxi/plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinxi/plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/vinxi/plugin/languages","stargazers_url":"https://api.github.com/repos/vinxi/plugin/stargazers","contributors_url":"https://api.github.com/repos/vinxi/plugin/contributors","subscribers_url":"https://api.github.com/repos/vinxi/plugin/subscribers","subscription_url":"https://api.github.com/repos/vinxi/plugin/subscription","commits_url":"https://api.github.com/repos/vinxi/plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinxi/plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinxi/plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinxi/plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinxi/plugin/contents/{+path}","compare_url":"https://api.github.com/repos/vinxi/plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinxi/plugin/merges","archive_url":"https://api.github.com/repos/vinxi/plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinxi/plugin/downloads","issues_url":"https://api.github.com/repos/vinxi/plugin/issues{/number}","pulls_url":"https://api.github.com/repos/vinxi/plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/vinxi/plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/vinxi/plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinxi/plugin/labels{/name}","releases_url":"https://api.github.com/repos/vinxi/plugin/releases{/id}","deployments_url":"https://api.github.com/repos/vinxi/plugin/deployments","created_at":"2016-04-02T12:08:56Z","updated_at":"2016-04-14T16:40:59Z","pushed_at":"2016-04-12T15:22:54Z","git_url":"git://github.com/vinxi/plugin.git","ssh_url":"git@github.com:vinxi/plugin.git","clone_url":"https://github.com/vinxi/plugin.git","svn_url":"https://github.com/vinxi/plugin","homepage":"","size":3,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/2"},"html":{"href":"https://github.com/vinxi/plugin/pull/2"},"issue":{"href":"https://api.github.com/repos/vinxi/plugin/issues/2"},"comments":{"href":"https://api.github.com/repos/vinxi/plugin/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vinxi/plugin/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/vinxi/plugin/statuses/a033024faca6c9157a96914550fe84178ca0b91e"}}}}