{"action":"created","comment":{"url":"https://api.github.com/repos/dedis/cothority/pulls/comments/68009318","id":68009318,"diff_hunk":"@@ -0,0 +1,123 @@\n+// Cosi takes a file or a message and signs it collectively.\n+// For usage, see README.md\n+package main\n+\n+import (\n+\t\"os\"\n+\n+\t\"errors\"\n+\t\"time\"\n+\n+\t\"github.com/dedis/cothority/app/lib/config\"\n+\t\"github.com/dedis/cothority/app/lib/ui\"\n+\t\"github.com/dedis/cothority/lib/dbg\"\n+\t\"github.com/dedis/cothority/lib/sda\"\n+\n+\t\"fmt\"\n+\n+\t\"github.com/dedis/cothority/services/status\"\n+\t\"gopkg.in/codegangsta/cli.v1\"\n+)\n+\n+// RequestTimeOut defines when the client stops waiting for the CoSi group to\n+// reply\n+const RequestTimeOut = time.Second * 10\n+\n+const optionGroup = \"group\"\n+const optionGroupShort = \"g\"\n+\n+func init() {\n+\tdbg.SetDebugVisible(1)\n+\tdbg.SetUseColors(false)\n+}\n+\n+func main() {\n+\tapp := cli.NewApp()\n+\tapp.Name = \"Status\"\n+\tapp.Usage = \"Get and print status of all servers in a file.\"\n+\tapp.Commands = []cli.Command{\n+\t\t{\n+\t\t\tName:    \"getStatus\",\n+\t\t\tAliases: []string{\"g\"},\n+\t\t\tUsage:   \"Gets status from all entities in group file.\",\n+\t\t\tAction:  getStatus,\n+\t\t},\n+\t}\n+\tapp.Flags = []cli.Flag{\n+\t\tcli.StringFlag{\n+\t\t\tName:  optionGroup + \" ,\" + optionGroupShort,\n+\t\t\tValue: \"group.toml\",\n+\t\t\tUsage: \"Cothority group definition in `FILE.toml`\",\n+\t\t},\n+\t\tcli.IntFlag{\n+\t\t\tName:  \"debug, d\",\n+\t\t\tValue: 0,\n+\t\t\tUsage: \"debug-level: `integer`: 1 for terse, 5 for maximal\",\n+\t\t},\n+\t}\n+\tapp.Before = func(c *cli.Context) error {\n+\t\tdbg.SetDebugVisible(c.GlobalInt(\"debug\"))\n+\t\treturn nil\n+\t}\n+\tapp.Run(os.Args)\n+}\n+\n+// signFile will search for the file and sign it\n+// it always returns nil as an error\n+func getStatus(c *cli.Context) error {\n+\tgroupToml := c.GlobalString(optionGroup)\n+\tel, err := readGroup(groupToml)\n+\tui.ErrFatal(err, \"Couldn't read file.\")\n+\tdbg.Lvl3(el)","path":"app/status/status.go","position":71,"original_position":71,"commit_id":"d123a3930c280b61f3cefb67f85100cca3fae1d8","original_commit_id":"d123a3930c280b61f3cefb67f85100cca3fae1d8","user":{"login":"nikkolasg","id":2564747,"avatar_url":"https://avatars.githubusercontent.com/u/2564747?v=3","gravatar_id":"","url":"https://api.github.com/users/nikkolasg","html_url":"https://github.com/nikkolasg","followers_url":"https://api.github.com/users/nikkolasg/followers","following_url":"https://api.github.com/users/nikkolasg/following{/other_user}","gists_url":"https://api.github.com/users/nikkolasg/gists{/gist_id}","starred_url":"https://api.github.com/users/nikkolasg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikkolasg/subscriptions","organizations_url":"https://api.github.com/users/nikkolasg/orgs","repos_url":"https://api.github.com/users/nikkolasg/repos","events_url":"https://api.github.com/users/nikkolasg/events{/privacy}","received_events_url":"https://api.github.com/users/nikkolasg/received_events","type":"User","site_admin":false},"body":"prefer to use `Info, Warn` etc for client apps. ","created_at":"2016-06-22T07:57:58Z","updated_at":"2016-06-22T07:57:58Z","html_url":"https://github.com/dedis/cothority/pull/439#discussion_r68009318","pull_request_url":"https://api.github.com/repos/dedis/cothority/pulls/439","_links":{"self":{"href":"https://api.github.com/repos/dedis/cothority/pulls/comments/68009318"},"html":{"href":"https://github.com/dedis/cothority/pull/439#discussion_r68009318"},"pull_request":{"href":"https://api.github.com/repos/dedis/cothority/pulls/439"}}},"pull_request":{"url":"https://api.github.com/repos/dedis/cothority/pulls/439","id":74231613,"html_url":"https://github.com/dedis/cothority/pull/439","diff_url":"https://github.com/dedis/cothority/pull/439.diff","patch_url":"https://github.com/dedis/cothority/pull/439.patch","issue_url":"https://api.github.com/repos/dedis/cothority/issues/439","number":439,"state":"open","locked":false,"title":"First version of Stats","user":{"login":"evanv03","id":19937212,"avatar_url":"https://avatars.githubusercontent.com/u/19937212?v=3","gravatar_id":"","url":"https://api.github.com/users/evanv03","html_url":"https://github.com/evanv03","followers_url":"https://api.github.com/users/evanv03/followers","following_url":"https://api.github.com/users/evanv03/following{/other_user}","gists_url":"https://api.github.com/users/evanv03/gists{/gist_id}","starred_url":"https://api.github.com/users/evanv03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanv03/subscriptions","organizations_url":"https://api.github.com/users/evanv03/orgs","repos_url":"https://api.github.com/users/evanv03/repos","events_url":"https://api.github.com/users/evanv03/events{/privacy}","received_events_url":"https://api.github.com/users/evanv03/received_events","type":"User","site_admin":false},"body":"This the first version of #438","created_at":"2016-06-17T12:01:45Z","updated_at":"2016-06-22T07:57:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"065bbcb57776da95066cb27639bd36d6d86b2b19","assignee":{"login":"evanv03","id":19937212,"avatar_url":"https://avatars.githubusercontent.com/u/19937212?v=3","gravatar_id":"","url":"https://api.github.com/users/evanv03","html_url":"https://github.com/evanv03","followers_url":"https://api.github.com/users/evanv03/followers","following_url":"https://api.github.com/users/evanv03/following{/other_user}","gists_url":"https://api.github.com/users/evanv03/gists{/gist_id}","starred_url":"https://api.github.com/users/evanv03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanv03/subscriptions","organizations_url":"https://api.github.com/users/evanv03/orgs","repos_url":"https://api.github.com/users/evanv03/repos","events_url":"https://api.github.com/users/evanv03/events{/privacy}","received_events_url":"https://api.github.com/users/evanv03/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dedis/cothority/pulls/439/commits","review_comments_url":"https://api.github.com/repos/dedis/cothority/pulls/439/comments","review_comment_url":"https://api.github.com/repos/dedis/cothority/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dedis/cothority/issues/439/comments","statuses_url":"https://api.github.com/repos/dedis/cothority/statuses/d123a3930c280b61f3cefb67f85100cca3fae1d8","head":{"label":"dedis:stat","ref":"stat","sha":"d123a3930c280b61f3cefb67f85100cca3fae1d8","user":{"login":"dedis","id":3638331,"avatar_url":"https://avatars.githubusercontent.com/u/3638331?v=3","gravatar_id":"","url":"https://api.github.com/users/dedis","html_url":"https://github.com/dedis","followers_url":"https://api.github.com/users/dedis/followers","following_url":"https://api.github.com/users/dedis/following{/other_user}","gists_url":"https://api.github.com/users/dedis/gists{/gist_id}","starred_url":"https://api.github.com/users/dedis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedis/subscriptions","organizations_url":"https://api.github.com/users/dedis/orgs","repos_url":"https://api.github.com/users/dedis/repos","events_url":"https://api.github.com/users/dedis/events{/privacy}","received_events_url":"https://api.github.com/users/dedis/received_events","type":"Organization","site_admin":false},"repo":{"id":41791684,"name":"cothority","full_name":"dedis/cothority","owner":{"login":"dedis","id":3638331,"avatar_url":"https://avatars.githubusercontent.com/u/3638331?v=3","gravatar_id":"","url":"https://api.github.com/users/dedis","html_url":"https://github.com/dedis","followers_url":"https://api.github.com/users/dedis/followers","following_url":"https://api.github.com/users/dedis/following{/other_user}","gists_url":"https://api.github.com/users/dedis/gists{/gist_id}","starred_url":"https://api.github.com/users/dedis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedis/subscriptions","organizations_url":"https://api.github.com/users/dedis/orgs","repos_url":"https://api.github.com/users/dedis/repos","events_url":"https://api.github.com/users/dedis/events{/privacy}","received_events_url":"https://api.github.com/users/dedis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dedis/cothority","description":"Scalable collective authority prototype","fork":false,"url":"https://api.github.com/repos/dedis/cothority","forks_url":"https://api.github.com/repos/dedis/cothority/forks","keys_url":"https://api.github.com/repos/dedis/cothority/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dedis/cothority/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dedis/cothority/teams","hooks_url":"https://api.github.com/repos/dedis/cothority/hooks","issue_events_url":"https://api.github.com/repos/dedis/cothority/issues/events{/number}","events_url":"https://api.github.com/repos/dedis/cothority/events","assignees_url":"https://api.github.com/repos/dedis/cothority/assignees{/user}","branches_url":"https://api.github.com/repos/dedis/cothority/branches{/branch}","tags_url":"https://api.github.com/repos/dedis/cothority/tags","blobs_url":"https://api.github.com/repos/dedis/cothority/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dedis/cothority/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dedis/cothority/git/refs{/sha}","trees_url":"https://api.github.com/repos/dedis/cothority/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dedis/cothority/statuses/{sha}","languages_url":"https://api.github.com/repos/dedis/cothority/languages","stargazers_url":"https://api.github.com/repos/dedis/cothority/stargazers","contributors_url":"https://api.github.com/repos/dedis/cothority/contributors","subscribers_url":"https://api.github.com/repos/dedis/cothority/subscribers","subscription_url":"https://api.github.com/repos/dedis/cothority/subscription","commits_url":"https://api.github.com/repos/dedis/cothority/commits{/sha}","git_commits_url":"https://api.github.com/repos/dedis/cothority/git/commits{/sha}","comments_url":"https://api.github.com/repos/dedis/cothority/comments{/number}","issue_comment_url":"https://api.github.com/repos/dedis/cothority/issues/comments{/number}","contents_url":"https://api.github.com/repos/dedis/cothority/contents/{+path}","compare_url":"https://api.github.com/repos/dedis/cothority/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dedis/cothority/merges","archive_url":"https://api.github.com/repos/dedis/cothority/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dedis/cothority/downloads","issues_url":"https://api.github.com/repos/dedis/cothority/issues{/number}","pulls_url":"https://api.github.com/repos/dedis/cothority/pulls{/number}","milestones_url":"https://api.github.com/repos/dedis/cothority/milestones{/number}","notifications_url":"https://api.github.com/repos/dedis/cothority/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dedis/cothority/labels{/name}","releases_url":"https://api.github.com/repos/dedis/cothority/releases{/id}","deployments_url":"https://api.github.com/repos/dedis/cothority/deployments","created_at":"2015-09-02T09:13:57Z","updated_at":"2016-06-14T17:30:37Z","pushed_at":"2016-06-22T07:53:09Z","git_url":"git://github.com/dedis/cothority.git","ssh_url":"git@github.com:dedis/cothority.git","clone_url":"https://github.com/dedis/cothority.git","svn_url":"https://github.com/dedis/cothority","homepage":"","size":53166,"stargazers_count":104,"watchers_count":104,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":56,"forks":10,"open_issues":56,"watchers":104,"default_branch":"master"}},"base":{"label":"dedis:development","ref":"development","sha":"92581d78ccb0e944814a46f74e3fc00bf5b854f5","user":{"login":"dedis","id":3638331,"avatar_url":"https://avatars.githubusercontent.com/u/3638331?v=3","gravatar_id":"","url":"https://api.github.com/users/dedis","html_url":"https://github.com/dedis","followers_url":"https://api.github.com/users/dedis/followers","following_url":"https://api.github.com/users/dedis/following{/other_user}","gists_url":"https://api.github.com/users/dedis/gists{/gist_id}","starred_url":"https://api.github.com/users/dedis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedis/subscriptions","organizations_url":"https://api.github.com/users/dedis/orgs","repos_url":"https://api.github.com/users/dedis/repos","events_url":"https://api.github.com/users/dedis/events{/privacy}","received_events_url":"https://api.github.com/users/dedis/received_events","type":"Organization","site_admin":false},"repo":{"id":41791684,"name":"cothority","full_name":"dedis/cothority","owner":{"login":"dedis","id":3638331,"avatar_url":"https://avatars.githubusercontent.com/u/3638331?v=3","gravatar_id":"","url":"https://api.github.com/users/dedis","html_url":"https://github.com/dedis","followers_url":"https://api.github.com/users/dedis/followers","following_url":"https://api.github.com/users/dedis/following{/other_user}","gists_url":"https://api.github.com/users/dedis/gists{/gist_id}","starred_url":"https://api.github.com/users/dedis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedis/subscriptions","organizations_url":"https://api.github.com/users/dedis/orgs","repos_url":"https://api.github.com/users/dedis/repos","events_url":"https://api.github.com/users/dedis/events{/privacy}","received_events_url":"https://api.github.com/users/dedis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dedis/cothority","description":"Scalable collective authority prototype","fork":false,"url":"https://api.github.com/repos/dedis/cothority","forks_url":"https://api.github.com/repos/dedis/cothority/forks","keys_url":"https://api.github.com/repos/dedis/cothority/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dedis/cothority/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dedis/cothority/teams","hooks_url":"https://api.github.com/repos/dedis/cothority/hooks","issue_events_url":"https://api.github.com/repos/dedis/cothority/issues/events{/number}","events_url":"https://api.github.com/repos/dedis/cothority/events","assignees_url":"https://api.github.com/repos/dedis/cothority/assignees{/user}","branches_url":"https://api.github.com/repos/dedis/cothority/branches{/branch}","tags_url":"https://api.github.com/repos/dedis/cothority/tags","blobs_url":"https://api.github.com/repos/dedis/cothority/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dedis/cothority/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dedis/cothority/git/refs{/sha}","trees_url":"https://api.github.com/repos/dedis/cothority/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dedis/cothority/statuses/{sha}","languages_url":"https://api.github.com/repos/dedis/cothority/languages","stargazers_url":"https://api.github.com/repos/dedis/cothority/stargazers","contributors_url":"https://api.github.com/repos/dedis/cothority/contributors","subscribers_url":"https://api.github.com/repos/dedis/cothority/subscribers","subscription_url":"https://api.github.com/repos/dedis/cothority/subscription","commits_url":"https://api.github.com/repos/dedis/cothority/commits{/sha}","git_commits_url":"https://api.github.com/repos/dedis/cothority/git/commits{/sha}","comments_url":"https://api.github.com/repos/dedis/cothority/comments{/number}","issue_comment_url":"https://api.github.com/repos/dedis/cothority/issues/comments{/number}","contents_url":"https://api.github.com/repos/dedis/cothority/contents/{+path}","compare_url":"https://api.github.com/repos/dedis/cothority/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dedis/cothority/merges","archive_url":"https://api.github.com/repos/dedis/cothority/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dedis/cothority/downloads","issues_url":"https://api.github.com/repos/dedis/cothority/issues{/number}","pulls_url":"https://api.github.com/repos/dedis/cothority/pulls{/number}","milestones_url":"https://api.github.com/repos/dedis/cothority/milestones{/number}","notifications_url":"https://api.github.com/repos/dedis/cothority/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dedis/cothority/labels{/name}","releases_url":"https://api.github.com/repos/dedis/cothority/releases{/id}","deployments_url":"https://api.github.com/repos/dedis/cothority/deployments","created_at":"2015-09-02T09:13:57Z","updated_at":"2016-06-14T17:30:37Z","pushed_at":"2016-06-22T07:53:09Z","git_url":"git://github.com/dedis/cothority.git","ssh_url":"git@github.com:dedis/cothority.git","clone_url":"https://github.com/dedis/cothority.git","svn_url":"https://github.com/dedis/cothority","homepage":"","size":53166,"stargazers_count":104,"watchers_count":104,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":56,"forks":10,"open_issues":56,"watchers":104,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dedis/cothority/pulls/439"},"html":{"href":"https://github.com/dedis/cothority/pull/439"},"issue":{"href":"https://api.github.com/repos/dedis/cothority/issues/439"},"comments":{"href":"https://api.github.com/repos/dedis/cothority/issues/439/comments"},"review_comments":{"href":"https://api.github.com/repos/dedis/cothority/pulls/439/comments"},"review_comment":{"href":"https://api.github.com/repos/dedis/cothority/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dedis/cothority/pulls/439/commits"},"statuses":{"href":"https://api.github.com/repos/dedis/cothority/statuses/d123a3930c280b61f3cefb67f85100cca3fae1d8"}}}}
{"actor":{"display_login":"nikkolasg"}}