{"id":13413814,"url":"https://github.com/vimeda/pletter","last_synced_at":"2026-01-14T16:29:54.809Z","repository":{"id":42191872,"uuid":"196020310","full_name":"vimeda/pletter","owner":"vimeda","description":"A standard way to wrap a proto message","archived":false,"fork":false,"pushed_at":"2023-12-15T05:54:34.000Z","size":65,"stargazers_count":19,"open_issues_count":9,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-07-31T20:52:54.234Z","etag":null,"topics":["envelope","go","protobuf","wrapper"],"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/vimeda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2019-07-09T14:02:08.000Z","updated_at":"2023-08-22T11:20:27.000Z","dependencies_parsed_at":"2023-12-15T06:52:50.046Z","dependency_job_id":null,"html_url":"https://github.com/vimeda/pletter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/vimeda/pletter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeda%2Fpletter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeda%2Fpletter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeda%2Fpletter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeda%2Fpletter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimeda","download_url":"https://codeload.github.com/vimeda/pletter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimeda%2Fpletter/sbom","scorecard":{"id":921872,"data":{"date":"2025-08-11","repo":{"name":"github.com/vimeda/pletter","commit":"f1d5882b4d0b96d009a05aad563537a8effe0e33"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"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":"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":"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":"Code-Review","score":10,"reason":"all changesets reviewed","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/draft-release.yaml:1","Warn: no topLevel permission defined: .github/workflows/master.yml:1","Warn: no topLevel permission defined: .github/workflows/pr.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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/draft-release.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/draft-release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/vimeda/pletter/pr.yml/master?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 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":"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: 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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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"}}]},"last_synced_at":"2025-08-25T04:54:58.753Z","repository_id":42191872,"created_at":"2025-08-25T04:54:58.753Z","updated_at":"2025-08-25T04:54:58.753Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"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":["envelope","go","protobuf","wrapper"],"created_at":"2024-07-30T20:01:50.070Z","updated_at":"2026-01-14T16:29:54.792Z","avatar_url":"https://github.com/vimeda.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003eWelcome to Pletter 👋\u003c/h1\u003e\n\u003cp\u003e\u003c/p\u003e\n\n[![Build Status](https://travis-ci.com/vimeda/pletter.svg?branch=master)](https://travis-ci.com/vimeda/pletter)\n[![Coverage Status](https://coveralls.io/repos/github/vimeda/pletter/badge.svg)](https://coveralls.io/github/vimeda/pletter)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vimeda/pletter)](https://goreportcard.com/report/github.com/vimeda/pletter)\n[![GoDoc](https://godoc.org/github.com/vimeda/pletter?status.svg)](https://godoc.org/github.com/vimeda/pletter)\n\n\u003e A standard way to wrap a proto message\n\nPletter was born with a single mission: `To standardize wrapping protocol buffer messages`. This is normally needed when you use protobuf as your messaging protocol. \n\n## The Problem\n\nImagine that you have an event driven architecture. In this system you chose to use protocol buffers to ensure message contract and to transit information.\nLet's assume we use Kafka as our message broker. In this Kafka we have one topic called `accounts`, this means all account messages will go to the `accounts` topic.\n\nOn the consumer side, we will receive multiple messages in the same topic. If an application wants to read this messages it needs to identify the message type/name\nto either enrich, fan out or handle it. To solve that we have a few options:\n\n1. If you use something like AMQP instead of a message broker you can set the name of the message in the header and deal with it in the consumer side\n2. If you use Kafka/Kinesis or any message broker that streams messages, you will need to envelop the message.\n\nOption 2 is the option that Pletter tries to solve in Go.\n\nAn interesting article about streams architecture can be found [here](https://docs.confluent.io/current/streams/architecture.html)\n\n## Install\n\n```sh\ngo get github.com/vimeda/pletter\n```\n\n## Use\n\nPletter is simple to use, we provide you a few functions to deal with the message.\n\nWhen producing messages:\n\n```go\n// Create your proto message\nac := pb.Example{\n    ID: \"1231231312\",\n}\n\n// call the PackAndMarshal function to wrap your message and already proto.Marshal it\nraw, err := any.PackAndMarshal(\u0026ac)\nif err != nil {\n    fmt.Errorf(\"an error ocurred while packing and marshalling the message: %s\", err)\n}\n\n// send the slice of byte to your message broker\n```\n\nWhen consuming messages:\n\n```go\n// declare your expected type\nvar expectedExample pb.Example\n\n// call the Unpack function that will unwrap your message from the envelop\nerr = any.Unpack(raw, \u0026expectedExample)\nif err != nil {\n    fmt.Errorf(\"an error ocurred while unpacking the message: %s\", err)\n}\n```\n\nYou can also filter out messages when consuming them:\n\n```go\n// call the Unpack function that will unwrap your message from the envelop\nname, err := any.GetMessageName(raw)\nif err != nil {\n    fmt.Errorf(\"an error ocurred while getting the message name: %s\", err)\n}\n\nswitch name {\n    case \"pb.Example\":\n        // declare your expected type\n        var expectedExample pb.Example\n\n        // call the Unpack function that will unwrap your message from the envelop\n        err = any.Unpack(raw, \u0026expectedExample)\n        if err != nil {\n            fmt.Errorf(\"an error ocurred while unpacking the message: %s\", err)\n        }\n        // do somthing\n    default;\n        // ignore the other messages\n}\n```\n\n## Run tests\n\n```sh\ngo test ./...\n```\n\n## Author\n\n👤 **Italo Vietro**\n\n* Github: [@italolelis](https://github.com/italolelis)\n\n👤 **Felipe Umpierre**\n\n* Github: [@felipeumpierre](https://github.com/felipeumpierre)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/vimeda/pletter/issues).\n","funding_links":[],"categories":["Serialization","序列化","安全领域相关库","Relational Databases"],"sub_categories":["HTTP Clients","HTTP客户端","查询语"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimeda%2Fpletter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimeda%2Fpletter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimeda%2Fpletter/lists"}