{"id":23938073,"url":"https://github.com/plebbit/go-libp2p-pubsub-plebbit-validator","last_synced_at":"2026-05-15T11:31:26.917Z","repository":{"id":169571337,"uuid":"645570123","full_name":"plebbit/go-libp2p-pubsub-plebbit-validator","owner":"plebbit","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-11T02:37:08.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T02:19:00.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plebbit.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":"2023-05-26T00:38:35.000Z","updated_at":"2023-06-06T09:39:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb032517-4c1a-46d5-93a4-955d897e7533","html_url":"https://github.com/plebbit/go-libp2p-pubsub-plebbit-validator","commit_stats":null,"previous_names":["plebbit/go-libp2p-pubsub-plebbit-validator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fgo-libp2p-pubsub-plebbit-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fgo-libp2p-pubsub-plebbit-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fgo-libp2p-pubsub-plebbit-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fgo-libp2p-pubsub-plebbit-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plebbit","download_url":"https://codeload.github.com/plebbit/go-libp2p-pubsub-plebbit-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240415209,"owners_count":19797599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-01-06T02:18:22.295Z","updated_at":"2026-05-15T11:31:21.895Z","avatar_url":"https://github.com/plebbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Usage\n\n```go\nimport (\n    libp2p \"github.com/libp2p/go-libp2p\"\n    pubsub \"github.com/libp2p/go-libp2p-pubsub\"\n    plebbitValidator \"github.com/plebbit/go-libp2p-pubsub-plebbit-validator\"\n)\n\nfunc main() {\n    // create libp2p\n    host, err := libp2p.New(libp2p.ListenAddrStrings(\"/ip4/0.0.0.0/tcp/0\"))\n    if err != nil {\n        panic(err)\n    }\n\n    // create pubsub with plebbit validator\n    ctx := context.Background()\n    ps, err := pubsub.NewGossipSub(ctx, host, pubsub.WithDefaultValidator(plebbitValidator.validate))\n    if err != nil {\n        panic(err)\n    }\n\n    // create test pubsub topic\n    topic, err := ps.Join(\"test-topic\")\n    if err != nil {\n        panic(err)\n    }\n\n    message := []byte(\"hello\")\n    topic.Publish(ctx, message)\n}\n```\n\n#### Test\n\n```sh\ngo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebbit%2Fgo-libp2p-pubsub-plebbit-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplebbit%2Fgo-libp2p-pubsub-plebbit-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebbit%2Fgo-libp2p-pubsub-plebbit-validator/lists"}