{"id":21708800,"url":"https://github.com/mono424/go-pts","last_synced_at":"2026-01-30T19:04:09.004Z","repository":{"id":60157471,"uuid":"541334503","full_name":"mono424/go-pts","owner":"mono424","description":"Go Library for WebSocket Channel Management ✨","archived":false,"fork":false,"pushed_at":"2024-11-18T18:36:18.000Z","size":185,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T06:42:35.280Z","etag":null,"topics":["go","golang","websocket"],"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/mono424.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":"2022-09-25T23:08:21.000Z","updated_at":"2024-04-25T18:45:59.000Z","dependencies_parsed_at":"2024-06-21T18:59:14.225Z","dependency_job_id":"dd60d16e-804d-4b19-83d3-82b38a9059a2","html_url":"https://github.com/mono424/go-pts","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.30000000000000004","last_synced_commit":"655eb3c29d639b0cd71e3496367d9c2d87bfbaea"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mono424/go-pts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono424%2Fgo-pts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono424%2Fgo-pts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono424%2Fgo-pts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono424%2Fgo-pts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mono424","download_url":"https://codeload.github.com/mono424/go-pts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono424%2Fgo-pts/sbom","scorecard":{"id":658717,"data":{"date":"2025-08-11","repo":{"name":"github.com/mono424/go-pts","commit":"655eb3c29d639b0cd71e3496367d9c2d87bfbaea"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/run-tests.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":"Code-Review","score":0,"reason":"Found 0/15 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":"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":"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/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/run-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/run-tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/run-tests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mono424/go-pts/run-tests.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"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":-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":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","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":"25 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-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","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"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-21T15:27:08.398Z","repository_id":60157471,"created_at":"2025-08-21T15:27:08.398Z","updated_at":"2025-08-21T15:27:08.398Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28917454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"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":["go","golang","websocket"],"created_at":"2024-11-25T22:32:41.719Z","updated_at":"2026-01-30T19:04:08.988Z","avatar_url":"https://github.com/mono424.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/mono424/go-pts/images/logo.png\"\u003e\u003cbr\u003e\n  Go (Pneumatic) Tube System\n\u003c/h1\u003e\n\n\n[![Run Tests](https://github.com/mono424/go-pts/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/mono424/go-pts/actions/workflows/run-tests.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mono424/go-pts)](https://goreportcard.com/report/github.com/mono424/go-pts)\n[![codecov](https://codecov.io/gh/mono424/go-pts/branch/main/graph/badge.svg?token=9VA6CYDXAZ)](https://codecov.io/gh/mono424/go-pts)\n\nGo-PTS is a flexible package for managing Pub-Sub over WebSockets in Go. It offers a rest-style syntax and easily integrates with various websocket and http frameworks.\n\n## Installation\n\n### Installing the main library\n\n1. Get the `go-pts` package using the following command:\n\n```shell\ngo get github.com/mono424/go-pts\n```\n\n### Using connectors\n\nTo use go-pts with a specific websocket library, you need to install the corresponding connector.\n\n```shell\ngo get github.com/mono424/go-pts-gorilla-connector\n```\n\nThen, you can import them in your code like this:\n\n```go\nimport (\n  \"github.com/mono424/go-pts\"\n  ptsc_gorilla \"github.com/mono424/go-pts-gorilla-connector\"\n)\n```\n\n## Client Libraries\n\nFor client-side integration, you can use one of the following client libraries:\n\n| Language | URL |\n| -------- | --- |\n| JavaScript | [go-pts-client-js](https://github.com/mono424/go-pts-client-js) |\n| Dart | [go-pts-client-dart](https://github.com/mono424/go-pts-client-dart) |\n\n## Connectors\n\nFor server-side integration with WebSocket libraries, you can use one of the following connectors:\n\n| WebSocket Library | URL |\n| ----------------- | --- |\n| Gorilla WebSocket | [go-pts-gorilla-connector](https://github.com/mono424/go-pts-gorilla-connector) |\n| Melody | [go-pts-melody-connector](https://github.com/mono424/go-pts-melody-connector) |\n\n## Getting Started\n\n1. Create a new TubeSystem\n\n```go\ntubeSystem := pts.New(ptsc_gorilla.NewConnector(\n  websocket.Upgrader{},\n  func(err *pts.Error) {\n    println(err.Description)\n  },\n))\n```\n\n2. Register Channels\n\n```go\ntubeSystem.RegisterChannel(\"/stream/:streamId\", pts.ChannelHandlers{\n  OnSubscribe: func(s *pts.Context) {\n    println(\"Client joined: \" + s.FullPath)\n  },\n  OnMessage: func(s *pts.Context, message *pts.Message) {\n    println(\"New Message on \" + s.FullPath + \": \" + string(message.Payload))\n  },\n  OnUnsubscribe: func(s *pts.Context) {\n    println(\"Client left: \" + s.FullPath)\n  },\n})\n```\n\n3. Provide a connect route\n\n```go\nr.GET(\"/connect\", func(c *gin.Context) {\n  properties := make(map[string]interface{}, 1)\n  properties[\"ctx\"] = c\n\n  if err := tubeSystem.HandleRequest(c.Writer, c.Request, properties); err != nil {\n    println(\"Something went wrong while handling a Socket request\")\n  }\n})\n```\n\n4. Connect from a frontend lib\n```javascript\nconst client = new GoPTSClient({ url: socketUrl, debugging: true })\nclient.subscribeChannel(\"test\", console.log);\nclient.send(\"test\", { payload: { foo: \"bar\" } })\n```\n\n## Examples\n\nTo get a quick overview of how to use Go-PTS, check out the `examples` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono424%2Fgo-pts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmono424%2Fgo-pts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono424%2Fgo-pts/lists"}