{"id":37856223,"url":"https://github.com/aacfactory/fns","last_synced_at":"2026-01-16T16:27:04.757Z","repository":{"id":37269068,"uuid":"385894245","full_name":"aacfactory/fns","owner":"aacfactory","description":"Fn Service for Golang","archived":false,"fork":false,"pushed_at":"2024-05-27T07:07:05.000Z","size":2235,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-21T15:27:36.944Z","etag":null,"topics":["fn","fns"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aacfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-14T10:04:57.000Z","updated_at":"2024-05-27T07:06:30.000Z","dependencies_parsed_at":"2023-12-22T03:57:08.278Z","dependency_job_id":"54e23437-7f85-4169-a0cc-905644fded0f","html_url":"https://github.com/aacfactory/fns","commit_stats":null,"previous_names":[],"tags_count":150,"template":false,"template_full_name":null,"purl":"pkg:github/aacfactory/fns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Ffns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Ffns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Ffns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Ffns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aacfactory","download_url":"https://codeload.github.com/aacfactory/fns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aacfactory%2Ffns/sbom","scorecard":{"id":158598,"data":{"date":"2025-08-11","repo":{"name":"github.com/aacfactory/fns","commit":"352e4ef5cf5a9d91f080091e5048961e6a73a68d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["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-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"],"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-16T12:40:34.867Z","repository_id":37269068,"created_at":"2025-08-16T12:40:34.867Z","updated_at":"2025-08-16T12:40:34.867Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fn","fns"],"created_at":"2026-01-16T16:27:04.000Z","updated_at":"2026-01-16T16:27:04.732Z","avatar_url":"https://github.com/aacfactory.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FNS\n\n---\n\nGolang的函数式框架。标准化协议来简化开发过程。\n\n## 特性\n* [x] 标准化\n  * [x] 万物皆[函数](https://github.com/aacfactory/fns/blob/main/docs/fn.md)\n  * [x] 天然分布式[服务](https://github.com/aacfactory/fns/blob/main/docs/architecture.md#Service)\n* [x] 适用于企业开发。\n  * [x] [环境化配置](https://github.com/aacfactory/fns/blob/main/docs/config.md)\n  * [x] 敏捷开发\n  * [x] [内置身份校验](https://github.com/aacfactory/fns/blob/main/docs/authorizations.md) \n  * [x] [内置权限验证](https://github.com/aacfactory/fns/blob/main/docs/perissions.md) \n  * [x] [内置指标收集](https://github.com/aacfactory/fns/blob/main/docs/metric.md)\n  * [x] [内置链路跟踪](https://github.com/aacfactory/fns/blob/main/docs/tracing.md)\n  * [x] [支持分布式跟踪的错误](https://github.com/aacfactory/errors)\n  * [x] [支持可检索的日志格式](https://github.com/aacfactory/fns/blob/main/docs/logs.md)\n  * [x] [自动化分布式API文档](https://github.com/aacfactory/fns/blob/main/docs/openapi.md)\n* [x] 高并发\n  * [x] 协程池\n  * [x] 支持 Fasthttp\n  * [x] [栅栏](https://github.com/aacfactory/fns/blob/main/docs/barrier.md)\n* [x] TLS\n  * [x] [自动化自签证书](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#SSC)\n* [x] 多版本HTTP\n  * [x] [Fasthttp](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Fasthttp)\n  * [x] [基于Fasthttp的HTTP2](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Fasthttp2)\n  * [x] [标准库](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Standard)\n  * [x] [HTTP3](https://github.com/aacfactory/fns-contrib/blob/main/transports/http3/README.md)\n  * [x] [通用的WEBSOCKET](https://github.com/aacfactory/fns-contrib/blob/main/transports/handlers/websockets/readme.md)\n* [x] 集群\n  * [x] [分布式共享](https://github.com/aacfactory/fns/blob/main/docs/cluster.md#Sharing)\n  * [x] [请求自动代理](https://github.com/aacfactory/fns/blob/main/docs/cluster.md#Proxy)\n  * [x] [Hazelcast](https://github.com/aacfactory/fns-contrib/blob/main/cluster/hazelcasts/README.md) \n  * [x] [Redis](https://github.com/aacfactory/fns-contrib/blob/main/databases/redis/README.md)\n  * [x] [Kubernetes](https://github.com/aacfactory/fns/blob/main/docs/cluster.md#KUBERNETES)\n* [x] 官方服务 \n    * [x] 数据库\n      * [x] [SQL](https://github.com/aacfactory/fns-contrib/blob/main/databases/sql/README.md)\n        * [x] 分布式事务\n        * [x] [Postgres ORM](https://github.com/aacfactory/fns-contrib/blob/main/databases/postgres/README.md) \n        * [x] [Mysql ORM](https://github.com/aacfactory/fns-contrib/blob/main/databases/mysql/readme.md)\n      * [x] [Redis](https://github.com/aacfactory/fns-contrib/blob/main/databases/redis/README.md)\n    * [ ] 消息\n        * [ ] RabbitMQ\n        * [x] [Kafka](https://github.com/aacfactory/fns-contrib/blob/main/message-queues/kafka/README.md)\n        * [ ] RocketMQ\n        * [ ] MQTT \n    * [ ] 第三方服务集成\n      * [ ] Oauth\n      * [ ] 支付\n      * [ ] 短信\n      * [ ] 通知\n\n## 使用\n### 创建项目\n一、安装`fns`。\n```shell\ngo install github.com/aacfactory/fns/cmd/fns@latest\n```\n二、使用`fns`创建项目。\n```shell\nmkdir {your project path}\ncd {your project path}\nfns init --mod={mod} --img={docker image name} --work={true} --version={go version} . \n## Example\n# fns init --mod=foo.com/project --img={foo.com/project} --work=true --version=1.21.0 .\n```\n\n### 编写代码\n一、理解[项目结构](https://github.com/aacfactory/fns/blob/main/docs/structure.md)\n\n二、设置[配置](https://github.com/aacfactory/fns/blob/main/docs/config.md)与[依赖](https://github.com/aacfactory/fns/blob/main/docs/dependence.md)\n\n三、创建[服务标识](https://github.com/aacfactory/fns/blob/main/docs/architecture.md#Service)。\n\n四、创建[函数](https://github.com/aacfactory/fns/blob/main/docs/fn.md)。\n\n五、运行`go generate`[生成代码](https://github.com/aacfactory/fns/blob/main/docs/generation.md)。\n\n### 运行项目\n设置环境变量激活[配置](https://github.com/aacfactory/fns/blob/main/docs/config.md)。\n\n如`FNS-ACTIVE=local`，则运行时使用`fns-local.yaml`的配置。\n\n### 测试与分析\n* [单元测试](https://github.com/aacfactory/fns/blob/main/docs/testing.md)\n* [pprof](https://github.com/aacfactory/fns-contrib/blob/main/transports/handlers/pprof/README.md)\n\n### 发布API文档\n开启[API文档](https://github.com/aacfactory/fns-contrib/blob/main/transports/handlers/documents/README.md)功能，通过浏览器或相关OPENAPI工具进行查阅。\n\n## 集群\n开启[集群](https://github.com/aacfactory/fns/blob/main/docs/architecture.md#Cluster)功能即可，无需其它改动。\n\n当运行在`kubernetes`环境中时，请使用 [inject](https://kubernetes.io/zh-cn/docs/tasks/inject-data-application/environment-variable-expose-pod-information/) 把 POD IP 注入到`FNS-HOST`环境变量中，最后把配置中`cluster.hostRetriever`的值设置为`env`。\n\n## 客制化HTTP服务\n* [HTTP服务](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Http)\n* [中间件](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Middleware)\n* [处理器](https://github.com/aacfactory/fns/blob/main/docs/trasnport.md#Handler)\n\n## 第三方服务集成\n### 服务化 \n[服务化](https://github.com/aacfactory/fns/blob/main/docs/architecture.md#Service)第三方服务的SDK，业务服务通过函数进行调用。\n\n### 组件化\n[组件化](https://github.com/aacfactory/fns/blob/main/docs/architecture.md#Component)第三方服务的SDK，然后注入到业务服务中。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faacfactory%2Ffns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faacfactory%2Ffns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faacfactory%2Ffns/lists"}