{"action":"created","comment":{"url":"https://api.github.com/repos/line/centraldogma/pulls/comments/173394078","pull_request_review_id":102577420,"id":173394078,"diff_hunk":"@@ -0,0 +1,332 @@\n+// Copyright 2018 LINE Corporation\n+//\n+// LINE Corporation licenses this file to you under the Apache License,\n+// version 2.0 (the \"License\"); you may not use this file except in compliance\n+// with the License. You may obtain a copy of the License at:\n+//\n+//   https://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+// License for the specific language governing permissions and limitations\n+// under the License.\n+\n+package dogma\n+\n+import (\n+\t\"bytes\"\n+\t\"context\"\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"golang.org/x/oauth2/clientcredentials\"\n+\t\"io\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"strconv\"\n+\t\"strings\"\n+)\n+\n+const (\n+\tDefaultScheme     = \"http\"\n+\tDefaultHostName   = \"localhost\"\n+\tDefaultPort       = 36462\n+\tDefaultPathPrefix = \"api/v1/\"\n+\tPathPrefixV0      = \"api/v0/\"\n+\tDefaultBaseURL    = \"http://localhost:36462/\"\n+\n+\tpathSecurityEnabled = \"security_enabled\"\n+)\n+\n+// A Client communicates with the Central Dogma server API.\n+type Client struct {\n+\tclient *http.Client // HTTP client which sends the request.\n+\n+\tBaseURL *url.URL // Base URL for API requests.\n+\n+\t// Services are used to communicate for the different parts of the Central Dogma server API.\n+\tproject    *projectService\n+\trepository *repositoryService\n+\tcontent    *contentService\n+}\n+\n+type service struct {\n+\tclient *Client\n+}\n+\n+func NewClientWithCredential(baseURL string, config clientcredentials.Config) (*Client, error) {\n+\treturn NewClient(baseURL, config.Client(context.Background()))\n+}\n+\n+func NewClient(baseURL string, client *http.Client) (*Client, error) {","path":"client/go/dogma/dogma.go","position":62,"original_position":62,"commit_id":"ffb69f34535e8c6d1e1aad78c1fa78e97ed029ec","original_commit_id":"6afa71c03ec69d0ec33baa07313c99ec960d86c8","user":{"login":"minwoox","id":25103250,"avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false},"body":"Fixed. Thank you~!","created_at":"2018-03-09T08:54:02Z","updated_at":"2018-03-09T08:54:14Z","html_url":"https://github.com/line/centraldogma/pull/141#discussion_r173394078","pull_request_url":"https://api.github.com/repos/line/centraldogma/pulls/141","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/line/centraldogma/pulls/comments/173394078"},"html":{"href":"https://github.com/line/centraldogma/pull/141#discussion_r173394078"},"pull_request":{"href":"https://api.github.com/repos/line/centraldogma/pulls/141"}},"in_reply_to_id":173056259},"pull_request":{"url":"https://api.github.com/repos/line/centraldogma/pulls/141","id":172818302,"html_url":"https://github.com/line/centraldogma/pull/141","diff_url":"https://github.com/line/centraldogma/pull/141.diff","patch_url":"https://github.com/line/centraldogma/pull/141.patch","issue_url":"https://api.github.com/repos/line/centraldogma/issues/141","number":141,"state":"open","locked":false,"title":"Provide Go client library","user":{"login":"minwoox","id":25103250,"avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false},"body":"Motivation:\r\nIf we provide Go client library, more people can adapt Central Dogma.\r\n\r\nModifications:\r\n- Add Go client library\r\n\r\nResult:\r\n- More customers\r\n\r\nTodos:\r\n- Repackage the original sources\r\n- Adapt CLI using this library\r\n- Add the watcher","created_at":"2018-03-05T09:50:21Z","updated_at":"2018-03-09T08:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"654ec780951254894ebcb5b012c249561b3903ec","assignee":null,"assignees":[],"requested_reviewers":[{"login":"huydx","id":535718,"avatar_url":"https://avatars0.githubusercontent.com/u/535718?v=4","gravatar_id":"","url":"https://api.github.com/users/huydx","html_url":"https://github.com/huydx","followers_url":"https://api.github.com/users/huydx/followers","following_url":"https://api.github.com/users/huydx/following{/other_user}","gists_url":"https://api.github.com/users/huydx/gists{/gist_id}","starred_url":"https://api.github.com/users/huydx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huydx/subscriptions","organizations_url":"https://api.github.com/users/huydx/orgs","repos_url":"https://api.github.com/users/huydx/repos","events_url":"https://api.github.com/users/huydx/events{/privacy}","received_events_url":"https://api.github.com/users/huydx/received_events","type":"User","site_admin":false},{"login":"hyangtack","id":8417787,"avatar_url":"https://avatars1.githubusercontent.com/u/8417787?v=4","gravatar_id":"","url":"https://api.github.com/users/hyangtack","html_url":"https://github.com/hyangtack","followers_url":"https://api.github.com/users/hyangtack/followers","following_url":"https://api.github.com/users/hyangtack/following{/other_user}","gists_url":"https://api.github.com/users/hyangtack/gists{/gist_id}","starred_url":"https://api.github.com/users/hyangtack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyangtack/subscriptions","organizations_url":"https://api.github.com/users/hyangtack/orgs","repos_url":"https://api.github.com/users/hyangtack/repos","events_url":"https://api.github.com/users/hyangtack/events{/privacy}","received_events_url":"https://api.github.com/users/hyangtack/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":716399577,"url":"https://api.github.com/repos/line/centraldogma/labels/new-feature","name":"new-feature","color":"009800","default":false}],"milestone":{"url":"https://api.github.com/repos/line/centraldogma/milestones/8","html_url":"https://github.com/line/centraldogma/milestone/8","labels_url":"https://api.github.com/repos/line/centraldogma/milestones/8/labels","id":3173418,"number":8,"title":"0.23.0","description":"","creator":{"login":"trustin","id":173918,"avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2018-03-09T04:57:46Z","updated_at":"2018-03-09T04:58:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/line/centraldogma/pulls/141/commits","review_comments_url":"https://api.github.com/repos/line/centraldogma/pulls/141/comments","review_comment_url":"https://api.github.com/repos/line/centraldogma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/line/centraldogma/issues/141/comments","statuses_url":"https://api.github.com/repos/line/centraldogma/statuses/ffb69f34535e8c6d1e1aad78c1fa78e97ed029ec","head":{"label":"minwoox:go_library","ref":"go_library","sha":"ffb69f34535e8c6d1e1aad78c1fa78e97ed029ec","user":{"login":"minwoox","id":25103250,"avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false},"repo":{"id":105045412,"name":"centraldogma","full_name":"minwoox/centraldogma","owner":{"login":"minwoox","id":25103250,"avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/minwoox/centraldogma","description":"Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2","fork":true,"url":"https://api.github.com/repos/minwoox/centraldogma","forks_url":"https://api.github.com/repos/minwoox/centraldogma/forks","keys_url":"https://api.github.com/repos/minwoox/centraldogma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minwoox/centraldogma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minwoox/centraldogma/teams","hooks_url":"https://api.github.com/repos/minwoox/centraldogma/hooks","issue_events_url":"https://api.github.com/repos/minwoox/centraldogma/issues/events{/number}","events_url":"https://api.github.com/repos/minwoox/centraldogma/events","assignees_url":"https://api.github.com/repos/minwoox/centraldogma/assignees{/user}","branches_url":"https://api.github.com/repos/minwoox/centraldogma/branches{/branch}","tags_url":"https://api.github.com/repos/minwoox/centraldogma/tags","blobs_url":"https://api.github.com/repos/minwoox/centraldogma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minwoox/centraldogma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minwoox/centraldogma/git/refs{/sha}","trees_url":"https://api.github.com/repos/minwoox/centraldogma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minwoox/centraldogma/statuses/{sha}","languages_url":"https://api.github.com/repos/minwoox/centraldogma/languages","stargazers_url":"https://api.github.com/repos/minwoox/centraldogma/stargazers","contributors_url":"https://api.github.com/repos/minwoox/centraldogma/contributors","subscribers_url":"https://api.github.com/repos/minwoox/centraldogma/subscribers","subscription_url":"https://api.github.com/repos/minwoox/centraldogma/subscription","commits_url":"https://api.github.com/repos/minwoox/centraldogma/commits{/sha}","git_commits_url":"https://api.github.com/repos/minwoox/centraldogma/git/commits{/sha}","comments_url":"https://api.github.com/repos/minwoox/centraldogma/comments{/number}","issue_comment_url":"https://api.github.com/repos/minwoox/centraldogma/issues/comments{/number}","contents_url":"https://api.github.com/repos/minwoox/centraldogma/contents/{+path}","compare_url":"https://api.github.com/repos/minwoox/centraldogma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minwoox/centraldogma/merges","archive_url":"https://api.github.com/repos/minwoox/centraldogma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minwoox/centraldogma/downloads","issues_url":"https://api.github.com/repos/minwoox/centraldogma/issues{/number}","pulls_url":"https://api.github.com/repos/minwoox/centraldogma/pulls{/number}","milestones_url":"https://api.github.com/repos/minwoox/centraldogma/milestones{/number}","notifications_url":"https://api.github.com/repos/minwoox/centraldogma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minwoox/centraldogma/labels{/name}","releases_url":"https://api.github.com/repos/minwoox/centraldogma/releases{/id}","deployments_url":"https://api.github.com/repos/minwoox/centraldogma/deployments","created_at":"2017-09-27T17:00:08Z","updated_at":"2017-09-27T17:00:10Z","pushed_at":"2018-03-09T06:48:38Z","git_url":"git://github.com/minwoox/centraldogma.git","ssh_url":"git@github.com:minwoox/centraldogma.git","clone_url":"https://github.com/minwoox/centraldogma.git","svn_url":"https://github.com/minwoox/centraldogma","homepage":"https://line.github.io/centraldogma/","size":18219,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"line:master","ref":"master","sha":"3b949f301efc642c91ff9d12c28124088739baeb","user":{"login":"line","id":13128444,"avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"repo":{"id":101732174,"name":"centraldogma","full_name":"line/centraldogma","owner":{"login":"line","id":13128444,"avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/line/centraldogma","description":"Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2","fork":false,"url":"https://api.github.com/repos/line/centraldogma","forks_url":"https://api.github.com/repos/line/centraldogma/forks","keys_url":"https://api.github.com/repos/line/centraldogma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/line/centraldogma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/line/centraldogma/teams","hooks_url":"https://api.github.com/repos/line/centraldogma/hooks","issue_events_url":"https://api.github.com/repos/line/centraldogma/issues/events{/number}","events_url":"https://api.github.com/repos/line/centraldogma/events","assignees_url":"https://api.github.com/repos/line/centraldogma/assignees{/user}","branches_url":"https://api.github.com/repos/line/centraldogma/branches{/branch}","tags_url":"https://api.github.com/repos/line/centraldogma/tags","blobs_url":"https://api.github.com/repos/line/centraldogma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/line/centraldogma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/line/centraldogma/git/refs{/sha}","trees_url":"https://api.github.com/repos/line/centraldogma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/line/centraldogma/statuses/{sha}","languages_url":"https://api.github.com/repos/line/centraldogma/languages","stargazers_url":"https://api.github.com/repos/line/centraldogma/stargazers","contributors_url":"https://api.github.com/repos/line/centraldogma/contributors","subscribers_url":"https://api.github.com/repos/line/centraldogma/subscribers","subscription_url":"https://api.github.com/repos/line/centraldogma/subscription","commits_url":"https://api.github.com/repos/line/centraldogma/commits{/sha}","git_commits_url":"https://api.github.com/repos/line/centraldogma/git/commits{/sha}","comments_url":"https://api.github.com/repos/line/centraldogma/comments{/number}","issue_comment_url":"https://api.github.com/repos/line/centraldogma/issues/comments{/number}","contents_url":"https://api.github.com/repos/line/centraldogma/contents/{+path}","compare_url":"https://api.github.com/repos/line/centraldogma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/line/centraldogma/merges","archive_url":"https://api.github.com/repos/line/centraldogma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/line/centraldogma/downloads","issues_url":"https://api.github.com/repos/line/centraldogma/issues{/number}","pulls_url":"https://api.github.com/repos/line/centraldogma/pulls{/number}","milestones_url":"https://api.github.com/repos/line/centraldogma/milestones{/number}","notifications_url":"https://api.github.com/repos/line/centraldogma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/line/centraldogma/labels{/name}","releases_url":"https://api.github.com/repos/line/centraldogma/releases{/id}","deployments_url":"https://api.github.com/repos/line/centraldogma/deployments","created_at":"2017-08-29T07:23:31Z","updated_at":"2018-02-26T02:58:00Z","pushed_at":"2018-03-09T06:48:40Z","git_url":"git://github.com/line/centraldogma.git","ssh_url":"git@github.com:line/centraldogma.git","clone_url":"https://github.com/line/centraldogma.git","svn_url":"https://github.com/line/centraldogma","homepage":"https://line.github.io/centraldogma/","size":18085,"stargazers_count":146,"watchers_count":146,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":33,"open_issues":48,"watchers":146,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/line/centraldogma/pulls/141"},"html":{"href":"https://github.com/line/centraldogma/pull/141"},"issue":{"href":"https://api.github.com/repos/line/centraldogma/issues/141"},"comments":{"href":"https://api.github.com/repos/line/centraldogma/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/line/centraldogma/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/line/centraldogma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/line/centraldogma/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/line/centraldogma/statuses/ffb69f34535e8c6d1e1aad78c1fa78e97ed029ec"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"minwoox"}}