{"id":48514427,"url":"https://github.com/rmoff/ksqldb-go","last_synced_at":"2026-04-07T18:32:58.003Z","repository":{"id":46268343,"uuid":"283617085","full_name":"rmoff/ksqldb-go","owner":"rmoff","description":"A Golang client for ksqlDB","archived":false,"fork":false,"pushed_at":"2021-11-03T10:22:23.000Z","size":7162,"stargazers_count":69,"open_issues_count":10,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-06T19:25:28.923Z","etag":null,"topics":["kafka","kafka-streams","sql","stream-processing"],"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/rmoff.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2020-07-29T22:45:08.000Z","updated_at":"2024-11-28T19:35:46.000Z","dependencies_parsed_at":"2022-08-28T15:24:10.546Z","dependency_job_id":null,"html_url":"https://github.com/rmoff/ksqldb-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rmoff/ksqldb-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmoff%2Fksqldb-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmoff%2Fksqldb-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmoff%2Fksqldb-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmoff%2Fksqldb-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmoff","download_url":"https://codeload.github.com/rmoff/ksqldb-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmoff%2Fksqldb-go/sbom","scorecard":{"id":779067,"data":{"date":"2025-08-11","repo":{"name":"github.com/rmoff/ksqldb-go","commit":"35d4fd2fc4747cb73e323ed1556c0d80b9e11d0a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/20 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"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":-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":"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":"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 'master'"],"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 15 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":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","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: 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"],"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-23T04:26:28.430Z","repository_id":46268343,"created_at":"2025-08-23T04:26:28.430Z","updated_at":"2025-08-23T04:26:28.430Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31524525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["kafka","kafka-streams","sql","stream-processing"],"created_at":"2026-04-07T18:32:56.426Z","updated_at":"2026-04-07T18:32:57.988Z","avatar_url":"https://github.com/rmoff.png","language":"Go","readme":"= ksqlDB Go library\nRobin Moffatt \u003crobin@moffatt.me\u003e\nv0.04, 8 October 2020\n\n'''\n'''\n'''\n\n🌟🌟🌟 *@thmeitz has recently forked this—with my gratitude and blessing—in order to develop it further - please see his repo at https://github.com/thmeitz/ksqldb-go[thmeitz/ksqldb-go]*\n\n'''\n'''\n'''\n\n:toc:\n\nThis is a Go client for https://ksqldb.io/[ksqlDB]. It supports both pull and push queries, as well as command execution. \n\n⚠️ Disclaimer #1: https://rmoff.net/2020/06/25/learning-golang-some-rough-notes-s01e00/[I am brand new to Go!] Tips (or PRs) to improve the code very welcome :)\n\n⚠️ Disclaimer #2: This is a personal project and not supported or endorsed by Confluent.\n\nimage::ksqldb-go.gif[Animation of the ksqlDB Golang client in action]\n\n== Installation\n\nModule install:\n\nThis client is a Go module, therefore you can have it simply by adding the following import to your code:\n\n[source,golang]\n----\nimport \"github.com/rmoff/ksqldb-go\"\n----\n\nThen run a build to have this client automatically added to your go.mod file as a dependency.\n\nManual install:\n\n[source,bash]\n----\ngo get -u github.com/rmoff/ksqldb-go\n----\n\n== Examples\n\nSee the link:test/environment.adoc[test environment here], and link:test/main.go[this sample code] which you can run with\n\n[source,bash]\n----\ngo run ./test/\n----\n\nCreate a ksqlDB Client \n\n[source,go]\n----\nclient := ksqldb.NewClient(\"http://ksqldb:8088\",\"username\",\"password\").Debug()\n----\n\nFor no authentication just use blank username and password values. \n\n=== Pull query\n\n[source,go]\n----\nctx, ctxCancel := context.WithTimeout(context.Background(), 10 * time.Second)\ndefer ctxCancel()\n\nk := \"SELECT TIMESTAMPTOSTRING(WINDOWSTART,'yyyy-MM-dd HH:mm:ss','Europe/London') AS WINDOW_START, TIMESTAMPTOSTRING(WINDOWEND,'HH:mm:ss','Europe/London') AS WINDOW_END, DOG_SIZE, DOGS_CT FROM DOGS_BY_SIZE WHERE DOG_SIZE='\" + s + \"';\"\n_, r, e := client.Pull(ctx, k, false)\n\nif e != nil {\n    // handle the error better here, e.g. check for no rows returned\n    return fmt.Errorf(\"Error running Pull request against ksqlDB:\\n%v\", e)\n}\n\nvar DOG_SIZE string\nvar DOGS_CT float64\nfor _, row := range r {\n    if row != nil {\n        // Should do some type assertions here\n        DOG_SIZE = row[2].(string)\n        DOGS_CT = row[3].(float64)\n        fmt.Printf(\"🐶 There are %v dogs size %v\\n\", DOGS_CT, DOG_SIZE)\n    }\n}\n----\n\n=== Push query\n\n[source,go]\n----\nrc := make(chan ksqldb.Row)\nhc := make(chan ksqldb.Header, 1)\n\nk := \"SELECT ROWTIME, ID, NAME, DOGSIZE, AGE FROM DOGS EMIT CHANGES;\"\n\n// This Go routine will handle rows as and when they\n// are sent to the channel\ngo func() {\n    var NAME string\n    var DOG_SIZE string\n    for row := range rc {\n        if row != nil {\n            // Should do some type assertions here\n            NAME = row[2].(string)\n            DOG_SIZE = row[3].(string)\n\n            fmt.Printf(\"🐾%v: %v\\n\",  NAME, DOG_SIZE)\n        }\n    }\n}()\n\nctx, ctxCancel := context.WithTimeout(context.Background(), 10 * time.Second)\ndefer ctxCancel()\n\ne := client.Push(ctx, k, rc, hc)\n\nif e != nil {\n    // handle the error better here, e.g. check for no rows returned\n    return fmt.Errorf(\"Error running Push request against ksqlDB:\\n%v\", e)\n}\n----\n\n=== Execute a command\n\n[source,go]\n----\nif err := client.Execute(ctx, ksqlDBServer, `\n\tCREATE STREAM DOGS (ID STRING KEY, \n\t\t\t\t\t\tNAME STRING, \n\t\t\t\t\t\tDOGSIZE STRING, \n\t\t\t\t\t\tAGE STRING) \n\t\t\t\t  WITH (KAFKA_TOPIC='dogs', \n\t\t\t\t  VALUE_FORMAT='JSON');\n`); err != nil {\n    return fmt.Errorf(\"Error creating the DOGS stream.\\n%v\", err)\n}\n----\n\n== TODO\n\nSee https://github.com/rmoff/ksqldb-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmoff%2Fksqldb-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmoff%2Fksqldb-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmoff%2Fksqldb-go/lists"}