From e051191e67e98a72e6155c9e28a298d006cd4eec Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Sat, 22 Aug 2026 10:51:32 -0400 Subject: [PATCH] feat(client): establish independent Rust distribution Signed-off-by: Yordis Prieto --- .github/release.yml | 23 - .github/workflows/build-docs.yml | 14 - .../workflows/cherry-pick-pr-for-label.yml | 14 - .github/workflows/ci.yml | 62 + .github/workflows/deploy.yml | 44 - .github/workflows/docker-repo.yml | 58 - .github/workflows/integration.yml | 125 + .github/workflows/publish-macros.yml | 27 - .github/workflows/release-please.yml | 24 + .github/workflows/rust.yml | 79 - .github/workflows/semconv.yml | 74 + .github/workflows/test-dispatch.yml | 23 - .github/workflows/tests.yml | 175 - .gitignore | 7 +- .release-please-manifest.json | 5 + Cargo.lock | 3264 +++++++++++++++++ Cargo.toml | 6 +- LICENSE | 197 +- LICENSES/MIT.txt | 21 + README.md | 34 +- configure-tls-for-tests.yml | 4 +- configure-user-certs-for-tests.yml | 4 +- docs/api/appending-events.md | 4 +- docs/api/delete-stream.md | 2 +- docs/api/reading-events.md | 2 +- examples/Cargo.toml | 2 +- examples/appending_events.rs | 6 +- examples/persistent_subscriptions.rs | 40 +- examples/quickstart.rs | 6 +- examples/reading_events.rs | 6 +- examples/server_side_filtering.rs | 6 +- examples/subscribing_to_stream.rs | 6 +- examples/user_certificates.rs | 2 +- kurrentdb-extras/README.md | 6 - kurrentdb-macros/Cargo.toml | 18 - release-please-config.json | 56 + .../Cargo.toml | 14 +- trogon-eventstore-extras/LICENSE | 176 + trogon-eventstore-extras/LICENSES/MIT.txt | 21 + trogon-eventstore-extras/README.md | 6 + .../src/lib.rs | 0 .../src/stats.rs | 144 +- trogon-eventstore-macros/Cargo.toml | 20 + trogon-eventstore-macros/LICENSE | 176 + trogon-eventstore-macros/LICENSES/MIT.txt | 21 + .../src/lib.rs | 0 {kurrentdb => trogon-eventstore}/Cargo.toml | 21 +- trogon-eventstore/LICENSE | 176 + trogon-eventstore/LICENSES/MIT.txt | 21 + {kurrentdb => trogon-eventstore}/codegen.rs | 0 .../protos/code.proto | 0 .../protos/gossip.proto | 0 .../protos/monitoring.proto | 0 .../protos/operations.proto | 0 .../protos/persistent.proto | 0 .../protos/projections.proto | 0 .../protos/serverfeatures.proto | 0 .../protos/shared.proto | 0 .../protos/status.proto | 0 .../protos/streams.proto | 0 .../protos/users.proto | 0 {kurrentdb => trogon-eventstore}/src/batch.rs | 0 .../src/client.rs | 0 .../src/commands.rs | 0 .../src/event_store/client.rs | 0 .../src/event_store/generated.rs | 0 .../src/event_store/generated/common.rs | 0 .../event_store/generated/google.protobuf.rs | 0 .../src/event_store/generated/google_rpc.rs | 0 .../src/event_store/generated/gossip.rs | 0 .../src/event_store/generated/monitoring.rs | 0 .../src/event_store/generated/operations.rs | 0 .../src/event_store/generated/persistent.rs | 0 .../src/event_store/generated/projections.rs | 0 .../event_store/generated/server_features.rs | 0 .../src/event_store/generated/streams.rs | 0 .../src/event_store/generated/users.rs | 0 .../src/event_store/mod.rs | 0 {kurrentdb => trogon-eventstore}/src/grpc.rs | 0 .../src/http/mod.rs | 0 .../src/http/persistent_subscriptions.rs | 0 {kurrentdb => trogon-eventstore}/src/lib.rs | 4 +- .../src/operations/gossip.rs | 1 + .../src/operations/mod.rs | 2 +- .../src/options/append_to_stream.rs | 2 +- .../src/options/batch_append.rs | 2 +- .../src/options/delete_stream.rs | 2 +- .../src/options/mod.rs | 0 .../src/options/persistent_subscription.rs | 2 +- .../src/options/projections.rs | 2 +- .../src/options/read_all.rs | 2 +- .../src/options/read_stream.rs | 2 +- .../src/options/retry.rs | 0 .../src/options/subscribe_to_all.rs | 2 +- .../src/options/subscribe_to_stream.rs | 2 +- .../src/options/tombstone_stream.rs | 2 +- .../src/private.rs | 0 .../src/projection_client.rs | 0 .../src/request.rs | 0 .../src/server_features.rs | 1 + {kurrentdb => trogon-eventstore}/src/types.rs | 0 .../tests/api/mod.rs | 0 .../tests/api/operations.rs | 38 +- .../tests/api/persistent_subscriptions.rs | 148 +- .../tests/api/projections.rs | 2 +- .../tests/api/streams.rs | 101 +- .../tests/common.rs | 2 +- .../fixtures/connection_string/mockups.toml | 0 .../tests/fixtures/projection-updated.js | 0 .../tests/fixtures/projection.js | 0 .../tests/images.rs | 0 .../tests/integration.rs | 29 +- .../tests/misc/mod.rs | 0 .../tests/misc/root_certificates.rs | 4 +- .../tests/plugins/mod.rs | 0 .../tests/plugins/user_certificates.rs | 2 +- 116 files changed, 4775 insertions(+), 821 deletions(-) delete mode 100644 .github/release.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/cherry-pick-pr-for-label.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/docker-repo.yml create mode 100644 .github/workflows/integration.yml delete mode 100644 .github/workflows/publish-macros.yml create mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/rust.yml create mode 100644 .github/workflows/semconv.yml delete mode 100644 .github/workflows/test-dispatch.yml delete mode 100644 .github/workflows/tests.yml mode change 100755 => 100644 .gitignore create mode 100644 .release-please-manifest.json create mode 100644 Cargo.lock mode change 100755 => 100644 LICENSE create mode 100644 LICENSES/MIT.txt mode change 100755 => 100644 README.md delete mode 100644 kurrentdb-extras/README.md delete mode 100644 kurrentdb-macros/Cargo.toml create mode 100644 release-please-config.json rename {kurrentdb-extras => trogon-eventstore-extras}/Cargo.toml (52%) create mode 100644 trogon-eventstore-extras/LICENSE create mode 100644 trogon-eventstore-extras/LICENSES/MIT.txt create mode 100644 trogon-eventstore-extras/README.md rename {kurrentdb-extras => trogon-eventstore-extras}/src/lib.rs (100%) rename {kurrentdb-extras => trogon-eventstore-extras}/src/stats.rs (85%) create mode 100644 trogon-eventstore-macros/Cargo.toml create mode 100644 trogon-eventstore-macros/LICENSE create mode 100644 trogon-eventstore-macros/LICENSES/MIT.txt rename {kurrentdb-macros => trogon-eventstore-macros}/src/lib.rs (100%) rename {kurrentdb => trogon-eventstore}/Cargo.toml (81%) create mode 100644 trogon-eventstore/LICENSE create mode 100644 trogon-eventstore/LICENSES/MIT.txt rename {kurrentdb => trogon-eventstore}/codegen.rs (100%) rename {kurrentdb => trogon-eventstore}/protos/code.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/gossip.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/monitoring.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/operations.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/persistent.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/projections.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/serverfeatures.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/shared.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/status.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/streams.proto (100%) rename {kurrentdb => trogon-eventstore}/protos/users.proto (100%) rename {kurrentdb => trogon-eventstore}/src/batch.rs (100%) rename {kurrentdb => trogon-eventstore}/src/client.rs (100%) rename {kurrentdb => trogon-eventstore}/src/commands.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/client.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/common.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/google.protobuf.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/google_rpc.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/gossip.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/monitoring.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/operations.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/persistent.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/projections.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/server_features.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/streams.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/generated/users.rs (100%) rename {kurrentdb => trogon-eventstore}/src/event_store/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/src/grpc.rs (100%) rename {kurrentdb => trogon-eventstore}/src/http/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/src/http/persistent_subscriptions.rs (100%) rename {kurrentdb => trogon-eventstore}/src/lib.rs (96%) rename {kurrentdb => trogon-eventstore}/src/operations/gossip.rs (99%) rename {kurrentdb => trogon-eventstore}/src/operations/mod.rs (99%) rename {kurrentdb => trogon-eventstore}/src/options/append_to_stream.rs (97%) rename {kurrentdb => trogon-eventstore}/src/options/batch_append.rs (65%) rename {kurrentdb => trogon-eventstore}/src/options/delete_stream.rs (94%) rename {kurrentdb => trogon-eventstore}/src/options/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/src/options/persistent_subscription.rs (99%) rename {kurrentdb => trogon-eventstore}/src/options/projections.rs (98%) rename {kurrentdb => trogon-eventstore}/src/options/read_all.rs (97%) rename {kurrentdb => trogon-eventstore}/src/options/read_stream.rs (97%) rename {kurrentdb => trogon-eventstore}/src/options/retry.rs (100%) rename {kurrentdb => trogon-eventstore}/src/options/subscribe_to_all.rs (97%) rename {kurrentdb => trogon-eventstore}/src/options/subscribe_to_stream.rs (97%) rename {kurrentdb => trogon-eventstore}/src/options/tombstone_stream.rs (94%) rename {kurrentdb => trogon-eventstore}/src/private.rs (100%) rename {kurrentdb => trogon-eventstore}/src/projection_client.rs (100%) rename {kurrentdb => trogon-eventstore}/src/request.rs (100%) rename {kurrentdb => trogon-eventstore}/src/server_features.rs (99%) rename {kurrentdb => trogon-eventstore}/src/types.rs (100%) rename {kurrentdb => trogon-eventstore}/tests/api/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/tests/api/operations.rs (87%) rename {kurrentdb => trogon-eventstore}/tests/api/persistent_subscriptions.rs (84%) rename {kurrentdb => trogon-eventstore}/tests/api/projections.rs (99%) rename {kurrentdb => trogon-eventstore}/tests/api/streams.rs (85%) rename {kurrentdb => trogon-eventstore}/tests/common.rs (93%) rename {kurrentdb => trogon-eventstore}/tests/fixtures/connection_string/mockups.toml (100%) rename {kurrentdb => trogon-eventstore}/tests/fixtures/projection-updated.js (100%) rename {kurrentdb => trogon-eventstore}/tests/fixtures/projection.js (100%) rename {kurrentdb => trogon-eventstore}/tests/images.rs (100%) rename {kurrentdb => trogon-eventstore}/tests/integration.rs (93%) rename {kurrentdb => trogon-eventstore}/tests/misc/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/tests/misc/root_certificates.rs (91%) rename {kurrentdb => trogon-eventstore}/tests/plugins/mod.rs (100%) rename {kurrentdb => trogon-eventstore}/tests/plugins/user_certificates.rs (88%) diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index e49cb28..0000000 --- a/.github/release.yml +++ /dev/null @@ -1,23 +0,0 @@ -changelog: - exclude: - labels: - - ignore-for-release - categories: - - title: Added - labels: - - enhancement - - title: Fixed - labels: - - bug - - title: Changed - labels: - - "*" - - title: Deprecated - labels: - - deprecated - - title: Breaking Changes - labels: - - breaking - - title: Documentation - labels: - - documentation \ No newline at end of file diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index 0d56702..0000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Build Production Site - -on: - push: - branches: [release/**/**] - paths: - - '**.md' - -jobs: - dispatch: - runs-on: ubuntu-latest - steps: - - name: Trigger build - run: curl -X POST -d {} "${{ secrets.CLOUDFLARE_BUILD_HOOK }}" \ No newline at end of file diff --git a/.github/workflows/cherry-pick-pr-for-label.yml b/.github/workflows/cherry-pick-pr-for-label.yml deleted file mode 100644 index f7fa3d2..0000000 --- a/.github/workflows/cherry-pick-pr-for-label.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Cherry pick PR commits for label -on: - pull_request_target: - types: [closed] -jobs: - cherry_pick_pr_for_label: - name: Cherry pick PR commits for label - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Cherry Pick PR for label - uses: kurrent-io/Automations/cherry-pick-pr-for-label@master - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6382177 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,62 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build and test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install Rust + shell: bash + run: | + rustup set profile minimal + rustup update stable + rustup default stable + - name: Check workspace + run: cargo check --workspace --all-targets + - name: Run library tests + run: cargo test --workspace --lib + + quality: + name: Quality + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install Rust + shell: bash + run: | + rustup set profile minimal + rustup update stable + rustup default stable + rustup component add clippy rustfmt + - name: Check formatting + run: cargo fmt --all -- --check + - name: Run Clippy + run: cargo clippy --workspace --all-features -- -D warnings diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 54b0aca..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,44 +0,0 @@ -# name: Deployment - -# on: -# push: -# tags: -# - '*' - -# jobs: -# deploy: - -# runs-on: ubuntu-latest - -# steps: -# - uses: actions/checkout@v1 -# - name: Install latest Rust stable toolchain -# run: | -# rustup update -# rustup default stable -# - name: Login on Crates.IO -# env: -# TOKEN: ${{ secrets.CRATES_IO_TOKEN }} -# run: cargo login $TOKEN -# - name: Upload -# run: | -# cargo publish -p kurrentdb - - -name: Publish to crates.io -on: - push: - tags: ['*'] -jobs: - publish: - runs-on: ubuntu-latest - environment: CRATES_IO_TOKEN - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - uses: rust-lang/crates-io-auth-action@v1 - id: auth - - run: cargo publish -p kurrentdb - env: - CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} \ No newline at end of file diff --git a/.github/workflows/docker-repo.yml b/.github/workflows/docker-repo.yml deleted file mode 100644 index f37ed1d..0000000 --- a/.github/workflows/docker-repo.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Get ESDB Docker repo -on: - workflow_call: - inputs: - runtime_env: - description: The runtime environment we want to run like release or staging - type: string - default: release - - outputs: - docker_registry: - description: ESDB docker registry - value: ${{ jobs.provide_docker.outputs.docker_registry }} - - docker_repo: - description: ESDB docker repository - value: ${{ jobs.provide_docker.outputs.docker_repo }} - - docker_container: - description: ESDB docker container - value: ${{ jobs.provide_docker.outputs.docker_container }} - -jobs: - provide_docker: - runs-on: ubuntu-latest - outputs: - docker_registry: ${{ steps.set_docker.outputs.docker_registry }} - docker_repo: ${{ steps.set_docker.outputs.docker_repo }} - docker_container: ${{ steps.set_docker.outputs.docker_container }} - steps: - - name: Set ESDB docker repo - id: set_docker - run: | - case ${{ inputs.runtime_env }} in - "release") - echo "docker_registry=docker.eventstore.com" >> $GITHUB_OUTPUT - echo "docker_repo=eventstore-ce" >> $GITHUB_OUTPUT - echo "docker_container=eventstoredb-ce" >> $GITHUB_OUTPUT - ;; - - "staging") - echo "docker_registry=docker.eventstore.com" >> $GITHUB_OUTPUT - echo "docker_repo=eventstore-staging-ce" >> $GITHUB_OUTPUT - echo "docker_container=eventstoredb-oss" >> $GITHUB_OUTPUT - ;; - - "enterprise") - echo "docker_registry=docker.eventstore.com" >> $GITHUB_OUTPUT - echo "docker_repo=eventstore-ee" >> $GITHUB_OUTPUT - echo "docker_container=eventstoredb-commercial" >> $GITHUB_OUTPUT - ;; - - *) - echo "docker_registry=docker.eventstore.com" >> $GITHUB_OUTPUT - echo "docker_repo=eventstore-ce" >> $GITHUB_OUTPUT - echo "docker_container=eventstoredb-ce" >> $GITHUB_OUTPUT - ;; - esac diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..9d78a79 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,125 @@ +name: Integration Tests + +on: + workflow_dispatch: + inputs: + server_registry: + description: Server image registry + required: true + type: string + default: docker.io + server_repository: + description: Server image repository + required: true + type: string + default: eventstore + server_container: + description: Server image name + required: true + type: string + default: eventstore + server_version: + description: Server image tag + required: true + type: string + default: latest + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + ESDB_DOCKER_REGISTRY: ${{ inputs.server_registry }} + ESDB_DOCKER_REPO: ${{ inputs.server_repository }} + ESDB_DOCKER_CONTAINER: ${{ inputs.server_container }} + ESDB_DOCKER_CONTAINER_VERSION: ${{ inputs.server_version }} + +jobs: + single-node: + name: Single node (${{ matrix.test }}) + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + test: + - single_node_streams + - single_node_projections + - single_node_persistent_subscriptions + - single_node_discover_error + - single_node_auto_resub_on_connection_drop + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install Rust + shell: bash + run: | + rustup set profile minimal + rustup update stable + rustup default stable + - name: Run integration test + run: cargo test --package trogon-eventstore --test integration ${{ matrix.test }} -- --exact + + secure-single-node: + name: Secure single node (${{ matrix.test }}) + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + test: + - single_node_operations + - root_certificates + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install Rust + shell: bash + run: | + rustup set profile minimal + rustup update stable + rustup default stable + - name: Generate certificates + run: docker compose --file configure-tls-for-tests.yml up --abort-on-container-exit --exit-code-from setup + - name: Run secure integration test + env: + SECURE: "true" + run: cargo test --package trogon-eventstore --test integration ${{ matrix.test }} -- --exact + - name: Clean up certificate services + if: always() + run: docker compose --file configure-tls-for-tests.yml down --volumes + + cluster: + name: Cluster (${{ matrix.test }}) + runs-on: ubuntu-latest + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + test: + - cluster_streams + - cluster_projections + - cluster_persistent_subscriptions + - cluster_operations + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Install Rust + shell: bash + run: | + rustup set profile minimal + rustup update stable + rustup default stable + - name: Start cluster + run: docker compose up --detach + - name: Run cluster integration test + run: cargo test --package trogon-eventstore --test integration ${{ matrix.test }} -- --exact + - name: Stop cluster + if: always() + run: docker compose down --volumes diff --git a/.github/workflows/publish-macros.yml b/.github/workflows/publish-macros.yml deleted file mode 100644 index 48270b2..0000000 --- a/.github/workflows/publish-macros.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish kurrentdb-macros - -on: - workflow_dispatch: - -jobs: - publish: - runs-on: ubuntu-latest - environment: CRATES_IO_TOKEN - steps: - - uses: actions/checkout@v4 - - - name: Verify version is new - run: | - LOCAL=$(cargo metadata --no-deps --format-version 1 \ - | jq -r '.packages[] | select(.name=="kurrentdb-macros") | .version') - REMOTE=$(cargo search kurrentdb-macros --limit 1 \ - | sed -nE 's/^kurrentdb-macros = "([^"]+)".*/\1/p') - echo "local=$LOCAL remote=$REMOTE" - if [ "$LOCAL" = "$REMOTE" ]; then - echo "Version $LOCAL is already published on crates.io. Bump kurrentdb-macros/Cargo.toml first." - exit 1 - fi - - - run: cargo publish -p kurrentdb-macros - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..08c91ed --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,24 @@ +name: Release Please + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Create release pull request or release + uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 + with: + token: ${{ secrets.GH_PAT_RELEASE_PLEASE_ACTION }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index d7f1b52..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: - - master - schedule: - - cron: '0 3 * * 0' # Every sunday at 3am UTC. -env: - CARGO_TERM_COLOR: always - -jobs: - build: - name: Build - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - rust: [stable, beta, nightly] - exclude: - - os: windows-latest - rust: beta - - - os: windows-latest - rust: nightly - - - os: macos-latest - rust: beta - - - os: macos-latest - rust: nightly - - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v3 - - - name: Install - run: | - rustup update - rustup default ${{ matrix.rust }} - - - name: Build - run: cargo check --all-targets - continue-on-error: ${{ matrix.rust == 'nightly' }} - - - name: Unit tests - run: cargo test --lib - - tests: - needs: build - name: Tests - - strategy: - fail-fast: false - matrix: - version: [previous-lts, lts, latest] - - uses: ./.github/workflows/tests.yml - with: - esdb_version: ${{ matrix.version }} - secrets: inherit - - linting: - name: Linting - needs: tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install - run: | - rustup update stable - rustup component add clippy - rustup component add rustfmt - - name: Linting - run: cargo clippy --all-features -- -D warnings - - name: Formatting - run: cargo fmt -- --check diff --git a/.github/workflows/semconv.yml b/.github/workflows/semconv.yml new file mode 100644 index 0000000..eca8092 --- /dev/null +++ b/.github/workflows/semconv.yml @@ -0,0 +1,74 @@ +name: SemConv + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + +jobs: + validate: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Validate pull request title and commits + shell: bash + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + REPOSITORY: ${{ github.repository }} + run: | + pattern='^(feat|fix|chore)(\([A-Za-z0-9][A-Za-z0-9._/-]*\))?!?: .+' + + if [[ ! "$PR_TITLE" =~ $pattern ]]; then + echo "Invalid pull request title: $PR_TITLE" >&2 + exit 1 + fi + + if ! commit_records=$(gh api --paginate \ + "repos/$REPOSITORY/pulls/$PR_NUMBER/commits" \ + --jq '.[] | { + parent_count: (.parents | length), + subject: (.commit.message | split("\n")[0]) + }'); then + echo "Unable to enumerate pull request commits." >&2 + exit 1 + fi + + if [ -z "$commit_records" ]; then + echo "Pull request contains no commits." >&2 + exit 1 + fi + + invalid_commits=0 + non_merge_commits=0 + while IFS= read -r record; do + if ! parent_count=$(jq -er '.parent_count' <<< "$record") || + ! subject=$(jq -er '.subject' <<< "$record"); then + echo "Unable to parse pull request commit metadata." >&2 + exit 1 + fi + + if [ "$parent_count" -gt 1 ]; then + continue + fi + + non_merge_commits=$((non_merge_commits + 1)) + if [[ ! "$subject" =~ $pattern ]]; then + echo "Invalid commit subject: $subject" >&2 + invalid_commits=1 + fi + done <<< "$commit_records" + + if [ "$non_merge_commits" -eq 0 ]; then + echo "Pull request contains no non-merge commits." >&2 + exit 1 + fi + + exit "$invalid_commits" diff --git a/.github/workflows/test-dispatch.yml b/.github/workflows/test-dispatch.yml deleted file mode 100644 index ab1403a..0000000 --- a/.github/workflows/test-dispatch.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Dispatch" - -on: - workflow_dispatch: - inputs: - runtime_env: - description: The runtime environment. release, staging or enterprise - type: string - default: release - - version: - description: "Version tag" - required: true - type: string - -jobs: - test: - name: Test - uses: ./.github/workflows/tests.yml - with: - esdb_version: ${{ inputs.version }} - runtime_env: ${{ inputs.runtime_env }} - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index c475549..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: tests workflow - -on: - workflow_call: - inputs: - runtime_env: - type: string - default: release - - esdb_version: - required: true - type: string - -env: - CARGO_TERM_COLOR: always - NEXTEST_FAILURE_OUTPUT: immediate - NEXTEST_HIDE_PROGRESS_BAR: true - -jobs: - provide_docker: - uses: ./.github/workflows/docker-repo.yml - with: - runtime_env: ${{ inputs.runtime_env }} - - single_node: - needs: provide_docker - name: Single node - - strategy: - fail-fast: false - matrix: - test: [streams, projections, persistent_subscriptions, discover_error, auto_resub_on_connection_drop] - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install - run: rustup update stable - - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v3 - with: - crate: cargo-nextest - locked: true - - - name: Run test - run: cargo nextest run single_node_${{ matrix.test }} - continue-on-error: ${{ matrix.test == 'auto_resub_on_connection_drop' }} - env: - ESDB_DOCKER_REGISTRY: ${{ needs.provide_docker.outputs.docker_registry }} - ESDB_DOCKER_REPO: ${{ needs.provide_docker.outputs.docker_repo }} - ESDB_DOCKER_CONTAINER: ${{ needs.provide_docker.outputs.docker_container }} - ESDB_DOCKER_CONTAINER_VERSION: ${{ inputs.esdb_version }} - - secure: - needs: provide_docker - name: Secure - - strategy: - fail-fast: false - matrix: - test: [operations] - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install - run: rustup update stable - - - name: Generate certificates - run: docker compose --file configure-tls-for-tests.yml up - - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v3 - with: - crate: cargo-nextest - locked: true - - - name: Run test - run: cargo nextest run single_node_${{ matrix.test }} - env: - ESDB_DOCKER_REGISTRY: ${{ needs.provide_docker.outputs.docker_registry }} - ESDB_DOCKER_REPO: ${{ needs.provide_docker.outputs.docker_repo }} - ESDB_DOCKER_CONTAINER: ${{ needs.provide_docker.outputs.docker_container }} - ESDB_DOCKER_CONTAINER_VERSION: ${{ inputs.esdb_version }} - SECURE: true - - cluster: - needs: provide_docker - name: Cluster - - strategy: - fail-fast: false - matrix: - test: [streams, projections, persistent_subscriptions] - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install - run: rustup update stable - - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v3 - with: - crate: cargo-nextest - locked: true - - - name: Set up cluster with Docker Compose - run: docker compose up -d - env: - ESDB_DOCKER_REGISTRY: ${{ needs.provide_docker.outputs.docker_registry }} - ESDB_DOCKER_REPO: ${{ needs.provide_docker.outputs.docker_repo }} - ESDB_DOCKER_CONTAINER: ${{ needs.provide_docker.outputs.docker_container }} - ESDB_DOCKER_CONTAINER_VERSION: ${{ inputs.esdb_version }} - - - name: Run test - run: cargo nextest run cluster_${{ matrix.test }} - env: - ESDB_DOCKER_CONTAINER_VERSION: ${{ inputs.esdb_version }} - - - name: Shutdown cluster - run: docker compose down - - plugins: - needs: provide_docker - name: plugins - - strategy: - fail-fast: false - matrix: - plugins: - - name: usercertificates - setup: docker compose --file configure-user-certs-for-tests.yml up - - runs-on: ubuntu-latest - # date: Jan 22nd, 2025 - # so far, only the LTS version comes with plugins - if: inputs.esdb_version == 'lts' - steps: - - uses: actions/checkout@v3 - - - name: Install - run: rustup update stable - - - name: Generate certificates - run: docker compose --file configure-tls-for-tests.yml up - - - name: Run plugin ${{ matrix.plugins.name }} setup - run: ${{ matrix.plugins.setup }} - - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v3 - with: - crate: cargo-nextest - locked: true - - - name: Set the plugins environment variables - run: | - echo "eventstore__${{ matrix.plugins.name }}__enabled=true" >> $GITHUB_ENV - - - name: Run test - run: cargo nextest run plugin_${{ matrix.plugins.name }} - env: - # date: Jan 22nd, 2025 - # so far, only the LTS version comes with plugins but also only one provided by dockerhub. - # it's going changed very soon after rebranding. - ESDB_DOCKER_REGISTRY: docker.io # ${{ needs.provide_docker.outputs.docker_registry }} - ESDB_DOCKER_REPO: eventstore # ${{ needs.provide_docker.outputs.docker_repo }} - ESDB_DOCKER_CONTAINER: eventstore # ${{ needs.provide_docker.outputs.docker_container }} - ESDB_DOCKER_CONTAINER_VERSION: lts # ${{ inputs.esdb_version }} - EVENTSTORE_LICENSING__LICENSE_KEY: ${{ secrets.KURRENTDB_TEST_LICENSE_KEY }} diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index 73efa65..8156509 --- a/.gitignore +++ b/.gitignore @@ -2,17 +2,12 @@ # will have compiled files and executables target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock -Cargo.lock - # Certs for testing purposes. certs/ # These are backup files generated by rustfmt **/*.rs.bk **/*.rs.bk -Cargo.lock # Directories generated during CI workflow. cached_cargo/ @@ -22,4 +17,4 @@ cached_cargo/ .cache .temp -node_modules \ No newline at end of file +node_modules diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..a15762e --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,5 @@ +{ + "trogon-eventstore": "0.0.1", + "trogon-eventstore-macros": "0.0.1", + "trogon-eventstore-extras": "0.0.1" +} diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5ddab26 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3264 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "aws-lc-rs" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "axum" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[package]] +name = "bollard" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ccca1260af6a459d75994ad5acc1651bcabcbdbc41467cc9786519ab854c30" +dependencies = [ + "base64", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "home", + "http", + "http-body-util", + "hyper", + "hyper-named-pipe", + "hyper-rustls", + "hyper-util", + "hyperlocal", + "log", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror", + "tokio", + "tokio-util", + "tower-service", + "url", + "winapi", +] + +[[package]] +name = "bollard-stubs" +version = "1.47.1-rc.27.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f179cfbddb6e77a5472703d4b30436bff32929c0aa8a9008ecf23d1d3cdd0da" +dependencies = [ + "serde", + "serde_repr", + "serde_with", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_derive" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck 0.4.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "ctor" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec09e802f5081de6157da9a75701d6c713d8dc3ba52571fd4bd25f412644e8a6" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2" + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "defmt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "docker_credential" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29547a1dc60885a552306986316bc9701ba120c1a8db6769fa68691529ad373d" +dependencies = [ + "base64", + "serde", + "serde_json", +] + +[[package]] +name = "dtor" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cbdf2ad6846025e8e25df05171abfb30e3ababa12ee0a0e44b9bbe570633a8" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7454e41ff9012c00d53cf7f475c5e3afa3b91b7c90568495495e8d9bf47a1055" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "examples" +version = "0.0.0" +dependencies = [ + "futures", + "serde", + "trogon-eventstore", + "uuid", +] + +[[package]] +name = "eyre" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08309dbcc659c5549a24ddb9b27027640641b282ef5768267c7e675558986a3" +dependencies = [ + "autocfg", + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-named-pipe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fab3637d6b04a8037af8a266fdf6cf92ea957e8c53981a2bf6136572531025bf" +dependencies = [ + "hex", + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2 0.6.5", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "hyperlocal" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" +dependencies = [ + "hex", + "http-body-util", + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jiff" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + +[[package]] +name = "jiff-static" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[package]] +name = "names" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" +dependencies = [ + "clap", + "rand 0.8.7", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "parse-display" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" +dependencies = [ + "parse-display-derive", + "regex", + "regex-syntax", +] + +[[package]] +name = "parse-display-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "regex-syntax", + "structmeta", + "syn 2.0.119", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap 2.14.0", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.119", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +dependencies = [ + "heck 0.5.0", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.119", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost", +] + +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.6.5", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.2", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.5", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee78f1fbe43ac4a0e47aadb3dbd357b69eb0d3793e948624cd03dd2750ab1c0a" +dependencies = [ + "base64", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "jiff", + "schemars 0.9.0", + "schemars 1.2.2", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8705578779c2b6bd90d84d66eb2e206b708b1a4d7b9f17641b293545bf1c7e46" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "structmeta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.119", +] + +[[package]] +name = "structmeta-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "testcontainers" +version = "0.23.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a4f01f39bb10fc2a5ab23eb0d888b1e2bb168c157f61a1b98e6c501c639c74" +dependencies = [ + "async-trait", + "bollard", + "bollard-stubs", + "bytes", + "docker_credential", + "either", + "etcetera", + "futures", + "log", + "memchr", + "parse-display", + "pin-project-lite", + "serde", + "serde_json", + "serde_with", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tar", + "tokio-util", + "url", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2 0.6.5", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tar" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" +dependencies = [ + "filetime", + "futures-core", + "libc", + "redox_syscall", + "tokio", + "tokio-stream", + "xattr", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tonic" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" +dependencies = [ + "async-trait", + "axum", + "base64", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "rustls-native-certs", + "socket2 0.5.10", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac6f67be712d12f0b41328db3137e0d0757645d8904b4cb7d51cd9c2279e847" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 2.14.0", + "pin-project-lite", + "slab", + "sync_wrapper", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trogon-eventstore" +version = "0.0.1" +dependencies = [ + "async-stream", + "base64", + "bitflags 2.13.1", + "byteorder", + "bytes", + "chrono", + "ctor", + "eyre", + "futures", + "http", + "hyper", + "hyper-rustls", + "hyper-util", + "lazy_static", + "names", + "nom", + "prost", + "prost-types", + "rand 0.9.5", + "reqwest", + "rustls", + "rustls-native-certs", + "serde", + "serde_json", + "testcontainers", + "thiserror", + "tokio", + "tokio-rustls", + "toml", + "tonic", + "tonic-build", + "tower", + "tracing", + "tracing-subscriber", + "trogon-eventstore-macros", + "url", + "urlencoding", + "uuid", +] + +[[package]] +name = "trogon-eventstore-extras" +version = "0.0.1" +dependencies = [ + "chrono", + "log", + "trogon-eventstore", +] + +[[package]] +name = "trogon-eventstore-macros" +version = "0.0.1" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f053576934f05a761a402421fbbe3d425d9366f75f978806a037b3ca481abecc" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml index 9786f6e..c3071cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] resolver = "2" members = [ - "kurrentdb", - "kurrentdb-extras", + "trogon-eventstore", + "trogon-eventstore-extras", # internals - "kurrentdb-macros", + "trogon-eventstore-macros", "examples" ] diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 index 190df1d..d9a10c0 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,176 @@ -MIT License - -Copyright (c) 2017 Yorick Laupa - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..190df1d --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Yorick Laupa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 1dcfd0d..656d34b --- a/README.md +++ b/README.md @@ -1,19 +1,12 @@ -# KurrentDB Rust Client -[![Crates.io][crates-badge]][crates-url] -[![Crates.io][crates-download]][crates-url] +# TrogonEventStore Rust Client [![Build Status][ci-badge]][ci-url] -![Discord](https://img.shields.io/discord/415421715385155584.svg) -![Crates.io](https://img.shields.io/crates/l/kurrentdb.svg) -[crates-badge]: https://img.shields.io/crates/v/kurrentdb.svg -[crates-download]: https://img.shields.io/crates/d/kurrentdb.svg -[crates-url]: https://crates.io/crates/kurrentdb -[ci-badge]: https://github.com/EventStore/EventStoreDB-Client-Rust/workflows/CI/badge.svg -[ci-url]: https://github.com/EventStore/EventStoreDB-Client-Rust/actions +[ci-badge]: https://github.com/TrogonStack/TrogonEventStore-Client-Rust/actions/workflows/ci.yml/badge.svg +[ci-url]: https://github.com/TrogonStack/TrogonEventStore-Client-Rust/actions -[Documentation](https://docs.rs/kurrentdb) +[Documentation](docs) -Official Rust [KurrentDB rust gRPC] gRPC Client. +Community-maintained Rust gRPC client for TrogonEventStore, derived from the KurrentDB Rust client. [KurrentDB] is the event-native database, where business events are immutably stored and streamed. Designed for event-sourced, event-driven, and microservices architectures. @@ -23,10 +16,19 @@ This client is compatible with version `20.6.1` upwards and works on Linux, MacO Server setup instructions can be found here [KurrentDB Docs], follow the docker setup for the simplest configuration. -# Example +## Installation + +```toml +[dependencies] +trogon-eventstore = { git = "https://github.com/TrogonStack/TrogonEventStore-Client-Rust", tag = "trogon-eventstore@v0.1.0" } +``` + +Cargo registry publishing is not currently configured. Use a tagged GitHub release as the dependency source. + +## Example ```rust -use kurrentdb::{ Client, EventData }; +use trogon_eventstore::{Client, EventData}; use serde::{Serialize, Deserialize}; #[derive(Serialize, Deserialize, Debug)] @@ -79,6 +81,10 @@ Documentation for KurrentDB can be found here: [KurrentDB Docs] Bear in mind that this client is not yet properly documented. We are working hard on a new version of the documentation. +## License + +TrogonEventStore Rust Client is licensed under the Apache License 2.0. It is derived from software originally licensed under the MIT License. The complete inherited MIT notice is preserved in [LICENSES/MIT.txt](LICENSES/MIT.txt). + ## Communities - [Discuss](https://discuss.kurrent.io/) diff --git a/configure-tls-for-tests.yml b/configure-tls-for-tests.yml index a772cd8..fae9d88 100644 --- a/configure-tls-for-tests.yml +++ b/configure-tls-for-tests.yml @@ -4,7 +4,7 @@ services: environment: PROVISION_DIRECTORIES: "1000:1000:0755:/tmp/certs" volumes: - - "./kurrentdb/certs:/tmp/certs" + - "./trogon-eventstore/certs:/tmp/certs" network_mode: "none" setup: @@ -19,6 +19,6 @@ services: && find . -type f -print0 | xargs -0 chmod 666" container_name: setup volumes: - - ./kurrentdb/certs:/certs + - ./trogon-eventstore/certs:/certs depends_on: - volumes-provisioner diff --git a/configure-user-certs-for-tests.yml b/configure-user-certs-for-tests.yml index 5ecfe3f..434f47e 100644 --- a/configure-user-certs-for-tests.yml +++ b/configure-user-certs-for-tests.yml @@ -4,7 +4,7 @@ services: environment: PROVISION_DIRECTORIES: "1000:1000:0755:/tmp/certs" volumes: - - "./kurrentdb/certs:/tmp/certs" + - "./trogon-eventstore/certs:/tmp/certs" network_mode: "none" setup: @@ -18,6 +18,6 @@ services: && find . -type f -print0 | xargs -0 chmod 666" container_name: setup volumes: - - ./kurrentdb/certs:/certs + - ./trogon-eventstore/certs:/certs depends_on: - volumes-provisioner diff --git a/docs/api/appending-events.md b/docs/api/appending-events.md index 14e127f..be66b27 100644 --- a/docs/api/appending-events.md +++ b/docs/api/appending-events.md @@ -80,7 +80,7 @@ Storing additional information alongside your event that is part of the event it ### ContentType -The content type indicates whether the event is stored as JSON or binary format. You can choose between `kurrentdb.ContentTypeJson` and `kurrentdb.ContentTypeBinary` when creating your `EventData` object. +The content type indicates whether the event is stored as JSON or binary format. You can choose between `trogon_eventstore::ContentTypeJson` and `trogon_eventstore::ContentTypeBinary` when creating your `EventData` object. ## Handling concurrency @@ -173,4 +173,4 @@ let options = let _ = client .append_to_stream("order-123", &options, event) .await?; -``` \ No newline at end of file +``` diff --git a/docs/api/delete-stream.md b/docs/api/delete-stream.md index e7822b7..dcd848d 100644 --- a/docs/api/delete-stream.md +++ b/docs/api/delete-stream.md @@ -43,7 +43,7 @@ specific conditions. Note that when a stream is hard deleted, you cannot reuse the stream name, it will raise an exception if you try to append to it again. ```rs -options := kurrentdb.TombstoneStreamOptions{ +options := trogon_eventstore::TombstoneStreamOptions{ let options = TombstoneStreamOptions::default(); client .tombstone_stream(stream_name, &options) diff --git a/docs/api/reading-events.md b/docs/api/reading-events.md index 14178fd..8d79213 100644 --- a/docs/api/reading-events.md +++ b/docs/api/reading-events.md @@ -217,7 +217,7 @@ let options = ReadAllOptions::default() ### Reading backwards In addition to reading the `$all` stream forwards, it can be read backwards. To -read all the events backwards, set the _direction_ to `kurrentdb.Backwards`: +read all the events backwards, set the _direction_ to `trogon_eventstore::Backwards`: ```rs let options = ReadAllOptions::default().position(StreamPosition::End); diff --git a/examples/Cargo.toml b/examples/Cargo.toml index be23261..56788bd 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -5,7 +5,7 @@ publish = false edition = "2024" [dev-dependencies] -kurrentdb = { path = "../kurrentdb" } +trogon-eventstore = { path = "../trogon-eventstore" } futures = "0.3" uuid = { version = "1.1", features = [ "v4", "serde" ] } serde = "1" diff --git a/examples/appending_events.rs b/examples/appending_events.rs index 94f7a0e..7ef0fd3 100644 --- a/examples/appending_events.rs +++ b/examples/appending_events.rs @@ -4,12 +4,12 @@ #![allow(unused_variables)] use futures::TryStreamExt; -use kurrentdb::{ +use serde::{Deserialize, Serialize}; +use std::error::Error; +use trogon_eventstore::{ AppendToStreamOptions, Client, Credentials, EventData, ReadStreamOptions, StreamPosition, StreamState, }; -use serde::{Deserialize, Serialize}; -use std::error::Error; use uuid::Uuid; #[derive(Serialize, Deserialize)] diff --git a/examples/persistent_subscriptions.rs b/examples/persistent_subscriptions.rs index 3e53ba9..7e41e45 100644 --- a/examples/persistent_subscriptions.rs +++ b/examples/persistent_subscriptions.rs @@ -3,12 +3,12 @@ #![allow(unused_results)] #![allow(unused_variables)] #![allow(dead_code)] -use kurrentdb::{ +use trogon_eventstore::{ Client, PersistentSubscriptionEvent, PersistentSubscriptionOptions, PersistentSubscriptionToAllOptions, ReplayParkedMessagesOptions, SubscriptionFilter, }; -async fn create_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn create_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { // #region create-persistent-subscription-to-stream client .create_persistent_subscription("test-stream", "subscription-group", &Default::default()) @@ -18,7 +18,9 @@ async fn create_persistent_subscription(client: &Client) -> kurrentdb::Result<() Ok(()) } -async fn connect_to_persistent_subscription_to_stream(client: &Client) -> kurrentdb::Result<()> { +async fn connect_to_persistent_subscription_to_stream( + client: &Client, +) -> trogon_eventstore::Result<()> { // #region subscribe-to-persistent-subscription-to-stream let mut sub = client .subscribe_to_persistent_subscription( @@ -36,7 +38,9 @@ async fn connect_to_persistent_subscription_to_stream(client: &Client) -> kurren // #endregion subscribe-to-persistent-subscription-to-stream } -async fn connect_to_persistent_subscription_to_all(client: &Client) -> kurrentdb::Result<()> { +async fn connect_to_persistent_subscription_to_all( + client: &Client, +) -> trogon_eventstore::Result<()> { // #region subscribe-to-persistent-subscription-to-all let mut sub = client .subscribe_to_persistent_subscription_to_all("subscription-group", &Default::default()) @@ -50,7 +54,7 @@ async fn connect_to_persistent_subscription_to_all(client: &Client) -> kurrentdb // #endregion subscribe-to-persistent-subscription-to-all } -async fn create_persistent_subscription_to_all(client: &Client) -> kurrentdb::Result<()> { +async fn create_persistent_subscription_to_all(client: &Client) -> trogon_eventstore::Result<()> { // #region create-persistent-subscription-to-all let options = PersistentSubscriptionToAllOptions::default() .filter(SubscriptionFilter::on_stream_name().add_prefix("test")); @@ -64,7 +68,7 @@ async fn create_persistent_subscription_to_all(client: &Client) -> kurrentdb::Re async fn connect_to_persistent_subscription_with_manual_acks( client: &Client, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { // #region subscribe-to-persistent-subscription-with-manual-acks let mut sub = client .subscribe_to_persistent_subscription( @@ -82,7 +86,7 @@ async fn connect_to_persistent_subscription_with_manual_acks( // #endregion subscribe-to-persistent-subscription-with-manual-acks } -async fn update_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn update_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { // #region update-persistent-subscription let options = PersistentSubscriptionOptions::default() .resolve_link_tos(true) @@ -96,7 +100,7 @@ async fn update_persistent_subscription(client: &Client) -> kurrentdb::Result<() Ok(()) } -async fn delete_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn delete_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { // #region delete-persistent-subscription client .delete_persistent_subscription("test-stream", "subscription-group", &Default::default()) @@ -106,7 +110,9 @@ async fn delete_persistent_subscription(client: &Client) -> kurrentdb::Result<() Ok(()) } -async fn get_persistent_subscription_to_stream_info(client: &Client) -> kurrentdb::Result<()> { +async fn get_persistent_subscription_to_stream_info( + client: &Client, +) -> trogon_eventstore::Result<()> { // #region get-persistent-subscription-to-stream-info let info = client .get_persistent_subscription_info("test-stream", "subscription-group", &Default::default()) @@ -120,7 +126,7 @@ async fn get_persistent_subscription_to_stream_info(client: &Client) -> kurrentd Ok(()) } -async fn get_persistent_subscription_to_all_info(client: &Client) -> kurrentdb::Result<()> { +async fn get_persistent_subscription_to_all_info(client: &Client) -> trogon_eventstore::Result<()> { // #region get-persistent-subscription-to-all-info let info = client .get_persistent_subscription_info_to_all("subscription-group", &Default::default()) @@ -134,7 +140,7 @@ async fn get_persistent_subscription_to_all_info(client: &Client) -> kurrentdb:: Ok(()) } -async fn replay_parked_to_stream(client: &Client) -> kurrentdb::Result<()> { +async fn replay_parked_to_stream(client: &Client) -> trogon_eventstore::Result<()> { // #region replay-parked-of-persistent-subscription-to-stream let options = ReplayParkedMessagesOptions::default().stop_at(10); client @@ -144,7 +150,7 @@ async fn replay_parked_to_stream(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn replay_parked_to_all(client: &Client) -> kurrentdb::Result<()> { +async fn replay_parked_to_all(client: &Client) -> trogon_eventstore::Result<()> { // #region replay-parked-of-persistent-subscription-to-all let options = ReplayParkedMessagesOptions::default().stop_at(10); client @@ -154,7 +160,7 @@ async fn replay_parked_to_all(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn list_persistent_subscription_to_stream(client: &Client) -> kurrentdb::Result<()> { +async fn list_persistent_subscription_to_stream(client: &Client) -> trogon_eventstore::Result<()> { // #region list-persistent-subscriptions-to-stream let subscriptions = client .list_persistent_subscriptions_for_stream("test-stream", &Default::default()) @@ -170,7 +176,7 @@ async fn list_persistent_subscription_to_stream(client: &Client) -> kurrentdb::R Ok(()) } -async fn list_persistent_subscription_to_all(client: &Client) -> kurrentdb::Result<()> { +async fn list_persistent_subscription_to_all(client: &Client) -> trogon_eventstore::Result<()> { // #region list-persistent-subscriptions-to-all let subscriptions = client .list_persistent_subscriptions_to_all(&Default::default()) @@ -186,7 +192,7 @@ async fn list_persistent_subscription_to_all(client: &Client) -> kurrentdb::Resu Ok(()) } -async fn list_all_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn list_all_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { // #region list-persistent-subscriptions let subscriptions = client .list_all_persistent_subscriptions(&Default::default()) @@ -202,7 +208,9 @@ async fn list_all_persistent_subscription(client: &Client) -> kurrentdb::Result< Ok(()) } -async fn restart_persistent_subscription_subsystem(client: &Client) -> kurrentdb::Result<()> { +async fn restart_persistent_subscription_subsystem( + client: &Client, +) -> trogon_eventstore::Result<()> { // #region restart-persistent-subscription-subsystem client .restart_persistent_subscription_subsystem(&Default::default()) diff --git a/examples/quickstart.rs b/examples/quickstart.rs index 9889a35..7db662f 100644 --- a/examples/quickstart.rs +++ b/examples/quickstart.rs @@ -4,11 +4,11 @@ #![allow(unused_variables)] #![allow(unused_must_use)] -use kurrentdb::{ - AppendToStreamOptions, Client, Credentials, EventData, ReadStreamOptions, StreamState, -}; use serde::{Deserialize, Serialize}; use std::error::Error; +use trogon_eventstore::{ + AppendToStreamOptions, Client, Credentials, EventData, ReadStreamOptions, StreamState, +}; use uuid::Uuid; #[derive(Serialize, Deserialize)] diff --git a/examples/reading_events.rs b/examples/reading_events.rs index 07b50d3..a573c02 100644 --- a/examples/reading_events.rs +++ b/examples/reading_events.rs @@ -3,12 +3,12 @@ #![allow(unused_results)] #![allow(unused_variables)] -use kurrentdb::{ +use serde::{Deserialize, Serialize}; +use std::error::Error; +use trogon_eventstore::{ Client, Credentials, EventData, Position, ReadAllOptions, ReadStreamOptions, StreamPosition, StreamState, }; -use serde::{Deserialize, Serialize}; -use std::error::Error; use uuid::Uuid; #[derive(Serialize, Deserialize, Debug)] diff --git a/examples/server_side_filtering.rs b/examples/server_side_filtering.rs index e0556de..a9a40b0 100644 --- a/examples/server_side_filtering.rs +++ b/examples/server_side_filtering.rs @@ -5,12 +5,12 @@ #![allow(unreachable_code)] use futures::TryStreamExt; -use kurrentdb::{ +use serde::{Deserialize, Serialize}; +use std::error::Error; +use trogon_eventstore::{ Client, Credentials, EventData, StreamState, SubscribeToAllOptions, SubscriptionEvent, SubscriptionFilter, }; -use serde::{Deserialize, Serialize}; -use std::error::Error; use uuid::Uuid; #[derive(Serialize, Deserialize, Debug)] diff --git a/examples/subscribing_to_stream.rs b/examples/subscribing_to_stream.rs index d24c420..22aef59 100644 --- a/examples/subscribing_to_stream.rs +++ b/examples/subscribing_to_stream.rs @@ -5,12 +5,12 @@ #![allow(unreachable_code)] use futures::TryStreamExt; -use kurrentdb::{ +use serde::{Deserialize, Serialize}; +use std::error::Error; +use trogon_eventstore::{ Client, Credentials, EventData, Position, RetryOptions, StreamPosition, StreamState, SubscribeToAllOptions, SubscribeToStreamOptions, SubscriptionEvent, SubscriptionFilter, }; -use serde::{Deserialize, Serialize}; -use std::error::Error; use uuid::Uuid; type Result = std::result::Result>; diff --git a/examples/user_certificates.rs b/examples/user_certificates.rs index 94ac30a..80c5a26 100644 --- a/examples/user_certificates.rs +++ b/examples/user_certificates.rs @@ -4,8 +4,8 @@ #![allow(unused_variables)] #![allow(unreachable_code)] -use kurrentdb::Client; use std::error::Error; +use trogon_eventstore::Client; type Result = std::result::Result>; diff --git a/kurrentdb-extras/README.md b/kurrentdb-extras/README.md deleted file mode 100644 index 5f81561..0000000 --- a/kurrentdb-extras/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# kurrent-extras - -KurrentDB gRPC client extra features. - -## Features -* Typeful stats data structures when reading from the stats gRPC endpoint. \ No newline at end of file diff --git a/kurrentdb-macros/Cargo.toml b/kurrentdb-macros/Cargo.toml deleted file mode 100644 index c9bb2e3..0000000 --- a/kurrentdb-macros/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "kurrentdb-macros" -version = "0.0.1" -edition = "2021" -license = "MIT" - -description = "Internal proc-macros for the KurrentDB Rust client" -keywords = ["database", "eventsourcing", "eventstore", "kurrent", "grpc"] -repository = "https://github.com/kurrent-io/KurrentDB-Client-Rust" -categories = ["database", "api-bindings"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[lib] -proc-macro = true - -[dependencies] -syn = { version = "1", features = ["full", "fold", "extra-traits"] } -quote = "1" \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..ad88120 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bootstrap-sha": "d76e58ba464b2dc77c196ffefbca330ce9df938d", + "group-pull-request-title-pattern": "chore${scope}: release${component} ${version}", + "signoff": "SHT Bot <61149376+sht-bot@users.noreply.github.com>", + "plugins": [ + { + "type": "cargo-workspace", + "merge": false + }, + { + "type": "linked-versions", + "groupName": "TrogonEventStore Rust Client", + "components": [ + "trogon-eventstore", + "trogon-eventstore-macros", + "trogon-eventstore-extras" + ] + } + ], + "packages": { + "trogon-eventstore": { + "release-type": "rust", + "package-name": "trogon-eventstore", + "component": "trogon-eventstore", + "include-component-in-tag": true, + "include-v-in-tag": true, + "tag-separator": "@", + "pull-request-title-pattern": "chore${scope}: release${component} ${version}", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false + }, + "trogon-eventstore-macros": { + "release-type": "rust", + "package-name": "trogon-eventstore-macros", + "component": "trogon-eventstore-macros", + "include-component-in-tag": true, + "include-v-in-tag": true, + "tag-separator": "@", + "pull-request-title-pattern": "chore${scope}: release${component} ${version}", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false + }, + "trogon-eventstore-extras": { + "release-type": "rust", + "package-name": "trogon-eventstore-extras", + "component": "trogon-eventstore-extras", + "include-component-in-tag": true, + "include-v-in-tag": true, + "tag-separator": "@", + "pull-request-title-pattern": "chore${scope}: release${component} ${version}", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false + } + } +} diff --git a/kurrentdb-extras/Cargo.toml b/trogon-eventstore-extras/Cargo.toml similarity index 52% rename from kurrentdb-extras/Cargo.toml rename to trogon-eventstore-extras/Cargo.toml index c839f08..0749bb2 100644 --- a/kurrentdb-extras/Cargo.toml +++ b/trogon-eventstore-extras/Cargo.toml @@ -1,19 +1,21 @@ [package] -name = "kurrentdb-extras" -version = "0.1.0-alpha.2" +authors = ["Straw Hat, LLC"] +name = "trogon-eventstore-extras" +version = "0.0.1" +publish = false edition = "2024" -license = "MIT" +license = "Apache-2.0 AND MIT" -description = "KurrentDB gRPC client extra features" +description = "Extra features for the TrogonEventStore Rust gRPC client" keywords = ["database", "eventsourcing", "eventstore", "eventstoredb", "grpc"] -repository = "https://github.com/EventStore/EventStoreDB-Client-Rust" +repository = "https://github.com/TrogonStack/TrogonEventStore-Client-Rust" categories = ["database", "api-bindings"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] # will move to version number once we got something stable. -kurrentdb = { path = "../kurrentdb", version = "1.0.0-alpha.2" } +trogon-eventstore = { path = "../trogon-eventstore", version = "0.0.1" } chrono = { version = "0.4", default-features = false } log = "0.4" diff --git a/trogon-eventstore-extras/LICENSE b/trogon-eventstore-extras/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/trogon-eventstore-extras/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/trogon-eventstore-extras/LICENSES/MIT.txt b/trogon-eventstore-extras/LICENSES/MIT.txt new file mode 100644 index 0000000..190df1d --- /dev/null +++ b/trogon-eventstore-extras/LICENSES/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Yorick Laupa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/trogon-eventstore-extras/README.md b/trogon-eventstore-extras/README.md new file mode 100644 index 0000000..d8d2efe --- /dev/null +++ b/trogon-eventstore-extras/README.md @@ -0,0 +1,6 @@ +# trogon-eventstore-extras + +Extra features for the TrogonEventStore Rust gRPC client. + +## Features +* Typeful stats data structures when reading from the stats gRPC endpoint. diff --git a/kurrentdb-extras/src/lib.rs b/trogon-eventstore-extras/src/lib.rs similarity index 100% rename from kurrentdb-extras/src/lib.rs rename to trogon-eventstore-extras/src/lib.rs diff --git a/kurrentdb-extras/src/stats.rs b/trogon-eventstore-extras/src/stats.rs similarity index 85% rename from kurrentdb-extras/src/stats.rs rename to trogon-eventstore-extras/src/stats.rs index b1b32b7..901a72a 100644 --- a/kurrentdb-extras/src/stats.rs +++ b/trogon-eventstore-extras/src/stats.rs @@ -9,18 +9,18 @@ pub struct Statistics { } pub trait StatisticsExt { - fn parse_statistics(self) -> kurrentdb::Result; + fn parse_statistics(self) -> trogon_eventstore::Result; } -impl StatisticsExt for kurrentdb::operations::RawStatistics { - fn parse_statistics(self) -> kurrentdb::Result { +impl StatisticsExt for trogon_eventstore::operations::RawStatistics { + fn parse_statistics(self) -> trogon_eventstore::Result { let mut stats = Statistics::default(); for (key, value) in self.0 { match key.as_str() { "proc-startTime" => { stats.proc.start_time = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -31,7 +31,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-id" => { stats.proc.id = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -42,7 +42,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-mem" => { stats.proc.mem = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -53,7 +53,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-cpu" => { stats.proc.cpu = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -64,7 +64,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-threadsCount" => { stats.proc.threads_count = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -75,7 +75,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-contentionsRate" => { stats.proc.contentions_rate = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -86,7 +86,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-thrownExceptionsRate" => { stats.proc.thrown_exceptions_rate = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -97,7 +97,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-allocationSpeed" => { stats.proc.gc.allocation_speed = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -108,7 +108,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen0ItemsCount" => { stats.proc.gc.gen0_items_count = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -119,7 +119,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen0Size" => { stats.proc.gc.gen0_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -130,7 +130,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen1ItemsCount" => { stats.proc.gc.gen1_items_count = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -141,7 +141,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen1Size" => { stats.proc.gc.gen1_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -152,7 +152,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen2ItemsCount" => { stats.proc.gc.gen2_items_count = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -163,7 +163,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-gen2Size" => { stats.proc.gc.gen2_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -174,7 +174,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-largeHeapSize" => { stats.proc.gc.large_heap_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -185,7 +185,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-timeInGc" => { stats.proc.gc.time_in_gc = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -196,7 +196,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-gc-totalBytesInHeaps" => { stats.proc.gc.total_bytes_in_heaps = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -207,7 +207,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-diskIo-readBytes" => { stats.proc.disk_io.read_bytes = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -218,7 +218,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-diskIo-writtenBytes" => { stats.proc.disk_io.written_bytes = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -229,7 +229,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-diskIo-readOps" => { stats.proc.disk_io.read_ops = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -240,7 +240,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-diskIo-writeOps" => { stats.proc.disk_io.write_ops = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -251,7 +251,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-connections" => { stats.proc.tcp.connections = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -262,7 +262,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-receivingSpeed" => { stats.proc.tcp.receiving_speed = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -273,7 +273,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-sendingSpeed" => { stats.proc.tcp.sending_speed = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -284,7 +284,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-inSend" => { stats.proc.tcp.in_send = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -299,7 +299,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-pendingReceived" => { stats.proc.tcp.pending_received = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -310,7 +310,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-pendingSend" => { stats.proc.tcp.pending_send = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -321,7 +321,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-receivedBytesSinceLastRun" => { stats.proc.tcp.received_bytes_since_last_run = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -332,7 +332,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-receivedBytesTotal" => { stats.proc.tcp.received_bytes_total = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -343,7 +343,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-sentBytesSinceLastRun" => { stats.proc.tcp.sent_bytes_since_last_run = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -354,7 +354,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "proc-tcp-sentBytesTotal" => { stats.proc.tcp.sent_bytes_total = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -365,7 +365,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "sys-loadavg-1m" => { stats.sys.loadavg.one_m = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -376,7 +376,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "sys-loadavg-5m" => { stats.sys.loadavg.five_m = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -387,7 +387,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "sys-loadavg-15m" => { stats.sys.loadavg.fifteen_m = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -415,7 +415,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { IntErrorKind::PosOverflow => { // In case the number is too big for a signed number, we try unsigned. stats.sys.free_mem = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -425,12 +425,14 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { } _ => { - return Err(kurrentdb::Error::InternalParsingError(format!( - "{key}: {err} = '{value}'", - key = key, - err = e, - value = value, - ))); + return Err(trogon_eventstore::Error::InternalParsingError( + format!( + "{key}: {err} = '{value}'", + key = key, + err = e, + value = value, + ), + )); } }, } @@ -438,7 +440,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-checksum" => { stats.es.checksum = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -449,7 +451,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-checksumNonFlushed" => { stats.es.checksum_non_flushed = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -478,7 +480,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { match prop { "availableBytes" => { drive.stats.available_bytes = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -489,7 +491,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "totalBytes" => { drive.stats.total_bytes = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -504,7 +506,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "usedBytes" => { drive.stats.used_bytes = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -539,7 +541,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "avgItemsPerSecond" => { queue.avg_items_per_second = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -550,7 +552,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "avgProcessingTime" => { queue.avg_processing_time = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -565,7 +567,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { } queue.current_idle_time = Some(value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -581,7 +583,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { queue.current_item_processing_time = Some(value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -592,7 +594,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "idleTimePercent" => { queue.idle_time_percent = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -603,7 +605,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "length" => { queue.length = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -614,7 +616,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "lengthCurrentTryPeak" => { queue.length_current_try_peak = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -625,7 +627,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "lengthLifetimePeak" => { queue.length_lifetime_peak = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -636,7 +638,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "totalItemsProcessed" => { queue.total_items_processed = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -661,7 +663,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-lastFlushSize" => { stats.es.writer.last_flush_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -672,7 +674,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-lastFlushDelayMs" => { stats.es.writer.last_flush_delays_ms = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -683,7 +685,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-meanFlushSize" => { stats.es.writer.mean_flush_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -694,7 +696,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-meanFlushDelayMs" => { stats.es.writer.mean_flush_delays_ms = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -705,7 +707,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-maxFlushSize" => { stats.es.writer.max_flush_size = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -716,7 +718,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-maxFlushDelayMs" => { stats.es.writer.max_flush_delays_ms = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -727,7 +729,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-writer-queuedFlushMessages" => { stats.es.writer.queued_flush_messages = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -738,7 +740,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-cachedRecord" => { stats.es.read_index.cached_record = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -749,7 +751,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-notCachedRecord" => { stats.es.read_index.not_cached_record = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -760,7 +762,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-cachedStreamInfo" => { stats.es.read_index.cached_stream_info = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -771,7 +773,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-notCachedStreamInfo" => { stats.es.read_index.not_cached_stream_info = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -782,7 +784,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-cachedTransInfo" => { stats.es.read_index.cached_trans_info = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, @@ -793,7 +795,7 @@ impl StatisticsExt for kurrentdb::operations::RawStatistics { "es-readIndex-notCachedTransInfo" => { stats.es.read_index.not_cached_trans_info = value.parse().map_err(|e| { - kurrentdb::Error::InternalParsingError(format!( + trogon_eventstore::Error::InternalParsingError(format!( "{key}: {err} = '{value}'", key = key, err = e, diff --git a/trogon-eventstore-macros/Cargo.toml b/trogon-eventstore-macros/Cargo.toml new file mode 100644 index 0000000..5fcc86c --- /dev/null +++ b/trogon-eventstore-macros/Cargo.toml @@ -0,0 +1,20 @@ +[package] +authors = ["Straw Hat, LLC"] +name = "trogon-eventstore-macros" +version = "0.0.1" +publish = false +edition = "2021" +license = "Apache-2.0 AND MIT" + +description = "Internal proc-macros for the TrogonEventStore Rust client" +keywords = ["database", "eventsourcing", "eventstore", "trogon", "grpc"] +repository = "https://github.com/TrogonStack/TrogonEventStore-Client-Rust" +categories = ["database", "api-bindings"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +proc-macro = true + +[dependencies] +syn = { version = "1", features = ["full", "fold", "extra-traits"] } +quote = "1" diff --git a/trogon-eventstore-macros/LICENSE b/trogon-eventstore-macros/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/trogon-eventstore-macros/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/trogon-eventstore-macros/LICENSES/MIT.txt b/trogon-eventstore-macros/LICENSES/MIT.txt new file mode 100644 index 0000000..190df1d --- /dev/null +++ b/trogon-eventstore-macros/LICENSES/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Yorick Laupa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/kurrentdb-macros/src/lib.rs b/trogon-eventstore-macros/src/lib.rs similarity index 100% rename from kurrentdb-macros/src/lib.rs rename to trogon-eventstore-macros/src/lib.rs diff --git a/kurrentdb/Cargo.toml b/trogon-eventstore/Cargo.toml similarity index 81% rename from kurrentdb/Cargo.toml rename to trogon-eventstore/Cargo.toml index 06fdbd2..9a890ab 100755 --- a/kurrentdb/Cargo.toml +++ b/trogon-eventstore/Cargo.toml @@ -1,19 +1,20 @@ [package] -authors = ["Yorick Laupa "] +authors = ["Straw Hat, LLC"] edition = "2024" -name = "kurrentdb" -version = "1.2.0" +name = "trogon-eventstore" +version = "0.0.1" +publish = false # Uncomment if you want to update messages.rs code-gen. # We disabled codegen.rs because it requires having `protoc` installed on your machine # in order to build that library. # build = "codegen.rs" -description = "Official KurrentDB gRPC client" -keywords = ["database", "event-sourcing", "ddd", "cqrs", "kurrent"] -license = "MIT" +description = "Community-maintained Rust gRPC client for TrogonEventStore" +keywords = ["database", "event-sourcing", "ddd", "cqrs", "eventstore"] +license = "Apache-2.0 AND MIT" readme = "../README.md" -repository = "https://github.com/kurrent-io/KurrentDB-Client-Rust" +repository = "https://github.com/TrogonStack/TrogonEventStore-Client-Rust" categories = ["database", "api-bindings"] @@ -28,7 +29,7 @@ chrono = { version = "0.4", default-features = false, features = [ "serde", "now", ] } -kurrentdb-macros = { path = "../kurrentdb-macros", version = "0.0.1" } +trogon-eventstore-macros = { path = "../trogon-eventstore-macros", version = "0.0.1" } futures = "0.3" http = "1" hyper = { version = "1", features = ["client"] } @@ -79,7 +80,3 @@ ctor = "0.4" [dev-dependencies.tracing-subscriber] version = "0.3" features = ["env-filter", "tracing-log"] - -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] diff --git a/trogon-eventstore/LICENSE b/trogon-eventstore/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/trogon-eventstore/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/trogon-eventstore/LICENSES/MIT.txt b/trogon-eventstore/LICENSES/MIT.txt new file mode 100644 index 0000000..190df1d --- /dev/null +++ b/trogon-eventstore/LICENSES/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Yorick Laupa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/kurrentdb/codegen.rs b/trogon-eventstore/codegen.rs similarity index 100% rename from kurrentdb/codegen.rs rename to trogon-eventstore/codegen.rs diff --git a/kurrentdb/protos/code.proto b/trogon-eventstore/protos/code.proto similarity index 100% rename from kurrentdb/protos/code.proto rename to trogon-eventstore/protos/code.proto diff --git a/kurrentdb/protos/gossip.proto b/trogon-eventstore/protos/gossip.proto similarity index 100% rename from kurrentdb/protos/gossip.proto rename to trogon-eventstore/protos/gossip.proto diff --git a/kurrentdb/protos/monitoring.proto b/trogon-eventstore/protos/monitoring.proto similarity index 100% rename from kurrentdb/protos/monitoring.proto rename to trogon-eventstore/protos/monitoring.proto diff --git a/kurrentdb/protos/operations.proto b/trogon-eventstore/protos/operations.proto similarity index 100% rename from kurrentdb/protos/operations.proto rename to trogon-eventstore/protos/operations.proto diff --git a/kurrentdb/protos/persistent.proto b/trogon-eventstore/protos/persistent.proto similarity index 100% rename from kurrentdb/protos/persistent.proto rename to trogon-eventstore/protos/persistent.proto diff --git a/kurrentdb/protos/projections.proto b/trogon-eventstore/protos/projections.proto similarity index 100% rename from kurrentdb/protos/projections.proto rename to trogon-eventstore/protos/projections.proto diff --git a/kurrentdb/protos/serverfeatures.proto b/trogon-eventstore/protos/serverfeatures.proto similarity index 100% rename from kurrentdb/protos/serverfeatures.proto rename to trogon-eventstore/protos/serverfeatures.proto diff --git a/kurrentdb/protos/shared.proto b/trogon-eventstore/protos/shared.proto similarity index 100% rename from kurrentdb/protos/shared.proto rename to trogon-eventstore/protos/shared.proto diff --git a/kurrentdb/protos/status.proto b/trogon-eventstore/protos/status.proto similarity index 100% rename from kurrentdb/protos/status.proto rename to trogon-eventstore/protos/status.proto diff --git a/kurrentdb/protos/streams.proto b/trogon-eventstore/protos/streams.proto similarity index 100% rename from kurrentdb/protos/streams.proto rename to trogon-eventstore/protos/streams.proto diff --git a/kurrentdb/protos/users.proto b/trogon-eventstore/protos/users.proto similarity index 100% rename from kurrentdb/protos/users.proto rename to trogon-eventstore/protos/users.proto diff --git a/kurrentdb/src/batch.rs b/trogon-eventstore/src/batch.rs similarity index 100% rename from kurrentdb/src/batch.rs rename to trogon-eventstore/src/batch.rs diff --git a/kurrentdb/src/client.rs b/trogon-eventstore/src/client.rs similarity index 100% rename from kurrentdb/src/client.rs rename to trogon-eventstore/src/client.rs diff --git a/kurrentdb/src/commands.rs b/trogon-eventstore/src/commands.rs similarity index 100% rename from kurrentdb/src/commands.rs rename to trogon-eventstore/src/commands.rs diff --git a/kurrentdb/src/event_store/client.rs b/trogon-eventstore/src/event_store/client.rs similarity index 100% rename from kurrentdb/src/event_store/client.rs rename to trogon-eventstore/src/event_store/client.rs diff --git a/kurrentdb/src/event_store/generated.rs b/trogon-eventstore/src/event_store/generated.rs similarity index 100% rename from kurrentdb/src/event_store/generated.rs rename to trogon-eventstore/src/event_store/generated.rs diff --git a/kurrentdb/src/event_store/generated/common.rs b/trogon-eventstore/src/event_store/generated/common.rs similarity index 100% rename from kurrentdb/src/event_store/generated/common.rs rename to trogon-eventstore/src/event_store/generated/common.rs diff --git a/kurrentdb/src/event_store/generated/google.protobuf.rs b/trogon-eventstore/src/event_store/generated/google.protobuf.rs similarity index 100% rename from kurrentdb/src/event_store/generated/google.protobuf.rs rename to trogon-eventstore/src/event_store/generated/google.protobuf.rs diff --git a/kurrentdb/src/event_store/generated/google_rpc.rs b/trogon-eventstore/src/event_store/generated/google_rpc.rs similarity index 100% rename from kurrentdb/src/event_store/generated/google_rpc.rs rename to trogon-eventstore/src/event_store/generated/google_rpc.rs diff --git a/kurrentdb/src/event_store/generated/gossip.rs b/trogon-eventstore/src/event_store/generated/gossip.rs similarity index 100% rename from kurrentdb/src/event_store/generated/gossip.rs rename to trogon-eventstore/src/event_store/generated/gossip.rs diff --git a/kurrentdb/src/event_store/generated/monitoring.rs b/trogon-eventstore/src/event_store/generated/monitoring.rs similarity index 100% rename from kurrentdb/src/event_store/generated/monitoring.rs rename to trogon-eventstore/src/event_store/generated/monitoring.rs diff --git a/kurrentdb/src/event_store/generated/operations.rs b/trogon-eventstore/src/event_store/generated/operations.rs similarity index 100% rename from kurrentdb/src/event_store/generated/operations.rs rename to trogon-eventstore/src/event_store/generated/operations.rs diff --git a/kurrentdb/src/event_store/generated/persistent.rs b/trogon-eventstore/src/event_store/generated/persistent.rs similarity index 100% rename from kurrentdb/src/event_store/generated/persistent.rs rename to trogon-eventstore/src/event_store/generated/persistent.rs diff --git a/kurrentdb/src/event_store/generated/projections.rs b/trogon-eventstore/src/event_store/generated/projections.rs similarity index 100% rename from kurrentdb/src/event_store/generated/projections.rs rename to trogon-eventstore/src/event_store/generated/projections.rs diff --git a/kurrentdb/src/event_store/generated/server_features.rs b/trogon-eventstore/src/event_store/generated/server_features.rs similarity index 100% rename from kurrentdb/src/event_store/generated/server_features.rs rename to trogon-eventstore/src/event_store/generated/server_features.rs diff --git a/kurrentdb/src/event_store/generated/streams.rs b/trogon-eventstore/src/event_store/generated/streams.rs similarity index 100% rename from kurrentdb/src/event_store/generated/streams.rs rename to trogon-eventstore/src/event_store/generated/streams.rs diff --git a/kurrentdb/src/event_store/generated/users.rs b/trogon-eventstore/src/event_store/generated/users.rs similarity index 100% rename from kurrentdb/src/event_store/generated/users.rs rename to trogon-eventstore/src/event_store/generated/users.rs diff --git a/kurrentdb/src/event_store/mod.rs b/trogon-eventstore/src/event_store/mod.rs similarity index 100% rename from kurrentdb/src/event_store/mod.rs rename to trogon-eventstore/src/event_store/mod.rs diff --git a/kurrentdb/src/grpc.rs b/trogon-eventstore/src/grpc.rs similarity index 100% rename from kurrentdb/src/grpc.rs rename to trogon-eventstore/src/grpc.rs diff --git a/kurrentdb/src/http/mod.rs b/trogon-eventstore/src/http/mod.rs similarity index 100% rename from kurrentdb/src/http/mod.rs rename to trogon-eventstore/src/http/mod.rs diff --git a/kurrentdb/src/http/persistent_subscriptions.rs b/trogon-eventstore/src/http/persistent_subscriptions.rs similarity index 100% rename from kurrentdb/src/http/persistent_subscriptions.rs rename to trogon-eventstore/src/http/persistent_subscriptions.rs diff --git a/kurrentdb/src/lib.rs b/trogon-eventstore/src/lib.rs similarity index 96% rename from kurrentdb/src/lib.rs rename to trogon-eventstore/src/lib.rs index 41d2545..373a3b5 100755 --- a/kurrentdb/src/lib.rs +++ b/trogon-eventstore/src/lib.rs @@ -1,4 +1,4 @@ -//! Official Rust [KurrentDB] gRPC Client. +//! Community-maintained Rust gRPC client for TrogonEventStore. //! //! [KurrentDB] is an open-source database built from the ground up for Event Sourcing, with Complex Event Processing in Javascript. //! @@ -11,7 +11,7 @@ //! # Example //! //! ```no_run -//! use eventstore::{ Client, EventData }; +//! use trogon_eventstore::{Client, EventData}; //! use serde::{Serialize, Deserialize}; //! //! #[derive(Serialize, Deserialize, Debug)] diff --git a/kurrentdb/src/operations/gossip.rs b/trogon-eventstore/src/operations/gossip.rs similarity index 99% rename from kurrentdb/src/operations/gossip.rs rename to trogon-eventstore/src/operations/gossip.rs index aeae0f3..1065c4b 100644 --- a/kurrentdb/src/operations/gossip.rs +++ b/trogon-eventstore/src/operations/gossip.rs @@ -8,6 +8,7 @@ use serde::{Deserialize, Serialize}; use tonic::{Request, Status}; use uuid::Uuid; +#[allow(clippy::result_large_err)] pub async fn read( settings: &ClientSettings, client: &HyperClient, diff --git a/kurrentdb/src/operations/mod.rs b/trogon-eventstore/src/operations/mod.rs similarity index 99% rename from kurrentdb/src/operations/mod.rs rename to trogon-eventstore/src/operations/mod.rs index 2f5ffd0..4dfc365 100644 --- a/kurrentdb/src/operations/mod.rs +++ b/trogon-eventstore/src/operations/mod.rs @@ -1,7 +1,7 @@ use futures::stream::TryStreamExt; -use kurrentdb_macros::{options, streaming}; use std::time::SystemTime; use std::{collections::HashMap, time::Duration}; +use trogon_eventstore_macros::{options, streaming}; use crate::event_store::generated::monitoring; use crate::event_store::generated::operations; diff --git a/kurrentdb/src/options/append_to_stream.rs b/trogon-eventstore/src/options/append_to_stream.rs similarity index 97% rename from kurrentdb/src/options/append_to_stream.rs rename to trogon-eventstore/src/options/append_to_stream.rs index b86a1fc..106ddd0 100644 --- a/kurrentdb/src/options/append_to_stream.rs +++ b/trogon-eventstore/src/options/append_to_stream.rs @@ -1,7 +1,7 @@ use crate::event_store::client::streams::append_req::options::ExpectedStreamRevision; use crate::private::Sealed; use crate::{EventData, StreamState}; -use kurrentdb_macros::options; +use trogon_eventstore_macros::options; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/batch_append.rs b/trogon-eventstore/src/options/batch_append.rs similarity index 65% rename from kurrentdb/src/options/batch_append.rs rename to trogon-eventstore/src/options/batch_append.rs index 74a1f7d..0f94fbb 100644 --- a/kurrentdb/src/options/batch_append.rs +++ b/trogon-eventstore/src/options/batch_append.rs @@ -1,4 +1,4 @@ -use kurrentdb_macros::{options, streaming}; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone, Default)] diff --git a/kurrentdb/src/options/delete_stream.rs b/trogon-eventstore/src/options/delete_stream.rs similarity index 94% rename from kurrentdb/src/options/delete_stream.rs rename to trogon-eventstore/src/options/delete_stream.rs index 31eb355..c60883a 100644 --- a/kurrentdb/src/options/delete_stream.rs +++ b/trogon-eventstore/src/options/delete_stream.rs @@ -1,5 +1,5 @@ use crate::StreamState; -use kurrentdb_macros::options; +use trogon_eventstore_macros::options; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/mod.rs b/trogon-eventstore/src/options/mod.rs similarity index 100% rename from kurrentdb/src/options/mod.rs rename to trogon-eventstore/src/options/mod.rs diff --git a/kurrentdb/src/options/persistent_subscription.rs b/trogon-eventstore/src/options/persistent_subscription.rs similarity index 99% rename from kurrentdb/src/options/persistent_subscription.rs rename to trogon-eventstore/src/options/persistent_subscription.rs index cbb03e0..7a44984 100644 --- a/kurrentdb/src/options/persistent_subscription.rs +++ b/trogon-eventstore/src/options/persistent_subscription.rs @@ -2,8 +2,8 @@ use crate::{ PersistentSubscriptionSettings, Position, StreamPosition, SubscriptionFilter, SystemConsumerStrategy, }; -use kurrentdb_macros::{options, streaming}; use std::time::Duration; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone, Default)] diff --git a/kurrentdb/src/options/projections.rs b/trogon-eventstore/src/options/projections.rs similarity index 98% rename from kurrentdb/src/options/projections.rs rename to trogon-eventstore/src/options/projections.rs index cf84f39..68a165a 100644 --- a/kurrentdb/src/options/projections.rs +++ b/trogon-eventstore/src/options/projections.rs @@ -1,4 +1,4 @@ -use kurrentdb_macros::options; +use trogon_eventstore_macros::options; /// Selects which projection engine the server should use when creating a /// continuous projection. `V1` is the default and is supported by every server diff --git a/kurrentdb/src/options/read_all.rs b/trogon-eventstore/src/options/read_all.rs similarity index 97% rename from kurrentdb/src/options/read_all.rs rename to trogon-eventstore/src/options/read_all.rs index f1e8229..f9d915c 100644 --- a/kurrentdb/src/options/read_all.rs +++ b/trogon-eventstore/src/options/read_all.rs @@ -1,5 +1,5 @@ use crate::{Position, ReadDirection, StreamPosition, SubscriptionFilter}; -use kurrentdb_macros::{options, streaming}; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/read_stream.rs b/trogon-eventstore/src/options/read_stream.rs similarity index 97% rename from kurrentdb/src/options/read_stream.rs rename to trogon-eventstore/src/options/read_stream.rs index 2d63bc4..fa44c62 100644 --- a/kurrentdb/src/options/read_stream.rs +++ b/trogon-eventstore/src/options/read_stream.rs @@ -1,5 +1,5 @@ use crate::{ReadDirection, StreamPosition}; -use kurrentdb_macros::{options, streaming}; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/retry.rs b/trogon-eventstore/src/options/retry.rs similarity index 100% rename from kurrentdb/src/options/retry.rs rename to trogon-eventstore/src/options/retry.rs diff --git a/kurrentdb/src/options/subscribe_to_all.rs b/trogon-eventstore/src/options/subscribe_to_all.rs similarity index 97% rename from kurrentdb/src/options/subscribe_to_all.rs rename to trogon-eventstore/src/options/subscribe_to_all.rs index 8cb3a2c..9b3e8d0 100644 --- a/kurrentdb/src/options/subscribe_to_all.rs +++ b/trogon-eventstore/src/options/subscribe_to_all.rs @@ -1,6 +1,6 @@ use crate::options::retry::RetryOptions; use crate::{Position, StreamPosition, SubscriptionFilter}; -use kurrentdb_macros::{options, streaming}; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/subscribe_to_stream.rs b/trogon-eventstore/src/options/subscribe_to_stream.rs similarity index 97% rename from kurrentdb/src/options/subscribe_to_stream.rs rename to trogon-eventstore/src/options/subscribe_to_stream.rs index c98c2b0..79ce264 100644 --- a/kurrentdb/src/options/subscribe_to_stream.rs +++ b/trogon-eventstore/src/options/subscribe_to_stream.rs @@ -1,6 +1,6 @@ use crate::StreamPosition; use crate::options::retry::RetryOptions; -use kurrentdb_macros::{options, streaming}; +use trogon_eventstore_macros::{options, streaming}; options! { #[derive(Clone)] diff --git a/kurrentdb/src/options/tombstone_stream.rs b/trogon-eventstore/src/options/tombstone_stream.rs similarity index 94% rename from kurrentdb/src/options/tombstone_stream.rs rename to trogon-eventstore/src/options/tombstone_stream.rs index 725296d..310dba5 100644 --- a/kurrentdb/src/options/tombstone_stream.rs +++ b/trogon-eventstore/src/options/tombstone_stream.rs @@ -1,5 +1,5 @@ use crate::StreamState; -use kurrentdb_macros::options; +use trogon_eventstore_macros::options; options! { #[derive(Clone)] diff --git a/kurrentdb/src/private.rs b/trogon-eventstore/src/private.rs similarity index 100% rename from kurrentdb/src/private.rs rename to trogon-eventstore/src/private.rs diff --git a/kurrentdb/src/projection_client.rs b/trogon-eventstore/src/projection_client.rs similarity index 100% rename from kurrentdb/src/projection_client.rs rename to trogon-eventstore/src/projection_client.rs diff --git a/kurrentdb/src/request.rs b/trogon-eventstore/src/request.rs similarity index 100% rename from kurrentdb/src/request.rs rename to trogon-eventstore/src/request.rs diff --git a/kurrentdb/src/server_features.rs b/trogon-eventstore/src/server_features.rs similarity index 99% rename from kurrentdb/src/server_features.rs rename to trogon-eventstore/src/server_features.rs index 218d571..40a2e2d 100644 --- a/kurrentdb/src/server_features.rs +++ b/trogon-eventstore/src/server_features.rs @@ -132,6 +132,7 @@ impl ServerInfo { } } +#[allow(clippy::result_large_err)] pub(crate) async fn supported_methods( client: &HyperClient, uri: hyper::Uri, diff --git a/kurrentdb/src/types.rs b/trogon-eventstore/src/types.rs similarity index 100% rename from kurrentdb/src/types.rs rename to trogon-eventstore/src/types.rs diff --git a/kurrentdb/tests/api/mod.rs b/trogon-eventstore/tests/api/mod.rs similarity index 100% rename from kurrentdb/tests/api/mod.rs rename to trogon-eventstore/tests/api/mod.rs diff --git a/kurrentdb/tests/api/operations.rs b/trogon-eventstore/tests/api/operations.rs similarity index 87% rename from kurrentdb/tests/api/operations.rs rename to trogon-eventstore/tests/api/operations.rs index 83351f6..667c7a8 100644 --- a/kurrentdb/tests/api/operations.rs +++ b/trogon-eventstore/tests/api/operations.rs @@ -1,13 +1,13 @@ -use kurrentdb::operations; -use kurrentdb::operations::StatsOptions; use std::time::Duration; use tracing::debug; +use trogon_eventstore::operations; +use trogon_eventstore::operations::StatsOptions; fn generate_login(names: &mut names::Generator<'_>) -> String { names.next().unwrap().replace("-", "_") } -async fn test_gossip(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_gossip(client: &operations::Client) -> trogon_eventstore::Result<()> { let gossip = client.read_gossip().await?; assert!(!gossip.is_empty()); @@ -15,7 +15,7 @@ async fn test_gossip(client: &operations::Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_stats(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_stats(client: &operations::Client) -> trogon_eventstore::Result<()> { let options = StatsOptions::default().refresh_time(Duration::from_millis(500)); let mut stream = client.stats(&options).await?; @@ -28,7 +28,7 @@ async fn test_stats(client: &operations::Client) -> kurrentdb::Result<()> { async fn test_create_user( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { client .create_user( generate_login(names), @@ -45,7 +45,7 @@ async fn test_create_user( async fn test_update_user( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -74,7 +74,7 @@ async fn test_update_user( async fn test_delete_user( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -97,7 +97,7 @@ async fn test_delete_user( async fn test_enable_user( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -120,7 +120,7 @@ async fn test_enable_user( async fn test_disable_user( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -147,7 +147,7 @@ async fn test_disable_user( async fn test_user_details( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -172,7 +172,7 @@ async fn test_user_details( async fn test_change_user_password( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); let password = names.next().unwrap(); @@ -201,7 +201,7 @@ async fn test_change_user_password( async fn test_reset_user_password( client: &operations::Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let login = generate_login(names); client @@ -221,27 +221,27 @@ async fn test_reset_user_password( Ok(()) } -async fn test_merge_indexes(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_merge_indexes(client: &operations::Client) -> trogon_eventstore::Result<()> { client.merge_indexes(&Default::default()).await } -async fn test_resign_node(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_resign_node(client: &operations::Client) -> trogon_eventstore::Result<()> { client.resign_node(&Default::default()).await } -async fn test_set_node_priority(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_set_node_priority(client: &operations::Client) -> trogon_eventstore::Result<()> { client.set_node_priority(1, &Default::default()).await } async fn test_op_restart_persistent_subscription_subsystem( client: &operations::Client, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { client .restart_persistent_subscriptions(&Default::default()) .await } -async fn test_scavenge(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_scavenge(client: &operations::Client) -> trogon_eventstore::Result<()> { let result = client.start_scavenge(1, 0, &Default::default()).await?; let result = client.stop_scavenge(result.id(), &Default::default()).await; @@ -250,11 +250,11 @@ async fn test_scavenge(client: &operations::Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_shutdown(client: &operations::Client) -> kurrentdb::Result<()> { +async fn test_shutdown(client: &operations::Client) -> trogon_eventstore::Result<()> { client.shutdown(&Default::default()).await } -pub async fn tests(client: kurrentdb::Client) -> eyre::Result<()> { +pub async fn tests(client: trogon_eventstore::Client) -> eyre::Result<()> { let mut generator = names::Generator::default(); let generator = &mut generator; let client: operations::Client = client.into(); diff --git a/kurrentdb/tests/api/persistent_subscriptions.rs b/trogon-eventstore/tests/api/persistent_subscriptions.rs similarity index 84% rename from kurrentdb/tests/api/persistent_subscriptions.rs rename to trogon-eventstore/tests/api/persistent_subscriptions.rs index 4557917..f59e165 100644 --- a/kurrentdb/tests/api/persistent_subscriptions.rs +++ b/trogon-eventstore/tests/api/persistent_subscriptions.rs @@ -1,13 +1,13 @@ use crate::common::{fresh_stream_id, generate_events}; -use kurrentdb::{Client, StreamPosition}; use std::time::Duration; use tracing::{debug, warn}; +use trogon_eventstore::{Client, StreamPosition}; -async fn test_create_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn test_create_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("create_persistent_sub"); - let options = - kurrentdb::PersistentSubscriptionOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::PersistentSubscriptionOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription(stream_id, "a_group_name", &options) .await?; @@ -18,10 +18,10 @@ async fn test_create_persistent_subscription(client: &Client) -> kurrentdb::Resu async fn test_create_persistent_subscription_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let group_name = names.next().unwrap(); - let options = - kurrentdb::PersistentSubscriptionToAllOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::PersistentSubscriptionToAllOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription_to_all(group_name, &options) @@ -31,11 +31,11 @@ async fn test_create_persistent_subscription_to_all( } // We test we can successfully update a persistent subscription. -async fn test_update_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn test_update_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("update_persistent_sub"); - let mut options = - kurrentdb::PersistentSubscriptionOptions::default().deadline(Duration::from_secs(2)); + let mut options = trogon_eventstore::PersistentSubscriptionOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription(stream_id.as_str(), "a_group_name", &options) @@ -53,11 +53,11 @@ async fn test_update_persistent_subscription(client: &Client) -> kurrentdb::Resu async fn test_update_persistent_subscription_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let group_name = names.next().unwrap(); - let mut options = - kurrentdb::PersistentSubscriptionToAllOptions::default().deadline(Duration::from_secs(2)); + let mut options = trogon_eventstore::PersistentSubscriptionToAllOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription_to_all(group_name.as_str(), &options) @@ -73,17 +73,17 @@ async fn test_update_persistent_subscription_to_all( } // We test we can successfully delete a persistent subscription. -async fn test_delete_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn test_delete_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("delete_persistent_sub"); - let options = - kurrentdb::PersistentSubscriptionOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::PersistentSubscriptionOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription(stream_id.as_str(), "a_group_name", &options) .await?; - let options = - kurrentdb::DeletePersistentSubscriptionOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::DeletePersistentSubscriptionOptions::default() + .deadline(Duration::from_secs(2)); client .delete_persistent_subscription(stream_id, "a_group_name", &options) @@ -95,17 +95,17 @@ async fn test_delete_persistent_subscription(client: &Client) -> kurrentdb::Resu async fn test_delete_persistent_subscription_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let group_name = names.next().unwrap(); - let options = - kurrentdb::PersistentSubscriptionToAllOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::PersistentSubscriptionToAllOptions::default() + .deadline(Duration::from_secs(2)); client .create_persistent_subscription_to_all(group_name.as_str(), &options) .await?; - let options = - kurrentdb::DeletePersistentSubscriptionOptions::default().deadline(Duration::from_secs(2)); + let options = trogon_eventstore::DeletePersistentSubscriptionOptions::default() + .deadline(Duration::from_secs(2)); client .delete_persistent_subscription_to_all(group_name.as_str(), &options) @@ -114,7 +114,7 @@ async fn test_delete_persistent_subscription_to_all( Ok(()) } -async fn test_persistent_subscription(client: &Client) -> kurrentdb::Result<()> { +async fn test_persistent_subscription(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("persistent_subscription"); let events = generate_events("persistent-subscription-test", 5); @@ -149,7 +149,7 @@ async fn test_persistent_subscription(client: &Client) -> kurrentdb::Result<()> } } - Ok::(count) + Ok::(count) }); let events = generate_events("es6-persistent-subscription-test", 5); @@ -160,7 +160,7 @@ async fn test_persistent_subscription(client: &Client) -> kurrentdb::Result<()> let count = handle .await .map_err(|_| { - kurrentdb::Error::IllegalStateError( + trogon_eventstore::Error::IllegalStateError( "Error when joining the tokio thread handle".to_string(), ) }) @@ -178,11 +178,11 @@ async fn test_persistent_subscription(client: &Client) -> kurrentdb::Result<()> async fn test_persistent_subscription_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let group_name = names.next().unwrap(); - let options = kurrentdb::PersistentSubscriptionToAllOptions::default() - .start_from(kurrentdb::StreamPosition::Start); + let options = trogon_eventstore::PersistentSubscriptionToAllOptions::default() + .start_from(trogon_eventstore::StreamPosition::Start); client .create_persistent_subscription_to_all(group_name.as_str(), &options) @@ -206,7 +206,7 @@ async fn test_persistent_subscription_to_all( } } - Ok::<_, kurrentdb::Error>(count) + Ok::<_, trogon_eventstore::Error>(count) }) .await; @@ -223,7 +223,7 @@ async fn test_persistent_subscription_to_all( async fn test_list_persistent_subscriptions( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let mut count = 0; let group_name = "group_name"; let mut expected_set = std::collections::HashSet::new(); @@ -260,7 +260,7 @@ async fn test_list_persistent_subscriptions( async fn test_list_persistent_subscriptions_for_stream( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let mut count = 0; let stream_name = names.next().unwrap(); let mut expected_set = std::collections::HashSet::new(); @@ -305,7 +305,7 @@ async fn test_list_persistent_subscriptions_for_stream( async fn test_list_persistent_subscriptions_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let mut count = 0; let mut expected_set = std::collections::HashSet::new(); @@ -341,7 +341,7 @@ async fn test_list_persistent_subscriptions_to_all( async fn test_get_persistent_subscription_info( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let stream_name = names.next().unwrap(); let group_name = names.next().unwrap(); @@ -374,7 +374,7 @@ async fn test_get_persistent_subscription_info( async fn test_get_persistent_subscription_info_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let group_name = names.next().unwrap(); client @@ -397,7 +397,7 @@ async fn test_get_persistent_subscription_info_to_all( async fn test_replay_parked_messages( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let stream_name = names.next().unwrap(); let group_name = names.next().unwrap(); let event_count = 2; @@ -428,8 +428,12 @@ async fn test_replay_parked_messages( for _ in 0..event_count { let event = sub.next().await?; - sub.nack(&event, kurrentdb::NakAction::Park, "because reasons") - .await?; + sub.nack( + &event, + trogon_eventstore::NakAction::Park, + "because reasons", + ) + .await?; } debug!("We let the server the time to write those parked event in the stream..."); @@ -449,7 +453,7 @@ async fn test_replay_parked_messages( sub.ack(&event).await?; } - Ok::<(), kurrentdb::Error>(()) + Ok::<(), trogon_eventstore::Error>(()) }) .await; @@ -466,7 +470,7 @@ async fn test_replay_parked_messages( async fn test_replay_parked_messages_to_all( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let stream_name = names.next().unwrap(); let group_name = names.next().unwrap(); let event_count = 2; @@ -491,8 +495,12 @@ async fn test_replay_parked_messages_to_all( let event = sub.next().await?; if event.get_original_stream_id() == stream_name.as_str() { - sub.nack(&event, kurrentdb::NakAction::Park, "because reasons") - .await?; + sub.nack( + &event, + trogon_eventstore::NakAction::Park, + "because reasons", + ) + .await?; count += 1; if count == event_count { @@ -530,7 +538,7 @@ async fn test_replay_parked_messages_to_all( } } - Ok::<(), kurrentdb::Error>(()) + Ok::<(), trogon_eventstore::Error>(()) }) .await; @@ -544,7 +552,9 @@ async fn test_replay_parked_messages_to_all( } } -async fn test_restart_persistent_subscription_subsystem(client: &Client) -> kurrentdb::Result<()> { +async fn test_restart_persistent_subscription_subsystem( + client: &Client, +) -> trogon_eventstore::Result<()> { client .restart_persistent_subscription_subsystem(&Default::default()) .await @@ -553,7 +563,7 @@ async fn test_restart_persistent_subscription_subsystem(client: &Client) -> kurr async fn test_persistent_subscription_encoding( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let stream_name = format!("/{}/foo", names.next().unwrap()); let group_name = format!("/{}/foo", names.next().unwrap()); @@ -589,7 +599,7 @@ async fn test_persistent_subscription_encoding( async fn test_persistent_subscription_info_with_connection_details( client: &Client, names: &mut names::Generator<'_>, -) -> kurrentdb::Result<()> { +) -> trogon_eventstore::Result<()> { let stream_name = names.next().unwrap(); let group_name = names.next().unwrap(); @@ -611,23 +621,25 @@ async fn test_persistent_subscription_info_with_connection_details( let client2 = client.clone(); let stream_name_2 = stream_name.clone(); - let append_handle: tokio::task::JoinHandle> = tokio::spawn(async move { - loop { - let event = generate_events("foobar", 1); - let _ = client2 - .append_to_stream(stream_name_2.as_str(), &Default::default(), event) - .await?; + let append_handle: tokio::task::JoinHandle> = + tokio::spawn(async move { + loop { + let event = generate_events("foobar", 1); + let _ = client2 + .append_to_stream(stream_name_2.as_str(), &Default::default(), event) + .await?; - tokio::time::sleep(Duration::from_millis(500)).await; - } - }); + tokio::time::sleep(Duration::from_millis(500)).await; + } + }); - let ack_handle: tokio::task::JoinHandle> = tokio::spawn(async move { - loop { - let event = sub.next().await?; - sub.ack(&event).await?; - } - }); + let ack_handle: tokio::task::JoinHandle> = + tokio::spawn(async move { + loop { + let event = sub.next().await?; + sub.ack(&event).await?; + } + }); tokio::time::sleep(Duration::from_millis(500)).await; @@ -660,7 +672,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_create_persistent_subscription_to_all"); if let Err(e) = test_create_persistent_subscription_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -672,7 +684,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_update_persistent_subscription_to_all"); if let Err(e) = test_update_persistent_subscription_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -687,7 +699,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_delete_persistent_subscription_to_all"); if let Err(e) = test_delete_persistent_subscription_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -702,7 +714,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_persistent_subscription_to_all"); if let Err(e) = test_persistent_subscription_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -720,7 +732,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_list_persistent_subscriptions_to_all..."); if let Err(e) = test_list_persistent_subscriptions_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -736,7 +748,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Before test_get_persistent_subscription_info_to_all..."); if let Err(e) = test_get_persistent_subscription_info_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); @@ -751,7 +763,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_replay_parked_messages_to_all..."); if let Err(e) = test_replay_parked_messages_to_all(&client, &mut name_generator).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!( "Persistent subscription to $all is not supported on the server we are targeting" ); diff --git a/kurrentdb/tests/api/projections.rs b/trogon-eventstore/tests/api/projections.rs similarity index 99% rename from kurrentdb/tests/api/projections.rs rename to trogon-eventstore/tests/api/projections.rs index 9048cd7..b794463 100644 --- a/kurrentdb/tests/api/projections.rs +++ b/trogon-eventstore/tests/api/projections.rs @@ -1,7 +1,7 @@ use crate::common::generate_events; -use kurrentdb::{Client, ProjectionClient}; use serde::Deserialize; use tracing::{debug, error, warn}; +use trogon_eventstore::{Client, ProjectionClient}; // This is the state of the projection, see tests/fixtures/projection.js. #[derive(Deserialize, Debug)] diff --git a/kurrentdb/tests/api/streams.rs b/trogon-eventstore/tests/api/streams.rs similarity index 85% rename from kurrentdb/tests/api/streams.rs rename to trogon-eventstore/tests/api/streams.rs index ad20706..bc094e5 100644 --- a/kurrentdb/tests/api/streams.rs +++ b/trogon-eventstore/tests/api/streams.rs @@ -1,15 +1,15 @@ use crate::common::{fresh_stream_id, generate_events}; use chrono::{Datelike, Utc}; use futures::channel::oneshot; -use kurrentdb::{ - Acl, Client, ReadEvent, StreamAclBuilder, StreamMetadataBuilder, StreamMetadataResult, - StreamName, StreamPosition, SubscriptionEvent, -}; use std::collections::HashMap; use std::time::Duration; use tracing::{debug, warn}; +use trogon_eventstore::{ + Acl, Client, ReadEvent, StreamAclBuilder, StreamMetadataBuilder, StreamMetadataResult, + StreamName, StreamPosition, SubscriptionEvent, +}; -async fn test_write_events(client: &Client) -> kurrentdb::Result<()> { +async fn test_write_events(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("write_events"); let events = generate_events("write-events-test", 3); @@ -22,7 +22,7 @@ async fn test_write_events(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_tick_date_conversion(client: &Client) -> kurrentdb::Result<()> { +async fn test_tick_date_conversion(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("ticks_date"); let events = generate_events("about_date_stuff", 1); @@ -46,7 +46,7 @@ async fn test_tick_date_conversion(client: &Client) -> kurrentdb::Result<()> { } // We read all stream events by batch. -async fn test_read_all_stream_events(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_all_stream_events(client: &Client) -> trogon_eventstore::Result<()> { // kurrent should always have "some" events in $all, since kurrent itself uses streams, ouroboros style. let result = client.read_all(&Default::default()).await?.next().await?; @@ -57,7 +57,7 @@ async fn test_read_all_stream_events(client: &Client) -> kurrentdb::Result<()> { // We read stream events by batch. We also test if we can properly read a // stream thoroughly. -async fn test_read_stream_events(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_stream_events(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("read_stream_events"); let events = generate_events("es6-read-stream-events-test", 10); @@ -85,7 +85,7 @@ async fn test_read_stream_events(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_read_stream_events_with_position(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_stream_events_with_position(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("read_position"); let events = generate_events("read_position", 10); @@ -93,7 +93,7 @@ async fn test_read_stream_events_with_position(client: &Client) -> kurrentdb::Re .append_to_stream(stream_id.as_str(), &Default::default(), events) .await?; - let options = kurrentdb::ReadStreamOptions::default() + let options = trogon_eventstore::ReadStreamOptions::default() .forwards() .position(StreamPosition::Start); @@ -111,7 +111,7 @@ async fn test_read_stream_events_with_position(client: &Client) -> kurrentdb::Re Ok(()) } -async fn test_read_stream_populates_log_position(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_stream_populates_log_position(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("read_stream_populates_log_position"); let events = generate_events("read_stream_populates_log_position", 1); @@ -135,7 +135,7 @@ async fn test_read_stream_populates_log_position(client: &Client) -> kurrentdb:: Ok(()) } -async fn test_metadata(client: &Client) -> kurrentdb::Result<()> { +async fn test_metadata(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("metadata"); let events = generate_events("metadata-test", 5); @@ -167,7 +167,7 @@ async fn test_metadata(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_metadata_not_exist(client: &Client) -> kurrentdb::Result<()> { +async fn test_metadata_not_exist(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("metadata_not_exist"); let events = generate_events("metadata-test-not-exist", 5); @@ -186,14 +186,14 @@ async fn test_metadata_not_exist(client: &Client) -> kurrentdb::Result<()> { // We check to see the client can handle the correct GRPC proto response when // a stream does not exist -async fn test_read_stream_events_non_existent(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_stream_events_non_existent(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("read_stream_events"); let mut stream = client .read_stream(stream_id.as_str(), &Default::default()) .await?; - if let Err(kurrentdb::Error::ResourceNotFound) = stream.next().await { + if let Err(trogon_eventstore::Error::ResourceNotFound) = stream.next().await { return Ok(()); } @@ -201,7 +201,7 @@ async fn test_read_stream_events_non_existent(client: &Client) -> kurrentdb::Res } // We write an event into a stream then soft delete that stream. -async fn test_delete_stream(client: &Client) -> kurrentdb::Result<()> { +async fn test_delete_stream(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("delete"); let events = generate_events("delete-test", 1); @@ -219,7 +219,7 @@ async fn test_delete_stream(client: &Client) -> kurrentdb::Result<()> { } // We write an event into a stream then hard delete that stream. -async fn test_tombstone_stream(client: &Client) -> kurrentdb::Result<()> { +async fn test_tombstone_stream(client: &Client) -> trogon_eventstore::Result<()> { let stream_id = fresh_stream_id("tombstone"); let events = generate_events("tombstone-test", 1); @@ -237,7 +237,7 @@ async fn test_tombstone_stream(client: &Client) -> kurrentdb::Result<()> { .read_stream(stream_id.as_str(), &Default::default()) .await; - if let Err(kurrentdb::Error::ResourceDeleted) = result { + if let Err(trogon_eventstore::Error::ResourceDeleted) = result { Ok(()) } else { panic!("Expected stream deleted error"); @@ -258,8 +258,8 @@ async fn test_subscription(client: &Client) -> eyre::Result<()> { .append_to_stream(stream_id.as_str(), &Default::default(), events_before) .await?; - let options = - kurrentdb::SubscribeToStreamOptions::default().start_from(kurrentdb::StreamPosition::Start); + let options = trogon_eventstore::SubscribeToStreamOptions::default() + .start_from(trogon_eventstore::StreamPosition::Start); let mut sub = client .subscribe_to_stream(stream_id.as_str(), &options) @@ -281,7 +281,7 @@ async fn test_subscription(client: &Client) -> eyre::Result<()> { } tx.send(count).unwrap(); - Ok(()) as kurrentdb::Result<()> + Ok(()) as trogon_eventstore::Result<()> }); let _ = client @@ -303,7 +303,7 @@ async fn test_subscription(client: &Client) -> eyre::Result<()> { Ok(()) } -async fn test_subscription_caughtup(client: &Client) -> kurrentdb::Result<()> { +async fn test_subscription_caughtup(client: &Client) -> trogon_eventstore::Result<()> { let info = client.server_info().await?; if info.version() < (23, 10) { @@ -321,8 +321,8 @@ async fn test_subscription_caughtup(client: &Client) -> kurrentdb::Result<()> { .append_to_stream(stream_id.clone(), &Default::default(), events) .await?; - let options = - kurrentdb::SubscribeToStreamOptions::default().start_from(kurrentdb::StreamPosition::Start); + let options = trogon_eventstore::SubscribeToStreamOptions::default() + .start_from(trogon_eventstore::StreamPosition::Start); let mut sub = client .subscribe_to_stream(stream_id.clone(), &options) @@ -338,7 +338,7 @@ async fn test_subscription_caughtup(client: &Client) -> kurrentdb::Result<()> { } let _ = tx.send(()); - Ok(()) as kurrentdb::Result<()> + Ok(()) as trogon_eventstore::Result<()> }); if tokio::time::timeout(Duration::from_secs(60), recv) @@ -351,10 +351,10 @@ async fn test_subscription_caughtup(client: &Client) -> kurrentdb::Result<()> { Ok(()) } -async fn test_subscription_all_filter(client: &Client) -> kurrentdb::Result<()> { - let filter = kurrentdb::SubscriptionFilter::on_event_type().exclude_system_events(); - let options = kurrentdb::SubscribeToAllOptions::default() - .position(kurrentdb::StreamPosition::Start) +async fn test_subscription_all_filter(client: &Client) -> trogon_eventstore::Result<()> { + let filter = trogon_eventstore::SubscriptionFilter::on_event_type().exclude_system_events(); + let options = trogon_eventstore::SubscribeToAllOptions::default() + .position(trogon_eventstore::StreamPosition::Start) .filter(filter); let mut sub = client.subscribe_to_all(&options).await; @@ -364,7 +364,7 @@ async fn test_subscription_all_filter(client: &Client) -> kurrentdb::Result<()> assert!(!event.get_original_event().event_type.starts_with('$')); - Ok(()) as kurrentdb::Result<()> + Ok(()) as trogon_eventstore::Result<()> }) .await { @@ -375,18 +375,22 @@ async fn test_subscription_all_filter(client: &Client) -> kurrentdb::Result<()> Ok(()) } -async fn test_batch_append(client: &Client) -> kurrentdb::Result<()> { +async fn test_batch_append(client: &Client) -> trogon_eventstore::Result<()> { let batch_client = client.batch_append(&Default::default()).await?; for _ in 0..3 { let stream_id = fresh_stream_id("batch-append"); let events = generate_events("batch-append-type", 3); let _ = batch_client - .append_to_stream(stream_id.as_str(), kurrentdb::StreamState::Any, events) + .append_to_stream( + stream_id.as_str(), + trogon_eventstore::StreamState::Any, + events, + ) .await?; - let options = kurrentdb::ReadStreamOptions::default() + let options = trogon_eventstore::ReadStreamOptions::default() .forwards() - .position(kurrentdb::StreamPosition::Start); + .position(trogon_eventstore::StreamPosition::Start); let mut stream = client.read_stream(stream_id.as_str(), &options).await?; let mut cpt = 0usize; @@ -402,7 +406,7 @@ async fn test_batch_append(client: &Client) -> kurrentdb::Result<()> { } // Tests that filtering works correctly when reading from $all stream -async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { +async fn test_read_all_filter(client: &Client) -> trogon_eventstore::Result<()> { // Create a unique prefix for our test events to make them identifiable let unique_prefix = format!("filter-test-{}", uuid::Uuid::new_v4()); let stream_id_prefix = format!("filter-stream-{}", uuid::Uuid::new_v4()); @@ -418,17 +422,17 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // Create event data directly without using serde_json::Result let events_to_append1 = vec![ - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &filtered_type, &serde_json::json!({"filtered": true, "index": 1}), ) .unwrap(), - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &unfiltered_type, &serde_json::json!({"filtered": false, "index": 2}), ) .unwrap(), - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &filtered_type, &serde_json::json!({"filtered": true, "index": 3}), ) @@ -437,12 +441,12 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // Append events to second stream let events_to_append2 = vec![ - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &filtered_type, &serde_json::json!({"filtered": true, "index": 4}), ) .unwrap(), - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &filtered_type, &serde_json::json!({"filtered": true, "index": 5}), ) @@ -451,7 +455,7 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // Append to other stream (should be excluded by stream prefix filter) let events_other = vec![ - kurrentdb::EventData::json( + trogon_eventstore::EventData::json( &filtered_type, &serde_json::json!({"filtered": true, "index": 99}), ) @@ -476,8 +480,8 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // TEST 1: Event type prefix filtering debug!("Testing event type prefix filtering"); - let filter1 = kurrentdb::SubscriptionFilter::on_event_type().add_prefix(&filtered_type); - let options1 = kurrentdb::ReadAllOptions::default() + let filter1 = trogon_eventstore::SubscriptionFilter::on_event_type().add_prefix(&filtered_type); + let options1 = trogon_eventstore::ReadAllOptions::default() .filter(filter1) .max_count(100); @@ -510,8 +514,9 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // TEST 2: Stream name prefix filtering debug!("Testing stream name prefix filtering"); - let filter2 = kurrentdb::SubscriptionFilter::on_stream_name().add_prefix(&stream_id_prefix); - let options2 = kurrentdb::ReadAllOptions::default() + let filter2 = + trogon_eventstore::SubscriptionFilter::on_stream_name().add_prefix(&stream_id_prefix); + let options2 = trogon_eventstore::ReadAllOptions::default() .filter(filter2) .max_count(100); @@ -540,9 +545,9 @@ async fn test_read_all_filter(client: &Client) -> kurrentdb::Result<()> { // TEST 3: Regular expression pattern matching debug!("Testing regex pattern matching"); - let regex_filter = kurrentdb::SubscriptionFilter::on_event_type() + let regex_filter = trogon_eventstore::SubscriptionFilter::on_event_type() .regex(&format!("{}.*include", unique_prefix)); - let regex_options = kurrentdb::ReadAllOptions::default() + let regex_options = trogon_eventstore::ReadAllOptions::default() .filter(regex_filter) .max_count(100); @@ -627,7 +632,7 @@ pub async fn tests(client: Client) -> eyre::Result<()> { debug!("Complete"); debug!("Before test_batch_append"); if let Err(e) = test_batch_append(&client).await { - if let kurrentdb::Error::UnsupportedFeature = e { + if let trogon_eventstore::Error::UnsupportedFeature = e { warn!("batch_append is not supported on the server we are targeting"); Ok(()) } else { diff --git a/kurrentdb/tests/common.rs b/trogon-eventstore/tests/common.rs similarity index 93% rename from kurrentdb/tests/common.rs rename to trogon-eventstore/tests/common.rs index c6b62ec..ac0518a 100644 --- a/kurrentdb/tests/common.rs +++ b/trogon-eventstore/tests/common.rs @@ -1,5 +1,5 @@ -use kurrentdb::EventData; use serde_json::json; +use trogon_eventstore::EventData; pub fn fresh_stream_id(prefix: &str) -> String { let uuid = uuid::Uuid::new_v4(); diff --git a/kurrentdb/tests/fixtures/connection_string/mockups.toml b/trogon-eventstore/tests/fixtures/connection_string/mockups.toml similarity index 100% rename from kurrentdb/tests/fixtures/connection_string/mockups.toml rename to trogon-eventstore/tests/fixtures/connection_string/mockups.toml diff --git a/kurrentdb/tests/fixtures/projection-updated.js b/trogon-eventstore/tests/fixtures/projection-updated.js similarity index 100% rename from kurrentdb/tests/fixtures/projection-updated.js rename to trogon-eventstore/tests/fixtures/projection-updated.js diff --git a/kurrentdb/tests/fixtures/projection.js b/trogon-eventstore/tests/fixtures/projection.js similarity index 100% rename from kurrentdb/tests/fixtures/projection.js rename to trogon-eventstore/tests/fixtures/projection.js diff --git a/kurrentdb/tests/images.rs b/trogon-eventstore/tests/images.rs similarity index 100% rename from kurrentdb/tests/images.rs rename to trogon-eventstore/tests/images.rs diff --git a/kurrentdb/tests/integration.rs b/trogon-eventstore/tests/integration.rs similarity index 93% rename from kurrentdb/tests/integration.rs rename to trogon-eventstore/tests/integration.rs index 43dbf95..0de0fb2 100644 --- a/kurrentdb/tests/integration.rs +++ b/trogon-eventstore/tests/integration.rs @@ -6,11 +6,11 @@ mod plugins; use crate::common::{fresh_stream_id, generate_events}; use futures::channel::oneshot; -use kurrentdb::{Client, ClientSettings}; use std::time::Duration; use testcontainers::{ImageExt, core::ContainerPort, runners::AsyncRunner}; use tracing::{debug, error}; use tracing_subscriber::EnvFilter; +use trogon_eventstore::{Client, ClientSettings}; fn configure_logging() { tracing_subscriber::fmt::fmt() @@ -38,7 +38,10 @@ fn create_unique_volume() -> eyre::Result { Ok(dir_name) } -async fn wait_node_is_alive(setts: &kurrentdb::ClientSettings, port: u16) -> eyre::Result<()> { +async fn wait_node_is_alive( + setts: &trogon_eventstore::ClientSettings, + port: u16, +) -> eyre::Result<()> { let client = reqwest::Client::builder() .danger_accept_invalid_certs(true) .build()?; @@ -100,15 +103,15 @@ async fn wait_node_is_alive(setts: &kurrentdb::ClientSettings, port: u16) -> eyr // This function assumes that we are using the admin credentials. It's possible during CI that // the cluster hasn't created the admin user yet, leading to failing the tests. -async fn wait_for_admin_to_be_available(client: &Client) -> kurrentdb::Result<()> { - fn can_retry(e: &kurrentdb::Error) -> bool { +async fn wait_for_admin_to_be_available(client: &Client) -> trogon_eventstore::Result<()> { + fn can_retry(e: &trogon_eventstore::Error) -> bool { matches!( e, - kurrentdb::Error::AccessDenied - | kurrentdb::Error::DeadlineExceeded - | kurrentdb::Error::ServerError(_) - | kurrentdb::Error::NotLeaderException(_) - | kurrentdb::Error::ResourceNotFound + trogon_eventstore::Error::AccessDenied + | trogon_eventstore::Error::DeadlineExceeded + | trogon_eventstore::Error::ServerError(_) + | trogon_eventstore::Error::NotLeaderException(_) + | trogon_eventstore::Error::ResourceNotFound ) } let mut count = 0; @@ -153,7 +156,7 @@ async fn wait_for_admin_to_be_available(client: &Client) -> kurrentdb::Result<() } } - Err(kurrentdb::Error::ServerError( + Err(trogon_eventstore::Error::ServerError( "Waiting for the admin user to be created took too much time".to_string(), )) } @@ -349,7 +352,7 @@ async fn single_node_discover_error() -> eyre::Result<()> { .append_to_stream(stream_id, &Default::default(), events) .await; - if let Err(kurrentdb::Error::GrpcConnectionError(_)) = result { + if let Err(trogon_eventstore::Error::GrpcConnectionError(_)) = result { Ok(()) } else { panic!("Expected gRPC connection error"); @@ -377,8 +380,8 @@ async fn single_node_auto_resub_on_connection_drop() -> eyre::Result<()> { let cloned_setts = settings.clone(); let client = Client::new(settings)?; let stream_name = fresh_stream_id("auto-reconnect"); - let retry = kurrentdb::RetryOptions::default().retry_forever(); - let options = kurrentdb::SubscribeToStreamOptions::default().retry_options(retry); + let retry = trogon_eventstore::RetryOptions::default().retry_forever(); + let options = trogon_eventstore::SubscribeToStreamOptions::default().retry_options(retry); let mut stream = client .subscribe_to_stream(stream_name.as_str(), &options) .await; diff --git a/kurrentdb/tests/misc/mod.rs b/trogon-eventstore/tests/misc/mod.rs similarity index 100% rename from kurrentdb/tests/misc/mod.rs rename to trogon-eventstore/tests/misc/mod.rs diff --git a/kurrentdb/tests/misc/root_certificates.rs b/trogon-eventstore/tests/misc/root_certificates.rs similarity index 91% rename from kurrentdb/tests/misc/root_certificates.rs rename to trogon-eventstore/tests/misc/root_certificates.rs index 353157c..4ccfb49 100644 --- a/kurrentdb/tests/misc/root_certificates.rs +++ b/trogon-eventstore/tests/misc/root_certificates.rs @@ -8,7 +8,7 @@ async fn test_with_valid_root_certificate(port: u16) -> eyre::Result<()> { port, root_cert ) .parse()?; - let client = kurrentdb::Client::new(setts)?; + let client = trogon_eventstore::Client::new(setts)?; let mut streams = client.read_all(&Default::default()).await?; @@ -26,7 +26,7 @@ async fn test_with_invalid_certificate(port: u16) -> eyre::Result<()> { port, root_cert ) .parse()?; - let client = kurrentdb::Client::new(setts)?; + let client = trogon_eventstore::Client::new(setts)?; let result = client.read_all(&Default::default()).await; diff --git a/kurrentdb/tests/plugins/mod.rs b/trogon-eventstore/tests/plugins/mod.rs similarity index 100% rename from kurrentdb/tests/plugins/mod.rs rename to trogon-eventstore/tests/plugins/mod.rs diff --git a/kurrentdb/tests/plugins/user_certificates.rs b/trogon-eventstore/tests/plugins/user_certificates.rs similarity index 88% rename from kurrentdb/tests/plugins/user_certificates.rs rename to trogon-eventstore/tests/plugins/user_certificates.rs index f6bcce2..5e82dea 100644 --- a/kurrentdb/tests/plugins/user_certificates.rs +++ b/trogon-eventstore/tests/plugins/user_certificates.rs @@ -6,7 +6,7 @@ pub async fn tests(port: u16) -> eyre::Result<()> { port, user_cert, user_key ) .parse()?; - let client = kurrentdb::Client::new(setts)?; + let client = trogon_eventstore::Client::new(setts)?; let mut streams = client.read_all(&Default::default()).await?;