{"action":"created","comment":{"url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/comments/245471774","pull_request_review_id":189589706,"id":245471774,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ3MTc3NA==","diff_hunk":"@@ -0,0 +1,286 @@\n+package iot\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\t\"time\"\n+\n+\truntimeclient \"openpitrix.io/openpitrix/pkg/client/runtime\"\n+\t\"openpitrix.io/openpitrix/pkg/constants\"\n+\t\"openpitrix.io/openpitrix/pkg/db\"\n+\t\"openpitrix.io/openpitrix/pkg/gerr\"\n+\n+\t\"openpitrix.io/openpitrix/pkg/logger\"\n+\t\"openpitrix.io/openpitrix/pkg/manager\"\n+\t\"openpitrix.io/openpitrix/pkg/models\"\n+\t\"openpitrix.io/openpitrix/pkg/pb\"\n+\t\"openpitrix.io/openpitrix/pkg/pi\"\n+\t\"openpitrix.io/openpitrix/pkg/plugins\"\n+\t\"openpitrix.io/openpitrix/pkg/util/pbutil\"\n+)\n+\n+//创建产品\n+func (p *Server) CreateProduct(ctx context.Context, req *pb.CreateProductRequest) (*pb.CreateProductResponse, error) {\n+\t//s := senderutil.GetSenderFromContext(ctx)\n+\n+\tnewProduct := models.NewProduct(\n+\t\treq.GetProductName().GetValue(),\n+\t\tconstants.StatusEnabled,\n+\t\treq.GetProductDesc().GetValue(),\n+\t\t// s.UserId,\n+\t)\n+\t//存到数据库\n+\t_, err := pi.Global().DB(ctx).\n+\t\tInsertInto(constants.TableProduct).\n+\t\tRecord(newProduct).\n+\t\tExec()\n+\tif err != nil {\n+\t\tlogger.Error(ctx, \"insert error: %+v\", err)\n+\t\treturn nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorCreateResourceFailed)\n+\t}\n+\tlogger.Info(ctx, \"insert succcess\")\n+\t//对接阿里云接口\n+\tclient, err := runtimeclient.NewRuntimeManagerClient()\n+\tif err != nil {\n+\n+\t\tlogger.Error(ctx, \"runtime client: %+v\", err)\n+\t}\n+\tlogger.Info(ctx, \"get runtime succcess\")\n+\tresponse, err := client.DescribeRuntimes(ctx, &pb.DescribeRuntimesRequest{\n+\t\tProvider: []string{constants.ProviderAliyun},\n+\t\t// Owner:    []string{senderutil.GetSystemSender().UserId},\n+\t})\n+\tif err != nil {\n+\n+\t\tlogger.Error(ctx, \"response describe runtime: %+v\", err)\n+\t}\n+\tlogger.Info(ctx, \"query runtime succcess\")\n+\tvar runtimeId string\n+\truntimeSet := response.GetRuntimeSet()\n+\tif len(runtimeSet) > 0 {\n+\t\truntimeId = runtimeSet[0].RuntimeId.GetValue()\n+\t} else {\n+\n+\t}\n+\tiotProvider, err := plugins.GetIotProviderPlugin(ctx, constants.ProviderAliyun)\n+\tif err != nil {\n+\n+\t\tlogger.Error(ctx, \"create provider: %+v\", err)\n+\t}\n+\tlogger.Info(ctx, \"create provider succcess\")\n+\tproductKey, err := iotProvider.CreateProduct(ctx, runtimeId, req.GetProductName().GetValue(), req.GetProductDesc().GetValue())\n+\tif err != nil {\n+\n+\t\tlogger.Error(ctx, \"failed to responese product key: %+v\", err)\n+\t} else {\n+\n+\t}\n+\tlogger.Info(ctx, \"get product key succcess\")\n+\t// req.owner\n+\t// res product key\n+\n+\t// update数据库\n+\n+\t// attributes := manager.BuildUpdateAttributes(&pb.ModifyProductRequest{\n+\t// \tproductKey: productKey,\n+\t// }, constants.ColumnProductKey)\n+\tattrs := make(map[string]interface{})\n+\tattrs[constants.ColumnProductKey] = productKey\n+\n+\t_, err = pi.Global().DB(ctx).\n+\t\tUpdate(constants.TableProduct).\n+\t\tSetMap(attrs).\n+\t\tWhere(db.Eq(constants.ColumnProductId, newProduct.ProductId)).\n+\t\tExec()\n+\tif err != nil {\n+\t\treturn nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorCreateResourceFailed)\n+\t}\n+\n+\t// 查询阿里云\n+\t// req.product_key\n+\t// 返回 product_secrect\n+\tproductInfo, err := iotProvider.QueryProduct(ctx, runtimeId, productKey)\n+\tif err != nil {\n+\n+\t} else {\n+\t\tfmt.Println(productInfo)\n+\t}\n+\tlogger.Info(ctx, \"get product secrect succcess+%v\", productInfo)\n+\t//productSecrect := productInfo.ProductSecret\n+\t// update数据库\n+\n+\tattrs = make(map[string]interface{})\n+\tattrs[constants.ColumnProductSecret] = productInfo.ProductSecret\n+\n+\t_, err = pi.Global().DB(ctx).\n+\t\tUpdate(constants.TableProduct).\n+\t\tSetMap(attrs).\n+\t\tWhere(db.Eq(constants.ColumnProductId, newProduct.ProductId)).\n+\t\tExec()\n+\n+\tnewProductId := newProduct.ProductId\n+\n+\tres := &pb.CreateProductResponse{\n+\t\tProductId: pbutil.ToProtoString(newProductId),\n+\t}\n+\n+\treturn res, nil\n+\n+}\n+\n+//查询单个产品\n+func (p *Server) DescribeOneProduct(ctx context.Context, req *pb.DescribeOneProductRequest) (*pb.DescribeOneProductResponse, error) {\n+\n+\tvar product *models.Product\n+\n+\tquery := pi.Global().DB(ctx).\n+\t\tSelect(models.ProductColumns...).\n+\t\tFrom(constants.TableProduct).\n+\t\tWhere(db.Eq(constants.ColumnProductId, req.ProductId))\n+\n+\terr := query.LoadOne(&product)\n+\n+\tif err != nil {\n+\t\treturn nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorDescribeResourcesFailed)\n+\t}\n+\tlogger.Info(ctx, \"query product secrect succcess\")\n+\n+\tres := &pb.DescribeOneProductResponse{\n+\t\tProductId:     pbutil.ToProtoString(product.ProductId),\n+\t\tProductName:   pbutil.ToProtoString(product.ProductName),\n+\t\tProductDesc:   pbutil.ToProtoString(product.ProductDesc),\n+\t\tProductKey:    pbutil.ToProtoString(product.ProductKey),\n+\t\tProductSecret: pbutil.ToProtoString(product.ProductSecret),\n+\t}\n+\n+\treturn res, nil\n+}\n+\n+//查询产品下的设备\n+func (p *Server) DescribeProductDeviceAnalyze(ctx context.Context, req *pb.DescribeProductDeviceAnalyzeRequest) (*pb.DescribeProductDeviceAnalyzeResponse, error) {\n+\tvar products []*models.Product\n+\n+\tquery := pi.Global().DB(ctx).\n+\t\tSelect(models.ProductColumns...).\n+\t\tFrom(constants.TableProductDeviceStatistics).\n+\t\tWhere(manager.BuildFilterConditions(req, constants.TableProduct))\n+\tquery = manager.AddQueryOrderDir(query, req, constants.ColumnCreateTime)\n+\n+\t_, err := query.Load(&products)\n+\n+\tif err != nil {\n+\t\treturn nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorDescribeResourcesFailed)\n+\t}\n+\tres := &pb.DescribeProductDeviceAnalyzeResponse{\n+\t\t//ProductId: pbutil.ToProtoString(newProductId),\n+\t}\n+\n+\treturn res, nil\n+}\n+\n+//查询产品下的数据\n+func (p *Server) DescribeProductDataAnalyze(ctx context.Context, req *pb.DescribeProductDataAnalyzeRequest) (*pb.DescribeProductDataAnalyzeResponse, error) {\n+\tvar products []*models.Product\n+\n+\tquery := pi.Global().DB(ctx).\n+\t\tSelect(models.ProductColumns...).\n+\t\tFrom(constants.TableProductDataStatistics).\n+\t\tWhere(manager.BuildFilterConditions(req, constants.TableProductDataStatistics))\n+\tquery = manager.AddQueryOrderDir(query, req, constants.ColumnCreateTime)\n+\n+\t_, err := query.Load(&products)\n+\n+\tif err != nil {\n+\t\treturn nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorDescribeResourcesFailed)\n+\t}\n+\n+\tres := &pb.DescribeProductDataAnalyzeResponse{\n+\t\t//ProductId: pbutil.ToProtoString(newProductId),\n+\t}\n+\n+\treturn res, nil\n+}\n+\n+//查询产品\n+func (p *Server) DescribeProduct(ctx context.Context, req *pb.DescribeProductsRequest) (*pb.DescribeProductsResponse, error) {\n+\tvar products []*models.Product\n+\toffset := pbutil.GetOffsetFromRequest(req)\n+\tlimit := pbutil.GetLimitFromRequest(req)\n+\n+\tquery := pi.Global().DB(ctx).","path":"pkg/service/iot/handler_product.go","position":210,"original_position":210,"commit_id":"acb7ec21c41d0f655328ecc20123fe3acd96a4f0","original_commit_id":"9bbbe33d8ca8fe21884d41cc65d32dd0b95396ff","user":{"login":"chenqing-yuhu","id":45652148,"node_id":"MDQ6VXNlcjQ1NjUyMTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/45652148?v=4","gravatar_id":"","url":"https://api.github.com/users/chenqing-yuhu","html_url":"https://github.com/chenqing-yuhu","followers_url":"https://api.github.com/users/chenqing-yuhu/followers","following_url":"https://api.github.com/users/chenqing-yuhu/following{/other_user}","gists_url":"https://api.github.com/users/chenqing-yuhu/gists{/gist_id}","starred_url":"https://api.github.com/users/chenqing-yuhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenqing-yuhu/subscriptions","organizations_url":"https://api.github.com/users/chenqing-yuhu/orgs","repos_url":"https://api.github.com/users/chenqing-yuhu/repos","events_url":"https://api.github.com/users/chenqing-yuhu/events{/privacy}","received_events_url":"https://api.github.com/users/chenqing-yuhu/received_events","type":"User","site_admin":false},"body":"如果当前用户不是系统管理员，则查询结果需要根据当前用户做筛选","created_at":"2019-01-05T08:52:19Z","updated_at":"2019-01-05T08:54:48Z","html_url":"https://github.com/yuhu-tech/things-backend/pull/3#discussion_r245471774","pull_request_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/comments/245471774"},"html":{"href":"https://github.com/yuhu-tech/things-backend/pull/3#discussion_r245471774"},"pull_request":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3","id":242426964,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyNDI2OTY0","html_url":"https://github.com/yuhu-tech/things-backend/pull/3","diff_url":"https://github.com/yuhu-tech/things-backend/pull/3.diff","patch_url":"https://github.com/yuhu-tech/things-backend/pull/3.patch","issue_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/3","number":3,"state":"open","locked":false,"title":"Add iot product and device api ","user":{"login":"yuhuluhao","id":44599650,"node_id":"MDQ6VXNlcjQ0NTk5NjUw","avatar_url":"https://avatars0.githubusercontent.com/u/44599650?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhuluhao","html_url":"https://github.com/yuhuluhao","followers_url":"https://api.github.com/users/yuhuluhao/followers","following_url":"https://api.github.com/users/yuhuluhao/following{/other_user}","gists_url":"https://api.github.com/users/yuhuluhao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhuluhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhuluhao/subscriptions","organizations_url":"https://api.github.com/users/yuhuluhao/orgs","repos_url":"https://api.github.com/users/yuhuluhao/repos","events_url":"https://api.github.com/users/yuhuluhao/events{/privacy}","received_events_url":"https://api.github.com/users/yuhuluhao/received_events","type":"User","site_admin":false},"body":"commit by yuhuluhao","created_at":"2019-01-05T07:51:59Z","updated_at":"2019-01-05T08:54:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"070fc5b40b5866a45afe18f99f28e7d86db4a244","assignee":null,"assignees":[],"requested_reviewers":[{"login":"astra-x","id":6139935,"node_id":"MDQ6VXNlcjYxMzk5MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/6139935?v=4","gravatar_id":"","url":"https://api.github.com/users/astra-x","html_url":"https://github.com/astra-x","followers_url":"https://api.github.com/users/astra-x/followers","following_url":"https://api.github.com/users/astra-x/following{/other_user}","gists_url":"https://api.github.com/users/astra-x/gists{/gist_id}","starred_url":"https://api.github.com/users/astra-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astra-x/subscriptions","organizations_url":"https://api.github.com/users/astra-x/orgs","repos_url":"https://api.github.com/users/astra-x/repos","events_url":"https://api.github.com/users/astra-x/events{/privacy}","received_events_url":"https://api.github.com/users/astra-x/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3/commits","review_comments_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3/comments","review_comment_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/3/comments","statuses_url":"https://api.github.com/repos/yuhu-tech/things-backend/statuses/acb7ec21c41d0f655328ecc20123fe3acd96a4f0","head":{"label":"yuhu-tech:2019-1-5","ref":"2019-1-5","sha":"acb7ec21c41d0f655328ecc20123fe3acd96a4f0","user":{"login":"yuhu-tech","id":45623420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NjIzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/45623420?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhu-tech","html_url":"https://github.com/yuhu-tech","followers_url":"https://api.github.com/users/yuhu-tech/followers","following_url":"https://api.github.com/users/yuhu-tech/following{/other_user}","gists_url":"https://api.github.com/users/yuhu-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhu-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhu-tech/subscriptions","organizations_url":"https://api.github.com/users/yuhu-tech/orgs","repos_url":"https://api.github.com/users/yuhu-tech/repos","events_url":"https://api.github.com/users/yuhu-tech/events{/privacy}","received_events_url":"https://api.github.com/users/yuhu-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":160663195,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA2NjMxOTU=","name":"things-backend","full_name":"yuhu-tech/things-backend","private":false,"owner":{"login":"yuhu-tech","id":45623420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NjIzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/45623420?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhu-tech","html_url":"https://github.com/yuhu-tech","followers_url":"https://api.github.com/users/yuhu-tech/followers","following_url":"https://api.github.com/users/yuhu-tech/following{/other_user}","gists_url":"https://api.github.com/users/yuhu-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhu-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhu-tech/subscriptions","organizations_url":"https://api.github.com/users/yuhu-tech/orgs","repos_url":"https://api.github.com/users/yuhu-tech/repos","events_url":"https://api.github.com/users/yuhu-tech/events{/privacy}","received_events_url":"https://api.github.com/users/yuhu-tech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/yuhu-tech/things-backend","description":null,"fork":false,"url":"https://api.github.com/repos/yuhu-tech/things-backend","forks_url":"https://api.github.com/repos/yuhu-tech/things-backend/forks","keys_url":"https://api.github.com/repos/yuhu-tech/things-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuhu-tech/things-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuhu-tech/things-backend/teams","hooks_url":"https://api.github.com/repos/yuhu-tech/things-backend/hooks","issue_events_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/events{/number}","events_url":"https://api.github.com/repos/yuhu-tech/things-backend/events","assignees_url":"https://api.github.com/repos/yuhu-tech/things-backend/assignees{/user}","branches_url":"https://api.github.com/repos/yuhu-tech/things-backend/branches{/branch}","tags_url":"https://api.github.com/repos/yuhu-tech/things-backend/tags","blobs_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuhu-tech/things-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/yuhu-tech/things-backend/languages","stargazers_url":"https://api.github.com/repos/yuhu-tech/things-backend/stargazers","contributors_url":"https://api.github.com/repos/yuhu-tech/things-backend/contributors","subscribers_url":"https://api.github.com/repos/yuhu-tech/things-backend/subscribers","subscription_url":"https://api.github.com/repos/yuhu-tech/things-backend/subscription","commits_url":"https://api.github.com/repos/yuhu-tech/things-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuhu-tech/things-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuhu-tech/things-backend/contents/{+path}","compare_url":"https://api.github.com/repos/yuhu-tech/things-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuhu-tech/things-backend/merges","archive_url":"https://api.github.com/repos/yuhu-tech/things-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuhu-tech/things-backend/downloads","issues_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues{/number}","pulls_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/yuhu-tech/things-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/yuhu-tech/things-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuhu-tech/things-backend/labels{/name}","releases_url":"https://api.github.com/repos/yuhu-tech/things-backend/releases{/id}","deployments_url":"https://api.github.com/repos/yuhu-tech/things-backend/deployments","created_at":"2018-12-06T11:10:27Z","updated_at":"2018-12-07T07:03:11Z","pushed_at":"2019-01-05T07:52:00Z","git_url":"git://github.com/yuhu-tech/things-backend.git","ssh_url":"git@github.com:yuhu-tech/things-backend.git","clone_url":"https://github.com/yuhu-tech/things-backend.git","svn_url":"https://github.com/yuhu-tech/things-backend","homepage":null,"size":53440,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"yuhu-tech:devel-v0.2.0","ref":"devel-v0.2.0","sha":"bd40397d1271fac551e8008839f4d69316033fad","user":{"login":"yuhu-tech","id":45623420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NjIzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/45623420?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhu-tech","html_url":"https://github.com/yuhu-tech","followers_url":"https://api.github.com/users/yuhu-tech/followers","following_url":"https://api.github.com/users/yuhu-tech/following{/other_user}","gists_url":"https://api.github.com/users/yuhu-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhu-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhu-tech/subscriptions","organizations_url":"https://api.github.com/users/yuhu-tech/orgs","repos_url":"https://api.github.com/users/yuhu-tech/repos","events_url":"https://api.github.com/users/yuhu-tech/events{/privacy}","received_events_url":"https://api.github.com/users/yuhu-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":160663195,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA2NjMxOTU=","name":"things-backend","full_name":"yuhu-tech/things-backend","private":false,"owner":{"login":"yuhu-tech","id":45623420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NjIzNDIw","avatar_url":"https://avatars3.githubusercontent.com/u/45623420?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhu-tech","html_url":"https://github.com/yuhu-tech","followers_url":"https://api.github.com/users/yuhu-tech/followers","following_url":"https://api.github.com/users/yuhu-tech/following{/other_user}","gists_url":"https://api.github.com/users/yuhu-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhu-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhu-tech/subscriptions","organizations_url":"https://api.github.com/users/yuhu-tech/orgs","repos_url":"https://api.github.com/users/yuhu-tech/repos","events_url":"https://api.github.com/users/yuhu-tech/events{/privacy}","received_events_url":"https://api.github.com/users/yuhu-tech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/yuhu-tech/things-backend","description":null,"fork":false,"url":"https://api.github.com/repos/yuhu-tech/things-backend","forks_url":"https://api.github.com/repos/yuhu-tech/things-backend/forks","keys_url":"https://api.github.com/repos/yuhu-tech/things-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuhu-tech/things-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuhu-tech/things-backend/teams","hooks_url":"https://api.github.com/repos/yuhu-tech/things-backend/hooks","issue_events_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/events{/number}","events_url":"https://api.github.com/repos/yuhu-tech/things-backend/events","assignees_url":"https://api.github.com/repos/yuhu-tech/things-backend/assignees{/user}","branches_url":"https://api.github.com/repos/yuhu-tech/things-backend/branches{/branch}","tags_url":"https://api.github.com/repos/yuhu-tech/things-backend/tags","blobs_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuhu-tech/things-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/yuhu-tech/things-backend/languages","stargazers_url":"https://api.github.com/repos/yuhu-tech/things-backend/stargazers","contributors_url":"https://api.github.com/repos/yuhu-tech/things-backend/contributors","subscribers_url":"https://api.github.com/repos/yuhu-tech/things-backend/subscribers","subscription_url":"https://api.github.com/repos/yuhu-tech/things-backend/subscription","commits_url":"https://api.github.com/repos/yuhu-tech/things-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuhu-tech/things-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuhu-tech/things-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuhu-tech/things-backend/contents/{+path}","compare_url":"https://api.github.com/repos/yuhu-tech/things-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuhu-tech/things-backend/merges","archive_url":"https://api.github.com/repos/yuhu-tech/things-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuhu-tech/things-backend/downloads","issues_url":"https://api.github.com/repos/yuhu-tech/things-backend/issues{/number}","pulls_url":"https://api.github.com/repos/yuhu-tech/things-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/yuhu-tech/things-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/yuhu-tech/things-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuhu-tech/things-backend/labels{/name}","releases_url":"https://api.github.com/repos/yuhu-tech/things-backend/releases{/id}","deployments_url":"https://api.github.com/repos/yuhu-tech/things-backend/deployments","created_at":"2018-12-06T11:10:27Z","updated_at":"2018-12-07T07:03:11Z","pushed_at":"2019-01-05T07:52:00Z","git_url":"git://github.com/yuhu-tech/things-backend.git","ssh_url":"git@github.com:yuhu-tech/things-backend.git","clone_url":"https://github.com/yuhu-tech/things-backend.git","svn_url":"https://github.com/yuhu-tech/things-backend","homepage":null,"size":53440,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3"},"html":{"href":"https://github.com/yuhu-tech/things-backend/pull/3"},"issue":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/issues/3"},"comments":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/yuhu-tech/things-backend/statuses/acb7ec21c41d0f655328ecc20123fe3acd96a4f0"}},"author_association":"NONE"}}
{"actor":{"display_login":"chenqing-yuhu"}}