Compare commits

...

125 Commits

Author SHA1 Message Date
Joel Wetzell e30376ffb9 Merge pull request #235 from jwetzell/remove-sip
remove SIP things
2026-08-30 19:09:37 -05:00
Joel Wetzell ca78efa27a Merge pull request #234 from jwetzell/renovate/github.com-jwetzell-osc-go-0.x
Update module github.com/jwetzell/osc-go to v0.3.1
2026-08-30 19:07:58 -05:00
Joel Wetzell 36dfda68ce remove SIP things 2026-08-30 19:01:27 -05:00
renovate[bot] 7675eaa226 Update module github.com/jwetzell/osc-go to v0.3.1 2026-08-30 16:55:33 +00:00
Joel Wetzell 10ca10db0d update to golang 1.27.0 2026-08-30 08:29:12 -05:00
Joel Wetzell 31dc7e1027 go mod tidy 2026-08-30 08:23:46 -05:00
Joel Wetzell 34527d7fc2 Merge pull request #233 from jwetzell/processor-id
add id getter for processors
2026-08-28 15:08:31 -05:00
Joel Wetzell adf649fac8 test for test processor 2026-08-28 15:06:40 -05:00
Joel Wetzell 54ada59f6e add id getter for processors 2026-08-28 14:55:19 -05:00
Joel Wetzell f9287cc87e add test for route id 2026-08-28 14:22:48 -05:00
Joel Wetzell 5574b73c78 switch coverage badge to codecov 2026-08-28 14:13:58 -05:00
Joel Wetzell 2491353860 Merge pull request #232 from jwetzell/renovate/github.com-nats-io-nats-server-v2-2.x
Update module github.com/nats-io/nats-server/v2 to v2.14.6
2026-08-28 14:07:32 -05:00
Joel Wetzell 252662db9f go back to filtering tests 2026-08-28 14:07:09 -05:00
Joel Wetzell 6f71797ac8 enable go mod tidy for renovate 2026-08-28 13:57:41 -05:00
Joel Wetzell 11df8f8a4b don't filter out tests 2026-08-28 13:57:35 -05:00
Joel Wetzell f0f074950e Merge pull request #231 from jwetzell/renovate/github.com-emiago-sipgo-1.x
Update module github.com/emiago/sipgo to v1.6.0
2026-08-28 13:52:19 -05:00
renovate[bot] 79ab05adb4 Update module github.com/nats-io/nats-server/v2 to v2.14.6 2026-08-28 18:52:06 +00:00
Joel Wetzell 70e1251391 switch to uploading coverage to codecov 2026-08-28 13:50:32 -05:00
Joel Wetzell 0b3d04d6db go mod tidy 2026-08-28 13:47:58 -05:00
renovate[bot] 35ca05404e Update module github.com/emiago/sipgo to v1.6.0 2026-08-27 11:49:08 +00:00
Joel Wetzell c40a4bbc02 Merge pull request #230 from jwetzell/renovate/modernc.org-quickjs-0.x
Update module modernc.org/quickjs to v0.24.2
2026-08-26 09:14:15 -05:00
renovate[bot] 3ac470f66f Update module modernc.org/quickjs to v0.24.2 2026-08-25 17:34:17 +00:00
Joel Wetzell 5ab77f16c7 Merge pull request #227 from jwetzell/renovate/docker-setup-buildx-action-4.x
Update docker/setup-buildx-action action to v4.3.0
2026-08-19 10:21:57 -05:00
Joel Wetzell 48e5abf1ac Merge pull request #228 from jwetzell/renovate/modernc.org-sqlite-1.x
Update module modernc.org/sqlite to v1.57.0
2026-08-19 10:19:34 -05:00
Joel Wetzell cade810137 Merge pull request #229 from jwetzell/feat/route-processor-ids
add id field to route and processor
2026-08-19 10:01:03 -05:00
Joel Wetzell 848e644a9f add id field to route and processor 2026-08-19 09:30:20 -05:00
renovate[bot] 2c29e743a4 Update module modernc.org/sqlite to v1.57.0 2026-08-19 13:09:45 +00:00
renovate[bot] 627bd12a5f Update docker/setup-buildx-action action to v4.3.0 2026-08-19 13:09:16 +00:00
Joel Wetzell a3926d980b Merge pull request #226 from jwetzell/renovate/github.com-emiago-sipgo-1.x
Update module github.com/emiago/sipgo to v1.5.0
2026-08-19 08:08:30 -05:00
renovate[bot] 88d4f2665f Update module github.com/emiago/sipgo to v1.5.0 2026-08-19 02:49:59 +00:00
Joel Wetzell 0713d665bb Merge pull request #225 from jwetzell/renovate/modernc.org-quickjs-0.x
Update module modernc.org/quickjs to v0.24.0
2026-08-17 13:57:48 -05:00
Joel Wetzell 9991e44549 Merge pull request #224 from jwetzell/renovate/github.com-urfave-cli-v3-3.x
Update module github.com/urfave/cli/v3 to v3.11.0
2026-08-17 13:57:36 -05:00
Joel Wetzell d895c117dd Merge pull request #223 from jwetzell/renovate/github.com-emiago-diago-0.x
Update module github.com/emiago/diago to v0.32.0
2026-08-17 13:57:24 -05:00
renovate[bot] 5b4b91769a Update module modernc.org/quickjs to v0.24.0 2026-08-17 18:54:39 +00:00
renovate[bot] c1925a1056 Update module github.com/urfave/cli/v3 to v3.11.0 2026-08-17 18:54:32 +00:00
renovate[bot] 2fa95b35c7 Update module github.com/emiago/diago to v0.32.0 2026-08-17 18:54:26 +00:00
Joel Wetzell 58a4217469 Merge pull request #222 from jwetzell/renovate/github.com-nats-io-nats.go-1.x
Update module github.com/nats-io/nats.go to v1.53.1
2026-08-17 13:53:30 -05:00
renovate[bot] c6bc30791c Update module github.com/nats-io/nats.go to v1.53.1 2026-08-17 18:45:05 +00:00
Joel Wetzell 117e5cedab Merge pull request #220 from jwetzell/renovate/github.com-nats-io-nats-server-v2-2.x
Update module github.com/nats-io/nats-server/v2 to v2.14.5
2026-08-17 13:43:13 -05:00
Joel Wetzell e727509522 Merge pull request #219 from jwetzell/renovate/actions-checkout-7.x
Update actions/checkout action to v7.0.1
2026-08-17 13:41:49 -05:00
renovate[bot] 663b595f40 Update module github.com/nats-io/nats-server/v2 to v2.14.5 2026-08-17 18:40:50 +00:00
Joel Wetzell 762bf816d7 remove dependabot config 2026-08-17 13:40:25 -05:00
renovate[bot] d200966212 Update actions/checkout action to v7.0.1 2026-08-17 18:40:20 +00:00
Joel Wetzell 7e721dc263 Merge pull request #218 from jwetzell/renovate/configure
Add renovate.json
2026-08-17 13:39:42 -05:00
renovate[bot] e6a42c81d6 Add renovate.json 2026-08-17 18:20:30 +00:00
Joel Wetzell c07ce2de73 Merge pull request #214 from jwetzell/dependabot/go_modules/modernc.org/quickjs-0.23.0
Bump modernc.org/quickjs from 0.22.0 to 0.23.0
2026-08-11 20:07:38 -05:00
dependabot[bot] 2a2fd04b78 Bump modernc.org/quickjs from 0.22.0 to 0.23.0
Bumps [modernc.org/quickjs](https://gitlab.com/cznic/quickjs) from 0.22.0 to 0.23.0.
- [Commits](https://gitlab.com/cznic/quickjs/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: modernc.org/quickjs
  dependency-version: 0.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-12 01:05:15 +00:00
Joel Wetzell ad01ba62bb Merge pull request #215 from jwetzell/dependabot/go_modules/github.com/redis/go-redis/v9-9.22.0
Bump github.com/redis/go-redis/v9 from 9.21.0 to 9.22.0
2026-08-11 20:03:38 -05:00
Joel Wetzell c20bd9d448 Merge pull request #216 from jwetzell/dependabot/go_modules/modernc.org/sqlite-1.56.0
Bump modernc.org/sqlite from 1.55.0 to 1.56.0
2026-08-11 20:03:27 -05:00
Joel Wetzell 8f681b0cb6 Merge pull request #217 from jwetzell/fix/mqtt-client-locking
fix lock releasing in mqtt client on error
2026-08-11 20:02:58 -05:00
Joel Wetzell 7c0a504616 fix lock releasing in mqtt client on error 2026-08-11 19:58:33 -05:00
dependabot[bot] 9af0991a0d Bump modernc.org/sqlite from 1.55.0 to 1.56.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.55.0 to 1.56.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.55.0...v1.56.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.56.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 17:23:58 +00:00
dependabot[bot] b22fdbe6ef Bump github.com/redis/go-redis/v9 from 9.21.0 to 9.22.0
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.21.0 to 9.22.0.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.21.0...v9.22.0)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-version: 9.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 17:23:51 +00:00
Joel Wetzell a1f7bca743 Merge pull request #212 from jwetzell/dependabot/github_actions/docker/login-action-4.6.0
Bump docker/login-action from 4.5.2 to 4.6.0
2026-08-04 14:28:35 -05:00
Joel Wetzell dbb1fed79f Merge pull request #213 from jwetzell/dependabot/go_modules/github.com/nats-io/nats-server/v2-2.14.4
Bump github.com/nats-io/nats-server/v2 from 2.14.3 to 2.14.4
2026-08-04 14:28:25 -05:00
dependabot[bot] c4e338a517 Bump github.com/nats-io/nats-server/v2 from 2.14.3 to 2.14.4
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.14.3 to 2.14.4.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/RELEASES.md)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.14.3...v2.14.4)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-version: 2.14.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-04 17:23:29 +00:00
dependabot[bot] eddeb4655b Bump docker/login-action from 4.5.2 to 4.6.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.5.2 to 4.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/371161bbe7024a29a25c5e19bfcbc0804fe9ad2c...dbcb813823bdd20940b903addbd779551569679f)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-04 17:23:20 +00:00
Joel Wetzell 4f34de7fa8 Merge pull request #207 from jwetzell/dependabot/go_modules/go.bug.st/serial-1.8.0
Bump go.bug.st/serial from 1.7.1 to 1.8.0
2026-07-29 08:32:53 -05:00
dependabot[bot] e47a5fff5f Bump go.bug.st/serial from 1.7.1 to 1.8.0
Bumps [go.bug.st/serial](https://github.com/bugst/go-serial) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/bugst/go-serial/releases)
- [Commits](https://github.com/bugst/go-serial/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: go.bug.st/serial
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-29 13:17:39 +00:00
Joel Wetzell a1aa80c9ee Merge pull request #208 from jwetzell/dependabot/go_modules/modernc.org/sqlite-1.54.0
Bump modernc.org/sqlite from 1.53.0 to 1.55.0
2026-07-29 08:15:27 -05:00
Joel Wetzell d926bd3f7d Merge pull request #206 from jwetzell/dependabot/github_actions/actions/setup-go-7
Bump actions/setup-go from 6 to 7
2026-07-29 08:02:54 -05:00
Joel Wetzell aee67547cf Merge pull request #209 from jwetzell/dependabot/github_actions/docker/login-action-4.5.2
Bump docker/login-action from 4.4.0 to 4.5.2
2026-07-29 08:02:30 -05:00
dependabot[bot] 5e2c85244f Bump modernc.org/sqlite from 1.53.0 to 1.55.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.53.0 to 1.55.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.53.0...v1.55.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-29 13:02:20 +00:00
Joel Wetzell f314fed2d9 Merge pull request #210 from jwetzell/dependabot/go_modules/github.com/emiago/diago-0.31.0
Bump github.com/emiago/diago from 0.30.0 to 0.31.0
2026-07-29 08:02:04 -05:00
Joel Wetzell 32deb2032b Merge pull request #211 from jwetzell/dependabot/go_modules/modernc.org/quickjs-0.22.0
Bump modernc.org/quickjs from 0.21.0 to 0.22.0
2026-07-29 08:00:24 -05:00
dependabot[bot] 6852a3e917 Bump modernc.org/quickjs from 0.21.0 to 0.22.0
Bumps [modernc.org/quickjs](https://gitlab.com/cznic/quickjs) from 0.21.0 to 0.22.0.
- [Commits](https://gitlab.com/cznic/quickjs/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: modernc.org/quickjs
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 17:23:41 +00:00
dependabot[bot] 2874f2c7ff Bump github.com/emiago/diago from 0.30.0 to 0.31.0
Bumps [github.com/emiago/diago](https://github.com/emiago/diago) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/emiago/diago/releases)
- [Commits](https://github.com/emiago/diago/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: github.com/emiago/diago
  dependency-version: 0.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 17:23:33 +00:00
dependabot[bot] a9f35fa4f7 Bump docker/login-action from 4.4.0 to 4.5.2
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.4.0 to 4.5.2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/af1e73f918a031802d376d3c8bbc3fe56130a9b0...371161bbe7024a29a25c5e19bfcbc0804fe9ad2c)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.5.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 17:23:28 +00:00
dependabot[bot] 5aa9961742 Bump actions/setup-go from 6 to 7
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6 to 7.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 17:23:15 +00:00
Joel Wetzell 4914db403e Merge pull request #205 from jwetzell/dependabot/go_modules/github.com/emiago/diago-0.30.0
Bump github.com/emiago/diago from 0.29.0 to 0.30.0
2026-07-18 13:16:27 -05:00
dependabot[bot] fd49fa2795 Bump github.com/emiago/diago from 0.29.0 to 0.30.0
Bumps [github.com/emiago/diago](https://github.com/emiago/diago) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/emiago/diago/releases)
- [Commits](https://github.com/emiago/diago/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: github.com/emiago/diago
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-14 17:23:39 +00:00
Joel Wetzell b86ca20592 syntax cleanup 2026-07-09 22:22:22 -05:00
Joel Wetzell 777f9c43de Merge pull request #196 from jwetzell/dependabot/go_modules/github.com/nats-io/nats-server/v2-2.14.3
Bump github.com/nats-io/nats-server/v2 from 2.14.2 to 2.14.3
2026-07-07 14:55:03 -05:00
dependabot[bot] 8ebbed482d Bump github.com/nats-io/nats-server/v2 from 2.14.2 to 2.14.3
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.14.2 to 2.14.3.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/RELEASES.md)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.14.2...v2.14.3)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-version: 2.14.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 19:28:50 +00:00
Joel Wetzell 27ef3f7766 Merge pull request #201 from jwetzell/dependabot/go_modules/github.com/emiago/sipgo-1.4.3
Bump github.com/emiago/sipgo from 1.4.0 to 1.4.3
2026-07-07 14:28:46 -05:00
Joel Wetzell 2b71829d47 Merge pull request #198 from jwetzell/dependabot/github_actions/docker/setup-buildx-action-4.2.0
Bump docker/setup-buildx-action from 4.1.0 to 4.2.0
2026-07-07 14:28:29 -05:00
Joel Wetzell cf1dcd305f Merge pull request #197 from jwetzell/dependabot/github_actions/docker/setup-qemu-action-4.2.0
Bump docker/setup-qemu-action from 4.1.0 to 4.2.0
2026-07-07 14:27:35 -05:00
Joel Wetzell 2c05549edb Merge pull request #194 from jwetzell/dependabot/go_modules/github.com/urfave/cli/v3-3.10.1
Bump github.com/urfave/cli/v3 from 3.10.0 to 3.10.1
2026-07-07 14:27:19 -05:00
Joel Wetzell 10fc3584e1 Merge pull request #199 from jwetzell/dependabot/github_actions/docker/metadata-action-6.2.0
Bump docker/metadata-action from 6.1.0 to 6.2.0
2026-07-07 14:27:02 -05:00
Joel Wetzell 0b26835eb6 Merge pull request #200 from jwetzell/dependabot/github_actions/docker/build-push-action-7.3.0
Bump docker/build-push-action from 7.2.0 to 7.3.0
2026-07-07 14:26:40 -05:00
Joel Wetzell c47f6fedff Merge pull request #202 from jwetzell/dependabot/github_actions/docker/login-action-4.4.0
Bump docker/login-action from 4.2.0 to 4.4.0
2026-07-07 14:26:27 -05:00
Joel Wetzell 250e0f2b0b Merge pull request #203 from jwetzell/dependabot/go_modules/modernc.org/quickjs-0.21.0
Bump modernc.org/quickjs from 0.18.2 to 0.21.0
2026-07-07 14:26:17 -05:00
dependabot[bot] e02ddf4255 Bump modernc.org/quickjs from 0.18.2 to 0.21.0
Bumps [modernc.org/quickjs](https://gitlab.com/cznic/quickjs) from 0.18.2 to 0.21.0.
- [Commits](https://gitlab.com/cznic/quickjs/compare/v0.18.2...v0.21.0)

---
updated-dependencies:
- dependency-name: modernc.org/quickjs
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:54 +00:00
dependabot[bot] 5c8ab7a2db Bump github.com/emiago/sipgo from 1.4.0 to 1.4.3
Bumps [github.com/emiago/sipgo](https://github.com/emiago/sipgo) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/emiago/sipgo/releases)
- [Commits](https://github.com/emiago/sipgo/compare/v1.4.0...v1.4.3)

---
updated-dependencies:
- dependency-name: github.com/emiago/sipgo
  dependency-version: 1.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:46 +00:00
dependabot[bot] 58edcff9b4 Bump docker/login-action from 4.2.0 to 4.4.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.2.0 to 4.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/650006c6eb7dba73a995cc03b0b2d7f5ca915bee...af1e73f918a031802d376d3c8bbc3fe56130a9b0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:46 +00:00
dependabot[bot] 74dbb26911 Bump docker/build-push-action from 7.2.0 to 7.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/f9f3042f7e2789586610d6e8b85c8f03e5195baf...53b7df96c91f9c12dcc8a07bcb9ccacbed38856a)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:42 +00:00
dependabot[bot] ccc1b4ac34 Bump docker/metadata-action from 6.1.0 to 6.2.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9...dc802804100637a589fabce1cb79ff13a1411302)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:36 +00:00
dependabot[bot] 7e95b52774 Bump docker/setup-buildx-action from 4.1.0 to 4.2.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5...bb05f3f5519dd87d3ba754cc423b652a5edd6d2c)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:32 +00:00
dependabot[bot] 4eb78fa719 Bump docker/setup-qemu-action from 4.1.0 to 4.2.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/06116385d9baf250c9f4dcb4858b16962ea869c3...96fe6ef7f33517b61c61be40b68a1882f3264fb8)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 17:23:29 +00:00
dependabot[bot] 66d30e9faf Bump github.com/urfave/cli/v3 from 3.10.0 to 3.10.1
Bumps [github.com/urfave/cli/v3](https://github.com/urfave/cli) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v3
  dependency-version: 3.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-30 17:23:18 +00:00
Joel Wetzell 04ba102768 Merge pull request #191 from jwetzell/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 6 to 7
2026-06-29 10:26:10 -05:00
Joel Wetzell 49c1f90912 Merge pull request #192 from jwetzell/dependabot/go_modules/modernc.org/sqlite-1.53.0
Bump modernc.org/sqlite from 1.52.0 to 1.53.0
2026-06-29 10:25:23 -05:00
Joel Wetzell 80c145a541 Merge pull request #193 from jwetzell/dependabot/go_modules/github.com/redis/go-redis/v9-9.21.0
Bump github.com/redis/go-redis/v9 from 9.20.1 to 9.21.0
2026-06-29 10:24:53 -05:00
dependabot[bot] 4119312e9d Bump github.com/redis/go-redis/v9 from 9.20.1 to 9.21.0
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.20.1 to 9.21.0.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.20.1...v9.21.0)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-version: 9.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-23 17:23:52 +00:00
dependabot[bot] 5b6cfc6849 Bump modernc.org/sqlite from 1.52.0 to 1.53.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.52.0 to 1.53.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.52.0...v1.53.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.53.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-23 17:23:44 +00:00
dependabot[bot] c48ca01b6d Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-23 17:23:16 +00:00
Joel Wetzell c551499fc6 add test for common events 2026-06-21 13:09:09 -05:00
Joel Wetzell cf48d0e65e Merge pull request #188 from jwetzell/dependabot/go_modules/gitlab.com/gomidi/midi/v2-2.3.24
Bump gitlab.com/gomidi/midi/v2 from 2.3.23 to 2.3.24
2026-06-19 17:27:23 -05:00
Joel Wetzell e5578a4d5d Merge pull request #189 from jwetzell/dependabot/go_modules/github.com/redis/go-redis/v9-9.20.1
Bump github.com/redis/go-redis/v9 from 9.20.0 to 9.20.1
2026-06-19 17:26:18 -05:00
dependabot[bot] 83199650af Bump gitlab.com/gomidi/midi/v2 from 2.3.23 to 2.3.24
Bumps [gitlab.com/gomidi/midi/v2](https://gitlab.com/gomidi/midi) from 2.3.23 to 2.3.24.
- [Commits](https://gitlab.com/gomidi/midi/compare/v2.3.23...v2.3.24)

---
updated-dependencies:
- dependency-name: gitlab.com/gomidi/midi/v2
  dependency-version: 2.3.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 22:24:02 +00:00
dependabot[bot] fcbc96c63b Bump github.com/redis/go-redis/v9 from 9.20.0 to 9.20.1
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.20.0 to 9.20.1.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.20.0...v9.20.1)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-version: 9.20.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 22:24:01 +00:00
Joel Wetzell fd4fbbd66d Merge pull request #190 from jwetzell/dependabot/go_modules/github.com/urfave/cli/v3-3.10.0
Bump github.com/urfave/cli/v3 from 3.9.0 to 3.10.0
2026-06-19 17:21:54 -05:00
dependabot[bot] 1dddec502f Bump github.com/urfave/cli/v3 from 3.9.0 to 3.10.0
Bumps [github.com/urfave/cli/v3](https://github.com/urfave/cli) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v3
  dependency-version: 3.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 17:24:32 +00:00
Joel Wetzell 28e8e4f8c7 Merge pull request #186 from jwetzell/dependabot/go_modules/github.com/emiago/diago-0.29.0
Bump github.com/emiago/diago from 0.28.0 to 0.29.0
2026-06-14 15:31:50 -05:00
Joel Wetzell 34dd6a0d31 update with new return signature 2026-06-14 15:29:38 -05:00
Joel Wetzell 2af9f348e7 Merge pull request #187 from jwetzell/dependabot/go_modules/modernc.org/sqlite-1.52.0
Bump modernc.org/sqlite from 1.51.0 to 1.52.0
2026-06-10 11:34:34 -05:00
dependabot[bot] b207643f1c Bump modernc.org/sqlite from 1.51.0 to 1.52.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.51.0 to 1.52.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.51.0...v1.52.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.52.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 17:24:03 +00:00
dependabot[bot] ae100ec567 Bump github.com/emiago/diago from 0.28.0 to 0.29.0
Bumps [github.com/emiago/diago](https://github.com/emiago/diago) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/emiago/diago/releases)
- [Commits](https://github.com/emiago/diago/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: github.com/emiago/diago
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 17:23:52 +00:00
Joel Wetzell 05c027dca7 Merge pull request #181 from jwetzell/dependabot/github_actions/docker/setup-qemu-action-4.1.0
Bump docker/setup-qemu-action from 4.0.0 to 4.1.0
2026-06-07 21:13:10 -05:00
Joel Wetzell 6ef4215248 Merge pull request #182 from jwetzell/dependabot/go_modules/github.com/redis/go-redis/v9-9.20.0
Bump github.com/redis/go-redis/v9 from 9.19.0 to 9.20.0
2026-06-07 21:12:58 -05:00
Joel Wetzell ac51d9bd3d Merge pull request #183 from jwetzell/dependabot/go_modules/modernc.org/sqlite-1.51.0
Bump modernc.org/sqlite from 1.50.1 to 1.51.0
2026-06-07 21:12:42 -05:00
Joel Wetzell c01a101214 Merge pull request #184 from jwetzell/dependabot/go_modules/github.com/emiago/sipgo-1.4.0
Bump github.com/emiago/sipgo from 1.3.1 to 1.4.0
2026-06-07 21:12:22 -05:00
Joel Wetzell 7d401b9570 Merge pull request #185 from jwetzell/dependabot/go_modules/github.com/nats-io/nats-server/v2-2.14.2
Bump github.com/nats-io/nats-server/v2 from 2.14.1 to 2.14.2
2026-06-07 21:12:11 -05:00
dependabot[bot] 809c31847b Bump github.com/nats-io/nats-server/v2 from 2.14.1 to 2.14.2
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.14.1 to 2.14.2.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/RELEASES.md)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.14.1...v2.14.2)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:43:00 +00:00
dependabot[bot] bdcf5a06ce Bump github.com/emiago/sipgo from 1.3.1 to 1.4.0
Bumps [github.com/emiago/sipgo](https://github.com/emiago/sipgo) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/emiago/sipgo/releases)
- [Commits](https://github.com/emiago/sipgo/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/emiago/sipgo
  dependency-version: 1.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:42:47 +00:00
dependabot[bot] 09a46d3634 Bump modernc.org/sqlite from 1.50.1 to 1.51.0
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.50.1 to 1.51.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.50.1...v1.51.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.51.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:42:42 +00:00
dependabot[bot] 7385f25b3d Bump github.com/redis/go-redis/v9 from 9.19.0 to 9.20.0
Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.19.0 to 9.20.0.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.19.0...v9.20.0)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-version: 9.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:42:37 +00:00
dependabot[bot] 94a59413a1 Bump docker/setup-qemu-action from 4.0.0 to 4.1.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/ce360397dd3f832beb865e1373c09c0e9f86d70a...06116385d9baf250c9f4dcb4858b16962ea869c3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 00:42:07 +00:00
Joel Wetzell b7e0d879bc Merge pull request #179 from jwetzell/fix/in-out-framer
make sure to use a distinct framer for both directions of communication
2026-06-01 21:35:58 -05:00
Joel Wetzell 9b76ee8195 make sure to use a distinct framer for both directions of communication 2026-06-01 21:32:14 -05:00
Joel Wetzell d48a89d1ef reword description 2026-06-01 18:30:19 -05:00
Joel Wetzell b01bebea54 Merge pull request #178 from jwetzell/processor-params-schema-descriptions
add description information to params for processors
2026-06-01 17:56:39 -05:00
Joel Wetzell 73905e1274 add description information to params for processors 2026-06-01 17:55:30 -05:00
Joel Wetzell 56566cf666 Merge pull request #177 from jwetzell/module-params-descriptions
add description information to params for modules
2026-06-01 17:39:30 -05:00
Joel Wetzell 5d1e6622cb add description information to params for modules 2026-06-01 17:39:00 -05:00
137 changed files with 1022 additions and 1966 deletions
-10
View File
@@ -1,10 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: gomod
directory: /
schedule:
interval: "weekly"
+17 -17
View File
@@ -17,7 +17,7 @@ jobs:
short_commit: ${{ steps.set_commit.outputs.short_commit }} short_commit: ${{ steps.set_commit.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: set environment variables - name: set environment variables
@@ -45,11 +45,11 @@ jobs:
SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: setup go - name: setup go
uses: actions/setup-go@v6 uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: install alsa lib - name: install alsa lib
@@ -79,11 +79,11 @@ jobs:
SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: setup go - name: setup go
uses: actions/setup-go@v6 uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: install alsa lib - name: install alsa lib
@@ -113,11 +113,11 @@ jobs:
SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: setup go - name: setup go
uses: actions/setup-go@v6 uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: setup zig - name: setup zig
@@ -153,11 +153,11 @@ jobs:
SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: setup go - name: setup go
uses: actions/setup-go@v6 uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: build - name: build
@@ -185,11 +185,11 @@ jobs:
SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
- name: setup go - name: setup go
uses: actions/setup-go@v6 uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: build - name: build
@@ -215,29 +215,29 @@ jobs:
if: github.ref_type == 'tag' && github.event_name != 'workflow_dispatch' if: github.ref_type == 'tag' && github.event_name != 'workflow_dispatch'
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Docker metadata - name: Setup Docker metadata
id: meta id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with: with:
images: | images: |
jwetzell/showbridge jwetzell/showbridge
- name: Build and push - name: Build and push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with: with:
push: true push: true
context: ./ context: ./
+7 -10
View File
@@ -26,8 +26,8 @@ jobs:
- name: Install alsa - name: Install alsa
run: sudo apt-get install -y libasound2-dev run: sudo apt-get install -y libasound2-dev
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-go@v6 - uses: actions/setup-go@v7
with: with:
go-version-file: "go.mod" go-version-file: "go.mod"
- name: mod tidy - name: mod tidy
@@ -38,12 +38,9 @@ jobs:
- name: clean up coverage report - name: clean up coverage report
run: cat coverage.out | grep -v "github.com/jwetzell/showbridge-go/cmd" > coverage.nocmd.out run: cat coverage.out | grep -v "github.com/jwetzell/showbridge-go/cmd" > coverage.nocmd.out
- name: Update coverage report
uses: ncruces/go-coverage-report@v0.3.2 - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with: with:
coverage-file: coverage.nocmd.out token: ${{ secrets.CODECOV_TOKEN }}
report: true files: coverage.nocmd.out
chart: true
amend: true
if: github.event_name == 'push'
continue-on-error: true
+1 -1
View File
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.26.3 ARG GO_VERSION=1.27.0
FROM golang:${GO_VERSION}-alpine AS build FROM golang:${GO_VERSION}-alpine AS build
RUN apk --no-cache add ca-certificates tzdata git RUN apk --no-cache add ca-certificates tzdata git
WORKDIR /build WORKDIR /build
+2 -2
View File
@@ -2,7 +2,8 @@
# showbridge (go edition) # showbridge (go edition)
[![Coverage](https://github.com/jwetzell/showbridge-go/wiki/coverage.svg)](https://raw.githack.com/wiki/jwetzell/showbridge-go/coverage.html) [![codecov](https://codecov.io/gh/jwetzell/showbridge-go/graph/badge.svg?token=T4XAAKZN14)](https://codecov.io/gh/jwetzell/showbridge-go)
Simple protocol router _/s_ Simple protocol router _/s_
</div> </div>
@@ -24,7 +25,6 @@ Simple protocol router _/s_
- Serial (not included in pre-built binaries yet) - Serial (not included in pre-built binaries yet)
- [OSC](https://opensoundcontrol.stanford.edu/spec-1_0.html) - [OSC](https://opensoundcontrol.stanford.edu/spec-1_0.html)
- [FreeD](https://ptzoptics.com/freed/) - [FreeD](https://ptzoptics.com/freed/)
- [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol)
- [Redis](https://redis.io/) - [Redis](https://redis.io/)
### CLI Usage ### CLI Usage
+7 -3
View File
@@ -13,11 +13,15 @@ modules:
port: 8000 port: 8000
routes: routes:
- input: http - input: http
id: http-to-osc
processors: processors:
- type: osc.message.create - id: create-osc
type: osc.message.create
params: params:
address: "{{.Payload.URL.Path}}" address: "{{.Payload.URL.Path}}"
- type: osc.message.encode - id: encode-osc
- type: module.output type: osc.message.encode
- id: output-osc
type: module.output
params: params:
module: udp module: udp
+23 -39
View File
@@ -1,77 +1,61 @@
module github.com/jwetzell/showbridge-go module github.com/jwetzell/showbridge-go
go 1.26.3 go 1.27.0
require ( require (
github.com/eclipse/paho.mqtt.golang v1.5.1 github.com/eclipse/paho.mqtt.golang v1.5.1
github.com/emiago/diago v0.28.0
github.com/emiago/sipgo v1.3.1
github.com/expr-lang/expr v1.17.8 github.com/expr-lang/expr v1.17.8
github.com/extism/go-sdk v1.7.1 github.com/extism/go-sdk v1.7.1
github.com/google/jsonschema-go v0.4.3 github.com/google/jsonschema-go v0.4.3
github.com/gorilla/websocket v1.5.3 github.com/gorilla/websocket v1.5.3
github.com/jwetzell/artnet-go v0.3.0 github.com/jwetzell/artnet-go v0.3.0
github.com/jwetzell/free-d-go v0.2.0 github.com/jwetzell/free-d-go v0.2.0
github.com/jwetzell/osc-go v0.3.0 github.com/jwetzell/osc-go v0.3.1
github.com/jwetzell/psn-go v0.3.0 github.com/jwetzell/psn-go v0.3.0
github.com/nats-io/nats-server/v2 v2.14.1 github.com/nats-io/nats-server/v2 v2.14.6
github.com/nats-io/nats.go v1.52.0 github.com/nats-io/nats.go v1.53.1
github.com/redis/go-redis/v9 v9.19.0 github.com/redis/go-redis/v9 v9.22.0
github.com/urfave/cli/v3 v3.9.0 github.com/urfave/cli/v3 v3.11.0
gitlab.com/gomidi/midi/v2 v2.3.23 gitlab.com/gomidi/midi/v2 v2.3.24
go.bug.st/serial v1.7.1 go.bug.st/serial v1.8.0
golang.org/x/time v0.15.0 golang.org/x/time v0.15.0
modernc.org/quickjs v0.18.2 modernc.org/quickjs v0.24.2
modernc.org/sqlite v1.50.1 modernc.org/sqlite v1.57.0
sigs.k8s.io/yaml v1.6.0 sigs.k8s.io/yaml v1.6.0
) )
require ( require (
github.com/antithesishq/antithesis-sdk-go v0.7.0 // indirect github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1 // indirect github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1 // indirect
github.com/emiago/dtls/v3 v3.0.0-20260122183559-8b8d23e359c0 // indirect
github.com/go-audio/riff v1.0.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect github.com/gobwas/glob v0.2.3 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/google/go-tpm v0.9.8 // indirect github.com/google/go-tpm v0.9.8 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f // indirect github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f // indirect
github.com/icholy/digest v1.1.0 // indirect github.com/klauspost/compress v1.19.2 // indirect
github.com/klauspost/compress v1.18.6 // indirect github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/minio/highwayhash v1.0.4 // indirect github.com/minio/highwayhash v1.0.4 // indirect
github.com/nats-io/jwt/v2 v2.8.1 // indirect github.com/nats-io/jwt/v2 v2.8.2 // indirect
github.com/nats-io/nkeys v0.4.15 // indirect github.com/nats-io/nkeys v0.4.16 // indirect
github.com/nats-io/nuid v1.0.1 // indirect github.com/nats-io/nuid v1.0.1 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/pion/logging v0.2.4 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.16 // indirect
github.com/pion/rtp v1.10.2 // indirect
github.com/pion/srtp/v3 v3.0.10 // indirect
github.com/pion/transport/v4 v4.0.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect
github.com/tetratelabs/wazero v1.11.0 // indirect github.com/tetratelabs/wazero v1.11.0 // indirect
github.com/zaf/g711 v1.4.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/atomic v1.11.0 // indirect go.uber.org/atomic v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.51.0 // indirect golang.org/x/crypto v0.55.0 // indirect
golang.org/x/net v0.54.0 // indirect golang.org/x/net v0.57.0 // indirect
golang.org/x/sync v0.20.0 // indirect golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.44.0 // indirect golang.org/x/sys v0.47.0 // indirect
golang.org/x/tools v0.44.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/hraban/opus.v2 v2.0.0-20230925203106-0188a62cb302 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
modernc.org/libc v1.72.3 // indirect modernc.org/libc v1.75.4 // indirect
modernc.org/libquickjs v0.12.8 // indirect modernc.org/libquickjs v0.13.1 // indirect
modernc.org/mathutil v1.7.1 // indirect modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect modernc.org/memory v1.12.1 // indirect
) )
+57 -89
View File
@@ -1,5 +1,5 @@
github.com/antithesishq/antithesis-sdk-go v0.7.0 h1:uWDG8BqLD1lI2ps38WDz2vXflrTX2+vLX0SvZtztJtE= github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op h1:p2zFsAzvhIpFya8AIOHIbWf7NGvO34QpLGclyf7nXj8=
github.com/antithesishq/antithesis-sdk-go v0.7.0/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI= github.com/antithesishq/antithesis-sdk-go v0.7.2-default-no-op/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
@@ -14,34 +14,20 @@ github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1 h1:idfl8M8r
github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1/go.mod h1:C8DzXehI4zAbrdlbtOByKX6pfivJTBiV9Jjqv56Yd9Q= github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1/go.mod h1:C8DzXehI4zAbrdlbtOByKX6pfivJTBiV9Jjqv56Yd9Q=
github.com/eclipse/paho.mqtt.golang v1.5.1 h1:/VSOv3oDLlpqR2Epjn1Q7b2bSTplJIeV2ISgCl2W7nE= github.com/eclipse/paho.mqtt.golang v1.5.1 h1:/VSOv3oDLlpqR2Epjn1Q7b2bSTplJIeV2ISgCl2W7nE=
github.com/eclipse/paho.mqtt.golang v1.5.1/go.mod h1:1/yJCneuyOoCOzKSsOTUc0AJfpsItBGWvYpBLimhArU= github.com/eclipse/paho.mqtt.golang v1.5.1/go.mod h1:1/yJCneuyOoCOzKSsOTUc0AJfpsItBGWvYpBLimhArU=
github.com/emiago/diago v0.28.0 h1:VCiimhFYLoBTsxH6WrufLSt6tKWG8Fv7LfCkZHqct2E=
github.com/emiago/diago v0.28.0/go.mod h1:eQT6j9co9PMQ/25aUiM2jpvwxxWFXLWi2w5R3lZNmKg=
github.com/emiago/dtls/v3 v3.0.0-20260122183559-8b8d23e359c0 h1:o4LxpUnZ1zxiQ+Qjc9kLwXcjz31NGAHmnZ7xoJto3VM=
github.com/emiago/dtls/v3 v3.0.0-20260122183559-8b8d23e359c0/go.mod h1:ydcZ977eS1I6uOWodzMuw30BwvNAzT9su/xcNYSJqjA=
github.com/emiago/sipgo v1.3.1 h1:JwcmYJtCmcjuLwB2ZxtupYilNQgwXN/JIcxp+CDq16A=
github.com/emiago/sipgo v1.3.1/go.mod h1:DuwAxBZhKMqIzQFPGZb1MVAGU6Wuxj64oTOhd5dx/FY=
github.com/expr-lang/expr v1.17.8 h1:W1loDTT+0PQf5YteHSTpju2qfUfNoBt4yw9+wOEU9VM= github.com/expr-lang/expr v1.17.8 h1:W1loDTT+0PQf5YteHSTpju2qfUfNoBt4yw9+wOEU9VM=
github.com/expr-lang/expr v1.17.8/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= github.com/expr-lang/expr v1.17.8/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
github.com/extism/go-sdk v1.7.1 h1:lWJos6uY+tRFdlIHR+SJjwFDApY7OypS/2nMhiVQ9Sw= github.com/extism/go-sdk v1.7.1 h1:lWJos6uY+tRFdlIHR+SJjwFDApY7OypS/2nMhiVQ9Sw=
github.com/extism/go-sdk v1.7.1/go.mod h1:IT+Xdg5AZM9hVtpFUA+uZCJMge/hbvshl8bwzLtFyKA= github.com/extism/go-sdk v1.7.1/go.mod h1:IT+Xdg5AZM9hVtpFUA+uZCJMge/hbvshl8bwzLtFyKA=
github.com/go-audio/riff v1.0.0 h1:d8iCGbDvox9BfLagY94fBynxSPHO80LmZCaOsmKxokA=
github.com/go-audio/riff v1.0.0/go.mod h1:l3cQwc85y79NQFCRB7TiPoNiaijp6q8Z0Uv38rVG498=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo= github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo=
github.com/google/go-tpm v0.9.8/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY= github.com/google/go-tpm v0.9.8/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0= github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=
github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo=
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 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/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
@@ -50,56 +36,45 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f h1:NW3E2QSchEk63/fjeEvWOa2cE02FSv9ox//VE/N4c8g= github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f h1:NW3E2QSchEk63/fjeEvWOa2cE02FSv9ox//VE/N4c8g=
github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
github.com/icholy/digest v1.1.0 h1:HfGg9Irj7i+IX1o1QAmPfIBNu/Q5A5Tu3n/MED9k9H4=
github.com/icholy/digest v1.1.0/go.mod h1:QNrsSGQ5v7v9cReDI0+eyjsXGUoRSUZQHeQ5C4XLa0Y=
github.com/jwetzell/artnet-go v0.3.0 h1:MDHElOSbpgmIbYGHO9SoxsT7ynrYtV5/UHGT82geHk0= github.com/jwetzell/artnet-go v0.3.0 h1:MDHElOSbpgmIbYGHO9SoxsT7ynrYtV5/UHGT82geHk0=
github.com/jwetzell/artnet-go v0.3.0/go.mod h1:zqRsSsrd6rPwJacwscPteDqGIqevjZ3Z6dpp092VJ1w= github.com/jwetzell/artnet-go v0.3.0/go.mod h1:zqRsSsrd6rPwJacwscPteDqGIqevjZ3Z6dpp092VJ1w=
github.com/jwetzell/free-d-go v0.2.0 h1:8WQW4du8Sf3d18aUzk9n5jZtHE6WdDQHDFjkFffvycc= github.com/jwetzell/free-d-go v0.2.0 h1:8WQW4du8Sf3d18aUzk9n5jZtHE6WdDQHDFjkFffvycc=
github.com/jwetzell/free-d-go v0.2.0/go.mod h1:yHuRy51NeDfN26eJ6wzZgys8qyQiS7hkYILw8yF+UJ4= github.com/jwetzell/free-d-go v0.2.0/go.mod h1:yHuRy51NeDfN26eJ6wzZgys8qyQiS7hkYILw8yF+UJ4=
github.com/jwetzell/osc-go v0.3.0 h1:z75TxuQSEmdcmZ56OAepkDa3m88SdZh//3m4nBb/XZI= github.com/jwetzell/osc-go v0.3.1 h1:IyXCUxzMFjiUFOeqOpz57zNv5D3Zf9yEYs2tKmPQnxA=
github.com/jwetzell/osc-go v0.3.0/go.mod h1:kCs329JxY6Qjga08tRQ/Gl0PqhgQzLIMpOhm6uszvIc= github.com/jwetzell/osc-go v0.3.1/go.mod h1:vdfsVQ0fvtaOVwnvaz7IJ0gqtx2bLcswsVU9k7h2UGo=
github.com/jwetzell/psn-go v0.3.0 h1:WVpCEmExYE8a+I5hQak5jNJJp2x35VdGX/VuMUKPmhY= github.com/jwetzell/psn-go v0.3.0 h1:WVpCEmExYE8a+I5hQak5jNJJp2x35VdGX/VuMUKPmhY=
github.com/jwetzell/psn-go v0.3.0/go.mod h1:bcEAeti4sQM375buujb3mIfmUstD4Aby18gq3ENb6+o= github.com/jwetzell/psn-go v0.3.0/go.mod h1:bcEAeti4sQM375buujb3mIfmUstD4Aby18gq3ENb6+o=
github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao= github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8=
github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/minio/highwayhash v1.0.4 h1:asJizugGgchQod2ja9NJlGOWq4s7KsAWr5XUc9Clgl4= github.com/minio/highwayhash v1.0.4 h1:asJizugGgchQod2ja9NJlGOWq4s7KsAWr5XUc9Clgl4=
github.com/minio/highwayhash v1.0.4/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/minio/highwayhash v1.0.4/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ=
github.com/nats-io/jwt/v2 v2.8.1 h1:V0xpGuD/N8Mi+fQNDynXohVvp7ZztevW5io8CUWlPmU= github.com/nats-io/jwt/v2 v2.8.2 h1:XXRgB60MSTnqsRwejQurVDs/hcv2dkt+86GjI+I/bMc=
github.com/nats-io/jwt/v2 v2.8.1/go.mod h1:nWnOEEiVMiKHQpnAy4eXlizVEtSfzacZ1Q43LIRavZg= github.com/nats-io/jwt/v2 v2.8.2/go.mod h1:Ag/56sq9OblL4JgdYufDd16Egb17Kr/8WwwuO/forVc=
github.com/nats-io/nats-server/v2 v2.14.1 h1:wXs/a5fw9Hzm3CvuzLxGeIwpjPulSa7gMT3eSuhGkcg= github.com/nats-io/nats-server/v2 v2.14.6 h1:dHjEHa49lUTxIb5jrsk5kz/AmOyOQ4T9ti8djcBumDQ=
github.com/nats-io/nats-server/v2 v2.14.1/go.mod h1:4N17zLpuS7WMbG8T9gsE2B7z9hC9PraPyulVBfpK6nU= github.com/nats-io/nats-server/v2 v2.14.6/go.mod h1:u/0bNBzN/m5orQGz7q2NNzxCQ6PWdwaOSwPNDADZn/A=
github.com/nats-io/nats.go v1.52.0 h1:n3avV4VBsCgsdwh71TppsTwtv+QdPs7ntSKM8qJLGsc= github.com/nats-io/nats.go v1.53.1 h1:Otsq3uLc/kLdjmkNHkXH0jBqwUquwdKFoe3fq6/3/Xo=
github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno= github.com/nats-io/nats.go v1.53.1/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno=
github.com/nats-io/nkeys v0.4.15 h1:JACV5jRVO9V856KOapQ7x+EY8Jo3qw1vJt/9Jpwzkk4= github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs= github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8=
github.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so=
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
github.com/pion/rtcp v1.2.16 h1:fk1B1dNW4hsI78XUCljZJlC4kZOPk67mNRuQ0fcEkSo=
github.com/pion/rtcp v1.2.16/go.mod h1:/as7VKfYbs5NIb4h6muQ35kQF/J0ZVNz2Z3xKoCBYOo=
github.com/pion/rtp v1.10.2 h1:l+f6tTDcAH6xwepaAoW791ddhuYsJlqRATOzirO04Mo=
github.com/pion/rtp v1.10.2/go.mod h1:Au8fc6cEByy8RLTwKTQTEeQqDB/SJDxwL4mZuxYA5Pk=
github.com/pion/srtp/v3 v3.0.10 h1:tFirkpBb3XccP5VEXLi50GqXhv5SKPxqrdlhDCJlZrQ=
github.com/pion/srtp/v3 v3.0.10/go.mod h1:3mOTIB0cq9qlbn59V4ozvv9ClW/BSEbRp4cY0VtaR7M=
github.com/pion/transport/v4 v4.0.1 h1:sdROELU6BZ63Ab7FrOLn13M6YdJLY20wldXW2Cu2k8o=
github.com/pion/transport/v4 v4.0.1/go.mod h1:nEuEA4AD5lPdcIegQDpVLgNoDGreqM/YqmEx3ovP4jM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/redis/go-redis/v9 v9.19.0 h1:XPVaaPSnG6RhYf7p+rmSa9zZfeVAnWsH5h3lxthOm/k= github.com/redis/go-redis/v9 v9.22.0 h1:laDvpYXTJtZLloinw1fA5Kqd6HAEH2XKxOkG/PDq2F0=
github.com/redis/go-redis/v9 v9.19.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA= github.com/redis/go-redis/v9 v9.22.0/go.mod h1:y2g0Wj8rQvuK0ELM+oxSudcLtC09JScs98I/X9gRWY4=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= 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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
@@ -110,16 +85,14 @@ github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 h1:ZF+QBjOI+tILZ
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834/go.mod h1:m9ymHTgNSEjuxvw8E7WWe4Pl4hZQHXONY8wE6dMLaRk= github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834/go.mod h1:m9ymHTgNSEjuxvw8E7WWe4Pl4hZQHXONY8wE6dMLaRk=
github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA=
github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU=
github.com/urfave/cli/v3 v3.9.0 h1:AV9lIiPv3ukYnxunaCUsHnEozptYmDN2F0+yWqLMn/c= github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q=
github.com/urfave/cli/v3 v3.9.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
github.com/zaf/g711 v1.4.0 h1:XZYkjjiAg9QTBnHqEg37m2I9q3IIDv5JRYXs2N8ma7c=
github.com/zaf/g711 v1.4.0/go.mod h1:eCDXt3dSp/kYYAoooba7ukD/Q75jvAaS4WOMr0l1Roo=
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
gitlab.com/gomidi/midi/v2 v2.3.23 h1:P8NxV4EzV9c+BjpwTeB+G/qa+Xdq/UTazS2fKxY0O0g= gitlab.com/gomidi/midi/v2 v2.3.24 h1:afkq5nhlzKvZaj9QK80YbK8tH3lIlKLnPPP9HxxD7Do=
gitlab.com/gomidi/midi/v2 v2.3.23/go.mod h1:jDpP4O4skYi+7iVwt6Zyp18bd2M4hkjtMuw2cmgKgfw= gitlab.com/gomidi/midi/v2 v2.3.24/go.mod h1:jDpP4O4skYi+7iVwt6Zyp18bd2M4hkjtMuw2cmgKgfw=
go.bug.st/serial v1.7.1 h1:5aP8wYL0UjEYOVs3oPAGscjaSfRQLHtCvBFXNN/rwtc= go.bug.st/serial v1.8.0 h1:ZtnmN8aYXtPlTghwSvDWPHKBHL9TM6oFDa+KpSn4SQE=
go.bug.st/serial v1.7.1/go.mod h1:d0MmS16Qt9b1m06yoYRNUXhRRTJV5Qg2S5EKqQtnayQ= go.bug.st/serial v1.8.0/go.mod h1:d0MmS16Qt9b1m06yoYRNUXhRRTJV5Qg2S5EKqQtnayQ=
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
@@ -128,61 +101,56 @@ go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI= golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8= golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w= golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ= golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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 h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/hraban/opus.v2 v2.0.0-20230925203106-0188a62cb302 h1:xeVptzkP8BuJhoIjNizd2bRHfq9KB9HfOLZu90T04XM=
gopkg.in/hraban/opus.v2 v2.0.0-20230925203106-0188a62cb302/go.mod h1:/L5E7a21VWl8DeuCPKxQBdVG5cy+L0MRZ08B1wnqt7g=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= modernc.org/cc/v4 v4.29.2 h1:h6+9ciCnPKutf4I03CvheAvDLX7+IHlqR6Iy6J+cgd8=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= modernc.org/cc/v4 v4.29.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
modernc.org/cc/v4 v4.28.2 h1:3tQ0lf2ADtoby2EtSP+J7IE2SHwEJdP8ioR59wx7XpY= modernc.org/ccgo/v4 v4.35.0 h1:F+TUsmw09QxLzmi3aeYYGxjAXarmZaKgj3mKQHNaA8w=
modernc.org/cc/v4 v4.28.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= modernc.org/ccgo/v4 v4.35.0/go.mod h1:qrVGs9S3Sr2Ztcg9ve+kTAYMp5a3YvWjo+SoN06kJ5I=
modernc.org/ccgo/v4 v4.34.0 h1:yRLPFZieg532OT4rp4JFNIVcquwalMX26G95WQDqwCQ=
modernc.org/ccgo/v4 v4.34.0/go.mod h1:AS5WYMyBakQ+fhsHhtP8mWB82KTGPkNNJDGfGQCe0/A=
modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=
modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
modernc.org/gc/v3 v3.1.2 h1:ZtDCnhonXSZexk/AYsegNRV1lJGgaNZJuKjJSWKyEqo= modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc=
modernc.org/gc/v3 v3.1.2/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
modernc.org/libc v1.72.3 h1:ZnDF4tXn4NBXFutMMQC4vtbTFSXhhKzR73fv0beZEAU= modernc.org/libc v1.75.4 h1:EHQJNYDC6LiDIOqM76862xe4frbDc7IzEOZTtGxZV8Q=
modernc.org/libc v1.72.3/go.mod h1:dn0dZNnnn1clLyvRxLxYExxiKRZIRENOfqQ8XEeg4Qs= modernc.org/libc v1.75.4/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ=
modernc.org/libquickjs v0.12.8 h1:wJ2GGxEDcQb7j8ILZScNNP1WsXFILlo1qQ8cS3q/tPw= modernc.org/libquickjs v0.13.1 h1:uCb9AYyEyL1JS2dnKtLZKWH/vDb36cx1Mr1SIdbzb8A=
modernc.org/libquickjs v0.12.8/go.mod h1:nIPezuUN/J6aDLSaR76qNaPNNy79FH5Gkjb/x9wa/gU= modernc.org/libquickjs v0.13.1/go.mod h1:tCEsA1Zda1+C5JagFIJGqjYZOxDPFOUYjK3dGhEeq0g=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= 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.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g=
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/quickjs v0.18.2 h1:v/KDawJfs4L7jSCItAKrkrHCmOL5VnDLMJOXpU8Evdk= modernc.org/quickjs v0.24.2 h1:wfVrO+6ailTzKHA7LAlknnOXH/rJyiIgw4+WNI0m6ew=
modernc.org/quickjs v0.18.2/go.mod h1:U11Fhn2hC71v+DyvEN3cY4IXkjU5XxrYT0DQWvZ43+A= modernc.org/quickjs v0.24.2/go.mod h1:4SZg8rXHeX2pO2VpBVmqSDrIOYD/UF5Cnh3ew4tzFng=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
modernc.org/sqlite v1.50.1 h1:l+cQvn0sd0zJJtfygGHuQJ5AjlrwXmWPw4KP3ZMwr9w= modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg=
modernc.org/sqlite v1.50.1/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM= modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= 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 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
+24
View File
@@ -0,0 +1,24 @@
package common_test
import (
"testing"
"github.com/jwetzell/showbridge-go/internal/common"
)
func TestEventToJson(t *testing.T) {
e := common.Event{
Type: "test.event",
Data: map[string]any{
"key": "value",
},
}
jsonData, err := e.ToJSON()
if err != nil {
t.Fatalf("Failed to convert event to JSON: %v", err)
}
expectedJson := `{"type":"test.event","data":{"key":"value"}}`
if string(jsonData) != expectedJson {
t.Errorf("Expected JSON: %s, got: %s", expectedJson, string(jsonData))
}
}
+1
View File
@@ -1,6 +1,7 @@
package config package config
type ProcessorConfig struct { type ProcessorConfig struct {
Id string `json:"id"`
Type string `json:"type"` Type string `json:"type"`
Params Params `json:"params,omitempty"` Params Params `json:"params,omitempty"`
} }
+1
View File
@@ -1,6 +1,7 @@
package config package config
type RouteConfig struct { type RouteConfig struct {
Id string `json:"id"`
Input string `json:"input"` Input string `json:"input"`
Processors []ProcessorConfig `json:"processors"` Processors []ProcessorConfig `json:"processors"`
} }
+4 -2
View File
@@ -22,8 +22,10 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"dsn": { "dsn": {
Type: "string", Title: "Data Source Name",
MinLength: new(1), Description: "the data source name (DSN) for the SQLite database",
Type: "string",
MinLength: new(1),
}, },
}, },
Required: []string{"dsn"}, Required: []string{"dsn"},
+5 -4
View File
@@ -24,10 +24,11 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port for the HTTP server to listen on",
Minimum: jsonschema.Ptr[float64](1024), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
}, },
}, },
Required: []string{"port"}, Required: []string{"port"},
+3 -2
View File
@@ -22,8 +22,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"port": { "port": {
Title: "Port", Title: "Port",
Type: "string", Description: "the name of the MIDI port to listen to",
Type: "string",
}, },
}, },
Required: []string{"port"}, Required: []string{"port"},
+3 -2
View File
@@ -24,8 +24,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"port": { "port": {
Title: "Port", Title: "Port",
Type: "string", Description: "the name of the MIDI port to send messages to",
Type: "string",
}, },
}, },
Required: []string{"port"}, Required: []string{"port"},
+2 -1
View File
@@ -30,7 +30,8 @@ func RegisterModule(mod ModuleRegistration) {
moduleRegistryMu.Lock() moduleRegistryMu.Lock()
defer moduleRegistryMu.Unlock() defer moduleRegistryMu.Unlock()
if _, ok := moduleRegistry[string(mod.Type)]; ok { _, exists := moduleRegistry[string(mod.Type)]
if exists {
panic(fmt.Sprintf("module already registered: %s", mod.Type)) panic(fmt.Sprintf("module already registered: %s", mod.Type))
} }
moduleRegistry[string(mod.Type)] = mod moduleRegistry[string(mod.Type)] = mod
+20 -15
View File
@@ -22,28 +22,33 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"broker": { "broker": {
Title: "Broker URL", Title: "Broker URL",
Type: "string", Description: "the URL of the MQTT broker to connect to",
Type: "string",
}, },
"topic": { "topic": {
Title: "Topic", Title: "Topic",
Type: "string", Description: "an MQTT topic to subscribe to",
Type: "string",
}, },
"clientId": { "clientId": {
Title: "Client ID", Title: "Client ID",
Type: "string", Description: "the client ID to use when connecting to the MQTT broker",
Type: "string",
}, },
"qos": { "qos": {
Title: "QoS", Title: "QoS",
Type: "integer", Description: "the QoS level to use when publishing messages",
Minimum: jsonschema.Ptr[float64](0), Type: "integer",
Maximum: jsonschema.Ptr[float64](2), Minimum: jsonschema.Ptr[float64](0),
Default: json.RawMessage(`0`), Maximum: jsonschema.Ptr[float64](2),
Default: json.RawMessage(`0`),
}, },
"retained": { "retained": {
Title: "Retained", Title: "Retained",
Type: "boolean", Description: "whether to set the retained flag when publishing messages",
Default: json.RawMessage(`false`), Type: "boolean",
Default: json.RawMessage(`false`),
}, },
}, },
Required: []string{"broker", "topic", "clientId"}, Required: []string{"broker", "topic", "clientId"},
@@ -143,13 +148,13 @@ func (mc *MQTTClient) Start(ctx context.Context, inputHandler common.InputHandle
mc.client = mqtt.NewClient(opts) mc.client = mqtt.NewClient(opts)
token := mc.client.Connect() token := mc.client.Connect()
mc.clientMu.Unlock()
token.Wait() token.Wait()
err := token.Error() err := token.Error()
if err != nil { if err != nil {
return err return err
} }
mc.clientMu.Unlock()
<-mc.ctx.Done() <-mc.ctx.Done()
mc.logger.Debug("done") mc.logger.Debug("done")
+6 -4
View File
@@ -20,12 +20,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"url": { "url": {
Title: "NATS Server URL", Title: "NATS Server URL",
Type: "string", Description: "the URL of the NATS server to connect to",
Type: "string",
}, },
"subject": { "subject": {
Title: "Subject", Title: "Subject",
Type: "string", Description: "the subject to subscribe to",
Type: "string",
}, },
}, },
Required: []string{"url", "subject"}, Required: []string{"url", "subject"},
+10 -8
View File
@@ -24,16 +24,18 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"ip": { "ip": {
Title: "IP", Title: "IP",
Type: "string", Description: "the IP address to bind the NATS server to",
Default: json.RawMessage(`"0.0.0.0"`), Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port for the NATS server to listen on",
Minimum: jsonschema.Ptr[float64](1024), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1024),
Default: json.RawMessage(`4222`), Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`4222`),
}, },
}, },
Required: []string{}, Required: []string{},
+2 -1
View File
@@ -75,7 +75,8 @@ func (pc *PSNClient) Start(ctx context.Context, inputHandler common.InputHandler
pc.connMu.Unlock() pc.connMu.Unlock()
if err != nil { if err != nil {
//NOTE(jwetzell) we hit deadline //NOTE(jwetzell) we hit deadline
if opErr, ok := err.(*net.OpError); ok && opErr.Timeout() { opErr, ok := err.(*net.OpError)
if ok && opErr.Timeout() {
continue continue
} }
return err return err
+8 -4
View File
@@ -21,12 +21,16 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"host": { "host": {
Type: "string", Title: "Host",
Description: "the hostname or IP address of the Redis server to connect to",
Type: "string",
}, },
"port": { "port": {
Type: "integer", Title: "Port",
Minimum: jsonschema.Ptr[float64](1), Description: "the port to use when connecting to the Redis server",
Maximum: jsonschema.Ptr[float64](65535), Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
}, },
}, },
Required: []string{"host", "port"}, Required: []string{"host", "port"},
+29 -15
View File
@@ -25,17 +25,20 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"port": { "port": {
Title: "Port", Title: "Port",
Type: "string", Description: "the name of the serial port to connect to",
Type: "string",
}, },
"baudRate": { "baudRate": {
Title: "Baud Rate", Title: "Baud Rate",
Type: "integer", Description: "the baud rate to use when connecting to the serial port",
Type: "integer",
}, },
"framing": { "framing": {
Title: "Framing Method", Title: "Framing Method",
Type: "string", Description: "the method to use for framing messages on the serial port",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"}, Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
}, },
}, },
Required: []string{"port", "baudRate", "framing"}, Required: []string{"port", "baudRate", "framing"},
@@ -53,12 +56,14 @@ func init() {
return nil, fmt.Errorf("serial.client framing error: %w", err) return nil, fmt.Errorf("serial.client framing error: %w", err)
} }
framer := framer.GetFramer(framingMethodString) inFramer := framer.GetFramer(framingMethodString)
if framer == nil { if inFramer == nil {
return nil, fmt.Errorf("serial.client unknown framing method: %s", framingMethodString) return nil, fmt.Errorf("serial.client unknown framing method: %s", framingMethodString)
} }
outFramer := framer.GetFramer(framingMethodString)
baudRateInt, err := params.GetInt("baudRate") baudRateInt, err := params.GetInt("baudRate")
if err != nil { if err != nil {
return nil, fmt.Errorf("serial.client baudRate error: %w", err) return nil, fmt.Errorf("serial.client baudRate error: %w", err)
@@ -68,7 +73,7 @@ func init() {
BaudRate: baudRateInt, BaudRate: baudRateInt,
} }
return &SerialClient{config: config, Port: portString, Framer: framer, Mode: &mode, logger: CreateLogger(config)}, nil return &SerialClient{config: config, Port: portString, inFramer: inFramer, outFramer: outFramer, Mode: &mode, logger: CreateLogger(config)}, nil
}, },
}) })
} }
@@ -78,7 +83,8 @@ type SerialClient struct {
ctx context.Context ctx context.Context
inputHandler common.InputHandler inputHandler common.InputHandler
Port string Port string
Framer framer.Framer inFramer framer.Framer
outFramer framer.Framer
Mode *serial.Mode Mode *serial.Mode
port serial.Port port serial.Port
logger *slog.Logger logger *slog.Logger
@@ -139,13 +145,13 @@ func (sc *SerialClient) Start(ctx context.Context, inputHandler common.InputHand
byteCount, err := sc.port.Read(buffer) byteCount, err := sc.port.Read(buffer)
if err != nil { if err != nil {
sc.Framer.Clear() sc.inFramer.Clear()
break READ break READ
} }
if sc.Framer != nil { if sc.inFramer != nil {
if byteCount > 0 { if byteCount > 0 {
messages := sc.Framer.Decode(buffer[0:byteCount]) messages := sc.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages { for _, message := range messages {
if sc.inputHandler != nil { if sc.inputHandler != nil {
sc.inputHandler(sc.ctx, sc.Id(), message) sc.inputHandler(sc.ctx, sc.Id(), message)
@@ -172,7 +178,7 @@ func (sc *SerialClient) Output(ctx context.Context, payload any) error {
return errors.New("serial.client can only output bytes") return errors.New("serial.client can only output bytes")
} }
_, err := sc.port.Write(sc.Framer.Encode(payloadBytes)) _, err := sc.port.Write(sc.outFramer.Encode(payloadBytes))
return err return err
} }
@@ -185,4 +191,12 @@ func (sc *SerialClient) Stop() {
if sc.port != nil { if sc.port != nil {
sc.port.Close() sc.port.Close()
} }
if sc.inFramer != nil {
sc.inFramer.Clear()
}
if sc.outFramer != nil {
sc.outFramer.Clear()
}
} }
-262
View File
@@ -1,262 +0,0 @@
package module
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"log/slog"
"os"
"sync"
"time"
"github.com/emiago/diago"
"github.com/emiago/diago/media"
"github.com/emiago/sipgo"
"github.com/emiago/sipgo/sip"
"github.com/google/jsonschema-go/jsonschema"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
"github.com/jwetzell/showbridge-go/internal/processor"
)
func init() {
RegisterModule(ModuleRegistration{
Type: "sip.call.server",
Title: "SIP Call Server",
ParamsSchema: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
},
Required: []string{},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
New: func(moduleConfig config.ModuleConfig) (common.Module, error) {
params := moduleConfig.Params
portNum, err := params.GetInt("port")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
portNum = 5060
} else {
return nil, fmt.Errorf("sip.call.server port error: %w", err)
}
}
ipString, err := params.GetString("ip")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
ipString = "0.0.0.0"
} else {
return nil, fmt.Errorf("sip.call.server ip error: %w", err)
}
}
transportString, err := params.GetString("transport")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
transportString = "udp"
} else {
return nil, fmt.Errorf("sip.call.server transport error: %w", err)
}
}
userAgentString, err := params.GetString("userAgent")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
userAgentString = "showbridge"
} else {
return nil, fmt.Errorf("sip.call.server userAgent error: %w", err)
}
}
return &SIPCallServer{config: moduleConfig, IP: ipString, Port: int(portNum), Transport: transportString, UserAgent: userAgentString, logger: CreateLogger(moduleConfig)}, nil
},
})
}
type SIPCallServer struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
IP string
Port int
Transport string
UserAgent string
logger *slog.Logger
cancel context.CancelFunc
ua *sipgo.UserAgent
uaMu sync.Mutex
}
type SIPCallMessage struct {
To string
}
type SIPCall struct {
inDialog *diago.DialogServerSession
lock sync.Mutex
}
type sipCallContextKey string
func (scs *SIPCallServer) Id() string {
return scs.config.Id
}
func (scs *SIPCallServer) Type() string {
return scs.config.Type
}
func (scs *SIPCallServer) Start(ctx context.Context, inputHandler common.InputHandler) error {
scs.logger.Debug("running")
scs.inputHandler = inputHandler
moduleContext, cancel := context.WithCancel(ctx)
scs.ctx = moduleContext
scs.cancel = cancel
diagoLogger := slog.New(slog.NewJSONHandler(io.Discard, nil))
ua, _ := sipgo.NewUA(
sipgo.WithUserAgent(scs.UserAgent),
sipgo.WithUserAgentTransportLayerOptions(sip.WithTransportLayerLogger(diagoLogger)),
sipgo.WithUserAgentTransactionLayerOptions(sip.WithTransactionLayerLogger(diagoLogger)),
)
scs.uaMu.Lock()
scs.ua = ua
scs.uaMu.Unlock()
sip.SetDefaultLogger(diagoLogger)
media.SetDefaultLogger(diagoLogger)
dg := diago.NewDiago(ua, diago.WithLogger(diagoLogger), diago.WithTransport(
diago.Transport{
Transport: scs.Transport,
BindHost: scs.IP,
BindPort: scs.Port,
},
))
err := dg.Serve(scs.ctx, func(inDialog *diago.DialogServerSession) {
scs.HandleCall(inDialog)
})
if err != nil {
scs.logger.Error("diago serve error", "error", err)
}
<-scs.ctx.Done()
scs.logger.Debug("done")
return nil
}
func (scs *SIPCallServer) HandleCall(inDialog *diago.DialogServerSession) {
inDialog.Trying()
inDialog.Ringing()
inDialog.Answer()
dialogContext := context.WithValue(scs.ctx, sipCallContextKey("call"), &SIPCall{
inDialog: inDialog,
})
if scs.inputHandler != nil {
scs.inputHandler(dialogContext, scs.Id(), SIPCallMessage{
To: inDialog.ToUser(),
})
}
}
func (scs *SIPCallServer) Output(ctx context.Context, payload any) error {
call, ok := ctx.Value(sipCallContextKey("call")).(*SIPCall)
if !ok {
return errors.New("sip.call.server output must originate from sip.call.server input")
}
gotLock := call.lock.TryLock()
if !gotLock {
return errors.New("sip.call.server call is already locked")
}
if call.inDialog.LoadState() == sip.DialogStateEnded {
return errors.New("sip.call.server inDialog already ended")
}
payloadDTMFResponse, ok := common.GetAnyAs[processor.SipDTMFResponse](payload)
if ok {
dtmfWriter := call.inDialog.AudioWriterDTMF()
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PreWait))
for i, dtmfRune := range payloadDTMFResponse.Digits {
err := dtmfWriter.WriteDTMF(dtmfRune)
if err != nil {
return fmt.Errorf("sip.dtmf.server error output dtmf digit at index %d", i)
}
}
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PostWait))
return nil
}
payloadAudioFileResponse, ok := common.GetAnyAs[processor.SipAudioFileResponse](payload)
if ok {
audioFile, err := os.Open(payloadAudioFileResponse.AudioFile)
if err != nil {
return err
}
defer audioFile.Close()
playback, err := call.inDialog.PlaybackCreate()
if err != nil {
return err
}
time.Sleep(time.Millisecond * time.Duration(payloadAudioFileResponse.PreWait))
_, err = playback.Play(audioFile, "audio/wav")
time.Sleep(time.Millisecond * time.Duration(payloadAudioFileResponse.PostWait))
if err != nil {
return err
}
return nil
}
return errors.New("sip.dtmf.server can only output SipDTMFResponse or SipAudioFileResponse")
}
func (scs *SIPCallServer) Stop() {
if scs.cancel != nil {
defer scs.cancel()
}
scs.uaMu.Lock()
defer scs.uaMu.Unlock()
if scs.ua != nil {
scs.ua.Close()
}
}
-297
View File
@@ -1,297 +0,0 @@
package module
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"log/slog"
"os"
"strings"
"sync"
"time"
"github.com/emiago/diago"
"github.com/emiago/diago/media"
"github.com/emiago/sipgo"
"github.com/emiago/sipgo/sip"
"github.com/google/jsonschema-go/jsonschema"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
"github.com/jwetzell/showbridge-go/internal/processor"
)
func init() {
RegisterModule(ModuleRegistration{
Type: "sip.dtmf.server",
Title: "SIP DTMF Server",
ParamsSchema: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
"separator": {
Title: "DTMF Separator",
Type: "string",
MinLength: new(1),
MaxLength: new(1),
},
},
Required: []string{"separator"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
New: func(moduleConfig config.ModuleConfig) (common.Module, error) {
params := moduleConfig.Params
portNum, err := params.GetInt("port")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
portNum = 5060
} else {
return nil, fmt.Errorf("sip.dtmf.server port error: %w", err)
}
}
ipString, err := params.GetString("ip")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
ipString = "0.0.0.0"
} else {
return nil, fmt.Errorf("sip.dtmf.server ip error: %w", err)
}
}
transportString, err := params.GetString("transport")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
transportString = "udp"
} else {
return nil, fmt.Errorf("sip.dtmf.server transport error: %w", err)
}
}
userAgentString, err := params.GetString("userAgent")
if err != nil {
if errors.Is(err, config.ErrParamNotFound) {
userAgentString = "showbridge"
} else {
return nil, fmt.Errorf("sip.dtmf.server userAgent error: %w", err)
}
}
separatorString, err := params.GetString("separator")
if err != nil {
return nil, fmt.Errorf("sip.dtmf.server separator error: %w", err)
}
if len(separatorString) != 1 {
return nil, errors.New("sip.dtmf.server separator must be a single character")
}
if !strings.ContainsRune("0123456789*#ABCD", rune(separatorString[0])) {
return nil, errors.New("sip.dtmf.server separator must be a valid DTMF character")
}
return &SIPDTMFServer{config: moduleConfig, IP: ipString, Port: int(portNum), Transport: transportString, UserAgent: userAgentString, Separator: separatorString, logger: CreateLogger(moduleConfig)}, nil
},
})
}
type SIPDTMFServer struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
IP string
Port int
Transport string
UserAgent string
Separator string
logger *slog.Logger
cancel context.CancelFunc
ua *sipgo.UserAgent
uaMu sync.Mutex
}
type SIPDTMFMessage struct {
To string
Digits string
}
type SIPDTMFCall struct {
inDialog *diago.DialogServerSession
lock sync.Mutex
}
func (sds *SIPDTMFServer) Id() string {
return sds.config.Id
}
func (sds *SIPDTMFServer) Type() string {
return sds.config.Type
}
func (sds *SIPDTMFServer) Start(ctx context.Context, inputHandler common.InputHandler) error {
sds.logger.Debug("running")
sds.inputHandler = inputHandler
moduleContext, cancel := context.WithCancel(ctx)
sds.ctx = moduleContext
sds.cancel = cancel
diagoLogger := slog.New(slog.NewJSONHandler(io.Discard, nil))
ua, _ := sipgo.NewUA(
sipgo.WithUserAgent(sds.UserAgent),
sipgo.WithUserAgentTransportLayerOptions(sip.WithTransportLayerLogger(diagoLogger)),
sipgo.WithUserAgentTransactionLayerOptions(sip.WithTransactionLayerLogger(diagoLogger)),
)
sds.uaMu.Lock()
sds.ua = ua
sds.uaMu.Unlock()
sip.SetDefaultLogger(diagoLogger)
media.SetDefaultLogger(diagoLogger)
dg := diago.NewDiago(ua, diago.WithLogger(diagoLogger), diago.WithTransport(
diago.Transport{
Transport: sds.Transport,
BindHost: sds.IP,
BindPort: sds.Port,
},
))
err := dg.Serve(sds.ctx, func(inDialog *diago.DialogServerSession) {
sds.HandleCall(inDialog)
})
if err != nil {
return err
}
<-sds.ctx.Done()
sds.logger.Debug("done")
return nil
}
func (sds *SIPDTMFServer) HandleCall(inDialog *diago.DialogServerSession) error {
inDialog.Trying()
inDialog.Ringing()
inDialog.Answer()
reader := inDialog.AudioReaderDTMF()
userString := ""
return reader.Listen(func(dtmf rune) error {
if dtmf == rune(sds.Separator[0]) {
if sds.inputHandler != nil {
dialogContext := context.WithValue(sds.ctx, sipCallContextKey("call"), &SIPDTMFCall{
inDialog: inDialog,
})
sds.inputHandler(dialogContext, sds.Id(), SIPDTMFMessage{
To: inDialog.ToUser(),
Digits: userString,
})
}
userString = ""
} else {
userString += string(dtmf)
}
return nil
}, 5*time.Second)
}
func (sds *SIPDTMFServer) Output(ctx context.Context, payload any) error {
call, ok := ctx.Value(sipCallContextKey("call")).(*SIPDTMFCall)
if !ok {
return errors.New("sip.dtmf.server output must originate from sip.dtmf.server input")
}
gotLock := call.lock.TryLock()
if !gotLock {
return errors.New("sip.dtmf.server call is already locked")
}
if call.inDialog.LoadState() == sip.DialogStateEnded {
return errors.New("sip.dtmf.server inDialog already ended")
}
payloadDTMFResponse, ok := common.GetAnyAs[processor.SipDTMFResponse](payload)
if ok {
dtmfWriter := call.inDialog.AudioWriterDTMF()
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PreWait))
for i, dtmfRune := range payloadDTMFResponse.Digits {
err := dtmfWriter.WriteDTMF(dtmfRune)
if err != nil {
return fmt.Errorf("sip.dtmf.server error output dtmf digit at index %d", i)
}
}
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PostWait))
return nil
}
payloadAudioFileResponse, ok := common.GetAnyAs[processor.SipAudioFileResponse](payload)
if ok {
audioFile, err := os.Open(payloadAudioFileResponse.AudioFile)
if err != nil {
return err
}
defer audioFile.Close()
playback, err := call.inDialog.PlaybackCreate()
if err != nil {
return err
}
time.Sleep(time.Millisecond * time.Duration(payloadAudioFileResponse.PreWait))
_, err = playback.Play(audioFile, "audio/wav")
time.Sleep(time.Millisecond * time.Duration(payloadAudioFileResponse.PostWait))
if err != nil {
return err
}
return nil
}
return errors.New("sip.dtmf.server can only output SipDTMFResponse or SipAudioFileResponse")
}
func (sds *SIPDTMFServer) Stop() {
if sds.cancel != nil {
defer sds.cancel()
}
sds.uaMu.Lock()
defer sds.uaMu.Unlock()
if sds.ua != nil {
sds.ua.Close()
}
}
+32 -17
View File
@@ -23,19 +23,22 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"host": { "host": {
Title: "Host", Title: "Host",
Type: "string", Description: "the hostname or IP address of the TCP server to connect to",
Type: "string",
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port of the TCP server to connect to",
Minimum: jsonschema.Ptr[float64](1), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
}, },
"framing": { "framing": {
Title: "Framing Method", Title: "Framing Method",
Type: "string", Description: "the method used to frame messages over the TCP connection",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"}, Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
}, },
}, },
Required: []string{"host", "port", "framing"}, Required: []string{"host", "port", "framing"},
@@ -63,19 +66,22 @@ func init() {
return nil, fmt.Errorf("net.tcp.client framing error: %w", err) return nil, fmt.Errorf("net.tcp.client framing error: %w", err)
} }
framer := framer.GetFramer(framingMethodString) inFramer := framer.GetFramer(framingMethodString)
if framer == nil { if inFramer == nil {
return nil, fmt.Errorf("net.tcp.client unknown framing method: %s", framingMethodString) return nil, fmt.Errorf("net.tcp.client unknown framing method: %s", framingMethodString)
} }
return &TCPClient{framer: framer, Addr: addr, config: config, logger: CreateLogger(config)}, nil
outFramer := framer.GetFramer(framingMethodString)
return &TCPClient{inFramer: inFramer, outFramer: outFramer, Addr: addr, config: config, logger: CreateLogger(config)}, nil
}, },
}) })
} }
type TCPClient struct { type TCPClient struct {
config config.ModuleConfig config config.ModuleConfig
framer framer.Framer inFramer framer.Framer
outFramer framer.Framer
conn *net.TCPConn conn *net.TCPConn
ctx context.Context ctx context.Context
inputHandler common.InputHandler inputHandler common.InputHandler
@@ -120,7 +126,8 @@ CONNECT_RETRY:
byteCount, err := tc.conn.Read(buffer) byteCount, err := tc.conn.Read(buffer)
if err != nil { if err != nil {
if opErr, ok := err.(*net.OpError); ok { opErr, ok := err.(*net.OpError)
if ok {
//NOTE(jwetzell) we hit deadline //NOTE(jwetzell) we hit deadline
if opErr.Timeout() { if opErr.Timeout() {
continue continue
@@ -132,9 +139,9 @@ CONNECT_RETRY:
break READ break READ
} }
if tc.framer != nil { if tc.inFramer != nil {
if byteCount > 0 { if byteCount > 0 {
messages := tc.framer.Decode(buffer[0:byteCount]) messages := tc.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages { for _, message := range messages {
if tc.inputHandler != nil { if tc.inputHandler != nil {
tc.inputHandler(tc.ctx, tc.Id(), message) tc.inputHandler(tc.ctx, tc.Id(), message)
@@ -169,7 +176,7 @@ func (tc *TCPClient) Output(ctx context.Context, payload any) error {
if !ok { if !ok {
return errors.New("net.tcp.client is only able to output bytes") return errors.New("net.tcp.client is only able to output bytes")
} }
_, err := tc.conn.Write(tc.framer.Encode(payloadBytes)) _, err := tc.conn.Write(tc.inFramer.Encode(payloadBytes))
return err return err
} }
@@ -182,4 +189,12 @@ func (tc *TCPClient) Stop() {
if tc.conn != nil { if tc.conn != nil {
tc.conn.Close() tc.conn.Close()
} }
if tc.inFramer != nil {
tc.inFramer.Clear()
}
if tc.outFramer != nil {
tc.outFramer.Clear()
}
} }
+22 -18
View File
@@ -26,20 +26,23 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"ip": { "ip": {
Title: "IP", Title: "IP",
Type: "string", Description: "the IP address to bind the TCP server to",
Default: json.RawMessage(`"0.0.0.0"`), Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port for the TCP server to listen on",
Minimum: jsonschema.Ptr[float64](1024), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
}, },
"framing": { "framing": {
Title: "Framing Method", Title: "Framing Method",
Type: "string", Description: "the method used to frame messages over the TCP connection",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"}, Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
}, },
}, },
Required: []string{"port", "framing"}, Required: []string{"port", "framing"},
@@ -78,7 +81,7 @@ func init() {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &TCPServer{InFramer: inFramer, OutFramer: outFramer, framerType: framingMethodString, Addr: addr, config: moduleConfig, logger: CreateLogger(moduleConfig)}, nil return &TCPServer{inFramer: inFramer, outFramer: outFramer, framerType: framingMethodString, Addr: addr, config: moduleConfig, logger: CreateLogger(moduleConfig)}, nil
}, },
}) })
} }
@@ -91,8 +94,8 @@ type tcpConnection struct {
type TCPServer struct { type TCPServer struct {
config config.ModuleConfig config config.ModuleConfig
Addr *net.TCPAddr Addr *net.TCPAddr
InFramer framer.Framer inFramer framer.Framer
OutFramer framer.Framer outFramer framer.Framer
framerType string framerType string
ctx context.Context ctx context.Context
inputHandler common.InputHandler inputHandler common.InputHandler
@@ -138,7 +141,8 @@ func (ts *TCPServer) handleClient(client *net.TCPConn) {
client.SetDeadline(time.Now().Add(time.Millisecond * 200)) client.SetDeadline(time.Now().Add(time.Millisecond * 200))
byteCount, err := client.Read(buffer) byteCount, err := client.Read(buffer)
if err != nil { if err != nil {
if opErr, ok := err.(*net.OpError); ok { opErr, ok := err.(*net.OpError)
if ok {
//NOTE(jwetzell) we hit deadline //NOTE(jwetzell) we hit deadline
if opErr.Timeout() { if opErr.Timeout() {
continue continue
@@ -146,9 +150,9 @@ func (ts *TCPServer) handleClient(client *net.TCPConn) {
} }
break break
} }
if ts.InFramer != nil { if ts.inFramer != nil {
if byteCount > 0 { if byteCount > 0 {
messages := ts.InFramer.Decode(buffer[0:byteCount]) messages := ts.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages { for _, message := range messages {
if ts.inputHandler != nil { if ts.inputHandler != nil {
ts.inputHandler(ts.ctx, ts.Id(), message) ts.inputHandler(ts.ctx, ts.Id(), message)
@@ -216,11 +220,11 @@ func (ts *TCPServer) Output(ctx context.Context, payload any) error {
defer ts.connectionsMu.Unlock() defer ts.connectionsMu.Unlock()
var errorString strings.Builder var errorString strings.Builder
if ts.OutFramer == nil { if ts.outFramer == nil {
return errors.New("no output framer configured") return errors.New("no output framer configured")
} }
outputBytes := ts.OutFramer.Encode(payloadBytes) outputBytes := ts.outFramer.Encode(payloadBytes)
for _, connection := range ts.connections { for _, connection := range ts.connections {
_, err := connection.conn.Write(outputBytes) _, err := connection.conn.Write(outputBytes)
+6 -3
View File
@@ -11,7 +11,8 @@ import (
func TestModuleBadRegistrationNoType(t *testing.T) { func TestModuleBadRegistrationNoType(t *testing.T) {
defer func() { defer func() {
if r := recover(); r == nil { r := recover()
if r == nil {
t.Fatalf("module registration should have panicked but did not") t.Fatalf("module registration should have panicked but did not")
} }
}() }()
@@ -26,7 +27,8 @@ func TestModuleBadRegistrationNoType(t *testing.T) {
func TestModuleBadRegistrationNoNew(t *testing.T) { func TestModuleBadRegistrationNoNew(t *testing.T) {
defer func() { defer func() {
if r := recover(); r == nil { r := recover()
if r == nil {
t.Fatalf("processor registration should have panicked but did not") t.Fatalf("processor registration should have panicked but did not")
} }
}() }()
@@ -39,7 +41,8 @@ func TestModuleBadRegistrationNoNew(t *testing.T) {
func TestModuleBadRegistrationExistingType(t *testing.T) { func TestModuleBadRegistrationExistingType(t *testing.T) {
defer func() { defer func() {
if r := recover(); r == nil { r := recover()
if r == nil {
t.Fatalf("processor registration should have panicked but did not") t.Fatalf("processor registration should have panicked but did not")
} }
}() }()
@@ -1,102 +0,0 @@
package module_test
import (
"testing"
"github.com/jwetzell/showbridge-go/internal/config"
"github.com/jwetzell/showbridge-go/internal/module"
)
func TestSIPCallServerFromRegistry(t *testing.T) {
registration, ok := module.GetModuleRegistration("sip.call.server")
if !ok {
t.Fatalf("sip.call.server module not registered")
}
moduleInstance, err := registration.New(config.ModuleConfig{
Id: "test",
Type: "sip.call.server",
})
if err != nil {
t.Fatalf("failed to create sip.call.server module: %s", err)
}
if moduleInstance.Id() != "test" {
t.Fatalf("sip.call.server module has wrong id: %s", moduleInstance.Id())
}
if moduleInstance.Type() != "sip.call.server" {
t.Fatalf("sip.call.server module has wrong type: %s", moduleInstance.Type())
}
}
func TestBadSIPCallServer(t *testing.T) {
tests := []struct {
name string
params map[string]any
errorString string
}{
{
name: "non-number port param",
params: map[string]any{
"port": "8000",
},
errorString: "sip.call.server port error: not a number",
},
{
name: "non-string ip param",
params: map[string]any{
"ip": 123,
},
errorString: "sip.call.server ip error: not a string",
},
{
name: "non-string transport param",
params: map[string]any{
"transport": 123,
},
errorString: "sip.call.server transport error: not a string",
},
{
name: "non-string userAgent param",
params: map[string]any{
"userAgent": 123,
},
errorString: "sip.call.server userAgent error: not a string",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
registration, ok := module.GetModuleRegistration("sip.call.server")
if !ok {
t.Fatalf("sip.call.server module not registered")
}
moduleInstance, err := registration.New(config.ModuleConfig{
Id: "test",
Type: "sip.call.server",
Params: test.params,
})
if err != nil {
if test.errorString != err.Error() {
t.Fatalf("sip.call.server got error '%s', expected '%s'", err.Error(), test.errorString)
}
return
}
err = moduleInstance.Start(t.Context(), nil)
if err == nil {
t.Fatalf("sip.call.server expected to fail")
}
if err.Error() != test.errorString {
t.Fatalf("sip.call.server got error '%s', expected '%s'", err.Error(), test.errorString)
}
})
}
}
@@ -1,121 +0,0 @@
package module_test
import (
"testing"
"github.com/jwetzell/showbridge-go/internal/config"
"github.com/jwetzell/showbridge-go/internal/module"
)
func TestSIPDTMFServerFromRegistry(t *testing.T) {
registration, ok := module.GetModuleRegistration("sip.dtmf.server")
if !ok {
t.Fatalf("sip.dtmf.server module not registered")
}
moduleInstance, err := registration.New(config.ModuleConfig{
Id: "test",
Type: "sip.dtmf.server",
Params: map[string]any{
"separator": "#",
},
})
if err != nil {
t.Fatalf("failed to create sip.dtmf.server module: %s", err)
}
if moduleInstance.Id() != "test" {
t.Fatalf("sip.dtmf.server module has wrong id: %s", moduleInstance.Id())
}
if moduleInstance.Type() != "sip.dtmf.server" {
t.Fatalf("sip.dtmf.server module has wrong type: %s", moduleInstance.Type())
}
}
func TestBadSIPDTMFServer(t *testing.T) {
tests := []struct {
name string
params map[string]any
errorString string
}{
{
name: "no separator param",
params: map[string]any{},
errorString: "sip.dtmf.server separator error: not found",
},
{
name: "non-string separator param",
params: map[string]any{
"separator": 123,
},
errorString: "sip.dtmf.server separator error: not a string",
},
{
name: "non-number port param",
params: map[string]any{
"separator": "#",
"port": "8000",
},
errorString: "sip.dtmf.server port error: not a number",
},
{
name: "non-string ip param",
params: map[string]any{
"separator": "#",
"ip": 123,
},
errorString: "sip.dtmf.server ip error: not a string",
},
{
name: "non-string transport param",
params: map[string]any{
"separator": "#",
"transport": 123,
},
errorString: "sip.dtmf.server transport error: not a string",
},
{
name: "non-string userAgent param",
params: map[string]any{
"separator": "#",
"userAgent": 123,
},
errorString: "sip.dtmf.server userAgent error: not a string",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
registration, ok := module.GetModuleRegistration("sip.dtmf.server")
if !ok {
t.Fatalf("sip.dtmf.server module not registered")
}
moduleInstance, err := registration.New(config.ModuleConfig{
Id: "test",
Type: "sip.dtmf.server",
Params: test.params,
})
if err != nil {
if test.errorString != err.Error() {
t.Fatalf("sip.dtmf.server got error '%s', expected '%s'", err.Error(), test.errorString)
}
return
}
err = moduleInstance.Start(t.Context(), nil)
if err == nil {
t.Fatalf("sip.dtmf.server expected to fail")
}
if err.Error() != test.errorString {
t.Fatalf("sip.dtmf.server got error '%s', expected '%s'", err.Error(), test.errorString)
}
})
}
}
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"duration": { "duration": {
Title: "Duration", Title: "Duration",
Description: "time in milliseconds between emitted events",
Type: "integer", Type: "integer",
Description: "Interval duration in milliseconds",
}, },
}, },
Required: []string{"duration"}, Required: []string{"duration"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"duration": { "duration": {
Title: "Duration", Title: "Duration",
Description: "time in milliseconds before the timer fires",
Type: "integer", Type: "integer",
Description: "Interval duration in milliseconds",
}, },
}, },
Required: []string{"duration"}, Required: []string{"duration"},
+8 -6
View File
@@ -21,14 +21,16 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"host": { "host": {
Title: "Host", Title: "Host",
Type: "string", Description: "the hostname or IP address of the UDP server to connect to",
Type: "string",
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port of the UDP server to connect to",
Minimum: jsonschema.Ptr[float64](1), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
}, },
}, },
Required: []string{"host", "port"}, Required: []string{"host", "port"},
+10 -7
View File
@@ -22,14 +22,16 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"ip": { "ip": {
Title: "IP", Title: "IP",
Type: "string", Description: "the multicast address to listen on",
Type: "string",
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port to listen on",
Minimum: jsonschema.Ptr[float64](1024), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
}, },
}, },
Required: []string{"ip", "port"}, Required: []string{"ip", "port"},
@@ -102,7 +104,8 @@ func (um *UDPMulticast) Start(ctx context.Context, inputHandler common.InputHand
break break
} }
//NOTE(jwetzell) we hit deadline //NOTE(jwetzell) we hit deadline
if opErr, ok := err.(*net.OpError); ok && opErr.Timeout() { opErr, ok := err.(*net.OpError)
if ok && opErr.Timeout() {
continue continue
} }
return err return err
+17 -13
View File
@@ -23,22 +23,25 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"ip": { "ip": {
Title: "IP", Title: "IP",
Type: "string", Description: "the IP address to bind the UDP server to",
Default: json.RawMessage(`"0.0.0.0"`), Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
}, },
"port": { "port": {
Title: "Port", Title: "Port",
Type: "integer", Description: "the port for the UDP server to listen on",
Minimum: jsonschema.Ptr[float64](1024), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
}, },
"bufferSize": { "bufferSize": {
Title: "Buffer Size", Title: "Buffer Size",
Type: "integer", Description: "the size of the buffer for incoming UDP messages",
Minimum: jsonschema.Ptr[float64](1), Type: "integer",
Maximum: jsonschema.Ptr[float64](65535), Minimum: jsonschema.Ptr[float64](1),
Default: json.RawMessage("2048"), Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage("2048"),
}, },
}, },
Required: []string{"port"}, Required: []string{"port"},
@@ -120,7 +123,8 @@ func (us *UDPServer) Start(ctx context.Context, inputHandler common.InputHandler
numBytes, _, err := listener.ReadFromUDP(buffer) numBytes, _, err := listener.ReadFromUDP(buffer)
if err != nil { if err != nil {
//NOTE(jwetzell) we hit deadline //NOTE(jwetzell) we hit deadline
if opErr, ok := err.(*net.OpError); ok && opErr.Timeout() { opErr, ok := err.(*net.OpError)
if ok && opErr.Timeout() {
continue continue
} }
break break
+3 -2
View File
@@ -23,8 +23,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"url": { "url": {
Title: "URL", Title: "URL",
Type: "string", Description: "the URL of the WebSocket server to connect",
Type: "string",
}, },
}, },
Required: []string{"url"}, Required: []string{"url"},
@@ -44,6 +44,10 @@ func (apd *ArtNetPacketDecode) Process(ctx context.Context, wrappedPayload commo
return wrappedPayload, nil return wrappedPayload, nil
} }
func (apd *ArtNetPacketDecode) Id() string {
return apd.config.Id
}
func (apd *ArtNetPacketDecode) Type() string { func (apd *ArtNetPacketDecode) Type() string {
return apd.config.Type return apd.config.Type
} }
@@ -43,6 +43,10 @@ func (ape *ArtNetPacketEncode) Process(ctx context.Context, wrappedPayload commo
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ape *ArtNetPacketEncode) Id() string {
return ape.config.Id
}
func (ape *ArtNetPacketEncode) Type() string { func (ape *ArtNetPacketEncode) Type() string {
return ape.config.Type return ape.config.Type
} }
+6 -2
View File
@@ -22,13 +22,13 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"module": { "module": {
Title: "Module ID", Title: "Module ID",
Type: "string",
Description: "ID of the database module to query", Description: "ID of the database module to query",
Type: "string",
}, },
"query": { "query": {
Title: "Query", Title: "Query",
Type: "string",
Description: "SQL query to execute", Description: "SQL query to execute",
Type: "string",
}, },
}, },
Required: []string{"module", "query"}, Required: []string{"module", "query"},
@@ -143,6 +143,10 @@ func (dq *DbQuery) Process(ctx context.Context, wrappedPayload common.WrappedPay
return wrappedPayload, nil return wrappedPayload, nil
} }
func (dq *DbQuery) Id() string {
return dq.config.Id
}
func (dq *DbQuery) Type() string { func (dq *DbQuery) Type() string {
return dq.config.Type return dq.config.Type
} }
+4 -1
View File
@@ -33,7 +33,10 @@ func (dl *DebugLog) Process(ctx context.Context, wrappedPayload common.WrappedPa
return wrappedPayload, nil return wrappedPayload, nil
} }
func (dl *DebugLog) Id() string {
return dl.config.Id
}
func (dl *DebugLog) Type() string { func (dl *DebugLog) Type() string {
return dl.config.Type return dl.config.Type
} }
+4
View File
@@ -35,6 +35,10 @@ func (fc *FilterChange) Process(ctx context.Context, wrappedPayload common.Wrapp
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fc *FilterChange) Id() string {
return fc.config.Id
}
func (fc *FilterChange) Type() string { func (fc *FilterChange) Type() string {
return fc.config.Type return fc.config.Type
} }
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"expression": { "expression": {
Title: "Expression", Title: "Expression",
Type: "string", Description: "Expr expression to evaluate, must return a boolean",
Type: "string",
}, },
}, },
Required: []string{"expression"}, Required: []string{"expression"},
@@ -75,6 +76,10 @@ func (fe *FilterExpr) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fe *FilterExpr) Id() string {
return fe.config.Id
}
func (fe *FilterExpr) Type() string { func (fe *FilterExpr) Type() string {
return fe.config.Type return fe.config.Type
} }
+6 -2
View File
@@ -18,9 +18,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"rate": { "rate": {
Type: "integer",
Title: "Rate", Title: "Rate",
Description: "The number of events to allow per second.", Description: "number of events to allow per second",
Type: "integer",
}, },
}, },
Required: []string{"rate"}, Required: []string{"rate"},
@@ -53,6 +53,10 @@ func (fc *FilterRate) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fc *FilterRate) Id() string {
return fc.config.Id
}
func (fc *FilterRate) Type() string { func (fc *FilterRate) Type() string {
return fc.config.Type return fc.config.Type
} }
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"pattern": { "pattern": {
Title: "Pattern", Title: "Pattern",
Type: "string", Description: "regex pattern to match against",
Type: "string",
}, },
}, },
Required: []string{"pattern"}, Required: []string{"pattern"},
@@ -68,6 +69,10 @@ func (fr *FilterRegex) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fr *FilterRegex) Id() string {
return fr.config.Id
}
func (fr *FilterRegex) Type() string { func (fr *FilterRegex) Type() string {
return fr.config.Type return fr.config.Type
} }
+9 -4
View File
@@ -20,10 +20,11 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"bitSize": { "bitSize": {
Title: "Bit Size", Title: "Bit Size",
Type: "integer", Description: "bit size of the resulting float",
Enum: []any{32, 64}, Type: "integer",
Default: json.RawMessage("64"), Enum: []any{32, 64},
Default: json.RawMessage("64"),
}, },
}, },
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
@@ -67,6 +68,10 @@ func (fp *FloatParse) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fp *FloatParse) Id() string {
return fp.config.Id
}
func (fp *FloatParse) Type() string { func (fp *FloatParse) Type() string {
return fp.config.Type return fp.config.Type
} }
+15 -8
View File
@@ -20,18 +20,21 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"bitSize": { "bitSize": {
Title: "Bit Size", Title: "Bit Size",
Type: "integer", Description: "bit size of the resulting float",
Enum: []any{32, 64}, Type: "integer",
Default: json.RawMessage("32"), Enum: []any{32, 64},
Default: json.RawMessage("32"),
}, },
"min": { "min": {
Title: "Minimum", Title: "Minimum",
Type: "number", Description: "inclusive minimum value of the random float",
Type: "number",
}, },
"max": { "max": {
Title: "Maximum", Title: "Maximum",
Type: "number", Description: "exclusive maximum value of the random float",
Type: "number",
}, },
}, },
Required: []string{"min", "max"}, Required: []string{"min", "max"},
@@ -94,6 +97,10 @@ func (fr *FloatRandom) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, errors.New("float.random bitSize error: must be 32 or 64") return wrappedPayload, errors.New("float.random bitSize error: must be 32 or 64")
} }
func (fr *FloatRandom) Id() string {
return fr.config.Id
}
func (fr *FloatRandom) Type() string { func (fr *FloatRandom) Type() string {
return fr.config.Type return fr.config.Type
} }
+60 -47
View File
@@ -21,40 +21,49 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"id": { "id": {
Title: "Camera ID", Title: "Camera ID",
Type: "string", Description: "ID of the camera this FreeD position corresponds to",
Type: "string",
}, },
"pan": { "pan": {
Title: "Pan", Title: "Pan",
Type: "string", Description: "pan angle of the camera",
Type: "string",
}, },
"tilt": { "tilt": {
Title: "Tilt", Title: "Tilt",
Type: "string", Description: "tilt angle of the camera",
Type: "string",
}, },
"roll": { "roll": {
Title: "Roll", Title: "Roll",
Type: "string", Description: "roll angle of the camera",
Type: "string",
}, },
"posX": { "posX": {
Title: "Position X", Title: "Position X",
Type: "string", Description: "X coordinate of the camera's position",
Type: "string",
}, },
"posY": { "posY": {
Title: "Position Y", Title: "Position Y",
Type: "string", Description: "Y coordinate of the camera's position",
Type: "string",
}, },
"posZ": { "posZ": {
Title: "Position Z", Title: "Position Z",
Type: "string", Description: "Z coordinate of the camera's position",
Type: "string",
}, },
"zoom": { "zoom": {
Title: "Zoom", Title: "Zoom",
Type: "string", Description: "zoom level of the camera",
Type: "string",
}, },
"focus": { "focus": {
Title: "Focus", Title: "Focus",
Type: "string", Description: "focus level of the camera",
Type: "string",
}, },
}, },
Required: []string{ Required: []string{
@@ -173,32 +182,32 @@ func init() {
} }
return &FreeDCreate{ return &FreeDCreate{
config: config, config: config,
Id: idTemplate, IdTemplate: idTemplate,
Pan: panTemplate, PanTemplate: panTemplate,
Tilt: tiltTemplate, TiltTemplate: tiltTemplate,
Roll: rollTemplate, RollTemplate: rollTemplate,
PosX: posXTemplate, PosXTemplate: posXTemplate,
PosY: posYTemplate, PosYTemplate: posYTemplate,
PosZ: posZTemplate, PosZTemplate: posZTemplate,
Zoom: zoomTemplate, ZoomTemplate: zoomTemplate,
Focus: focusTemplate, FocusTemplate: focusTemplate,
}, nil }, nil
}, },
}) })
} }
type FreeDCreate struct { type FreeDCreate struct {
config config.ProcessorConfig config config.ProcessorConfig
Id *template.Template IdTemplate *template.Template
Pan *template.Template PanTemplate *template.Template
Tilt *template.Template TiltTemplate *template.Template
Roll *template.Template RollTemplate *template.Template
PosX *template.Template PosXTemplate *template.Template
PosY *template.Template PosYTemplate *template.Template
PosZ *template.Template PosZTemplate *template.Template
Zoom *template.Template ZoomTemplate *template.Template
Focus *template.Template FocusTemplate *template.Template
} }
func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) { func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
@@ -206,7 +215,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
templateData := wrappedPayload templateData := wrappedPayload
var idBuffer bytes.Buffer var idBuffer bytes.Buffer
err := fc.Id.Execute(&idBuffer, templateData) err := fc.IdTemplate.Execute(&idBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -223,7 +232,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var panBuffer bytes.Buffer var panBuffer bytes.Buffer
err = fc.Pan.Execute(&panBuffer, templateData) err = fc.PanTemplate.Execute(&panBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -240,7 +249,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var tiltBuffer bytes.Buffer var tiltBuffer bytes.Buffer
err = fc.Tilt.Execute(&tiltBuffer, templateData) err = fc.TiltTemplate.Execute(&tiltBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -257,7 +266,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var rollBuffer bytes.Buffer var rollBuffer bytes.Buffer
err = fc.Roll.Execute(&rollBuffer, templateData) err = fc.RollTemplate.Execute(&rollBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -274,7 +283,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var posXBuffer bytes.Buffer var posXBuffer bytes.Buffer
err = fc.PosX.Execute(&posXBuffer, templateData) err = fc.PosXTemplate.Execute(&posXBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -291,7 +300,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var posYBuffer bytes.Buffer var posYBuffer bytes.Buffer
err = fc.PosY.Execute(&posYBuffer, templateData) err = fc.PosYTemplate.Execute(&posYBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -308,7 +317,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var posZBuffer bytes.Buffer var posZBuffer bytes.Buffer
err = fc.PosZ.Execute(&posZBuffer, templateData) err = fc.PosZTemplate.Execute(&posZBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -325,7 +334,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var zoomBuffer bytes.Buffer var zoomBuffer bytes.Buffer
err = fc.Zoom.Execute(&zoomBuffer, templateData) err = fc.ZoomTemplate.Execute(&zoomBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -342,7 +351,7 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
} }
var focusBuffer bytes.Buffer var focusBuffer bytes.Buffer
err = fc.Focus.Execute(&focusBuffer, templateData) err = fc.FocusTemplate.Execute(&focusBuffer, templateData)
if err != nil { if err != nil {
wrappedPayload.End = true wrappedPayload.End = true
@@ -375,6 +384,10 @@ func (fc *FreeDCreate) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fc *FreeDCreate) Id() string {
return fc.config.Id
}
func (fc *FreeDCreate) Type() string { func (fc *FreeDCreate) Type() string {
return fc.config.Type return fc.config.Type
} }
+5 -1
View File
@@ -21,7 +21,7 @@ func init() {
type FreeDDecode struct { type FreeDDecode struct {
config config.ProcessorConfig config config.ProcessorConfig
buf [29]byte buf [29]byte
} }
func (fd *FreeDDecode) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) { func (fd *FreeDDecode) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
@@ -49,6 +49,10 @@ func (fd *FreeDDecode) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fd *FreeDDecode) Id() string {
return fd.config.Id
}
func (fd *FreeDDecode) Type() string { func (fd *FreeDDecode) Type() string {
return fd.config.Type return fd.config.Type
} }
+4
View File
@@ -38,6 +38,10 @@ func (fe *FreeDEncode) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (fe *FreeDEncode) Id() string {
return fe.config.Id
}
func (fe *FreeDEncode) Type() string { func (fe *FreeDEncode) Type() string {
return fe.config.Type return fe.config.Type
} }
+11 -5
View File
@@ -22,13 +22,15 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"method": { "method": {
Title: "HTTP Method", Title: "HTTP Method",
Type: "string", Description: "method to use for the HTTP request",
Enum: []any{"GET", "POST", "PUT", "PATCH", "DELETE"}, Type: "string",
Enum: []any{"GET", "POST", "PUT", "PATCH", "DELETE"},
}, },
"url": { "url": {
Title: "URL", Title: "URL",
Type: "string", Description: "URL to send the HTTP request to",
Type: "string",
}, },
}, },
Required: []string{"method", "url"}, Required: []string{"method", "url"},
@@ -112,6 +114,10 @@ func (hrd *HTTPRequestDo) Process(ctx context.Context, wrappedPayload common.Wra
return wrappedPayload, nil return wrappedPayload, nil
} }
func (hrd *HTTPRequestDo) Id() string {
return hrd.config.Id
}
func (hrd *HTTPRequestDo) Type() string { func (hrd *HTTPRequestDo) Type() string {
return hrd.config.Type return hrd.config.Type
} }
+10 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"status": { "status": {
Title: "Status Code", Title: "Status Code",
Type: "integer", Description: "status code to set on the response",
Type: "integer",
}, },
"bodyTemplate": { "bodyTemplate": {
Title: "Body Template", Title: "Body Template",
Type: "string", Description: "template for the response body",
Type: "string",
}, },
}, },
Required: []string{"status", "bodyTemplate"}, Required: []string{"status", "bodyTemplate"},
@@ -83,6 +85,10 @@ func (hrc *HTTPResponseCreate) Process(ctx context.Context, wrappedPayload commo
return wrappedPayload, nil return wrappedPayload, nil
} }
func (hrc *HTTPResponseCreate) Id() string {
return hrc.config.Id
}
func (hrc *HTTPResponseCreate) Type() string { func (hrc *HTTPResponseCreate) Type() string {
return hrc.config.Type return hrc.config.Type
} }
+14 -8
View File
@@ -20,16 +20,18 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"base": { "base": {
Title: "Base", Title: "Base",
Type: "integer", Description: "numerical base to use for parsing the integer",
Enum: []any{0, 2, 8, 10, 16}, Type: "integer",
Default: json.RawMessage("10"), Enum: []any{0, 2, 8, 10, 16},
Default: json.RawMessage("10"),
}, },
"bitSize": { "bitSize": {
Title: "Bit Size", Title: "Bit Size",
Type: "integer", Description: "bit size of the resulting integer",
Enum: []any{0, 8, 16, 32, 64}, Type: "integer",
Default: json.RawMessage("64"), Enum: []any{0, 8, 16, 32, 64},
Default: json.RawMessage("64"),
}, },
}, },
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
@@ -83,6 +85,10 @@ func (ip *IntParse) Process(ctx context.Context, wrappedPayload common.WrappedPa
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ip *IntParse) Id() string {
return ip.config.Id
}
func (ip *IntParse) Type() string { func (ip *IntParse) Type() string {
return ip.config.Type return ip.config.Type
} }
+10 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"min": { "min": {
Title: "Minimum", Title: "Minimum",
Type: "integer", Description: "inclusive minimum value of the random integer",
Type: "integer",
}, },
"max": { "max": {
Title: "Maximum", Title: "Maximum",
Type: "integer", Description: "inclusive maximum value of the random integer",
Type: "integer",
}, },
}, },
Required: []string{"min", "max"}, Required: []string{"min", "max"},
@@ -64,6 +66,10 @@ func (ir *IntRandom) Process(ctx context.Context, wrappedPayload common.WrappedP
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ir *IntRandom) Id() string {
return ir.config.Id
}
func (ir *IntRandom) Type() string { func (ir *IntRandom) Type() string {
return ir.config.Type return ir.config.Type
} }
+16 -8
View File
@@ -18,20 +18,24 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"inMin": { "inMin": {
Title: "Input Minimum", Title: "Input Minimum",
Type: "integer", Description: "minimum value of the input integer",
Type: "integer",
}, },
"inMax": { "inMax": {
Title: "Input Maximum", Title: "Input Maximum",
Type: "integer", Description: "maximum value of the input integer",
Type: "integer",
}, },
"outMin": { "outMin": {
Title: "Output Minimum", Title: "Output Minimum",
Type: "integer", Description: "minimum value of the output integer",
Type: "integer",
}, },
"outMax": { "outMax": {
Title: "Output Maximum", Title: "Output Maximum",
Type: "integer", Description: "maximum value of the output integer",
Type: "integer",
}, },
}, },
Required: []string{"inMin", "inMax", "outMin", "outMax"}, Required: []string{"inMin", "inMax", "outMin", "outMax"},
@@ -94,6 +98,10 @@ func (is *IntScale) Process(ctx context.Context, wrappedPayload common.WrappedPa
return wrappedPayload, nil return wrappedPayload, nil
} }
func (is *IntScale) Id() string {
return is.config.Id
}
func (is *IntScale) Type() string { func (is *IntScale) Type() string {
return is.config.Type return is.config.Type
} }
+4
View File
@@ -50,6 +50,10 @@ func (jd *JsonDecode) Process(ctx context.Context, wrappedPayload common.Wrapped
} }
func (jd *JsonDecode) Id() string {
return jd.config.Id
}
func (jd *JsonDecode) Type() string { func (jd *JsonDecode) Type() string {
return jd.config.Type return jd.config.Type
} }
+4
View File
@@ -42,6 +42,10 @@ func (je *JsonEncode) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (je *JsonEncode) Id() string {
return je.config.Id
}
func (je *JsonEncode) Type() string { func (je *JsonEncode) Type() string {
return je.config.Type return je.config.Type
} }
+10 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"module": { "module": {
Title: "Module ID", Title: "Module ID",
Type: "string", Description: "ID of the key-value module to get the value from",
Type: "string",
}, },
"key": { "key": {
Title: "Key", Title: "Key",
Type: "string", Description: "key to retrieve from the key-value module",
Type: "string",
}, },
}, },
Required: []string{"module", "key"}, Required: []string{"module", "key"},
@@ -87,6 +89,10 @@ func (kvg *KVGet) Process(ctx context.Context, wrappedPayload common.WrappedPayl
return wrappedPayload, nil return wrappedPayload, nil
} }
func (kvg *KVGet) Id() string {
return kvg.config.Id
}
func (kvg *KVGet) Type() string { func (kvg *KVGet) Type() string {
return kvg.config.Type return kvg.config.Type
} }
+10 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"module": { "module": {
Title: "Module ID", Title: "Module ID",
Type: "string", Description: "ID of the key-value module to set the value in",
Type: "string",
}, },
"key": { "key": {
Title: "Key", Title: "Key",
Type: "string", Description: "key to set in the key-value module",
Type: "string",
}, },
}, },
Required: []string{"module", "key"}, Required: []string{"module", "key"},
@@ -87,6 +89,10 @@ func (kvs *KVSet) Process(ctx context.Context, wrappedPayload common.WrappedPayl
return wrappedPayload, nil return wrappedPayload, nil
} }
func (kvs *KVSet) Id() string {
return kvs.config.Id
}
func (kvs *KVSet) Type() string { func (kvs *KVSet) Type() string {
return kvs.config.Type return kvs.config.Type
} }
@@ -23,16 +23,19 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"channel": { "channel": {
Title: "Channel", Title: "Channel",
Type: "string", Description: "channel number for the control change message",
Type: "string",
}, },
"control": { "control": {
Title: "Control", Title: "Control",
Type: "string", Description: "control number for the control change message",
Type: "string",
}, },
"value": { "value": {
Title: "Value", Title: "Value",
Type: "string", Description: "value for the control change message",
Type: "string",
}, },
}, },
Required: []string{"channel", "control", "value"}, Required: []string{"channel", "control", "value"},
@@ -144,6 +147,10 @@ func (mccc *MIDIControlChangeCreate) Process(ctx context.Context, wrappedPayload
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mccc *MIDIControlChangeCreate) Id() string {
return mccc.config.Id
}
func (mccc *MIDIControlChangeCreate) Type() string { func (mccc *MIDIControlChangeCreate) Type() string {
return mccc.config.Type return mccc.config.Type
} }
@@ -40,6 +40,10 @@ func (mmd *MIDIMessageDecode) Process(ctx context.Context, wrappedPayload common
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mmd *MIDIMessageDecode) Id() string {
return mmd.config.Id
}
func (mmd *MIDIMessageDecode) Type() string { func (mmd *MIDIMessageDecode) Type() string {
return mmd.config.Type return mmd.config.Type
} }
@@ -38,6 +38,10 @@ func (mme *MIDIMessageEncode) Process(ctx context.Context, wrappedPayload common
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mme *MIDIMessageEncode) Id() string {
return mme.config.Id
}
func (mme *MIDIMessageEncode) Type() string { func (mme *MIDIMessageEncode) Type() string {
return mme.config.Type return mme.config.Type
} }
@@ -96,6 +96,10 @@ func (mmu *MIDIMessageUnpack) Process(ctx context.Context, wrappedPayload common
} }
} }
func (mmu *MIDIMessageUnpack) Id() string {
return mmu.config.Id
}
func (mmu *MIDIMessageUnpack) Type() string { func (mmu *MIDIMessageUnpack) Type() string {
return mmu.config.Type return mmu.config.Type
} }
+13 -6
View File
@@ -23,16 +23,19 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"channel": { "channel": {
Title: "Channel", Title: "Channel",
Type: "string", Description: "channel number for the note off message",
Type: "string",
}, },
"note": { "note": {
Title: "Note", Title: "Note",
Type: "string", Description: "note number for the note off message",
Type: "string",
}, },
"velocity": { "velocity": {
Title: "Velocity", Title: "Velocity",
Type: "string", Description: "velocity for the note off message",
Type: "string",
}, },
}, },
Required: []string{"channel", "note", "velocity"}, Required: []string{"channel", "note", "velocity"},
@@ -143,6 +146,10 @@ func (mnoc *MIDINoteOffCreate) Process(ctx context.Context, wrappedPayload commo
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mnoc *MIDINoteOffCreate) Id() string {
return mnoc.config.Id
}
func (mnoc *MIDINoteOffCreate) Type() string { func (mnoc *MIDINoteOffCreate) Type() string {
return mnoc.config.Type return mnoc.config.Type
} }
+13 -6
View File
@@ -23,16 +23,19 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"channel": { "channel": {
Title: "Channel", Title: "Channel",
Type: "string", Description: "channel number for the note on message",
Type: "string",
}, },
"note": { "note": {
Title: "Note", Title: "Note",
Type: "string", Description: "note number for the note on message",
Type: "string",
}, },
"velocity": { "velocity": {
Title: "Velocity", Title: "Velocity",
Type: "string", Description: "velocity for the note on message",
Type: "string",
}, },
}, },
Required: []string{"channel", "note", "velocity"}, Required: []string{"channel", "note", "velocity"},
@@ -142,6 +145,10 @@ func (mnoc *MIDINoteOnCreate) Process(ctx context.Context, wrappedPayload common
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mnoc *MIDINoteOnCreate) Id() string {
return mnoc.config.Id
}
func (mnoc *MIDINoteOnCreate) Type() string { func (mnoc *MIDINoteOnCreate) Type() string {
return mnoc.config.Type return mnoc.config.Type
} }
@@ -23,12 +23,14 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"channel": { "channel": {
Title: "Channel", Title: "Channel",
Type: "string", Description: "channel number for the program change message",
Type: "string",
}, },
"program": { "program": {
Title: "Program", Title: "Program",
Type: "string", Description: "program number for the program change message",
Type: "string",
}, },
}, },
Required: []string{"type", "channel", "program"}, Required: []string{"type", "channel", "program"},
@@ -111,6 +113,10 @@ func (mpcc *MIDIProgramChangeCreate) Process(ctx context.Context, wrappedPayload
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mpcc *MIDIProgramChangeCreate) Id() string {
return mpcc.config.Id
}
func (mpcc *MIDIProgramChangeCreate) Type() string { func (mpcc *MIDIProgramChangeCreate) Type() string {
return mpcc.config.Type return mpcc.config.Type
} }
+5 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"module": { "module": {
Title: "Module ID", Title: "Module ID",
Type: "string",
Description: "ID of module to send output to", Description: "ID of module to send output to",
Type: "string",
}, },
}, },
Required: []string{"module"}, Required: []string{"module"},
@@ -81,6 +81,10 @@ func (mo *ModuleOutput) Process(ctx context.Context, wrappedPayload common.Wrapp
return wrappedPayload, nil return wrappedPayload, nil
} }
func (mo *ModuleOutput) Id() string {
return mo.config.Id
}
func (mo *ModuleOutput) Type() string { func (mo *ModuleOutput) Type() string {
return mo.config.Type return mo.config.Type
} }
+13 -6
View File
@@ -23,19 +23,22 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"address": { "address": {
Title: "Address", Title: "Address",
Type: "string", Description: "OSC address for the message",
Type: "string",
}, },
"args": { "args": {
Title: "Arguments", Title: "Arguments",
Type: "array", Description: "arguments for the OSC message",
Type: "array",
Items: &jsonschema.Schema{ Items: &jsonschema.Schema{
Type: "string", Type: "string",
}, },
}, },
"types": { "types": {
Title: "Argument Types", Title: "Argument Types",
Type: "string", Description: "string of OSC types corresponding to the arguments in args",
Type: "string",
}, },
}, },
Required: []string{"address"}, Required: []string{"address"},
@@ -154,6 +157,10 @@ func (omc *OSCMessageCreate) Process(ctx context.Context, wrappedPayload common.
return wrappedPayload, nil return wrappedPayload, nil
} }
func (omc *OSCMessageCreate) Id() string {
return omc.config.Id
}
func (omc *OSCMessageCreate) Type() string { func (omc *OSCMessageCreate) Type() string {
return omc.config.Type return omc.config.Type
} }
+4
View File
@@ -52,6 +52,10 @@ func (omd *OSCMessageDecode) Process(ctx context.Context, wrappedPayload common.
return wrappedPayload, nil return wrappedPayload, nil
} }
func (omd *OSCMessageDecode) Id() string {
return omd.config.Id
}
func (omd *OSCMessageDecode) Type() string { func (omd *OSCMessageDecode) Type() string {
return omd.config.Type return omd.config.Type
} }
+4
View File
@@ -42,6 +42,10 @@ func (ome *OSCMessageEncode) Process(ctx context.Context, wrappedPayload common.
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ome *OSCMessageEncode) Id() string {
return ome.config.Id
}
func (ome *OSCMessageEncode) Type() string { func (ome *OSCMessageEncode) Type() string {
return ome.config.Type return ome.config.Type
} }
+3 -1
View File
@@ -11,6 +11,7 @@ import (
) )
type Processor interface { type Processor interface {
Id() string
Type() string Type() string
Process(context.Context, common.WrappedPayload) (common.WrappedPayload, error) Process(context.Context, common.WrappedPayload) (common.WrappedPayload, error)
} }
@@ -35,7 +36,8 @@ func RegisterProcessor(processor ProcessorRegistration) {
processorRegistryMu.Lock() processorRegistryMu.Lock()
defer processorRegistryMu.Unlock() defer processorRegistryMu.Unlock()
if _, ok := processorRegistry[string(processor.Type)]; ok { _, exists := processorRegistry[string(processor.Type)]
if exists {
panic(fmt.Sprintf("processor already registered: %s", processor.Type)) panic(fmt.Sprintf("processor already registered: %s", processor.Type))
} }
processorRegistry[string(processor.Type)] = processor processorRegistry[string(processor.Type)] = processor
+6 -2
View File
@@ -22,13 +22,13 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"module": { "module": {
Title: "Module ID", Title: "Module ID",
Type: "string",
Description: "ID of the module to publish to", Description: "ID of the module to publish to",
Type: "string",
}, },
"topic": { "topic": {
Title: "Topic", Title: "Topic",
Description: "topic to publish to",
Type: "string", Type: "string",
Description: "Topic to publish to",
}, },
}, },
Required: []string{"module", "topic"}, Required: []string{"module", "topic"},
@@ -104,6 +104,10 @@ func (psp *PubSubPublish) Process(ctx context.Context, wrappedPayload common.Wra
return wrappedPayload, nil return wrappedPayload, nil
} }
func (psp *PubSubPublish) Id() string {
return psp.config.Id
}
func (psp *PubSubPublish) Type() string { func (psp *PubSubPublish) Type() string {
return psp.config.Type return psp.config.Type
} }
+5 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"source": { "source": {
Title: "Source", Title: "Source",
Type: "string",
Description: "source to report as to the router", Description: "source to report as to the router",
Type: "string",
}, },
}, },
Required: []string{"source"}, Required: []string{"source"},
@@ -68,6 +68,10 @@ func (ri *RouterInput) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ri *RouterInput) Id() string {
return ri.config.Id
}
func (ri *RouterInput) Type() string { func (ri *RouterInput) Type() string {
return ri.config.Type return ri.config.Type
} }
+7 -2
View File
@@ -25,8 +25,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"expression": { "expression": {
Title: "Expression", Title: "Expression",
Type: "string", Description: "Expr expression to evaluate",
Type: "string",
}, },
}, },
Required: []string{"expression"}, Required: []string{"expression"},
@@ -64,6 +65,10 @@ func (se *ScriptExpr) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (se *ScriptExpr) Id() string {
return se.config.Id
}
func (se *ScriptExpr) Type() string { func (se *ScriptExpr) Type() string {
return se.config.Type return se.config.Type
} }
+7 -2
View File
@@ -18,8 +18,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"program": { "program": {
Title: "Program", Title: "Program",
Type: "string", Description: "JavaScript program to run",
Type: "string",
}, },
}, },
Required: []string{"program"}, Required: []string{"program"},
@@ -134,6 +135,10 @@ func (sj *ScriptJS) Process(ctx context.Context, wrappedPayload common.WrappedPa
return wrappedPayload, nil return wrappedPayload, nil
} }
func (sj *ScriptJS) Id() string {
return sj.config.Id
}
func (sj *ScriptJS) Type() string { func (sj *ScriptJS) Type() string {
return sj.config.Type return sj.config.Type
} }
+15 -8
View File
@@ -20,18 +20,21 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"path": { "path": {
Title: "Path", Title: "Path",
Type: "string", Description: "path to the WASM plugin to load",
Type: "string",
}, },
"function": { "function": {
Title: "Function", Title: "Function",
Type: "string", Description: "exported function to call on the WASM plugin",
Default: json.RawMessage(`"process"`), Type: "string",
Default: json.RawMessage(`"process"`),
}, },
"enableWasi": { "enableWasi": {
Title: "Enable WASI", Title: "Enable WASI",
Type: "boolean", Description: "whether to enable WASI when running the WASM plugin",
Default: json.RawMessage("false"), Type: "boolean",
Default: json.RawMessage("false"),
}, },
}, },
Required: []string{"path"}, Required: []string{"path"},
@@ -117,6 +120,10 @@ func (sw *ScriptWASM) Process(ctx context.Context, wrappedPayload common.Wrapped
return wrappedPayload, nil return wrappedPayload, nil
} }
func (sw *ScriptWASM) Id() string {
return sw.config.Id
}
func (sw *ScriptWASM) Type() string { func (sw *ScriptWASM) Type() string {
return sw.config.Type return sw.config.Type
} }
@@ -1,101 +0,0 @@
package processor
import (
"bytes"
"context"
"fmt"
"text/template"
"github.com/google/jsonschema-go/jsonschema"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
)
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "sip.response.audio.create",
Title: "Create SIP Audio Response",
ParamsSchema: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"preWait": {
Title: "Pre Wait (ms)",
Type: "integer",
},
"postWait": {
Title: "Post Wait (ms)",
Type: "integer",
},
"audioFile": {
Type: "string",
},
},
Required: []string{"preWait", "postWait", "audioFile"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
New: func(config config.ProcessorConfig) (Processor, error) {
params := config.Params
preWaitNum, err := params.GetInt("preWait")
if err != nil {
return nil, fmt.Errorf("sip.response.audio.create preWait error: %w", err)
}
postWaitNum, err := params.GetInt("postWait")
if err != nil {
return nil, fmt.Errorf("sip.response.audio.create postWait error: %w", err)
}
audioFileString, err := params.GetString("audioFile")
if err != nil {
return nil, fmt.Errorf("sip.response.audio.create audioFile error: %w", err)
}
audioFileTemplate, err := template.New("audioFile").Parse(audioFileString)
if err != nil {
return nil, err
}
return &SipResponseAudioCreate{config: config, AudioFile: audioFileTemplate, PreWait: int(preWaitNum), PostWait: int(postWaitNum)}, nil
},
})
}
type SipResponseAudioCreate struct {
config config.ProcessorConfig
PreWait int
PostWait int
AudioFile *template.Template
}
type SipAudioFileResponse struct {
PreWait int
PostWait int
AudioFile string
}
func (srac *SipResponseAudioCreate) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
templateData := wrappedPayload
var audioFileBuffer bytes.Buffer
err := srac.AudioFile.Execute(&audioFileBuffer, templateData)
if err != nil {
wrappedPayload.End = true
return wrappedPayload, err
}
audioFileString := audioFileBuffer.String()
wrappedPayload.Payload = SipAudioFileResponse{
PreWait: srac.PreWait,
PostWait: srac.PostWait,
AudioFile: audioFileString,
}
return wrappedPayload, nil
}
func (srac *SipResponseAudioCreate) Type() string {
return srac.config.Type
}
@@ -1,111 +0,0 @@
package processor
import (
"bytes"
"context"
"errors"
"fmt"
"regexp"
"text/template"
"github.com/google/jsonschema-go/jsonschema"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
)
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "sip.response.dtmf.create",
Title: "Create SIP DTMF Response",
ParamsSchema: &jsonschema.Schema{
Type: "object",
Properties: map[string]*jsonschema.Schema{
"preWait": {
Title: "Pre Wait (ms)",
Type: "integer",
},
"postWait": {
Title: "Post Wait (ms)",
Type: "integer",
},
"digits": {
Type: "string",
},
},
Required: []string{"preWait", "postWait", "digits"},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
},
New: func(config config.ProcessorConfig) (Processor, error) {
params := config.Params
preWaitNum, err := params.GetInt("preWait")
if err != nil {
return nil, fmt.Errorf("sip.response.dtmf.create preWait error: %w", err)
}
postWaitNum, err := params.GetInt("postWait")
if err != nil {
return nil, fmt.Errorf("sip.response.dtmf.create postWait error: %w", err)
}
digitsString, err := params.GetString("digits")
if err != nil {
return nil, fmt.Errorf("sip.response.dtmf.create digits error: %w", err)
}
digitsTemplate, err := template.New("digits").Parse(digitsString)
if err != nil {
return nil, err
}
return &SipResponseDTMFCreate{config: config, Digits: digitsTemplate, PreWait: int(preWaitNum), PostWait: int(postWaitNum), validDTMF: validDTMFRegex}, nil
},
})
}
type SipResponseDTMFCreate struct {
config config.ProcessorConfig
PreWait int
PostWait int
Digits *template.Template
validDTMF *regexp.Regexp
}
type SipDTMFResponse struct {
PreWait int
PostWait int
Digits string
}
var validDTMFRegex = regexp.MustCompile(`^[0-9*#A-Da-d]+$`)
func (srdc *SipResponseDTMFCreate) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
templateData := wrappedPayload
var digitsBuffer bytes.Buffer
err := srdc.Digits.Execute(&digitsBuffer, templateData)
if err != nil {
wrappedPayload.End = true
return wrappedPayload, err
}
digitsString := digitsBuffer.String()
if !srdc.validDTMF.MatchString(digitsString) {
wrappedPayload.End = true
return wrappedPayload, errors.New("sip.response.dtmf.create result of digits template contains invalid characters")
}
wrappedPayload.Payload = SipDTMFResponse{
PreWait: srdc.PreWait,
PostWait: srdc.PostWait,
Digits: digitsString,
}
return wrappedPayload, nil
}
func (srdc *SipResponseDTMFCreate) Type() string {
return srdc.config.Type
}
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"template": { "template": {
Title: "Template", Title: "Template",
Type: "string", Description: "template to evaluate",
Type: "string",
}, },
}, },
Required: []string{"template"}, Required: []string{"template"},
@@ -64,6 +65,10 @@ func (sc *StringCreate) Process(ctx context.Context, wrappedPayload common.Wrapp
return wrappedPayload, nil return wrappedPayload, nil
} }
func (sc *StringCreate) Id() string {
return sc.config.Id
}
func (sc *StringCreate) Type() string { func (sc *StringCreate) Type() string {
return sc.config.Type return sc.config.Type
} }
+4
View File
@@ -37,6 +37,10 @@ func (sd *StringDecode) Process(ctx context.Context, wrappedPayload common.Wrapp
return wrappedPayload, nil return wrappedPayload, nil
} }
func (sd *StringDecode) Id() string {
return sd.config.Id
}
func (sd *StringDecode) Type() string { func (sd *StringDecode) Type() string {
return sd.config.Type return sd.config.Type
} }
+4
View File
@@ -36,6 +36,10 @@ func (se *StringEncode) Process(ctx context.Context, wrappedPayload common.Wrapp
return wrappedPayload, nil return wrappedPayload, nil
} }
func (se *StringEncode) Id() string {
return se.config.Id
}
func (se *StringEncode) Type() string { func (se *StringEncode) Type() string {
return se.config.Type return se.config.Type
} }
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"separator": { "separator": {
Title: "Separator", Title: "Separator",
Type: "string", Description: "separator to split the string on",
Type: "string",
}, },
}, },
Required: []string{"separator"}, Required: []string{"separator"},
@@ -58,6 +59,10 @@ func (ss *StringSplit) Process(ctx context.Context, wrappedPayload common.Wrappe
return wrappedPayload, nil return wrappedPayload, nil
} }
func (ss *StringSplit) Id() string {
return ss.config.Id
}
func (ss *StringSplit) Type() string { func (ss *StringSplit) Type() string {
return ss.config.Type return ss.config.Type
} }
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"name": { "name": {
Title: "Field Name", Title: "Field Name",
Type: "string", Description: "name of the struct field to extract",
Type: "string",
}, },
}, },
Required: []string{"name"}, Required: []string{"name"},
@@ -66,6 +67,10 @@ func (sfg *StructFieldGet) Process(ctx context.Context, wrappedPayload common.Wr
return wrappedPayload, nil return wrappedPayload, nil
} }
func (sfg *StructFieldGet) Id() string {
return sfg.config.Id
}
func (sfg *StructFieldGet) Type() string { func (sfg *StructFieldGet) Type() string {
return sfg.config.Type return sfg.config.Type
} }
+7 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object", Type: "object",
Properties: map[string]*jsonschema.Schema{ Properties: map[string]*jsonschema.Schema{
"name": { "name": {
Title: "Method Name", Title: "Method Name",
Type: "string", Description: "name of the struct method to extract and call (with no arguments)",
Type: "string",
}, },
}, },
Required: []string{"name"}, Required: []string{"name"},
@@ -85,6 +86,10 @@ func (smg *StructMethodGet) Process(ctx context.Context, wrappedPayload common.W
return wrappedPayload, nil return wrappedPayload, nil
} }
func (smg *StructMethodGet) Id() string {
return smg.config.Id
}
func (smg *StructMethodGet) Type() string { func (smg *StructMethodGet) Type() string {
return smg.config.Type return smg.config.Type
} }
@@ -17,6 +17,7 @@ func TestArtnetPacketDecodeFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "artnet.packet.decode", Type: "artnet.packet.decode",
}) })
@@ -24,6 +25,10 @@ func TestArtnetPacketDecodeFromRegistry(t *testing.T) {
t.Fatalf("failed to create artnet.packet.decode processor: %s", err) t.Fatalf("failed to create artnet.packet.decode processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("artnet.packet.decode processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "artnet.packet.decode" { if processorInstance.Type() != "artnet.packet.decode" {
t.Fatalf("artnet.packet.decode processor has wrong type: %s", processorInstance.Type()) t.Fatalf("artnet.packet.decode processor has wrong type: %s", processorInstance.Type())
} }
@@ -17,6 +17,7 @@ func TestArtnetPacketEncodeFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "artnet.packet.encode", Type: "artnet.packet.encode",
}) })
@@ -24,6 +25,10 @@ func TestArtnetPacketEncodeFromRegistry(t *testing.T) {
t.Fatalf("failed to create artnet.packet.encode processor: %s", err) t.Fatalf("failed to create artnet.packet.encode processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("artnet.packet.encode processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "artnet.packet.encode" { if processorInstance.Type() != "artnet.packet.encode" {
t.Fatalf("artnet.packet.encode processor has wrong type: %s", processorInstance.Type()) t.Fatalf("artnet.packet.encode processor has wrong type: %s", processorInstance.Type())
} }
+5
View File
@@ -18,6 +18,7 @@ func TestDbQueryFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "db.query", Type: "db.query",
Params: map[string]any{ Params: map[string]any{
"module": "test", "module": "test",
@@ -28,6 +29,10 @@ func TestDbQueryFromRegistry(t *testing.T) {
t.Fatalf("failed to create db.query processor: %s", err) t.Fatalf("failed to create db.query processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("db.query processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "db.query" { if processorInstance.Type() != "db.query" {
t.Fatalf("db.query processor has wrong type: %s", processorInstance.Type()) t.Fatalf("db.query processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestDebugLogFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "debug.log", Type: "debug.log",
}) })
@@ -23,6 +24,10 @@ func TestDebugLogFromRegistry(t *testing.T) {
t.Fatalf("failed to create debug.log processor: %s", err) t.Fatalf("failed to create debug.log processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("debug.log processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "debug.log" { if processorInstance.Type() != "debug.log" {
t.Fatalf("debug.log processor has wrong type: %s", processorInstance.Type()) t.Fatalf("debug.log processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,12 +16,17 @@ func TestFilterChangeFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "filter.change", Type: "filter.change",
}) })
if err != nil { if err != nil {
t.Fatalf("failed to create filter.change processor: %s", err) t.Fatalf("failed to create filter.change processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("filter.change processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "filter.change" { if processorInstance.Type() != "filter.change" {
t.Fatalf("filter.change processor has wrong type: %s", processorInstance.Type()) t.Fatalf("filter.change processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestFilterExprFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "filter.expr", Type: "filter.expr",
Params: map[string]any{ Params: map[string]any{
"expression": "foo + bar", "expression": "foo + bar",
@@ -25,6 +26,10 @@ func TestFilterExprFromRegistry(t *testing.T) {
t.Fatalf("failed to create filter.expr processor: %s", err) t.Fatalf("failed to create filter.expr processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("filter.expr processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "filter.expr" { if processorInstance.Type() != "filter.expr" {
t.Fatalf("filter.expr processor has wrong type: %s", processorInstance.Type()) t.Fatalf("filter.expr processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestFilterRateFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "filter.rate", Type: "filter.rate",
Params: map[string]any{ Params: map[string]any{
"rate": 1, "rate": 1,
@@ -25,6 +26,10 @@ func TestFilterRateFromRegistry(t *testing.T) {
t.Fatalf("failed to create filter.rate processor: %s", err) t.Fatalf("failed to create filter.rate processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("filter.rate processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "filter.rate" { if processorInstance.Type() != "filter.rate" {
t.Fatalf("filter.rate processor has wrong type: %s", processorInstance.Type()) t.Fatalf("filter.rate processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestFilterRegexFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "filter.regex", Type: "filter.regex",
Params: map[string]any{ Params: map[string]any{
"pattern": "hello", "pattern": "hello",
@@ -25,6 +26,10 @@ func TestFilterRegexFromRegistry(t *testing.T) {
t.Fatalf("failed to create filter.regex processor: %s", err) t.Fatalf("failed to create filter.regex processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("filter.regex processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "filter.regex" { if processorInstance.Type() != "filter.regex" {
t.Fatalf("filter.regex processor has wrong type: %s", processorInstance.Type()) t.Fatalf("filter.regex processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestFloatParseFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "float.parse", Type: "float.parse",
}) })
@@ -23,6 +24,9 @@ func TestFloatParseFromRegistry(t *testing.T) {
t.Fatalf("failed to create float.parse processor: %s", err) t.Fatalf("failed to create float.parse processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("float.parse processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "float.parse" { if processorInstance.Type() != "float.parse" {
t.Fatalf("float.parse processor has wrong type: %s", processorInstance.Type()) t.Fatalf("float.parse processor has wrong type: %s", processorInstance.Type())
} }
@@ -15,6 +15,7 @@ func TestFloatRandomFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "float.random", Type: "float.random",
Params: map[string]any{ Params: map[string]any{
"min": 1.0, "min": 1.0,
@@ -26,6 +27,10 @@ func TestFloatRandomFromRegistry(t *testing.T) {
t.Fatalf("failed to create float.random processor: %s", err) t.Fatalf("failed to create float.random processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("float.random processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "float.random" { if processorInstance.Type() != "float.random" {
t.Fatalf("float.random processor has wrong type: %s", processorInstance.Type()) t.Fatalf("float.random processor has wrong type: %s", processorInstance.Type())
} }
@@ -17,6 +17,7 @@ func TestFreeDCreateFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "freed.create", Type: "freed.create",
Params: map[string]any{ Params: map[string]any{
"id": "0", "id": "0",
@@ -35,6 +36,10 @@ func TestFreeDCreateFromRegistry(t *testing.T) {
t.Fatalf("failed to create freed.create processor: %s", err) t.Fatalf("failed to create freed.create processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("freed.create processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "freed.create" { if processorInstance.Type() != "freed.create" {
t.Fatalf("freed.create processor has wrong type: %s", processorInstance.Type()) t.Fatalf("freed.create processor has wrong type: %s", processorInstance.Type())
} }
@@ -17,6 +17,7 @@ func TestFreeDDecodeFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "freed.decode", Type: "freed.decode",
}) })
@@ -24,6 +25,10 @@ func TestFreeDDecodeFromRegistry(t *testing.T) {
t.Fatalf("failed to create freed.decode processor: %s", err) t.Fatalf("failed to create freed.decode processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("freed.decode processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "freed.decode" { if processorInstance.Type() != "freed.decode" {
t.Fatalf("freed.decode processor has wrong type: %s", processorInstance.Type()) t.Fatalf("freed.decode processor has wrong type: %s", processorInstance.Type())
} }
@@ -17,6 +17,7 @@ func TestFreeDEncodeFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "freed.encode", Type: "freed.encode",
}) })
@@ -24,6 +25,10 @@ func TestFreeDEncodeFromRegistry(t *testing.T) {
t.Fatalf("failed to create freed.encode processor: %s", err) t.Fatalf("failed to create freed.encode processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("freed.encode processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "freed.encode" { if processorInstance.Type() != "freed.encode" {
t.Fatalf("freed.encode processor has wrong type: %s", processorInstance.Type()) t.Fatalf("freed.encode processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestHTTPRequestCreateFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "http.request.do", Type: "http.request.do",
Params: map[string]any{ Params: map[string]any{
"method": "GET", "method": "GET",
@@ -27,6 +28,10 @@ func TestHTTPRequestCreateFromRegistry(t *testing.T) {
t.Fatalf("failed to create http.request.do processor: %s", err) t.Fatalf("failed to create http.request.do processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("http.request.do processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "http.request.do" { if processorInstance.Type() != "http.request.do" {
t.Fatalf("http.request.do processor has wrong type: %s", processorInstance.Type()) t.Fatalf("http.request.do processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestHTTPResponseCreateFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "http.response.create", Type: "http.response.create",
Params: map[string]any{ Params: map[string]any{
"status": 200, "status": 200,
@@ -27,6 +28,10 @@ func TestHTTPResponseCreateFromRegistry(t *testing.T) {
t.Fatalf("failed to create http.response.create processor: %s", err) t.Fatalf("failed to create http.response.create processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("http.response.create processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "http.response.create" { if processorInstance.Type() != "http.response.create" {
t.Fatalf("http.response.create processor has wrong type: %s", processorInstance.Type()) t.Fatalf("http.response.create processor has wrong type: %s", processorInstance.Type())
} }
@@ -16,6 +16,7 @@ func TestIntParseFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "int.parse", Type: "int.parse",
}) })
@@ -23,6 +24,10 @@ func TestIntParseFromRegistry(t *testing.T) {
t.Fatalf("failed to create int.parse processor: %s", err) t.Fatalf("failed to create int.parse processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("int.parse processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "int.parse" { if processorInstance.Type() != "int.parse" {
t.Fatalf("int.parse processor has wrong type: %s", processorInstance.Type()) t.Fatalf("int.parse processor has wrong type: %s", processorInstance.Type())
} }
@@ -15,6 +15,7 @@ func TestIntRandomFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "int.random", Type: "int.random",
Params: map[string]any{ Params: map[string]any{
"min": 1, "min": 1,
@@ -26,6 +27,10 @@ func TestIntRandomFromRegistry(t *testing.T) {
t.Fatalf("failed to create int.random processor: %s", err) t.Fatalf("failed to create int.random processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("int.random processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "int.random" { if processorInstance.Type() != "int.random" {
t.Fatalf("int.random processor has wrong type: %s", processorInstance.Type()) t.Fatalf("int.random processor has wrong type: %s", processorInstance.Type())
} }
@@ -15,6 +15,7 @@ func TestIntScaleFromRegistry(t *testing.T) {
} }
processorInstance, err := registration.New(config.ProcessorConfig{ processorInstance, err := registration.New(config.ProcessorConfig{
Id: "test-id",
Type: "int.scale", Type: "int.scale",
Params: map[string]any{ Params: map[string]any{
"inMin": 0, "inMin": 0,
@@ -28,6 +29,10 @@ func TestIntScaleFromRegistry(t *testing.T) {
t.Fatalf("failed to create int.scale processor: %s", err) t.Fatalf("failed to create int.scale processor: %s", err)
} }
if processorInstance.Id() != "test-id" {
t.Fatalf("int.scale processor has wrong id: %s", processorInstance.Id())
}
if processorInstance.Type() != "int.scale" { if processorInstance.Type() != "int.scale" {
t.Fatalf("int.scale processor has wrong type: %s", processorInstance.Type()) t.Fatalf("int.scale processor has wrong type: %s", processorInstance.Type())
} }

Some files were not shown because too many files have changed in this diff Show More