{"id":23217058,"url":"https://github.com/gotomicro/egoctl","last_synced_at":"2025-08-19T08:31:33.564Z","repository":{"id":39335578,"uuid":"328174107","full_name":"gotomicro/egoctl","owner":"gotomicro","description":"Go graphics are generated as code tools","archived":false,"fork":false,"pushed_at":"2022-09-02T03:53:21.000Z","size":3655,"stargazers_count":43,"open_issues_count":1,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T20:36:23.183Z","etag":null,"topics":["ego","egoctl","golang","lowcode"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotomicro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-09T14:32:16.000Z","updated_at":"2024-05-15T10:10:47.000Z","dependencies_parsed_at":"2022-08-25T13:30:23.565Z","dependency_job_id":null,"html_url":"https://github.com/gotomicro/egoctl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/gotomicro/egoctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fegoctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fegoctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fegoctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fegoctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotomicro","download_url":"https://codeload.github.com/gotomicro/egoctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fegoctl/sbom","scorecard":{"id":442193,"data":{"date":"2025-08-11","repo":{"name":"github.com/gotomicro/egoctl","commit":"65e30a38dc7650f135fcc263408edcf74d54187f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/reviewdog.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/egoctl/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/egoctl/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/egoctl/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/egoctl/reviewdog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/egoctl/reviewdog.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.6 not signed: https://api.github.com/repos/gotomicro/egoctl/releases/49057948","Warn: release artifact v1.0.5 not signed: https://api.github.com/repos/gotomicro/egoctl/releases/48662137","Warn: release artifact v1.0.4 not signed: https://api.github.com/repos/gotomicro/egoctl/releases/48647248","Warn: release artifact v1.0.3 not signed: https://api.github.com/repos/gotomicro/egoctl/releases/39261738","Warn: release artifact v1.0.6 does not have provenance: https://api.github.com/repos/gotomicro/egoctl/releases/49057948","Warn: release artifact v1.0.5 does not have provenance: https://api.github.com/repos/gotomicro/egoctl/releases/48662137","Warn: release artifact v1.0.4 does not have provenance: https://api.github.com/repos/gotomicro/egoctl/releases/48647248","Warn: release artifact v1.0.3 does not have provenance: https://api.github.com/repos/gotomicro/egoctl/releases/39261738"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"88 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3vp4-m3rf-835h","Warn: Project is vulnerable to: GO-2023-1737 / GHSA-2c4m-59x9-fr2g","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37","Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8mmm-9v2q-x3f9","Warn: Project is vulnerable to: GHSA-9qmh-276g-x5pj","Warn: Project is vulnerable to: GHSA-33f9-j839-rf8h","Warn: Project is vulnerable to: GHSA-c36v-fmgq-m8hx","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-mh8j-9jvh-gjf6","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T05:49:25.492Z","repository_id":39335578,"created_at":"2025-08-19T05:49:25.492Z","updated_at":"2025-08-19T05:49:25.492Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121754,"owners_count":24702870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ego","egoctl","golang","lowcode"],"created_at":"2024-12-18T20:40:01.940Z","updated_at":"2025-08-19T08:31:33.068Z","avatar_url":"https://github.com/gotomicro.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# egoctl\n## 1 Requirements\n- Go version \u003e= 1.18\n\n## 2 Installation\n```\nbash \u003c(curl -L https://raw.githubusercontent.com/gotomicro/egoctl/main/getlatest.sh)\n```\n通过以上脚本，可以下载protoc工具全家桶，以及ego的protoc插件和egoctl\n* /usr/local/bin/protoc\n* /usr/local/bin/protoc-gen-go\n* /usr/local/bin/protoc-gen-go-grpc\n* /usr/local/bin/protoc-gen-openapiv2\n* /usr/local/bin/protoc-gen-go-errors\n* /usr/local/bin/protoc-gen-go-http\n* /usr/local/bin/egoctl\n\n## 3 快速生成代码\n* 启动web: egoctl web start\n* 访问http://127.0.0.1:9999\n* 如下所示\n\n![](./docs/images/lowcode-home.png)\n\n* 我们第一次进入页面，先配置生成代码的模板，你也可以自己自定义自己的模板\n\n![](./docs/images/lowcode-template.png)\n\n* 然后在进入项目页面，创建项目\n\n![](./docs/images/lowcode-projects.png)\n\n* 编写DSL\n\n![](./docs/images/lowcode-dsl.png)\n\n* 创建项目的go mod\n```bash\nmkdir /Users/askuy/tmp/egotest1 \ncd /Users/askuy/tmp/egotest1 \u0026\u0026 go mod init egotest1\n```\n* 点击生成代码\n* 运行你的代码\n```bash\ncd /Users/askuy/tmp/egotest1\ngo mod tidy\nvim config/local.toml 更改db配置\nexport EGO_DEBUG=true \u0026\u0026 go run main.go\n```\n\n## 3 模板\n因为前端会使用关键字`{{`, `}}`，而`pongo2`的模板也会使用该关键字，所以`egoctl`将`pongo2/v6`版本`fork`到项目里，\n将模板关键字`{{`,`}}`改为`{$`,`$}`\n\n## 5 DSL配置\n```\npackage egoctl\ntype User struct {\n\tUid int `gorm:\"AUTO_INCREMENT\" json:\"id\" dto:\"\" ego:\"primary_key\"`    // id\n    UserName string `gorm:\"not null\" json:\"userName\" dto:\"\"` // 昵称\n}\n```\n\n\n## 6 模板配置\n### 6.1 根据模型设置模板\nDSL配置\n```\npackage egoctl\ntype User struct {\n\tUid int `gorm:\"AUTO_INCREMENT\" json:\"id\" dto:\"\" ego:\"primary_key\"`                      // id\n    UserName string `gorm:\"not null\" json:\"userName\" dto:\"\"` // 昵称\n}\n```\n### 6.2 获取主键 \n模版配置\n```\n{$modelSchemas|fieldsGetPrimaryKey|snakeString$}\n```\n\n### 6.3 生成结构体\n模板配置\n```\ntype {{modelName|upperFirst}} struct {\n\t{% for value in modelSchemas %}\n\t{$ value.FieldName $} {$ value.FieldType $} `gorm:\"{$ value|fieldGetTag:\"gorm\" $}\"` {$ value.Comment $}\n\t{% endfor %}\n}\n```\n\n### 6.4 判断某字段是否存在\n模板配置\n```\n{% if modelSchemas|fieldsExist:Uid %}\n{% endif %}\n```\n\n### 6.5 判断某个字段中某个tag值是否存在\n```\n{% if modelSchemas|fieldsTagExist:json,userName %}\n{% endif %}\n```\n\n## 7 根据单个字段设置模板\nDSL配置\n```\ntype User struct {\n\tUid int `gorm:\"AUTO_INCREMENT\" json:\"id\" dto:\"\" ego:\"primary_key\"`                      // id\n    UserName string `gorm:\"not null\" json:\"userName\" dto:\"\"` // 昵称\n}\n```\n\n### 7.1 获取某个字段的驼峰（常用于JSON，前后端对接）\n```\n{$ value.FieldName|camelString|lowerFirst $}\nUserName  变成   userName\n```\n\n### 7.2 获取某个字段的蛇形（常用于数据库）\n```\n{$ value.FieldName|snakeString|lowerFirst $}\nUserName  变成   user_name\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotomicro%2Fegoctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotomicro%2Fegoctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotomicro%2Fegoctl/lists"}