Feed generator written in Golang

initial commit of golang source code

+90
go.mod
···
+
module banana.com
+
+
go 1.23.0
+
+
toolchain go1.23.9
+
+
require (
+
github.com/bluesky-social/indigo v0.0.0-20250520232546-236dd575c91e
+
github.com/fxamacker/cbor/v2 v2.8.0
+
github.com/go-chi/chi/v5 v5.2.1
+
github.com/gorilla/websocket v1.5.3
+
github.com/ipfs/go-cid v0.4.1
+
modernc.org/sqlite v1.37.1
+
)
+
+
require (
+
github.com/beorn7/perks v1.0.1 // indirect
+
github.com/carlmjohnson/versioninfo v0.22.5 // indirect
+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
+
github.com/dustin/go-humanize v1.0.1 // indirect
+
github.com/felixge/httpsnoop v1.0.4 // indirect
+
github.com/go-logr/logr v1.4.1 // indirect
+
github.com/go-logr/stdr v1.2.2 // indirect
+
github.com/gogo/protobuf v1.3.2 // indirect
+
github.com/google/uuid v1.6.0 // indirect
+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
+
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
+
github.com/hashicorp/golang-lru v1.0.2 // indirect
+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
+
github.com/ipfs/bbloom v0.0.4 // indirect
+
github.com/ipfs/go-block-format v0.2.0 // indirect
+
github.com/ipfs/go-blockservice v0.5.2 // indirect
+
github.com/ipfs/go-datastore v0.6.0 // indirect
+
github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect
+
github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect
+
github.com/ipfs/go-ipfs-exchange-interface v0.2.1 // indirect
+
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
+
github.com/ipfs/go-ipld-cbor v0.1.0 // indirect
+
github.com/ipfs/go-ipld-format v0.6.0 // indirect
+
github.com/ipfs/go-ipld-legacy v0.2.1 // indirect
+
github.com/ipfs/go-log v1.0.5 // indirect
+
github.com/ipfs/go-log/v2 v2.5.1 // indirect
+
github.com/ipfs/go-merkledag v0.11.0 // indirect
+
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
+
github.com/ipfs/go-verifcid v0.0.3 // indirect
+
github.com/ipld/go-car v0.6.1-0.20230509095817-92d28eb23ba4 // indirect
+
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
+
github.com/ipld/go-ipld-prime v0.21.0 // indirect
+
github.com/jbenet/goprocess v0.1.4 // indirect
+
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+
github.com/mattn/go-isatty v0.0.20 // indirect
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
+
github.com/minio/sha256-simd v1.0.1 // indirect
+
github.com/mr-tron/base58 v1.2.0 // indirect
+
github.com/multiformats/go-base32 v0.1.0 // indirect
+
github.com/multiformats/go-base36 v0.2.0 // indirect
+
github.com/multiformats/go-multibase v0.2.0 // indirect
+
github.com/multiformats/go-multihash v0.2.3 // indirect
+
github.com/multiformats/go-varint v0.0.7 // indirect
+
github.com/ncruces/go-strftime v0.1.9 // indirect
+
github.com/opentracing/opentracing-go v1.2.0 // indirect
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f // indirect
+
github.com/prometheus/client_golang v1.17.0 // indirect
+
github.com/prometheus/client_model v0.5.0 // indirect
+
github.com/prometheus/common v0.45.0 // indirect
+
github.com/prometheus/procfs v0.12.0 // indirect
+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
+
github.com/spaolacci/murmur3 v1.1.0 // indirect
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e // indirect
+
github.com/x448/float16 v0.8.4 // indirect
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
+
go.opentelemetry.io/otel v1.21.0 // indirect
+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
+
go.opentelemetry.io/otel/trace v1.21.0 // indirect
+
go.uber.org/atomic v1.11.0 // indirect
+
go.uber.org/multierr v1.11.0 // indirect
+
go.uber.org/zap v1.26.0 // indirect
+
golang.org/x/crypto v0.21.0 // indirect
+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
+
golang.org/x/sys v0.33.0 // indirect
+
golang.org/x/time v0.3.0 // indirect
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
+
google.golang.org/protobuf v1.33.0 // indirect
+
lukechampine.com/blake3 v1.2.1 // indirect
+
modernc.org/libc v1.65.7 // indirect
+
modernc.org/mathutil v1.7.1 // indirect
+
modernc.org/memory v1.11.0 // indirect
+
)
+383
go.sum
···
+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
+
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+
github.com/bluesky-social/indigo v0.0.0-20250520232546-236dd575c91e h1:DVD+HxQsDCVJtAkjfIKZVaBNc3kayHaU+A2TJZkFdp4=
+
github.com/bluesky-social/indigo v0.0.0-20250520232546-236dd575c91e/go.mod h1:ovyxp8AMO1Hoe838vMJUbqHTZaAR8ABM3g3TXu+A5Ng=
+
github.com/carlmjohnson/versioninfo v0.22.5 h1:O00sjOLUAFxYQjlN/bzYTuZiS0y6fWDQjMRvwtKgwwc=
+
github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8=
+
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+
github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0=
+
github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis=
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
+
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
+
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
+
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
+
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
+
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
+
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
+
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
+
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
+
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
+
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
+
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
+
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
+
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
+
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
+
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
+
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
+
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
+
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
+
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
+
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
+
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
+
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
+
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
+
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
+
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
+
github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ=
+
github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y=
+
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
+
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
+
github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ=
+
github.com/ipfs/go-bitswap v0.11.0/go.mod h1:05aE8H3XOU+LXpTedeAS0OZpcO1WFsj5niYQH9a1Tmk=
+
github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs=
+
github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM=
+
github.com/ipfs/go-blockservice v0.5.2 h1:in9Bc+QcXwd1apOVM7Un9t8tixPKdaHQFdLSUM1Xgk8=
+
github.com/ipfs/go-blockservice v0.5.2/go.mod h1:VpMblFEqG67A/H2sHKAemeH9vlURVavlysbdUI632yk=
+
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
+
github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk=
+
github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk=
+
github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8=
+
github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=
+
github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=
+
github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ=
+
github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE=
+
github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ=
+
github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk=
+
github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ=
+
github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
+
github.com/ipfs/go-ipfs-ds-help v1.1.1 h1:B5UJOH52IbcfS56+Ul+sv8jnIV10lbjLF5eOO0C66Nw=
+
github.com/ipfs/go-ipfs-ds-help v1.1.1/go.mod h1:75vrVCkSdSFidJscs8n4W+77AtTpCIAdDGAwjitJMIo=
+
github.com/ipfs/go-ipfs-exchange-interface v0.2.1 h1:jMzo2VhLKSHbVe+mHNzYgs95n0+t0Q69GQ5WhRDZV/s=
+
github.com/ipfs/go-ipfs-exchange-interface v0.2.1/go.mod h1:MUsYn6rKbG6CTtsDp+lKJPmVt3ZrCViNyH3rfPGsZ2E=
+
github.com/ipfs/go-ipfs-exchange-offline v0.3.0 h1:c/Dg8GDPzixGd0MC8Jh6mjOwU57uYokgWRFidfvEkuA=
+
github.com/ipfs/go-ipfs-exchange-offline v0.3.0/go.mod h1:MOdJ9DChbb5u37M1IcbrRB02e++Z7521fMxqCNRrz9s=
+
github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY=
+
github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY=
+
github.com/ipfs/go-ipfs-routing v0.3.0 h1:9W/W3N+g+y4ZDeffSgqhgo7BsBSJwPMcyssET9OWevc=
+
github.com/ipfs/go-ipfs-routing v0.3.0/go.mod h1:dKqtTFIql7e1zYsEuWLyuOU+E0WJWW8JjbTPLParDWo=
+
github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0=
+
github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs=
+
github.com/ipfs/go-ipld-cbor v0.1.0 h1:dx0nS0kILVivGhfWuB6dUpMa/LAwElHPw1yOGYopoYs=
+
github.com/ipfs/go-ipld-cbor v0.1.0/go.mod h1:U2aYlmVrJr2wsUBU67K4KgepApSZddGRDWBYR0H4sCk=
+
github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U=
+
github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg=
+
github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk=
+
github.com/ipfs/go-ipld-legacy v0.2.1/go.mod h1:782MOUghNzMO2DER0FlBR94mllfdCJCkTtDtPM51otM=
+
github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8=
+
github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo=
+
github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g=
+
github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY=
+
github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
+
github.com/ipfs/go-merkledag v0.11.0 h1:DgzwK5hprESOzS4O1t/wi6JDpyVQdvm9Bs59N/jqfBY=
+
github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1LsA7+djsM4=
+
github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg=
+
github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY=
+
github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJYsUjqaU=
+
github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM=
+
github.com/ipfs/go-verifcid v0.0.3 h1:gmRKccqhWDocCRkC+a59g5QW7uJw5bpX9HWBevXa0zs=
+
github.com/ipfs/go-verifcid v0.0.3/go.mod h1:gcCtGniVzelKrbk9ooUSX/pM3xlH73fZZJDzQJRvOUw=
+
github.com/ipld/go-car v0.6.1-0.20230509095817-92d28eb23ba4 h1:oFo19cBmcP0Cmg3XXbrr0V/c+xU9U1huEZp8+OgBzdI=
+
github.com/ipld/go-car v0.6.1-0.20230509095817-92d28eb23ba4/go.mod h1:6nkFF8OmR5wLKBzRKi7/YFJpyYR7+oEn1DX+mMWnlLA=
+
github.com/ipld/go-car/v2 v2.13.1 h1:KnlrKvEPEzr5IZHKTXLAEub+tPrzeAFQVRlSQvuxBO4=
+
github.com/ipld/go-car/v2 v2.13.1/go.mod h1:QkdjjFNGit2GIkpQ953KBwowuoukoM75nP/JI1iDJdo=
+
github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc=
+
github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s=
+
github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E=
+
github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ=
+
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
+
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
+
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
+
github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o=
+
github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
+
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
+
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+
github.com/koron/go-ssdp v0.0.3 h1:JivLMY45N76b4p/vsWGOKewBQu6uf39y8l+AQ7sDKx8=
+
github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA=
+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
+
github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
+
github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c=
+
github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic=
+
github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw=
+
github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4=
+
github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw=
+
github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI=
+
github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0=
+
github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk=
+
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
+
github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg=
+
github.com/libp2p/go-msgio v0.2.0 h1:W6shmB+FeynDrUVl2dgFQvzfBZcXiyqY4VmpQLu9FqU=
+
github.com/libp2p/go-msgio v0.2.0/go.mod h1:dBVM1gW3Jk9XqHkU4eKdGvVHdLa51hoGfll6jMJMSlY=
+
github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg=
+
github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC3uRBM=
+
github.com/libp2p/go-netroute v0.2.0 h1:0FpsbsvuSnAhXFnCY0VLFbJOzaK0VnP0r1QT/o4nWRE=
+
github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI=
+
github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo=
+
github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc=
+
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
+
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
+
github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
+
github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
+
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
+
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
+
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
+
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
+
github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE=
+
github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=
+
github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0=
+
github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=
+
github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc=
+
github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs=
+
github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A=
+
github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk=
+
github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E=
+
github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo=
+
github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g=
+
github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk=
+
github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg=
+
github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k=
+
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
+
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
+
github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o=
+
github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg=
+
github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8=
+
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
+
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
+
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
+
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+
github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk=
+
github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw=
+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f h1:VXTQfuJj9vKR4TCkEuWIckKvdHFeJH/huIFJ9/cXOB0=
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw=
+
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
+
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
+
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
+
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
+
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
+
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
+
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
+
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
+
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
+
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
+
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
+
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
+
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
+
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
+
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
+
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
+
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+
github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+
github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s=
+
github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y=
+
github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ=
+
github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=
+
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0=
+
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ=
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e h1:28X54ciEwwUxyHn9yrZfl5ojgF4CBNLWX7LR0rvBkf4=
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so=
+
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
+
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
+
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24=
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=
+
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
+
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
+
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
+
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
+
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
+
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
+
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
+
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
+
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
+
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
+
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
+
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
+
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
+
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
+
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
+
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
+
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
+
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
+
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
+
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
+
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
+
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
+
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
+
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
+
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
+
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
+
modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s=
+
modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
+
modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU=
+
modernc.org/ccgo/v4 v4.28.0/go.mod h1:JygV3+9AV6SmPhDasu4JgquwU81XAKLd3OKTUDNOiKE=
+
modernc.org/fileutil v1.3.1 h1:8vq5fe7jdtEvoCf3Zf9Nm0Q05sH6kGx0Op2CPx1wTC8=
+
modernc.org/fileutil v1.3.1/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
+
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
+
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
+
modernc.org/libc v1.65.7 h1:Ia9Z4yzZtWNtUIuiPuQ7Qf7kxYrxP1/jeHZzG8bFu00=
+
modernc.org/libc v1.65.7/go.mod h1:011EQibzzio/VX3ygj1qGFt5kMjP0lHb0qCW5/D/pQU=
+
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
+
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
+
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
+
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
+
modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
+
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
+
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
+
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
+
modernc.org/sqlite v1.37.1 h1:EgHJK/FPoqC+q2YBXg7fUmES37pCHFc97sI7zSayBEs=
+
modernc.org/sqlite v1.37.1/go.mod h1:XwdRtsE1MpiBcL54+MbKcaDvcuej+IYSMfLN6gSKV8g=
+
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
+
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
+
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
+
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
+81
src/firehose-consumer.go
···
+
package main
+
+
import (
+
"fmt"
+
"log"
+
"net/url"
+
"time"
+
+
"github.com/gorilla/websocket"
+
)
+
+
const FIREHOSE_QUERY = "wantedCollections=app.bsky.feed.post"
+
+
const URL_RELAY_JETSTREAM2 = "wss://jetstream2.us-east.bsky.network/subscribe"
+
const URL_RELAY_BLACKSKY = "wss://atproto.africa/xrpc/com.atproto.sync.subscribeRepos"
+
+
type OnMessageCB = func(message []byte)
+
+
type FirehoseConsumer struct {
+
WebsocketConnection *websocket.Conn
+
MessagesChan *chan []byte
+
DoneSignal *chan struct{}
+
}
+
+
func MakeConsumer(baseUrl string) *FirehoseConsumer {
+
firehoseUrl, err := url.Parse(fmt.Sprintf("%s?%s", baseUrl, FIREHOSE_QUERY))
+
+
MessagesChan := make(chan []byte)
+
doneSignal := make(chan struct{})
+
conn, _, err := websocket.DefaultDialer.Dial(firehoseUrl.String(), nil)
+
if err != nil {
+
log.Fatal("failed to dial: ", err)
+
}
+
+
consumer := FirehoseConsumer{
+
WebsocketConnection: conn,
+
MessagesChan: &MessagesChan,
+
DoneSignal: &doneSignal,
+
}
+
+
return &consumer
+
}
+
+
func (consumer *FirehoseConsumer) Close() error {
+
return consumer.WebsocketConnection.Close()
+
}
+
+
func (consumer *FirehoseConsumer) StartConsumer() {
+
defer close(*consumer.DoneSignal)
+
for {
+
_, message, err := consumer.WebsocketConnection.ReadMessage()
+
if err != nil {
+
log.Println(err)
+
return
+
}
+
+
// onMessage(message)
+
*consumer.MessagesChan <- message
+
}
+
}
+
+
func (consumer *FirehoseConsumer) CloseWithTimeout(timeoutDuration time.Duration) error {
+
err := consumer.WebsocketConnection.WriteMessage(
+
websocket.CloseMessage,
+
websocket.FormatCloseMessage(
+
websocket.CloseNormalClosure,
+
"",
+
),
+
)
+
+
if err != nil {
+
return fmt.Errorf("failed to close ws: ", err)
+
}
+
+
select {
+
case <-*consumer.DoneSignal:
+
return nil
+
case <-time.After(timeoutDuration):
+
return fmt.Errorf("websocket close timeout")
+
}
+
}
+222
src/firehose-decoders.go
···
+
package main
+
+
import (
+
"bytes"
+
"context"
+
"encoding/json"
+
"fmt"
+
"io"
+
"log"
+
"net/http"
+
"os"
+
"strings"
+
"time"
+
+
"github.com/bluesky-social/indigo/repo"
+
"github.com/fxamacker/cbor/v2"
+
"github.com/ipfs/go-cid"
+
)
+
+
func JSONDecoder(messageChan chan *DatabasePost) OnMessageCB {
+
return func(message []byte) {
+
+
// log.Printf("recv: %s", message)
+
+
var data ComBskyFeedPost
+
err := json.Unmarshal(message, &data)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshal data", err))
+
return
+
}
+
+
// log.Printf("parse: %s", data)
+
+
/// /// /// /// /// /// /// ///
+
/// Begin Filtering Logic ///
+
/// /// /// /// /// /// /// ///
+
+
if data.Commit.Operation != "create" {
+
return
+
}
+
+
topic := "unknown"
+
text := data.Commit.Record.Text
+
if MessageIsAboutCoffee(text) {
+
topic = "coffee"
+
} else if MessageSlippedOnBananaPeel(text) {
+
topic = "banana-slip"
+
} else {
+
return
+
}
+
+
/// /// /// /// /// /// /// ///
+
/// End Filtering Logic ///
+
/// /// /// /// /// /// /// ///
+
+
log.Printf("text (topic=%s): %s", topic, text)
+
+
uri := fmt.Sprintf("at://%s/%s/%s", data.Did, data.Commit.Collection, data.Commit.Rev)
+
cid := data.Commit.Cid
+
+
now := time.Now()
+
indexedAt := now.UTC().Format(time.RFC3339)
+
+
post := &DatabasePost{
+
Uri: uri,
+
Cid: cid,
+
Topic: topic,
+
IndexedAt: indexedAt,
+
}
+
+
// log.Printf("formed: %s", post)
+
messageChan <- post
+
}
+
}
+
+
func CBORDecoder(messageChan chan *DatabasePost) OnMessageCB {
+
return func(message []byte) {
+
var frame MessageFrameCBOR
+
var err error
+
+
remaining, err := cbor.UnmarshalFirst(message, &frame.Header)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshal frame header data", err))
+
return
+
}
+
+
if frame.Header.Kind != "#commit" {
+
return
+
}
+
+
_, err = cbor.UnmarshalFirst(remaining, &frame.Commit)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshal frame body as commit", err))
+
return
+
}
+
+
var car *repo.Repo = nil
+
var ctx *context.Context = nil
+
for _, op := range frame.Commit.Ops {
+
if op.Action != "create" || !strings.Contains(op.Path, "app.bsky.feed.post/") {
+
continue
+
}
+
+
// Why do we need to remove the first character? No idea, but it's garbage
+
opCID, err := cid.Cast(op.RawCID[1:])
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshal CID: ", err))
+
return
+
}
+
+
if car == nil {
+
blocks := bytes.NewReader(frame.Commit.Blocks)
+
newCtx := context.Background()
+
ctx = &newCtx
+
car, err = repo.ReadRepoFromCar(*ctx, blocks)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to read CAR: ", err))
+
return
+
}
+
}
+
+
block, err := car.Blockstore().Get(*ctx, opCID)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to retrieve from blockstore: ", err))
+
return
+
}
+
+
rawData := block.RawData()
+
var blockData BlockCBOR
+
_, err = cbor.UnmarshalFirst(rawData, &blockData)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshall block data: ", err))
+
return
+
}
+
+
embedKind := blockData.Embed.Kind
+
if embedKind == "app.bsky.embed.images" && strings.Contains(strings.ToLower(blockData.Text), "coffee") {
+
for _, imageData := range blockData.Embed.Images {
+
// Why do we need to remove the first character? No idea, but it's garbage
+
imageCID, err := cid.Cast(imageData.Image.Ref[1:])
+
if err != nil {
+
log.Println(fmt.Errorf("failed to unmarshal image CID: ", err))
+
return
+
}
+
+
// what do we do with imageCID???
+
imageCDNURL := fmt.Sprintf(
+
"https://cdn.bsky.app/img/feed_thumbnail/plain/%s/%s",
+
frame.Commit.Did,
+
imageCID.String(),
+
)
+
+
res, err := http.Get(imageCDNURL)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to download image: ", err))
+
return
+
}
+
+
defer res.Body.Close()
+
// body, err := io.ReadAll(res.Body)
+
// if err != nil {
+
// log.Println(fmt.Errorf("failed to read image: ", err))
+
// return
+
// }
+
+
file, err := os.Create(fmt.Sprintf("im/%s-%s.jpeg", frame.Commit.Did, imageCID.String()))
+
if err != nil {
+
log.Println(fmt.Errorf("failed to open image file: ", err))
+
return
+
}
+
defer file.Close()
+
+
_, err = io.Copy(file, res.Body)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to copy to image file: ", err))
+
return
+
}
+
}
+
}
+
+
// FINALLY
+
text := blockData.Text
+
+
/// /// /// /// /// /// /// ///
+
/// Begin Filtering Logic ///
+
/// /// /// /// /// /// /// ///
+
+
topic := "unknown"
+
if MessageIsAboutCoffee(text) {
+
topic = "coffee"
+
} else if MessageSlippedOnBananaPeel(text) {
+
topic = "banana-slip"
+
} else {
+
return
+
}
+
+
/// /// /// /// /// /// /// ///
+
/// End Filtering Logic ///
+
/// /// /// /// /// /// /// ///
+
+
log.Printf("text (topic=%s): %s", topic, text)
+
+
did := frame.Commit.Did
+
path := op.Path
+
+
uri := fmt.Sprintf("at://%s/%s", did, path)
+
+
now := time.Now()
+
indexedAt := now.UTC().Format(time.RFC3339)
+
+
post := &DatabasePost{
+
Uri: uri,
+
Cid: opCID.String(),
+
Topic: topic,
+
IndexedAt: indexedAt,
+
}
+
+
// log.Printf("formed: %s", post)
+
messageChan <- post
+
}
+
}
+
}
+232
src/http-server.go
···
+
package main
+
+
import (
+
"encoding/json"
+
"fmt"
+
"log"
+
"net/http"
+
"strconv"
+
"strings"
+
"time"
+
+
combskytypes "github.com/bluesky-social/indigo/api/bsky"
+
chi "github.com/go-chi/chi/v5"
+
middleware "github.com/go-chi/chi/v5/middleware"
+
)
+
+
type HTTPServerSettings struct {
+
PublisherDID string
+
ServiceDID string
+
Hostname string
+
}
+
+
type HTTPServer struct {
+
Router chi.Router
+
DatabaseConn *ManagedDatabaseConnection
+
DoneSignal *chan interface{}
+
Settings HTTPServerSettings
+
}
+
+
func NewHTTPServer(dbcon *ManagedDatabaseConnection) *HTTPServer {
+
router := chi.NewRouter()
+
+
router.Use(middleware.RequestID)
+
router.Use(middleware.Logger)
+
router.Use(middleware.Recoverer)
+
router.Use(middleware.Compress(5))
+
router.Use(middleware.SetHeader("Content-Type", "application/json"))
+
+
env := GetEnvironmentVariables()
+
publisherDid := env["FEEDGEN_PUBLISHER_DID"]
+
hostname := env["FEEDGEN_HOSTNAME"]
+
serviceDid, hasSvcDid := env["FEEDGEN_SERVICE_DID"]
+
if !hasSvcDid {
+
serviceDid = fmt.Sprintf("did:web:%s", hostname)
+
}
+
+
done := make(chan interface{})
+
+
server := HTTPServer{
+
router,
+
dbcon,
+
&done,
+
HTTPServerSettings{
+
publisherDid,
+
serviceDid,
+
hostname,
+
},
+
}
+
+
return &server
+
}
+
+
func (httpServer HTTPServer) RegisterRoutes() {
+
httpServer.Router.Get("/", func(w http.ResponseWriter, r *http.Request) {
+
encoded, _ := json.Marshal(
+
map[string]interface{}{
+
"what": "atproto feed generator, written in from scratch in go",
+
"when": "may 2025",
+
"who": map[string]string{
+
"did": fmt.Sprintf("at://%s", httpServer.Settings.PublisherDID),
+
"github": "https://github.com/keaysma",
+
},
+
},
+
)
+
+
w.WriteHeader(http.StatusOK)
+
w.Write(encoded)
+
})
+
+
httpServer.Router.Get("/.well-known/did.json", func(w http.ResponseWriter, r *http.Request) {
+
if !strings.HasSuffix(httpServer.Settings.ServiceDID, httpServer.Settings.Hostname) {
+
w.WriteHeader(http.StatusNotFound)
+
return
+
}
+
+
encoded, _ := json.Marshal(
+
map[string]interface{}{
+
"@context": []string{"https://www.w3.org/ns/did/v1"},
+
"id": httpServer.Settings.ServiceDID,
+
"service": []map[string]string{
+
map[string]string{
+
"id": "#bsky_fg",
+
"type": "BskyFeedGenerator",
+
"serviceEndpoint": fmt.Sprintf("https://%s", httpServer.Settings.Hostname),
+
},
+
},
+
},
+
)
+
w.WriteHeader(http.StatusOK)
+
w.Write(encoded)
+
return
+
})
+
+
// TBD - Does Indigo provide some kind-of wrapper for this?
+
httpServer.Router.Get("/xrpc/app.bsky.feed.getFeedSkeleton", func(w http.ResponseWriter, r *http.Request) {
+
query := r.URL.Query()
+
feedName := query.Get("feed")
+
cursor := query.Get("cursor")
+
paramLimit := query.Get("limit")
+
+
feedNameBase := fmt.Sprintf("at://%s/app.bsky.feed.generator/", httpServer.Settings.PublisherDID)
+
algo, hasFeedNameBase := strings.CutPrefix(feedName, feedNameBase)
+
if !hasFeedNameBase {
+
encoded, _ := json.Marshal(
+
map[string]string{
+
"error": "UnsupportedAlgorithm",
+
"message": "Unsupported algorithm",
+
},
+
)
+
+
w.WriteHeader(http.StatusBadRequest)
+
w.Write(encoded)
+
return
+
}
+
+
switch algo {
+
case "banana-slip":
+
case "coffee":
+
break
+
default:
+
encoded, _ := json.Marshal(
+
map[string]string{
+
"error": "UnsupportedAlgorithm",
+
"message": "Unsupported algorithm",
+
},
+
)
+
+
w.WriteHeader(http.StatusBadRequest)
+
w.Write(encoded)
+
return
+
}
+
+
limit, err := strconv.Atoi(paramLimit)
+
if err != nil || limit < 1 || limit > 100 {
+
limit = 50
+
}
+
+
indexedBefore := time.Now().UTC()
+
if cursor != "" {
+
epoch, err := strconv.ParseInt(cursor, 10, 64)
+
if err != nil {
+
encoded, _ := json.Marshal(
+
map[string]string{
+
"error": "InvalidRequest",
+
"message": "Bad cursor value",
+
},
+
)
+
+
w.WriteHeader(http.StatusBadRequest)
+
w.Write(encoded)
+
return
+
}
+
indexedBefore = time.Unix(epoch, 0)
+
}
+
+
feedData, err := httpServer.DatabaseConn.ReadPostsFromDatabase(algo, indexedBefore, limit)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to read posts from database: ", err))
+
encoded, _ := json.Marshal(
+
map[string]string{
+
"error": "internal server error",
+
"message": "Failed to get feed data",
+
},
+
)
+
+
w.WriteHeader(http.StatusInternalServerError)
+
w.Write(encoded)
+
return
+
}
+
+
feed := make([]combskytypes.FeedDefs_SkeletonFeedPost, 0)
+
for _, entry := range *feedData {
+
feed = append(feed, combskytypes.FeedDefs_SkeletonFeedPost{
+
Post: entry.Uri,
+
})
+
}
+
+
lastIndexed := indexedBefore
+
if len(*feedData) > 0 {
+
lastIndexed, err = time.Parse(time.RFC3339, (*feedData)[len(*feedData)-1].IndexedAt)
+
if err != nil {
+
log.Println(fmt.Errorf("failed to read posts from database: ", err))
+
encoded, _ := json.Marshal(
+
map[string]string{
+
"error": "internal server error",
+
"message": "Failed to get feed data",
+
},
+
)
+
+
w.WriteHeader(http.StatusInternalServerError)
+
w.Write(encoded)
+
return
+
}
+
}
+
+
encoded, _ := json.Marshal(
+
map[string]interface{}{
+
"cursor": strconv.FormatInt(lastIndexed.UTC().Unix(), 10),
+
"feed": feed,
+
},
+
)
+
+
w.WriteHeader(http.StatusOK)
+
w.Write(encoded)
+
})
+
}
+
+
func (httpServer HTTPServer) StartListener() {
+
env := GetEnvironmentVariables()
+
host, hostFound := env["FEEDGEN_LISTENHOST"]
+
if !hostFound {
+
host = "0.0.0.0"
+
}
+
+
port, portFound := env["FEEDGEN_PORT"]
+
if !portFound {
+
port = "3123"
+
}
+
+
defer close(*httpServer.DoneSignal)
+
http.ListenAndServe(fmt.Sprintf("%s:%s", host, port), httpServer.Router)
+
}
+112
src/main.go
···
+
package main
+
+
import (
+
"fmt"
+
"log"
+
"os"
+
"os/signal"
+
"time"
+
)
+
+
func main() {
+
logger := log.Default()
+
+
logger.Println("Opening DB connection")
+
db, err := NewDatabaseConnection()
+
if err != nil {
+
log.Fatalf("failed to open db: ", err)
+
}
+
+
logger.Println("Ensuring migrations")
+
err = db.EnsureMigrations()
+
if err != nil {
+
log.Fatalf("failed to ensure migrations: ", err)
+
}
+
+
logger.Println("Preparing post chan -> db consumer")
+
chanPosts := make(chan *DatabasePost, 1000)
+
go db.StreamPostsFromChannel(chanPosts)
+
+
logger.Println("Installing interrupt handler")
+
interrupt := make(chan os.Signal, 1)
+
signal.Notify(interrupt, os.Interrupt)
+
+
/*
+
logger.Println("Creating JS2 firehose websocket consumer")
+
consumerJS2 := MakeConsumer(URL_RELAY_JETSTREAM2)
+
defer consumerJS2.Close()
+
+
logger.Println("Starting JS2 firehose consumer")
+
go consumerJS2.StartConsumer(
+
streamPostsToDbCurry(chanPosts),
+
)
+
+
consumer := consumerJS2
+
*/
+
+
logger.Println("Creating Blacksky firehose websocket consumer")
+
consumerBlksky := MakeConsumer(URL_RELAY_BLACKSKY)
+
defer consumerBlksky.Close()
+
+
logger.Println("Initiating message handlers")
+
go func() {
+
decoder := CBORDecoder(chanPosts)
+
for {
+
select {
+
case data := <-*consumerBlksky.MessagesChan:
+
decoder(data)
+
}
+
}
+
}()
+
+
go func() {
+
decoder := CBORDecoder(chanPosts)
+
for {
+
select {
+
case data := <-*consumerBlksky.MessagesChan:
+
decoder(data)
+
}
+
}
+
}()
+
+
logger.Println("Starting Blacksky firehose consumer")
+
go consumerBlksky.StartConsumer(
+
// CBORDecoder(chanPosts),
+
)
+
+
consumer := consumerBlksky
+
+
logger.Println("Creating HTTP server")
+
server := NewHTTPServer(db)
+
+
logger.Println("Registering routes")
+
server.RegisterRoutes()
+
+
logger.Println("Starting HTTP server")
+
go server.StartListener()
+
+
logger.Println("System is now running until it isn't")
+
for {
+
select {
+
case <-*consumer.DoneSignal:
+
logger.Println("ws goroutine closed, goodbye")
+
return
+
case <-*server.DoneSignal:
+
logger.Println("http server closed, goodbye")
+
err := consumer.CloseWithTimeout(time.Second)
+
if err != nil {
+
logger.Println("failed to close ws: ", err)
+
}
+
+
return
+
case <-interrupt:
+
fmt.Println()
+
err := consumer.CloseWithTimeout(time.Second)
+
if err != nil {
+
logger.Println("failed to close ws: ", err)
+
}
+
+
return
+
}
+
}
+
}
+18
src/message-filters.go
···
+
package main
+
+
import "strings"
+
+
type MessageFilter = func(rawText string) bool
+
+
func MessageIsAboutCoffee(rawText string) bool {
+
textLower := strings.ToLower(rawText)
+
thisIsAboutCoffee := strings.Contains(textLower, "coffee") || strings.Contains(textLower, "コーヒー")
+
return thisIsAboutCoffee
+
}
+
+
func MessageSlippedOnBananaPeel(rawText string) bool {
+
textLower := strings.ToLower(rawText)
+
thisIsAboutCoffee := (strings.Contains(textLower, "banana") ||
+
strings.Contains(textLower, "peel"))
+
return thisIsAboutCoffee
+
}
+219
src/sqlite-store.go
···
+
package main
+
+
import (
+
"database/sql"
+
"fmt"
+
"log"
+
"sync"
+
"time"
+
+
// SQLite3 Database Driver
+
_ "modernc.org/sqlite"
+
)
+
+
const DB_DRIVER = "sqlite"
+
const DB_PATH_DEFAULT = "feed.sqlite"
+
+
type ManagedDatabaseConnection struct {
+
db *sql.DB
+
mutex *sync.Mutex
+
}
+
+
func NewDatabaseConnection() (*ManagedDatabaseConnection, error) {
+
env := GetEnvironmentVariables()
+
envDBName, isFound := env["FEEDGEN_SQLITE_LOCATION"]
+
if !isFound {
+
envDBName = DB_PATH_DEFAULT
+
}
+
+
log.Println(fmt.Sprintf("Opening database at %s", envDBName))
+
db, err := sql.Open(DB_DRIVER, envDBName)
+
if err != nil {
+
log.Fatalf("failed to open database connection", err)
+
return nil, err
+
}
+
+
mutex := &sync.Mutex{}
+
+
driver := ManagedDatabaseConnection{
+
db,
+
mutex,
+
}
+
+
return &driver, nil
+
}
+
+
func (mdbc *ManagedDatabaseConnection) ensureMigration(desc string, migration func() error) error {
+
// If you didn't grab the lock before running this,
+
// you're going to have a bad time
+
+
// If you try to grab the lock within this method,
+
// you're going to have a bad time
+
+
rows, err := mdbc.db.Query(
+
"SELECT runAt FROM migration WHERE description = ?",
+
desc,
+
)
+
+
if err != nil {
+
return err
+
}
+
+
var runAt string = ""
+
for rows.Next() {
+
err := rows.Scan(&runAt)
+
if err != nil {
+
return err
+
}
+
}
+
+
if runAt != "" {
+
log.Println(fmt.Sprintf("migration %s already ran at %s", desc, runAt))
+
return nil
+
}
+
+
err = migration()
+
if err != nil {
+
return err
+
}
+
+
now := time.Now().UTC().Format(time.RFC3339)
+
_, err = mdbc.db.Exec(
+
"INSERT INTO migration (description, runAt) VALUES (?, ?)",
+
desc,
+
now,
+
)
+
if err != nil {
+
return err
+
}
+
+
log.Println(fmt.Sprintf("migration %s run at %s", desc, now))
+
+
return nil
+
}
+
+
func (mdbc *ManagedDatabaseConnection) EnsureMigrations() error {
+
/*
+
sqlite> .schema post
+
CREATE TABLE IF NOT EXISTS "post" ("uri" varchar primary key, "cid" varchar not null, "indexedAt" varchar not null);
+
*/
+
+
mdbc.mutex.Lock()
+
defer mdbc.mutex.Unlock()
+
+
_, err := mdbc.db.Exec(
+
`CREATE TABLE IF NOT EXISTS "migration" ("description" varchar primary key, "runAt" varchar not null);`,
+
)
+
if err != nil {
+
return err
+
}
+
+
err = mdbc.ensureMigration("create posts table", func() error {
+
_, err = mdbc.db.Exec(
+
`CREATE TABLE IF NOT EXISTS "post" ("uri" varchar primary key, "cid" varchar not null, "indexedAt" varchar not null);`,
+
)
+
return err
+
})
+
if err != nil {
+
return err
+
}
+
+
err = mdbc.ensureMigration("add topic to posts table", func() error {
+
_, err = mdbc.db.Exec(
+
`ALTER TABLE post RENAME TO post_old;`,
+
)
+
if err != nil {
+
return err
+
}
+
_, err = mdbc.db.Exec(
+
`CREATE TABLE IF NOT EXISTS "post" ("uri" varchar primary key, "cid" varchar not null, "topic" varchar not null, "indexedAt" varchar not null);`,
+
)
+
if err != nil {
+
return err
+
}
+
_, err = mdbc.db.Exec(
+
`INSERT INTO post (uri, cid, indexedAt, topic) SELECT uri, cid, indexedAt, 'coffee' FROM post_old;`,
+
)
+
if err != nil {
+
return err
+
}
+
+
_, err = mdbc.db.Exec(
+
`DROP TABLE post_old;`,
+
)
+
return err
+
})
+
if err != nil {
+
return err
+
}
+
+
return err
+
}
+
+
func (mdbc *ManagedDatabaseConnection) WriteToPostTable(payload *DatabasePost) error {
+
/*
+
sqlite> INSERT INTO post (uri, cid, indexedAt) VALUES ('test', 'test', '2025-05-24T16:33:53.960Z');
+
sqlite>
+
sqlite> SELECT * FROM post WHERE uri = 'test';
+
test|test|2025-05-24T16:33:53.960Z
+
*/
+
+
mdbc.mutex.Lock()
+
defer mdbc.mutex.Unlock()
+
+
stmt, err := mdbc.db.Prepare("INSERT INTO post (uri, cid, topic, indexedAt) VALUES (?, ?, ?, ?)")
+
if err != nil {
+
return err
+
}
+
defer stmt.Close()
+
+
_, err = stmt.Exec(payload.Uri, payload.Cid, payload.Topic, payload.IndexedAt)
+
+
return err
+
}
+
+
func (mdbc *ManagedDatabaseConnection) StreamPostsFromChannel(postsChannel chan *DatabasePost) {
+
defer close(postsChannel)
+
for {
+
select {
+
case post := <-postsChannel:
+
err := mdbc.WriteToPostTable(post)
+
if err != nil {
+
log.Fatalf("failed to write post: ", err)
+
}
+
}
+
}
+
}
+
+
func (mdbc *ManagedDatabaseConnection) ReadPostsFromDatabase(topic string, indexedBefore time.Time, limit int) (*[]DatabasePost, error) {
+
/*
+
SELECT uri, cid, indexedAt FROM post WHERE indexedAt < '2026' ORDER BY indexedAt DESC, cid DESC;
+
*/
+
+
mdbc.mutex.Lock()
+
defer mdbc.mutex.Unlock()
+
+
rows, err := mdbc.db.Query(
+
"SELECT uri, cid, indexedAt FROM post WHERE topic = ? AND indexedAt < ? ORDER BY indexedAt DESC, cid DESC LIMIT ?",
+
topic,
+
indexedBefore.Format(time.RFC3339),
+
limit,
+
)
+
+
if err != nil {
+
return nil, err
+
}
+
+
posts := make([]DatabasePost, 0)
+
for rows.Next() {
+
var post DatabasePost
+
err := rows.Scan(&post.Uri, &post.Cid, &post.IndexedAt)
+
if err != nil {
+
return nil, err
+
}
+
+
posts = append(posts, post)
+
}
+
+
return &posts, nil
+
}
+77
src/types.go
···
+
package main
+
+
type DatabasePost struct {
+
Uri string
+
Cid string
+
Topic string
+
IndexedAt string
+
}
+
+
type MessageFrameHeaderCBOR struct {
+
Op int64 `cbor:"op"`
+
Kind string `cbor:"t"`
+
}
+
+
type MessageFrameCommitCBOR struct {
+
Did string `cbor:"repo"`
+
Ops []struct {
+
Action string `cbor:"action"`
+
Path string `cbor:"path"`
+
RawCID []byte `cbor:"cid"`
+
} `cbor:"ops"`
+
Blocks []byte `cbor:"blocks"`
+
Blobs []byte `cbor:"blobs"`
+
}
+
+
type MessageFrameCBOR struct {
+
Header MessageFrameHeaderCBOR
+
Commit MessageFrameCommitCBOR
+
}
+
+
type BlockCBOR struct {
+
Text string `cbor:"text"`
+
Embed struct {
+
Kind string `cbor:"$type"`
+
Images []struct {
+
Alt string `cbor:"alt"`
+
Image struct {
+
Kind string `cbor:"$type"`
+
Ref []byte `cbor:"ref"`
+
// Ref struct {
+
// LinkRawCid []byte `cbor:"$link"`
+
// } `cbor:"ref"`
+
MimeType string `cbor:"mimeType"`
+
Size int `cbor:"size"`
+
} `cbor:"image"`
+
AspectRatio struct {
+
Width int
+
Height int
+
} `cbor:"aspectRatio"`
+
} `cbor:"images,omitempty"`
+
} `cbor:"embed,omitempty"`
+
}
+
+
type ComBskyFeedPost struct {
+
Did string
+
Kind string
+
Commit struct {
+
Rev string
+
Operation string
+
Collection string
+
Cid string
+
Record struct {
+
Type string `json:"$type"`
+
Text string
+
Reply struct {
+
Parent struct {
+
Cid string
+
Uri string
+
} `json:"parent,omitempty"`
+
Root struct {
+
Cid string
+
Uri string
+
} `json:"root,omitempty"`
+
} `json:"reply,omitempty"`
+
}
+
}
+
}
+17
src/utils.go
···
+
package main
+
+
import (
+
"os"
+
"strings"
+
)
+
+
func GetEnvironmentVariables() map[string]string {
+
env := map[string]string{}
+
+
for _, pair := range os.Environ() {
+
parts := strings.SplitN(pair, "=", 2)
+
env[parts[0]] = parts[1]
+
}
+
+
return env
+
}