{"id":41430556,"url":"https://github.com/ninlil/butler","last_synced_at":"2026-01-23T14:28:21.437Z","repository":{"id":48832839,"uuid":"383116578","full_name":"ninlil/butler","owner":"ninlil","description":"Go-framework for cloud/kubernetes-friendly microservices","archived":false,"fork":false,"pushed_at":"2025-07-23T23:00:12.000Z","size":64,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T02:01:40.315Z","etag":null,"topics":["cloud","framework","go","kubernetes-service","microservice"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ninlil.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,"zenodo":null}},"created_at":"2021-07-05T11:26:11.000Z","updated_at":"2025-07-23T23:00:15.000Z","dependencies_parsed_at":"2022-08-28T02:53:34.151Z","dependency_job_id":"f85b9279-770d-4349-8389-05fcf6cce9a6","html_url":"https://github.com/ninlil/butler","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ninlil/butler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninlil%2Fbutler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninlil%2Fbutler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninlil%2Fbutler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninlil%2Fbutler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninlil","download_url":"https://codeload.github.com/ninlil/butler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninlil%2Fbutler/sbom","scorecard":{"id":688578,"data":{"date":"2025-08-11","repo":{"name":"github.com/ninlil/butler","commit":"f37435e3eef3e29497ba42eb7a71b64fdd701255"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":10,"reason":"0 existing vulnerabilities detected","details":null,"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-22T01:40:52.962Z","repository_id":48832839,"created_at":"2025-08-22T01:40:52.962Z","updated_at":"2025-08-22T01:40:52.962Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cloud","framework","go","kubernetes-service","microservice"],"created_at":"2026-01-23T14:28:20.744Z","updated_at":"2026-01-23T14:28:21.421Z","avatar_url":"https://github.com/ninlil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# butler\nGo-framework for cloud/kubernetes-friendly microservices\n\n## Why?\nThis package is meant to streamline the development of simple microservice without requiring each developer to handle the overhead of parsing http-headers, request- and response-body.\n\nMy definition of a successful microservice, specially in kubernetes is this:\n- Handles the health-probes\n- Separate response-status by 'Data found', 'Data not found/No-data' and 'Route/handler not found'\n- Handle different encodings on both request- and response-body\n- Consistent tracing/tracking on both request and application logging\n- Automatic and consistent error-handling on parameters\n- Graceful shutdown (close incoming connections, but keep processing those already received)\n\nWith all that in mind (and more) I'm building this framework: **the Butler** - _makes life easier_\n\n## Features\n\n### Router\n- Gracefull shutdown of http-server\n- Liveness and Readyness-probes for Kubernetes\n- Parameter-validation\n  - min/max and default-values\n  - optional or required\n  - from `path`, `query`, `header` or `body`\n- Handle the `Accept` \u0026 `Content-Type` headers (json, xml)\n- Enable handlers to use functional-programming\n  - Return the actual result\n  - Accept `context.Context` argument\n- Wrapped handling of `Request-Id` and `Correlation-Id`\n- Automatic log-support with json to pipe/stream and pretty-printed to console/tty\n- Automatic `204 'No Content'` on empty result\n\n### Workers\n- Easy job/cronjob (run-then-exit) with health-probes\n- Startup/initialization-phase\n\n### ...planned for future updates\n- Metrics for Prometheus\n- More dataformats (yaml, toml)\n- Regex-validation of parameters\n- Support custom datatypes (ex: UUID)\n- More documentation\n- ETag-calculation\n- Easily detect/handle closed/cancelled requests\n\n## Examples\n- [Misc. router-example](examples/example)\n- [Worker-demo](examples/workers1)\n\n### HelloWorld\n```go\nimport (\n\t\"github.com/ninlil/butler\"\n\t\"github.com/ninlil/butler/log\"\n\t\"github.com/ninlil/butler/router\"\n)\n\nvar routes = []router.Route{\n\t{Name: \"hello\", Method: \"GET\", Path: \"/\", Handler: helloWorld},\n}\n\nfunc main() {\n\tdefer butler.Cleanup(nil)\n\n\terr := router.Serve(routes, 10000)\n\tif err != nil {\n\t\tlog.Fatal().Msg(err.Error())\n\t}\n\n\tbutler.Run()\n}\n\nfunc helloWorld() string {\n\treturn \"Hello World!\"\n}\n```\n\n### API with arguments and return-values\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/ninlil/butler/log\"\n)\n\ntype handlerArgs struct {\n\tA float64 `from:\"query\" json:\"a\" required:\"\"`\n\tB float64 `from:\"query\" json:\"b\" required:\"\"`\n}\n\ntype handlerResult struct {\n\tSum float64 `json:\"sum\"`\n}\n\nfunc handler(ctx context.Context, args *handlerArgs) *handlerResult {\n\tlog := log.FromCtx(ctx)\n\tlog.Info().Msgf(\"handler called with a=%v and b=%v\", args.B, args.B)\n\treturn \u0026handlerResult{\n\t\tSum: args.A + args.B,\n\t}\n}\n```\n\n```\nGET http://localhost/handler?a=3\u0026b=0.14\n---\nHTTP/1.1 200 OK\nContent-Length: 12\nContent-Type: application/json; charset=utf-8\nCorrelation-Id: ...tas0\nRequest-Id: ...targ\nDate: Mon, 05 Jul 2021 13:57:17 GMT\nConnection: close\n\n{\n  \"sum\": 3.14\n}\n```\nand the log also prints (to console/tty)\n```\n13:57:17.351 INF handler called with a=0.14 and b=0.14 corr_id=...tas0 req_id=...tas0\n```\n\n## External packages\n- github.com/go-chi/chi/v5 - is a lightweight, idiomatic and composable router for building Go HTTP services\n-\tgithub.com/justinas/alice - Painless middleware chaining for Go\n-\tgithub.com/rs/xid - xid is a globally unique id generator thought for the web\n-\tgithub.com/rs/zerolog - Zero Allocation JSON Logger\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninlil%2Fbutler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninlil%2Fbutler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninlil%2Fbutler/lists"}