{"action":"created","comment":{"url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/comments/24741888","id":24741888,"diff_hunk":"@@ -0,0 +1,42 @@\n+package main\n+\n+import (\n+  \"fmt\"\n+  \"net/http\"\n+  \"github.com/gorilla/mux\"\n+)\n+\n+type PoolAPI struct {\n+  Res http.ResponseWriter\n+  Req *http.Request\n+}\n+\n+func poolHandler(res http.ResponseWriter, req *http.Request) {\n+  res.WriteHeader(200)\n+  var pool PoolAPI\n+  pool.Res = res\n+  pool.Req = req\n+  callback := func(data string, err error) {\n+    fmt.Fprint(res, data)\n+  }\n+  pool.handleAction(callback)\n+}\n+\n+func (pool PoolAPI) handleAction(callback func(data string, err error)) {\n+  vars := mux.Vars(pool.Req)\n+  action := vars[\"action\"]\n+  switch action {\n+  case \"create\":\n+    data, err := pool.create()\n+    callback(data, err)\n+  }\n+}\n+\n+// TODO: Consider methods POST, PUT, etc\n+func (pool PoolAPI) create() (data string, err error) {","path":"workspace/src/github.com/darkcrux/go-ceph-rest-api/handler_pool.go","position":36,"original_position":36,"commit_id":"d04f6962293ce846f5e8d648295fe91268fa81c3","original_commit_id":"d04f6962293ce846f5e8d648295fe91268fa81c3","user":{"login":"choodur","id":514649,"avatar_url":"https://avatars.githubusercontent.com/u/514649?v=3","gravatar_id":"","url":"https://api.github.com/users/choodur","html_url":"https://github.com/choodur","followers_url":"https://api.github.com/users/choodur/followers","following_url":"https://api.github.com/users/choodur/following{/other_user}","gists_url":"https://api.github.com/users/choodur/gists{/gist_id}","starred_url":"https://api.github.com/users/choodur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choodur/subscriptions","organizations_url":"https://api.github.com/users/choodur/orgs","repos_url":"https://api.github.com/users/choodur/repos","events_url":"https://api.github.com/users/choodur/events{/privacy}","received_events_url":"https://api.github.com/users/choodur/received_events","type":"User","site_admin":false},"body":"String is correct. Data must be a serialized JSON string.","created_at":"2015-02-16T10:20:31Z","updated_at":"2015-02-16T10:20:31Z","html_url":"https://github.com/darkcrux/go-ceph-rest-api/pull/5#discussion_r24741888","pull_request_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/comments/24741888"},"html":{"href":"https://github.com/darkcrux/go-ceph-rest-api/pull/5#discussion_r24741888"},"pull_request":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5","id":29361262,"html_url":"https://github.com/darkcrux/go-ceph-rest-api/pull/5","diff_url":"https://github.com/darkcrux/go-ceph-rest-api/pull/5.diff","patch_url":"https://github.com/darkcrux/go-ceph-rest-api/pull/5.patch","issue_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/5","number":5,"state":"open","locked":false,"title":"[WIP] Create pool","user":{"login":"lvillasica","id":806532,"avatar_url":"https://avatars.githubusercontent.com/u/806532?v=3","gravatar_id":"","url":"https://api.github.com/users/lvillasica","html_url":"https://github.com/lvillasica","followers_url":"https://api.github.com/users/lvillasica/followers","following_url":"https://api.github.com/users/lvillasica/following{/other_user}","gists_url":"https://api.github.com/users/lvillasica/gists{/gist_id}","starred_url":"https://api.github.com/users/lvillasica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvillasica/subscriptions","organizations_url":"https://api.github.com/users/lvillasica/orgs","repos_url":"https://api.github.com/users/lvillasica/repos","events_url":"https://api.github.com/users/lvillasica/events{/privacy}","received_events_url":"https://api.github.com/users/lvillasica/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-16T10:04:14Z","updated_at":"2015-02-16T10:20:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd2908e3cf890691b9a207c63a0564b2e8ee393e","assignee":{"login":"lvillasica","id":806532,"avatar_url":"https://avatars.githubusercontent.com/u/806532?v=3","gravatar_id":"","url":"https://api.github.com/users/lvillasica","html_url":"https://github.com/lvillasica","followers_url":"https://api.github.com/users/lvillasica/followers","following_url":"https://api.github.com/users/lvillasica/following{/other_user}","gists_url":"https://api.github.com/users/lvillasica/gists{/gist_id}","starred_url":"https://api.github.com/users/lvillasica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvillasica/subscriptions","organizations_url":"https://api.github.com/users/lvillasica/orgs","repos_url":"https://api.github.com/users/lvillasica/repos","events_url":"https://api.github.com/users/lvillasica/events{/privacy}","received_events_url":"https://api.github.com/users/lvillasica/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5/commits","review_comments_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5/comments","review_comment_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/5/comments","statuses_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/statuses/d04f6962293ce846f5e8d648295fe91268fa81c3","head":{"label":"lvillasica:feature/create_pool","ref":"feature/create_pool","sha":"d04f6962293ce846f5e8d648295fe91268fa81c3","user":{"login":"lvillasica","id":806532,"avatar_url":"https://avatars.githubusercontent.com/u/806532?v=3","gravatar_id":"","url":"https://api.github.com/users/lvillasica","html_url":"https://github.com/lvillasica","followers_url":"https://api.github.com/users/lvillasica/followers","following_url":"https://api.github.com/users/lvillasica/following{/other_user}","gists_url":"https://api.github.com/users/lvillasica/gists{/gist_id}","starred_url":"https://api.github.com/users/lvillasica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvillasica/subscriptions","organizations_url":"https://api.github.com/users/lvillasica/orgs","repos_url":"https://api.github.com/users/lvillasica/repos","events_url":"https://api.github.com/users/lvillasica/events{/privacy}","received_events_url":"https://api.github.com/users/lvillasica/received_events","type":"User","site_admin":false},"repo":{"id":30623834,"name":"go-ceph-rest-api","full_name":"lvillasica/go-ceph-rest-api","owner":{"login":"lvillasica","id":806532,"avatar_url":"https://avatars.githubusercontent.com/u/806532?v=3","gravatar_id":"","url":"https://api.github.com/users/lvillasica","html_url":"https://github.com/lvillasica","followers_url":"https://api.github.com/users/lvillasica/followers","following_url":"https://api.github.com/users/lvillasica/following{/other_user}","gists_url":"https://api.github.com/users/lvillasica/gists{/gist_id}","starred_url":"https://api.github.com/users/lvillasica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvillasica/subscriptions","organizations_url":"https://api.github.com/users/lvillasica/orgs","repos_url":"https://api.github.com/users/lvillasica/repos","events_url":"https://api.github.com/users/lvillasica/events{/privacy}","received_events_url":"https://api.github.com/users/lvillasica/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lvillasica/go-ceph-rest-api","description":"Ceph Rest API in Go","fork":true,"url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api","forks_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/forks","keys_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/teams","hooks_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/hooks","issue_events_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/events","assignees_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/tags","blobs_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/languages","stargazers_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/stargazers","contributors_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/contributors","subscribers_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/subscribers","subscription_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/subscription","commits_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/merges","archive_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/downloads","issues_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/lvillasica/go-ceph-rest-api/releases{/id}","created_at":"2015-02-11T01:17:55Z","updated_at":"2015-02-11T02:08:17Z","pushed_at":"2015-02-16T10:03:10Z","git_url":"git://github.com/lvillasica/go-ceph-rest-api.git","ssh_url":"git@github.com:lvillasica/go-ceph-rest-api.git","clone_url":"https://github.com/lvillasica/go-ceph-rest-api.git","svn_url":"https://github.com/lvillasica/go-ceph-rest-api","homepage":null,"size":144,"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":"develop"}},"base":{"label":"darkcrux:develop","ref":"develop","sha":"b9e2dea7df1068eb034fe5ed317a4d37e1fbfe0e","user":{"login":"darkcrux","id":1343136,"avatar_url":"https://avatars.githubusercontent.com/u/1343136?v=3","gravatar_id":"","url":"https://api.github.com/users/darkcrux","html_url":"https://github.com/darkcrux","followers_url":"https://api.github.com/users/darkcrux/followers","following_url":"https://api.github.com/users/darkcrux/following{/other_user}","gists_url":"https://api.github.com/users/darkcrux/gists{/gist_id}","starred_url":"https://api.github.com/users/darkcrux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkcrux/subscriptions","organizations_url":"https://api.github.com/users/darkcrux/orgs","repos_url":"https://api.github.com/users/darkcrux/repos","events_url":"https://api.github.com/users/darkcrux/events{/privacy}","received_events_url":"https://api.github.com/users/darkcrux/received_events","type":"User","site_admin":false},"repo":{"id":30059849,"name":"go-ceph-rest-api","full_name":"darkcrux/go-ceph-rest-api","owner":{"login":"darkcrux","id":1343136,"avatar_url":"https://avatars.githubusercontent.com/u/1343136?v=3","gravatar_id":"","url":"https://api.github.com/users/darkcrux","html_url":"https://github.com/darkcrux","followers_url":"https://api.github.com/users/darkcrux/followers","following_url":"https://api.github.com/users/darkcrux/following{/other_user}","gists_url":"https://api.github.com/users/darkcrux/gists{/gist_id}","starred_url":"https://api.github.com/users/darkcrux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkcrux/subscriptions","organizations_url":"https://api.github.com/users/darkcrux/orgs","repos_url":"https://api.github.com/users/darkcrux/repos","events_url":"https://api.github.com/users/darkcrux/events{/privacy}","received_events_url":"https://api.github.com/users/darkcrux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/darkcrux/go-ceph-rest-api","description":"Ceph Rest API in Go","fork":false,"url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api","forks_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/forks","keys_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/teams","hooks_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/hooks","issue_events_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/events","assignees_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/tags","blobs_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/languages","stargazers_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/stargazers","contributors_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/contributors","subscribers_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/subscribers","subscription_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/subscription","commits_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/merges","archive_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/downloads","issues_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/releases{/id}","created_at":"2015-01-30T06:41:45Z","updated_at":"2015-02-16T07:45:13Z","pushed_at":"2015-02-16T07:46:18Z","git_url":"git://github.com/darkcrux/go-ceph-rest-api.git","ssh_url":"git@github.com:darkcrux/go-ceph-rest-api.git","clone_url":"https://github.com/darkcrux/go-ceph-rest-api.git","svn_url":"https://github.com/darkcrux/go-ceph-rest-api","homepage":null,"size":144,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5"},"html":{"href":"https://github.com/darkcrux/go-ceph-rest-api/pull/5"},"issue":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/5"},"comments":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/darkcrux/go-ceph-rest-api/statuses/d04f6962293ce846f5e8d648295fe91268fa81c3"}}}}