diff --git a/.github/actions/create-cluster/action.yml b/.github/actions/create-cluster/action.yml new file mode 100644 index 00000000..9cbc0e52 --- /dev/null +++ b/.github/actions/create-cluster/action.yml @@ -0,0 +1,71 @@ +name: create-cluster +description: Sets up a Couchbase cluster using cbdinocluster +inputs: + version: + description: 'Couchbase Server version to use' + required: true +outputs: + ip: + description: 'The IP address of a node of the cluster' + value: ${{ steps.start-cluster.outputs.ip }} + connstr: + description: 'Connection string to connect to the cluster' + value: ${{ steps.start-cluster.outputs.connstr }} + tls-connstr: + description: 'Connection string to connect to the cluster over TLS' + value: ${{ steps.start-cluster.outputs.tls-connstr }} + id: + description: 'The cbdinocluster ID of the created cluster' + value: ${{ steps.start-cluster.outputs.id }} +runs: + using: composite + steps: + - name: Install cbdinocluster + shell: bash + run: | + mkdir -p "$HOME/bin" + wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.113/cbdinocluster-linux-amd64 + chmod +x $HOME/bin/cbdinocluster + echo "$HOME/bin" >> $GITHUB_PATH + - name: Initialize cbdinocluster + shell: bash + run: | + cbdinocluster -v init --auto + - name: Start Couchbase cluster + id: start-cluster + shell: bash + env: + CLUSTER_CONFIG: | + nodes: + - count: 2 + version: ${{ inputs.version }} + services: + - kv + - n1ql + - index + - count: 1 + version: ${{ inputs.version }} + services: + - kv + - fts + - cbas + docker: + kv-memory: 1500 + fts-memory: 3000 + expiry: 1h + run: | + CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTER_CONFIG}") + echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV" + echo "ip=$(cbdinocluster -v ip $CBDC_ID)" >> "$GITHUB_OUTPUT" + echo "connstr=$(cbdinocluster -v connstr --no-tls $CBDC_ID)" >> "$GITHUB_OUTPUT" + echo "tls-connstr=$(cbdinocluster -v connstr --tls $CBDC_ID)" >> "$GITHUB_OUTPUT" + echo "id=$CBDC_ID" >> "$GITHUB_OUTPUT" + cbdinocluster certificates get-ca $CBDC_ID >> "$GITHUB_WORKSPACE/cluster.crt" + - name: Add default bucket + shell: bash + run: | + cbdinocluster buckets add $CBDC_ID default --ram-quota-mb 100 --flush-enabled true + - name: Load travel-sample bucket + shell: bash + run: | + cbdinocluster buckets load-sample $CBDC_ID travel-sample diff --git a/.github/actions/start-cng/action.yml b/.github/actions/start-cng/action.yml new file mode 100644 index 00000000..d5442b00 --- /dev/null +++ b/.github/actions/start-cng/action.yml @@ -0,0 +1,63 @@ +name: "Start CNG (Stellar Gateway)" +description: "Checks out and starts the Couchbase Stellar Gateway (CNG), generating a self-signed certificate for TLS." + +inputs: + couchbase-hostname: + description: "Hostname of the Couchbase cluster to connect CNG to" + required: true + cng-ref: + description: "The git ref (branch, tag, or SHA) of CNG to use" + required: false + default: master + +outputs: + ca-cert-path: + description: "Absolute path to the self-signed CA certificate" + value: ${{ steps.generate-cert.outputs.ca-cert-path }} + cng-connection-string: + description: "The connection string for CNG" + value: "couchbase2://localhost:18098" + +runs: + using: "composite" + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Checkout Stellar Gateway + uses: actions/checkout@v4 + with: + repository: couchbase/stellar-gateway + path: stellar-gateway + ref: ${{ inputs.cng-ref }} + + - name: Generate self-signed certificate + id: generate-cert + shell: bash + working-directory: stellar-gateway + run: | + openssl req -x509 -newkey rsa:4096 -keyout key.pem \ + -out cert.pem -days 365 -nodes \ + -subj "/CN=CNG Local CA" \ + -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" + + echo "ca-cert-path=$(pwd)/cert.pem" >> "$GITHUB_OUTPUT" + + - name: Build Stellar Gateway + shell: bash + working-directory: stellar-gateway + run: | + go generate ./... + go build -o stellar-gateway ./cmd/gateway + + - name: Start Stellar Gateway + shell: bash + working-directory: stellar-gateway + run: | + ./stellar-gateway \ + --cb-host "${{ inputs.couchbase-hostname }}" \ + --data-port 18098 \ + --cert cert.pem \ + --key key.pem & diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 97c796d3..b3655399 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -724,42 +724,94 @@ jobs: - 7.6.8 - 7.2.9 steps: - - name: Install cbdinocluster - run: | - mkdir -p "$HOME/bin" - curl -L -o "$HOME/bin/cbdinocluster" https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.98/cbdinocluster-linux-amd64 - chmod a+x "$HOME/bin/cbdinocluster" - echo "$HOME/bin" >> $GITHUB_PATH - - name: Initialize cbdinocluster + - uses: actions/checkout@v4 + - name: Create Couchbase cluster + id: create-cluster + uses: ./.github/actions/create-cluster + with: + version: ${{ matrix.server }} + - uses: actions/download-artifact@v4 + with: + name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux + - uses: actions/download-artifact@v4 + with: + name: couchbase-opentelemetry-${{ needs.source.outputs.otel_gem_version }} + - uses: actions/download-artifact@v4 + with: + name: scripts-${{ needs.source.outputs.gem_version }} + - uses: actions/download-artifact@v4 + with: + name: tests-${{ needs.source.outputs.gem_version }} + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + - name: Install run: | - cbdinocluster -v init --auto - - name: Start couchbase cluster + COUCHBASE_GEM_PATH=$(realpath couchbase-${{ needs.source.outputs.gem_version }}-*.gem) + COUCHBASE_OPENTELEMETRY_GEM_PATH=$(realpath couchbase-opentelemetry-${{ needs.source.outputs.otel_gem_version }}.gem) + mkdir -p local-gem-repo/gems + mv ${COUCHBASE_GEM_PATH} local-gem-repo/gems + mv ${COUCHBASE_OPENTELEMETRY_GEM_PATH} local-gem-repo/gems + GEM_REPO_PATH=$(realpath local-gem-repo) + gem generate_index --directory local-gem-repo + ruby -i.bak -pe "gsub(/gemspec$/, 'gem \"couchbase\", source: \"file://${GEM_REPO_PATH}\"')" Gemfile + ruby -i.bak -pe "gsub(/gemspec path: \"couchbase-opentelemetry\"$/, 'gem \"couchbase-opentelemetry\", source: \"file://${GEM_REPO_PATH}\"')" Gemfile + bundle install + bundle exec ruby -r bundler/setup -r couchbase -r couchbase/opentelemetry -e 'pp Couchbase::VERSION, Couchbase::BUILD_INFO, {otel: Couchbase::OpenTelemetry::VERSION}' + - name: Test env: - CLUSTERCONFIG: | - nodes: - - count: 2 - version: ${{ matrix.server }} - services: - - kv - - n1ql - - index - - count: 1 - version: ${{ matrix.server }} - services: - - kv - - fts - - cbas - docker: - kv-memory: 1500 - fts-memory: 2048 - expiry: 1h + TEST_CONNECTION_STRING: ${{ steps.create-cluster.outputs.connstr }}?dump_configuration=true + TEST_SERVER_VERSION: ${{ matrix.server }} run: | - CLUSTER_ID=$(cbdinocluster -v allocate --def="${CLUSTERCONFIG}") - CONNECTION_STRING=$(cbdinocluster -v connstr "${CLUSTER_ID}") - cbdinocluster -v buckets add ${CLUSTER_ID} default --ram-quota-mb=100 --flush-enabled=true - cbdinocluster -v buckets load-sample ${CLUSTER_ID} travel-sample - echo "CLUSTER_ID=${CLUSTER_ID}" >> "$GITHUB_ENV" - echo "TEST_CONNECTION_STRING=${CONNECTION_STRING}?dump_configuration=true" >> "$GITHUB_ENV" + bundle exec rake test + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4.1.0 + if: always() + with: + check_name: 🐧server, ee-${{ matrix.server }} + report_paths: test/reports/*.xml + require_tests: true + annotate_only: true + - name: Collect server logs + timeout-minutes: 15 + if: failure() + run: | + mkdir -p logs + cbdinocluster -v collect-logs ${{ steps.create-cluster.outputs.id }} ./logs + - name: Upload logs + if: failure() + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ github.run_attempt }}-${{ matrix.server }}-logs + path: | + logs/* + test/**/*.{log,xml} + retention-days: 5 + + test_cng_linux_x86_64: + timeout-minutes: 60 + needs: + - source + - repackage_linux_x86_64 + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + server: + - 8.0.0 + steps: + - uses: actions/checkout@v4 + - name: Create Couchbase cluster + id: create-cluster + uses: ./.github/actions/create-cluster + with: + version: ${{ matrix.server }} + - name: Start CNG + id: start-cng + uses: ./.github/actions/start-cng + with: + couchbase-hostname: ${{ steps.create-cluster.outputs.ip }} + cng-ref: 3949daef30ebe55d75690cd7e487bfae7da82c9f - uses: actions/download-artifact@v4 with: name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux @@ -790,6 +842,7 @@ jobs: bundle exec ruby -r bundler/setup -r couchbase -r couchbase/opentelemetry -e 'pp Couchbase::VERSION, Couchbase::BUILD_INFO, {otel: Couchbase::OpenTelemetry::VERSION}' - name: Test env: + TEST_CONNECTION_STRING: ${{ steps.start-cng.outputs.cng-connection-string }}?trust_certificate=${{ steps.start-cng.outputs.ca-cert-path }} TEST_SERVER_VERSION: ${{ matrix.server }} run: | bundle exec rake test @@ -797,7 +850,7 @@ jobs: uses: mikepenz/action-junit-report@v4.1.0 if: always() with: - check_name: 🐧server, ee-${{ matrix.server }} + check_name: 🐧cng, ee-${{ matrix.server }} report_paths: test/reports/*.xml require_tests: true annotate_only: true @@ -806,7 +859,7 @@ jobs: if: failure() run: | mkdir -p logs - cbdinocluster -v collect-logs $CLUSTER_ID ./logs + cbdinocluster -v collect-logs ${{ steps.create-cluster.outputs.id }} ./logs - name: Upload logs if: failure() uses: actions/upload-artifact@v4 diff --git a/deps/protostellar b/deps/protostellar index 098bcb8a..d963e998 160000 --- a/deps/protostellar +++ b/deps/protostellar @@ -1 +1 @@ -Subproject commit 098bcb8a548f4a2560874ae289cede3a3e142e69 +Subproject commit d963e998d454f123bf48f28717a232d40b0147cc diff --git a/lib/couchbase/datastructures/couchbase_list.rb b/lib/couchbase/datastructures/couchbase_list.rb index 3275ed09..621a7aeb 100644 --- a/lib/couchbase/datastructures/couchbase_list.rb +++ b/lib/couchbase/datastructures/couchbase_list.rb @@ -38,6 +38,7 @@ def initialize(id, collection, options = Options::CouchbaseList.new) @options = options @cas = 0 @observability = @collection.instance_variable_get(:@observability) + @observability = Observability::Wrapper.new if @observability.nil? end # Calls the given block once for each element in the list, passing that element as a parameter. diff --git a/lib/couchbase/datastructures/couchbase_map.rb b/lib/couchbase/datastructures/couchbase_map.rb index 49219d7b..c49556de 100644 --- a/lib/couchbase/datastructures/couchbase_map.rb +++ b/lib/couchbase/datastructures/couchbase_map.rb @@ -38,6 +38,7 @@ def initialize(id, collection, options = Options::CouchbaseMap.new) @options = options @cas = 0 @observability = collection.instance_variable_get(:@observability) + @observability = Observability::Wrapper.new if @observability.nil? end # Calls the given block once for each element in the map, passing that element as a parameter. diff --git a/lib/couchbase/datastructures/couchbase_queue.rb b/lib/couchbase/datastructures/couchbase_queue.rb index 1aee1e08..303ce308 100644 --- a/lib/couchbase/datastructures/couchbase_queue.rb +++ b/lib/couchbase/datastructures/couchbase_queue.rb @@ -38,6 +38,7 @@ def initialize(id, collection, options = Options::CouchbaseQueue.new) @options = options @cas = 0 @observability = @collection.instance_variable_get(:@observability) + @observability = Observability::Wrapper.new if @observability.nil? end # Calls the given block once for each element in the queue, passing that element as a parameter. diff --git a/lib/couchbase/datastructures/couchbase_set.rb b/lib/couchbase/datastructures/couchbase_set.rb index cb568a95..ebc67e7b 100644 --- a/lib/couchbase/datastructures/couchbase_set.rb +++ b/lib/couchbase/datastructures/couchbase_set.rb @@ -38,6 +38,7 @@ def initialize(id, collection, options = Options::CouchbaseSet.new) @options = options @cas = 0 @observability = @collection.instance_variable_get(:@observability) + @observability = Observability::Wrapper.new if @observability.nil? end # Calls the given block once for each element in the set, passing that element as a parameter. diff --git a/lib/couchbase/errors.rb b/lib/couchbase/errors.rb index 61008b94..60d24f68 100644 --- a/lib/couchbase/errors.rb +++ b/lib/couchbase/errors.rb @@ -44,7 +44,7 @@ def context=(context) end def to_s - result = super + result = +super result << ", context=#{JSON.generate(@context)}" if @context result << ", cause=#{@cause}" if @cause result diff --git a/lib/couchbase/protostellar/client.rb b/lib/couchbase/protostellar/client.rb index 61ed1354..89f364cc 100644 --- a/lib/couchbase/protostellar/client.rb +++ b/lib/couchbase/protostellar/client.rb @@ -16,7 +16,6 @@ require_relative "error_handling" -require_relative "generated/routing/v1/routing_services_pb" require_relative "generated/kv/v1/kv_services_pb" require_relative "generated/query/v1/query_services_pb" require_relative "generated/search/v1/search_services_pb" @@ -37,7 +36,6 @@ def initialize(host:, credentials:, channel_args:, call_metadata:, timeouts:) @timeouts = timeouts @stubs = { - routing: Generated::Routing::V1::RoutingService::Stub.new(host, credentials, channel_override: @channel), kv: Generated::KV::V1::KvService::Stub.new(host, credentials, channel_override: @channel), query: Generated::Query::V1::QueryService::Stub.new(host, credentials, channel_override: @channel), search: Generated::Search::V1::SearchService::Stub.new(host, credentials, channel_override: @channel), diff --git a/lib/couchbase/protostellar/cluster.rb b/lib/couchbase/protostellar/cluster.rb index 4d31471a..dac95d16 100644 --- a/lib/couchbase/protostellar/cluster.rb +++ b/lib/couchbase/protostellar/cluster.rb @@ -155,6 +155,10 @@ def ping(_options = Options::Ping::DEFAULT) raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping" end + def search_indexes + raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support search index management" + end + private def initialize(host, options = ConnectOptions.new) diff --git a/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb b/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb new file mode 100644 index 00000000..86b5e426 --- /dev/null +++ b/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: couchbase/admin/analytics/v1/analytics.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,couchbase/admin/analytics/v1/analytics.proto\x12\x1c\x63ouchbase.admin.analytics.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x0b\n\x11\x43reateLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\x12W\n\x0e\x63ouchbase_link\x18\x03 \x01(\x0b\x32=.couchbase.admin.analytics.v1.CreateLinkRequest.CouchbaseLinkH\x00\x12I\n\x07s3_link\x18\x04 \x01(\x0b\x32\x36.couchbase.admin.analytics.v1.CreateLinkRequest.S3LinkH\x00\x12W\n\x0e\x61zureblob_link\x18\x05 \x01(\x0b\x32=.couchbase.admin.analytics.v1.CreateLinkRequest.AzureBlobLinkH\x00\x12K\n\x08gcs_link\x18\x06 \x01(\x0b\x32\x37.couchbase.admin.analytics.v1.CreateLinkRequest.GcsLinkH\x00\x1a\xc3\x02\n\rCouchbaseLink\x12\x10\n\x08hostname\x18\x01 \x01(\t\x12N\n\x0f\x65ncryption_mode\x18\x02 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x15\n\x08username\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08password\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12\x63lient_certificate\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nclient_key\x18\x07 \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_usernameB\x0b\n\t_passwordB\x0e\n\x0c_certificateB\x15\n\x13_client_certificateB\r\n\x0b_client_key\x1a\xac\x01\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x19\n\x11secret_access_key\x18\x02 \x01(\t\x12\x1a\n\rsession_token\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_session_tokenB\x13\n\x11_service_endpoint\x1a\xc9\x03\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61\x63\x63ount_key\x18\x02 \x01(\tH\x01\x88\x01\x01\x12$\n\x17shared_access_signature\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\rclient_secret\x18\x07 \x01(\tH\x06\x88\x01\x01\x12(\n\x1b\x63lient_certificate_password\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\t \x01(\tH\x08\x88\x01\x01\x42\x0f\n\r_account_nameB\x0e\n\x0c_account_keyB\x1a\n\x18_shared_access_signatureB\x16\n\x14_managed_identity_idB\x0c\n\n_client_idB\x0c\n\n_tenant_idB\x10\n\x0e_client_secretB\x1e\n\x1c_client_certificate_passwordB\x0b\n\t_endpoint\x1a=\n\x07GcsLink\x12\x1d\n\x10json_credentials\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_json_credentialsB\x06\n\x04link\"\x14\n\x12\x43reateLinkResponse\"A\n\x0eGetLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\"\xe9\x07\n\x0fGetLinkResponse\x12U\n\x0e\x63ouchbase_link\x18\x01 \x01(\x0b\x32;.couchbase.admin.analytics.v1.GetLinkResponse.CouchbaseLinkH\x00\x12G\n\x07s3_link\x18\x02 \x01(\x0b\x32\x34.couchbase.admin.analytics.v1.GetLinkResponse.S3LinkH\x00\x12U\n\x0e\x61zureblob_link\x18\x03 \x01(\x0b\x32;.couchbase.admin.analytics.v1.GetLinkResponse.AzureBlobLinkH\x00\x12I\n\x08gcs_link\x18\x04 \x01(\x0b\x32\x35.couchbase.admin.analytics.v1.GetLinkResponse.GcsLinkH\x00\x1a\x86\x02\n\rCouchbaseLink\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x17\n\x0f\x61\x63tive_hostname\x18\x02 \x01(\t\x12\x1a\n\x12\x62ootstrap_hostname\x18\x03 \x01(\t\x12&\n\x1eis_bootstrap_alternate_address\x18\x04 \x01(\x08\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x00\x88\x01\x01\x12N\n\x0f\x65ncryption_mode\x18\x06 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x10\n\x08username\x18\x07 \x01(\tB\x0e\n\x0c_certificate\x1a\x63\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_service_endpoint\x1a\xd3\x01\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tclient_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08\x65ndpoint\x18\x03 \x01(\t\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\ttenant_id\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\x0f\n\r_account_nameB\x0c\n\n_client_idB\x16\n\x14_managed_identity_idB\x0c\n\n_tenant_id\x1aH\n\x07GcsLink\x12+\n#use_application_default_credentials\x18\x01 \x01(\x08\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\tB\x06\n\x04link\"\x96\x0b\n\x11UpdateLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\x12W\n\x0e\x63ouchbase_link\x18\x03 \x01(\x0b\x32=.couchbase.admin.analytics.v1.UpdateLinkRequest.CouchbaseLinkH\x00\x12I\n\x07s3_link\x18\x04 \x01(\x0b\x32\x36.couchbase.admin.analytics.v1.UpdateLinkRequest.S3LinkH\x00\x12W\n\x0e\x61zureblob_link\x18\x05 \x01(\x0b\x32=.couchbase.admin.analytics.v1.UpdateLinkRequest.AzureBlobLinkH\x00\x12K\n\x08gcs_link\x18\x06 \x01(\x0b\x32\x37.couchbase.admin.analytics.v1.UpdateLinkRequest.GcsLinkH\x00\x1a\xc3\x02\n\rCouchbaseLink\x12\x10\n\x08hostname\x18\x01 \x01(\t\x12N\n\x0f\x65ncryption_mode\x18\x02 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x15\n\x08username\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08password\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12\x63lient_certificate\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nclient_key\x18\x07 \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_usernameB\x0b\n\t_passwordB\x0e\n\x0c_certificateB\x15\n\x13_client_certificateB\r\n\x0b_client_key\x1a\xac\x01\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x19\n\x11secret_access_key\x18\x02 \x01(\t\x12\x1a\n\rsession_token\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_session_tokenB\x13\n\x11_service_endpoint\x1a\xc9\x03\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61\x63\x63ount_key\x18\x02 \x01(\tH\x01\x88\x01\x01\x12$\n\x17shared_access_signature\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\rclient_secret\x18\x07 \x01(\tH\x06\x88\x01\x01\x12(\n\x1b\x63lient_certificate_password\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\t \x01(\tH\x08\x88\x01\x01\x42\x0f\n\r_account_nameB\x0e\n\x0c_account_keyB\x1a\n\x18_shared_access_signatureB\x16\n\x14_managed_identity_idB\x0c\n\n_client_idB\x0c\n\n_tenant_idB\x10\n\x0e_client_secretB\x1e\n\x1c_client_certificate_passwordB\x0b\n\t_endpoint\x1a=\n\x07GcsLink\x12\x1d\n\x10json_credentials\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_json_credentialsB\x06\n\x04link\"\x14\n\x12UpdateLinkResponse\"D\n\x11\x44\x65leteLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\"\x14\n\x12\x44\x65leteLinkResponse\"\x1b\n\x19GetIngestionStatusRequest\"\x95\x06\n\x1aGetIngestionStatusResponse\x12L\n\x05links\x18\x01 \x03(\x0b\x32=.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link\x1a\xa8\x05\n\x04Link\x12\x11\n\tlink_name\x18\x01 \x01(\t\x12\x1c\n\x14\x61nalytics_scope_name\x18\x02 \x01(\t\x12\x38\n\x06status\x18\x03 \x01(\x0e\x32(.couchbase.admin.analytics.v1.LinkStatus\x12S\n\x06states\x18\x04 \x03(\x0b\x32\x43.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State\x1a\xdf\x03\n\x05State\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08progress\x18\x02 \x01(\x01\x12\x18\n\x0btime_lag_ms\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x1c\n\x0fitems_processed\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1b\n\x0eseqno_advances\x18\x05 \x01(\x03H\x02\x88\x01\x01\x12Y\n\x06scopes\x18\x06 \x03(\x0b\x32I.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope\x1a\xad\x01\n\x05Scope\x12\x12\n\nscope_name\x18\x01 \x01(\t\x12i\n\x0b\x63ollections\x18\x02 \x03(\x0b\x32T.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope.Collection\x1a%\n\nCollection\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\tB\x0e\n\x0c_time_lag_msB\x12\n\x10_items_processedB\x11\n\x0f_seqno_advances*\x8d\x01\n\nLinkStatus\x12\x17\n\x13LINK_STATUS_UNKNOWN\x10\x00\x12\x17\n\x13LINK_STATUS_HEALTHY\x10\x01\x12\x17\n\x13LINK_STATUS_STOPPED\x10\x02\x12\x19\n\x15LINK_STATUS_UNHEALTHY\x10\x03\x12\x19\n\x15LINK_STATUS_SUSPENDED\x10\x04*\x85\x01\n\x17\x43ouchbaseEncryptionMode\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_NONE\x10\x00\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_HALF\x10\x01\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_FULL\x10\x02\x32\xe6\x04\n\x15\x41nalyticsAdminService\x12q\n\nCreateLink\x12/.couchbase.admin.analytics.v1.CreateLinkRequest\x1a\x30.couchbase.admin.analytics.v1.CreateLinkResponse\"\x00\x12h\n\x07GetLink\x12,.couchbase.admin.analytics.v1.GetLinkRequest\x1a-.couchbase.admin.analytics.v1.GetLinkResponse\"\x00\x12q\n\nUpdateLink\x12/.couchbase.admin.analytics.v1.UpdateLinkRequest\x1a\x30.couchbase.admin.analytics.v1.UpdateLinkResponse\"\x00\x12q\n\nDeleteLink\x12/.couchbase.admin.analytics.v1.DeleteLinkRequest\x1a\x30.couchbase.admin.analytics.v1.DeleteLinkResponse\"\x00\x12\x89\x01\n\x12GetIngestionStatus\x12\x37.couchbase.admin.analytics.v1.GetIngestionStatusRequest\x1a\x38.couchbase.admin.analytics.v1.GetIngestionStatusResponse\"\x00\x42\xa9\x02\n4com.couchbase.client.protostellar.admin.analytics.v1P\x01ZRgithub.com/couchbase/goprotostellar/genproto/admin_analytics_v1;admin_analytics_v1\xaa\x02)Couchbase.Protostellar.Admin.Analytics.V1\xca\x02\x33\x43ouchbase\\Protostellar\\Generated\\Admin\\Analytics\\V1\xea\x02\x38\x43ouchbase::Protostellar::Generated::Admin::Analytics::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Couchbase + module Protostellar + module Generated + module Admin + module Analytics + module V1 + CreateLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest").msgclass + CreateLinkRequest::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.CouchbaseLink").msgclass + CreateLinkRequest::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.S3Link").msgclass + CreateLinkRequest::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.AzureBlobLink").msgclass + CreateLinkRequest::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.GcsLink").msgclass + CreateLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkResponse").msgclass + GetLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkRequest").msgclass + GetLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse").msgclass + GetLinkResponse::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.CouchbaseLink").msgclass + GetLinkResponse::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.S3Link").msgclass + GetLinkResponse::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.AzureBlobLink").msgclass + GetLinkResponse::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.GcsLink").msgclass + UpdateLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest").msgclass + UpdateLinkRequest::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.CouchbaseLink").msgclass + UpdateLinkRequest::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.S3Link").msgclass + UpdateLinkRequest::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.AzureBlobLink").msgclass + UpdateLinkRequest::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.GcsLink").msgclass + UpdateLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkResponse").msgclass + DeleteLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.DeleteLinkRequest").msgclass + DeleteLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.DeleteLinkResponse").msgclass + GetIngestionStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusRequest").msgclass + GetIngestionStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse").msgclass + GetIngestionStatusResponse::Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link").msgclass + GetIngestionStatusResponse::Link::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State").msgclass + GetIngestionStatusResponse::Link::State::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope").msgclass + GetIngestionStatusResponse::Link::State::Scope::Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope.Collection").msgclass + LinkStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.LinkStatus").enummodule + CouchbaseEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CouchbaseEncryptionMode").enummodule + end + end + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb b/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb new file mode 100644 index 00000000..3ca46069 --- /dev/null +++ b/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: couchbase/admin/analytics/v1/analytics.proto for package 'Couchbase.Protostellar.Generated.Admin.Analytics.V1' +# Original file comments: +# Analytics Admin Service +# +# Provides analytics link lifecycle management and ingestion status +# monitoring. Analytics links connect the analytics service to external +# data sources (remote Couchbase clusters, S3, Azure Blob, GCS). + +require 'grpc' +require 'couchbase/protostellar/generated/admin/analytics/v1/analytics_pb' + +module Couchbase + module Protostellar + module Generated + module Admin + module Analytics + module V1 + module AnalyticsAdminService + # AnalyticsAdminService provides CRUD for analytics links and + # ingestion status monitoring. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'couchbase.admin.analytics.v1.AnalyticsAdminService' + + # CreateLink creates a new analytics link. + rpc :CreateLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::CreateLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::CreateLinkResponse + # GetLink retrieves an analytics link's configuration. + # Sensitive fields (passwords, secret keys) are omitted from the response. + rpc :GetLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetLinkResponse + # UpdateLink updates an existing analytics link's configuration. + rpc :UpdateLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::UpdateLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::UpdateLinkResponse + # DeleteLink removes an analytics link. + rpc :DeleteLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::DeleteLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::DeleteLinkResponse + # GetIngestionStatus returns the current ingestion status for all links, + # including progress, time lag, and scope/collection details. + rpc :GetIngestionStatus, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetIngestionStatusRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetIngestionStatusResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb b/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb index 2f5839d6..fb2e6628 100644 --- a/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb @@ -7,31 +7,10 @@ require 'couchbase/protostellar/generated/kv/v1/kv_pb' -descriptor_data = "\n&couchbase/admin/bucket/v1/bucket.proto\x12\x19\x63ouchbase.admin.bucket.v1\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\x14\n\x12ListBucketsRequest\"\xcc\x05\n\x13ListBucketsResponse\x12\x46\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x35.couchbase.admin.bucket.v1.ListBucketsResponse.Bucket\x1a\xec\x04\n\x06\x42ucket\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rflush_enabled\x18\x02 \x01(\x08\x12\x14\n\x0cram_quota_mb\x18\x03 \x01(\x04\x12\x14\n\x0cnum_replicas\x18\x04 \x01(\r\x12\x17\n\x0freplica_indexes\x18\x05 \x01(\x08\x12:\n\x0b\x62ucket_type\x18\x06 \x01(\x0e\x32%.couchbase.admin.bucket.v1.BucketType\x12>\n\reviction_mode\x18\x07 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionMode\x12\x17\n\x0fmax_expiry_secs\x18\x08 \x01(\r\x12\x44\n\x10\x63ompression_mode\x18\t \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionMode\x12G\n\x18minimum_durability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x00\x88\x01\x01\x12G\n\x0fstorage_backend\x18\x0b \x01(\x0e\x32).couchbase.admin.bucket.v1.StorageBackendH\x01\x88\x01\x01\x12S\n\x18\x63onflict_resolution_type\x18\x0c \x01(\x0e\x32\x31.couchbase.admin.bucket.v1.ConflictResolutionTypeB\x1b\n\x19_minimum_durability_levelB\x12\n\x10_storage_backend\"\xc1\x06\n\x13\x43reateBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12:\n\x0b\x62ucket_type\x18\x02 \x01(\x0e\x32%.couchbase.admin.bucket.v1.BucketType\x12\x19\n\x0cram_quota_mb\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x04 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rflush_enabled\x18\x05 \x01(\x08H\x02\x88\x01\x01\x12\x1c\n\x0freplica_indexes\x18\x06 \x01(\x08H\x03\x88\x01\x01\x12\x43\n\reviction_mode\x18\x07 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionModeH\x04\x88\x01\x01\x12\x1c\n\x0fmax_expiry_secs\x18\x08 \x01(\rH\x05\x88\x01\x01\x12I\n\x10\x63ompression_mode\x18\t \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionModeH\x06\x88\x01\x01\x12G\n\x18minimum_durability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x07\x88\x01\x01\x12G\n\x0fstorage_backend\x18\x0b \x01(\x0e\x32).couchbase.admin.bucket.v1.StorageBackendH\x08\x88\x01\x01\x12X\n\x18\x63onflict_resolution_type\x18\x0c \x01(\x0e\x32\x31.couchbase.admin.bucket.v1.ConflictResolutionTypeH\t\x88\x01\x01\x42\x0f\n\r_ram_quota_mbB\x0f\n\r_num_replicasB\x10\n\x0e_flush_enabledB\x12\n\x10_replica_indexesB\x10\n\x0e_eviction_modeB\x12\n\x10_max_expiry_secsB\x13\n\x11_compression_modeB\x1b\n\x19_minimum_durability_levelB\x12\n\x10_storage_backendB\x1b\n\x19_conflict_resolution_type\"+\n\x14\x43reateBucketResponse\x12\x13\n\x0b\x62ucket_uuid\x18\x01 \x01(\t\"\xff\x03\n\x13UpdateBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x19\n\x0cram_quota_mb\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rflush_enabled\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x43\n\reviction_mode\x18\x05 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionModeH\x03\x88\x01\x01\x12\x1c\n\x0fmax_expiry_secs\x18\x06 \x01(\rH\x04\x88\x01\x01\x12I\n\x10\x63ompression_mode\x18\x07 \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionModeH\x05\x88\x01\x01\x12G\n\x18minimum_durability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x06\x88\x01\x01\x42\x0f\n\r_ram_quota_mbB\x0f\n\r_num_replicasB\x10\n\x0e_flush_enabledB\x10\n\x0e_eviction_modeB\x12\n\x10_max_expiry_secsB\x13\n\x11_compression_modeB\x1b\n\x19_minimum_durability_level\"\x16\n\x14UpdateBucketResponse\"*\n\x13\x44\x65leteBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x16\n\x14\x44\x65leteBucketResponse*B\n\nBucketType\x12\x19\n\x15\x42UCKET_TYPE_COUCHBASE\x10\x00\x12\x19\n\x15\x42UCKET_TYPE_EPHEMERAL\x10\x01*\x81\x01\n\x0c\x45victionMode\x12\x16\n\x12\x45VICTION_MODE_FULL\x10\x00\x12#\n\x1f\x45VICTION_MODE_NOT_RECENTLY_USED\x10\x01\x12\x1c\n\x18\x45VICTION_MODE_VALUE_ONLY\x10\x02\x12\x16\n\x12\x45VICTION_MODE_NONE\x10\x03*f\n\x0f\x43ompressionMode\x12\x18\n\x14\x43OMPRESSION_MODE_OFF\x10\x00\x12\x1c\n\x18\x43OMPRESSION_MODE_PASSIVE\x10\x01\x12\x1b\n\x17\x43OMPRESSION_MODE_ACTIVE\x10\x02*K\n\x0eStorageBackend\x12\x1e\n\x1aSTORAGE_BACKEND_COUCHSTORE\x10\x00\x12\x19\n\x15STORAGE_BACKEND_MAGMA\x10\x01*\x93\x01\n\x16\x43onflictResolutionType\x12&\n\"CONFLICT_RESOLUTION_TYPE_TIMESTAMP\x10\x00\x12,\n(CONFLICT_RESOLUTION_TYPE_SEQUENCE_NUMBER\x10\x01\x12#\n\x1f\x43ONFLICT_RESOLUTION_TYPE_CUSTOM\x10\x02\x32\xdd\x03\n\x12\x42ucketAdminService\x12n\n\x0bListBuckets\x12-.couchbase.admin.bucket.v1.ListBucketsRequest\x1a..couchbase.admin.bucket.v1.ListBucketsResponse\"\x00\x12q\n\x0c\x43reateBucket\x12..couchbase.admin.bucket.v1.CreateBucketRequest\x1a/.couchbase.admin.bucket.v1.CreateBucketResponse\"\x00\x12q\n\x0cUpdateBucket\x12..couchbase.admin.bucket.v1.UpdateBucketRequest\x1a/.couchbase.admin.bucket.v1.UpdateBucketResponse\"\x00\x12q\n\x0c\x44\x65leteBucket\x12..couchbase.admin.bucket.v1.DeleteBucketRequest\x1a/.couchbase.admin.bucket.v1.DeleteBucketResponse\"\x00\x42\x97\x02\n1com.couchbase.client.protostellar.admin.bucket.v1P\x01ZLgithub.com/couchbase/goprotostellar/genproto/admin_bucket_v1;admin_bucket_v1\xaa\x02&Couchbase.Protostellar.Admin.Bucket.V1\xca\x02\x30\x43ouchbase\\Protostellar\\Generated\\Admin\\Bucket\\V1\xea\x02\x35\x43ouchbase::Protostellar::Generated::Admin::Bucket::V1b\x06proto3" +descriptor_data = "\n&couchbase/admin/bucket/v1/bucket.proto\x12\x19\x63ouchbase.admin.bucket.v1\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\x14\n\x12ListBucketsRequest\"\xbc\x07\n\x13ListBucketsResponse\x12\x46\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x35.couchbase.admin.bucket.v1.ListBucketsResponse.Bucket\x1a\xdc\x06\n\x06\x42ucket\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x15\n\rflush_enabled\x18\x02 \x01(\x08\x12\x14\n\x0cram_quota_mb\x18\x03 \x01(\x04\x12\x14\n\x0cnum_replicas\x18\x04 \x01(\r\x12\x17\n\x0freplica_indexes\x18\x05 \x01(\x08\x12:\n\x0b\x62ucket_type\x18\x06 \x01(\x0e\x32%.couchbase.admin.bucket.v1.BucketType\x12>\n\reviction_mode\x18\x07 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionMode\x12\x17\n\x0fmax_expiry_secs\x18\x08 \x01(\r\x12\x44\n\x10\x63ompression_mode\x18\t \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionMode\x12G\n\x18minimum_durability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x00\x88\x01\x01\x12G\n\x0fstorage_backend\x18\x0b \x01(\x0e\x32).couchbase.admin.bucket.v1.StorageBackendH\x01\x88\x01\x01\x12S\n\x18\x63onflict_resolution_type\x18\x0c \x01(\x0e\x32\x31.couchbase.admin.bucket.v1.ConflictResolutionType\x12\x31\n$history_retention_collection_default\x18\r \x01(\x08H\x02\x88\x01\x01\x12$\n\x17history_retention_bytes\x18\x0e \x01(\x04H\x03\x88\x01\x01\x12,\n\x1fhistory_retention_duration_secs\x18\x0f \x01(\rH\x04\x88\x01\x01\x42\x1b\n\x19_minimum_durability_levelB\x12\n\x10_storage_backendB\'\n%_history_retention_collection_defaultB\x1a\n\x18_history_retention_bytesB\"\n _history_retention_duration_secs\"\xb1\x08\n\x13\x43reateBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12:\n\x0b\x62ucket_type\x18\x02 \x01(\x0e\x32%.couchbase.admin.bucket.v1.BucketType\x12\x19\n\x0cram_quota_mb\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x04 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rflush_enabled\x18\x05 \x01(\x08H\x02\x88\x01\x01\x12\x1c\n\x0freplica_indexes\x18\x06 \x01(\x08H\x03\x88\x01\x01\x12\x43\n\reviction_mode\x18\x07 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionModeH\x04\x88\x01\x01\x12\x1c\n\x0fmax_expiry_secs\x18\x08 \x01(\rH\x05\x88\x01\x01\x12I\n\x10\x63ompression_mode\x18\t \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionModeH\x06\x88\x01\x01\x12G\n\x18minimum_durability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x07\x88\x01\x01\x12G\n\x0fstorage_backend\x18\x0b \x01(\x0e\x32).couchbase.admin.bucket.v1.StorageBackendH\x08\x88\x01\x01\x12X\n\x18\x63onflict_resolution_type\x18\x0c \x01(\x0e\x32\x31.couchbase.admin.bucket.v1.ConflictResolutionTypeH\t\x88\x01\x01\x12\x31\n$history_retention_collection_default\x18\r \x01(\x08H\n\x88\x01\x01\x12$\n\x17history_retention_bytes\x18\x0e \x01(\x04H\x0b\x88\x01\x01\x12,\n\x1fhistory_retention_duration_secs\x18\x0f \x01(\rH\x0c\x88\x01\x01\x42\x0f\n\r_ram_quota_mbB\x0f\n\r_num_replicasB\x10\n\x0e_flush_enabledB\x12\n\x10_replica_indexesB\x10\n\x0e_eviction_modeB\x12\n\x10_max_expiry_secsB\x13\n\x11_compression_modeB\x1b\n\x19_minimum_durability_levelB\x12\n\x10_storage_backendB\x1b\n\x19_conflict_resolution_typeB\'\n%_history_retention_collection_defaultB\x1a\n\x18_history_retention_bytesB\"\n _history_retention_duration_secs\"+\n\x14\x43reateBucketResponse\x12\x13\n\x0b\x62ucket_uuid\x18\x01 \x01(\t\"\xef\x05\n\x13UpdateBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x19\n\x0cram_quota_mb\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rflush_enabled\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x43\n\reviction_mode\x18\x05 \x01(\x0e\x32\'.couchbase.admin.bucket.v1.EvictionModeH\x03\x88\x01\x01\x12\x1c\n\x0fmax_expiry_secs\x18\x06 \x01(\rH\x04\x88\x01\x01\x12I\n\x10\x63ompression_mode\x18\x07 \x01(\x0e\x32*.couchbase.admin.bucket.v1.CompressionModeH\x05\x88\x01\x01\x12G\n\x18minimum_durability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x06\x88\x01\x01\x12\x31\n$history_retention_collection_default\x18\n \x01(\x08H\x07\x88\x01\x01\x12$\n\x17history_retention_bytes\x18\x0b \x01(\x04H\x08\x88\x01\x01\x12,\n\x1fhistory_retention_duration_secs\x18\x0c \x01(\rH\t\x88\x01\x01\x42\x0f\n\r_ram_quota_mbB\x0f\n\r_num_replicasB\x10\n\x0e_flush_enabledB\x10\n\x0e_eviction_modeB\x12\n\x10_max_expiry_secsB\x13\n\x11_compression_modeB\x1b\n\x19_minimum_durability_levelB\'\n%_history_retention_collection_defaultB\x1a\n\x18_history_retention_bytesB\"\n _history_retention_duration_secs\"\x16\n\x14UpdateBucketResponse\"*\n\x13\x44\x65leteBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x16\n\x14\x44\x65leteBucketResponse\")\n\x12\x46lushBucketRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x15\n\x13\x46lushBucketResponse*B\n\nBucketType\x12\x19\n\x15\x42UCKET_TYPE_COUCHBASE\x10\x00\x12\x19\n\x15\x42UCKET_TYPE_EPHEMERAL\x10\x01*\x81\x01\n\x0c\x45victionMode\x12\x16\n\x12\x45VICTION_MODE_FULL\x10\x00\x12#\n\x1f\x45VICTION_MODE_NOT_RECENTLY_USED\x10\x01\x12\x1c\n\x18\x45VICTION_MODE_VALUE_ONLY\x10\x02\x12\x16\n\x12\x45VICTION_MODE_NONE\x10\x03*f\n\x0f\x43ompressionMode\x12\x18\n\x14\x43OMPRESSION_MODE_OFF\x10\x00\x12\x1c\n\x18\x43OMPRESSION_MODE_PASSIVE\x10\x01\x12\x1b\n\x17\x43OMPRESSION_MODE_ACTIVE\x10\x02*K\n\x0eStorageBackend\x12\x1e\n\x1aSTORAGE_BACKEND_COUCHSTORE\x10\x00\x12\x19\n\x15STORAGE_BACKEND_MAGMA\x10\x01*\x93\x01\n\x16\x43onflictResolutionType\x12&\n\"CONFLICT_RESOLUTION_TYPE_TIMESTAMP\x10\x00\x12,\n(CONFLICT_RESOLUTION_TYPE_SEQUENCE_NUMBER\x10\x01\x12#\n\x1f\x43ONFLICT_RESOLUTION_TYPE_CUSTOM\x10\x02\x32\xcd\x04\n\x12\x42ucketAdminService\x12n\n\x0bListBuckets\x12-.couchbase.admin.bucket.v1.ListBucketsRequest\x1a..couchbase.admin.bucket.v1.ListBucketsResponse\"\x00\x12q\n\x0c\x43reateBucket\x12..couchbase.admin.bucket.v1.CreateBucketRequest\x1a/.couchbase.admin.bucket.v1.CreateBucketResponse\"\x00\x12q\n\x0cUpdateBucket\x12..couchbase.admin.bucket.v1.UpdateBucketRequest\x1a/.couchbase.admin.bucket.v1.UpdateBucketResponse\"\x00\x12q\n\x0c\x44\x65leteBucket\x12..couchbase.admin.bucket.v1.DeleteBucketRequest\x1a/.couchbase.admin.bucket.v1.DeleteBucketResponse\"\x00\x12n\n\x0b\x46lushBucket\x12-.couchbase.admin.bucket.v1.FlushBucketRequest\x1a..couchbase.admin.bucket.v1.FlushBucketResponse\"\x00\x42\x97\x02\n1com.couchbase.client.protostellar.admin.bucket.v1P\x01ZLgithub.com/couchbase/goprotostellar/genproto/admin_bucket_v1;admin_bucket_v1\xaa\x02&Couchbase.Protostellar.Admin.Bucket.V1\xca\x02\x30\x43ouchbase\\Protostellar\\Generated\\Admin\\Bucket\\V1\xea\x02\x35\x43ouchbase::Protostellar::Generated::Admin::Bucket::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -48,6 +27,8 @@ module V1 UpdateBucketResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.UpdateBucketResponse").msgclass DeleteBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.DeleteBucketRequest").msgclass DeleteBucketResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.DeleteBucketResponse").msgclass + FlushBucketRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.FlushBucketRequest").msgclass + FlushBucketResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.FlushBucketResponse").msgclass BucketType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.BucketType").enummodule EvictionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.EvictionMode").enummodule CompressionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.bucket.v1.CompressionMode").enummodule diff --git a/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb b/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb index 27cd0e40..d193cf6e 100644 --- a/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/admin/bucket/v1/bucket.proto for package 'Couchbase.Protostellar.Generated.Admin.Bucket.V1' +# Original file comments: +# Bucket Admin Service +# +# Provides bucket lifecycle management for a Couchbase cluster, including +# creating, updating, deleting, listing, and flushing buckets. Bucket +# configuration includes type, memory quota, replicas, eviction, compression, +# storage backend, conflict resolution, and history retention settings. require 'grpc' require 'couchbase/protostellar/generated/admin/bucket/v1/bucket_pb' @@ -11,6 +18,7 @@ module Admin module Bucket module V1 module BucketAdminService + # BucketAdminService provides CRUD operations for Couchbase buckets. class Service include ::GRPC::GenericService @@ -19,10 +27,18 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.admin.bucket.v1.BucketAdminService' + # ListBuckets returns all buckets in the cluster with their configurations. rpc :ListBuckets, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::ListBucketsRequest, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::ListBucketsResponse + # CreateBucket creates a new bucket with the specified configuration. rpc :CreateBucket, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::CreateBucketRequest, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::CreateBucketResponse + # UpdateBucket modifies the configuration of an existing bucket. + # Only mutable properties can be changed (e.g., ram_quota, replicas). rpc :UpdateBucket, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::UpdateBucketRequest, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::UpdateBucketResponse + # DeleteBucket permanently removes a bucket and all its data. rpc :DeleteBucket, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::DeleteBucketRequest, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::DeleteBucketResponse + # FlushBucket removes all documents from a bucket while preserving its + # configuration. Requires flush_enabled to be true on the bucket. + rpc :FlushBucket, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::FlushBucketRequest, ::Couchbase::Protostellar::Generated::Admin::Bucket::V1::FlushBucketResponse end Stub = Service.rpc_stub_class diff --git a/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb b/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb index 833a38e9..c979f9a3 100644 --- a/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb @@ -5,31 +5,10 @@ require 'google/protobuf' -descriptor_data = "\n.couchbase/admin/collection/v1/collection.proto\x12\x1d\x63ouchbase.admin.collection.v1\"-\n\x16ListCollectionsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\xa4\x02\n\x17ListCollectionsResponse\x12L\n\x06scopes\x18\x01 \x03(\x0b\x32<.couchbase.admin.collection.v1.ListCollectionsResponse.Scope\x1aL\n\nCollection\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fmax_expiry_secs\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x12\n\x10_max_expiry_secs\x1am\n\x05Scope\x12\x0c\n\x04name\x18\x01 \x01(\t\x12V\n\x0b\x63ollections\x18\x02 \x03(\x0b\x32\x41.couchbase.admin.collection.v1.ListCollectionsResponse.Collection\"=\n\x12\x43reateScopeRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\"\x15\n\x13\x43reateScopeResponse\"=\n\x12\x44\x65leteScopeRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\"\x15\n\x13\x44\x65leteScopeResponse\"\x8d\x01\n\x17\x43reateCollectionRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x1c\n\x0fmax_expiry_secs\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x12\n\x10_max_expiry_secs\"\x1a\n\x18\x43reateCollectionResponse\"[\n\x17\x44\x65leteCollectionRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"\x1a\n\x18\x44\x65leteCollectionResponse2\x9d\x05\n\x16\x43ollectionAdminService\x12\x82\x01\n\x0fListCollections\x12\x35.couchbase.admin.collection.v1.ListCollectionsRequest\x1a\x36.couchbase.admin.collection.v1.ListCollectionsResponse\"\x00\x12v\n\x0b\x43reateScope\x12\x31.couchbase.admin.collection.v1.CreateScopeRequest\x1a\x32.couchbase.admin.collection.v1.CreateScopeResponse\"\x00\x12v\n\x0b\x44\x65leteScope\x12\x31.couchbase.admin.collection.v1.DeleteScopeRequest\x1a\x32.couchbase.admin.collection.v1.DeleteScopeResponse\"\x00\x12\x85\x01\n\x10\x43reateCollection\x12\x36.couchbase.admin.collection.v1.CreateCollectionRequest\x1a\x37.couchbase.admin.collection.v1.CreateCollectionResponse\"\x00\x12\x85\x01\n\x10\x44\x65leteCollection\x12\x36.couchbase.admin.collection.v1.DeleteCollectionRequest\x1a\x37.couchbase.admin.collection.v1.DeleteCollectionResponse\"\x00\x42\xaf\x02\n5com.couchbase.client.protostellar.admin.collection.v1P\x01ZTgithub.com/couchbase/goprotostellar/genproto/admin_collection_v1;admin_collection_v1\xaa\x02*Couchbase.Protostellar.Admin.Collection.V1\xca\x02\x34\x43ouchbase\\Protostellar\\Generated\\Admin\\Collection\\V1\xea\x02\x39\x43ouchbase::Protostellar::Generated::Admin::Collection::V1b\x06proto3" +descriptor_data = "\n.couchbase/admin/collection/v1/collection.proto\x12\x1d\x63ouchbase.admin.collection.v1\"-\n\x16ListCollectionsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x81\x03\n\x17ListCollectionsResponse\x12L\n\x06scopes\x18\x01 \x03(\x0b\x32<.couchbase.admin.collection.v1.ListCollectionsResponse.Scope\x12\x14\n\x0cmanifest_uid\x18\x02 \x01(\x04\x1a\x92\x01\n\nCollection\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0fmax_expiry_secs\x18\x02 \x01(\rH\x00\x88\x01\x01\x12&\n\x19history_retention_enabled\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_max_expiry_secsB\x1c\n\x1a_history_retention_enabled\x1am\n\x05Scope\x12\x0c\n\x04name\x18\x01 \x01(\t\x12V\n\x0b\x63ollections\x18\x02 \x03(\x0b\x32\x41.couchbase.admin.collection.v1.ListCollectionsResponse.Collection\"=\n\x12\x43reateScopeRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\"+\n\x13\x43reateScopeResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\x04\"=\n\x12\x44\x65leteScopeRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\"+\n\x13\x44\x65leteScopeResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\x04\"\xd3\x01\n\x17\x43reateCollectionRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x1c\n\x0fmax_expiry_secs\x18\x04 \x01(\rH\x00\x88\x01\x01\x12&\n\x19history_retention_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_max_expiry_secsB\x1c\n\x1a_history_retention_enabled\"0\n\x18\x43reateCollectionResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\x04\"\xd3\x01\n\x17UpdateCollectionRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x1c\n\x0fmax_expiry_secs\x18\x04 \x01(\rH\x00\x88\x01\x01\x12&\n\x19history_retention_enabled\x18\x05 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_max_expiry_secsB\x1c\n\x1a_history_retention_enabled\"0\n\x18UpdateCollectionResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\x04\"[\n\x17\x44\x65leteCollectionRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"0\n\x18\x44\x65leteCollectionResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\x04\x32\xa5\x06\n\x16\x43ollectionAdminService\x12\x82\x01\n\x0fListCollections\x12\x35.couchbase.admin.collection.v1.ListCollectionsRequest\x1a\x36.couchbase.admin.collection.v1.ListCollectionsResponse\"\x00\x12v\n\x0b\x43reateScope\x12\x31.couchbase.admin.collection.v1.CreateScopeRequest\x1a\x32.couchbase.admin.collection.v1.CreateScopeResponse\"\x00\x12v\n\x0b\x44\x65leteScope\x12\x31.couchbase.admin.collection.v1.DeleteScopeRequest\x1a\x32.couchbase.admin.collection.v1.DeleteScopeResponse\"\x00\x12\x85\x01\n\x10\x43reateCollection\x12\x36.couchbase.admin.collection.v1.CreateCollectionRequest\x1a\x37.couchbase.admin.collection.v1.CreateCollectionResponse\"\x00\x12\x85\x01\n\x10UpdateCollection\x12\x36.couchbase.admin.collection.v1.UpdateCollectionRequest\x1a\x37.couchbase.admin.collection.v1.UpdateCollectionResponse\"\x00\x12\x85\x01\n\x10\x44\x65leteCollection\x12\x36.couchbase.admin.collection.v1.DeleteCollectionRequest\x1a\x37.couchbase.admin.collection.v1.DeleteCollectionResponse\"\x00\x42\xaf\x02\n5com.couchbase.client.protostellar.admin.collection.v1P\x01ZTgithub.com/couchbase/goprotostellar/genproto/admin_collection_v1;admin_collection_v1\xaa\x02*Couchbase.Protostellar.Admin.Collection.V1\xca\x02\x34\x43ouchbase\\Protostellar\\Generated\\Admin\\Collection\\V1\xea\x02\x39\x43ouchbase::Protostellar::Generated::Admin::Collection::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -47,6 +26,8 @@ module V1 DeleteScopeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.DeleteScopeResponse").msgclass CreateCollectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.CreateCollectionRequest").msgclass CreateCollectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.CreateCollectionResponse").msgclass + UpdateCollectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.UpdateCollectionRequest").msgclass + UpdateCollectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.UpdateCollectionResponse").msgclass DeleteCollectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.DeleteCollectionRequest").msgclass DeleteCollectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.collection.v1.DeleteCollectionResponse").msgclass end diff --git a/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb b/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb index d90a32be..2558af10 100644 --- a/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/admin/collection/v1/collection.proto for package 'Couchbase.Protostellar.Generated.Admin.Collection.V1' +# Original file comments: +# Collection Admin Service +# +# Provides scope and collection lifecycle management within a Couchbase +# bucket. Scopes provide a logical grouping of collections (similar to +# schemas in SQL databases). Each mutation returns a manifest_uid that +# tracks the version of the scope/collection configuration. require 'grpc' require 'couchbase/protostellar/generated/admin/collection/v1/collection_pb' @@ -11,6 +18,7 @@ module Admin module Collection module V1 module CollectionAdminService + # CollectionAdminService provides CRUD for scopes and collections. class Service include ::GRPC::GenericService @@ -19,10 +27,18 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.admin.collection.v1.CollectionAdminService' + # ListCollections returns all scopes and collections within a bucket, + # along with the current manifest_uid. rpc :ListCollections, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::ListCollectionsRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::ListCollectionsResponse + # CreateScope creates a new scope within a bucket. rpc :CreateScope, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::CreateScopeRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::CreateScopeResponse + # DeleteScope removes a scope and all its collections from a bucket. rpc :DeleteScope, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::DeleteScopeRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::DeleteScopeResponse + # CreateCollection creates a new collection within a scope. rpc :CreateCollection, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::CreateCollectionRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::CreateCollectionResponse + # UpdateCollection modifies a collection's configuration (e.g., max expiry). + rpc :UpdateCollection, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::UpdateCollectionRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::UpdateCollectionResponse + # DeleteCollection removes a collection from a scope. rpc :DeleteCollection, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::DeleteCollectionRequest, ::Couchbase::Protostellar::Generated::Admin::Collection::V1::DeleteCollectionResponse end diff --git a/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb b/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb index 663271cf..f5ad8b5e 100644 --- a/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb @@ -5,31 +5,10 @@ require 'google/protobuf' -descriptor_data = "\n$couchbase/admin/query/v1/query.proto\x12\x18\x63ouchbase.admin.query.v1\"\x9a\x01\n\x14GetAllIndexesRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x12\n\x10_collection_name\"\x91\x03\n\x15GetAllIndexesResponse\x12\x46\n\x07indexes\x18\x01 \x03(\x0b\x32\x35.couchbase.admin.query.v1.GetAllIndexesResponse.Index\x1a\xaf\x02\n\x05Index\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x12\n\nis_primary\x18\x05 \x01(\x08\x12\x31\n\x04type\x18\x06 \x01(\x0e\x32#.couchbase.admin.query.v1.IndexType\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32$.couchbase.admin.query.v1.IndexState\x12\x0e\n\x06\x66ields\x18\x08 \x03(\t\x12\x16\n\tcondition\x18\t \x01(\tH\x00\x88\x01\x01\x12\x16\n\tpartition\x18\n \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_conditionB\x0c\n\n_partition\"\xaa\x02\n\x19\x43reatePrimaryIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x05 \x01(\x05H\x03\x88\x01\x01\x12\x15\n\x08\x64\x65\x66\x65rred\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x10ignore_if_exists\x18\x07 \x01(\x08H\x05\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x07\n\x05_nameB\x0f\n\r_num_replicasB\x0b\n\t_deferredB\x13\n\x11_ignore_if_exists\"\x1c\n\x1a\x43reatePrimaryIndexResponse\"\xa5\x02\n\x12\x43reateIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x19\n\x0cnum_replicas\x18\x05 \x01(\x05H\x02\x88\x01\x01\x12\x0e\n\x06\x66ields\x18\x06 \x03(\t\x12\x15\n\x08\x64\x65\x66\x65rred\x18\x07 \x01(\x08H\x03\x88\x01\x01\x12\x1d\n\x10ignore_if_exists\x18\x08 \x01(\x08H\x04\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x0f\n\r_num_replicasB\x0b\n\t_deferredB\x13\n\x11_ignore_if_exists\"\x15\n\x13\x43reateIndexResponse\"\xda\x01\n\x17\x44ropPrimaryIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11ignore_if_missing\x18\x05 \x01(\x08H\x03\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x07\n\x05_nameB\x14\n\x12_ignore_if_missing\"\x1a\n\x18\x44ropPrimaryIndexResponse\"\xc5\x01\n\x10\x44ropIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x1e\n\x11ignore_if_missing\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x14\n\x12_ignore_if_missing\"\x13\n\x11\x44ropIndexResponse\"\x8c\x01\n\x1b\x42uildDeferredIndexesRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_name\"\xf4\x01\n\x1c\x42uildDeferredIndexesResponse\x12M\n\x07indexes\x18\x01 \x03(\x0b\x32<.couchbase.admin.query.v1.BuildDeferredIndexesResponse.Index\x1a\x84\x01\n\x05Index\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\tB\r\n\x0b_scope_nameB\x12\n\x10_collection_name*4\n\tIndexType\x12\x13\n\x0fINDEX_TYPE_VIEW\x10\x00\x12\x12\n\x0eINDEX_TYPE_GSI\x10\x01*\xbf\x01\n\nIndexState\x12\x18\n\x14INDEX_STATE_DEFERRED\x10\x00\x12\x18\n\x14INDEX_STATE_BUILDING\x10\x01\x12\x17\n\x13INDEX_STATE_PENDING\x10\x02\x12\x16\n\x12INDEX_STATE_ONLINE\x10\x03\x12\x17\n\x13INDEX_STATE_OFFLINE\x10\x04\x12\x18\n\x14INDEX_STATE_ABRIDGED\x10\x05\x12\x19\n\x15INDEX_STATE_SCHEDULED\x10\x06\x32\xe8\x05\n\x11QueryAdminService\x12r\n\rGetAllIndexes\x12..couchbase.admin.query.v1.GetAllIndexesRequest\x1a/.couchbase.admin.query.v1.GetAllIndexesResponse\"\x00\x12\x81\x01\n\x12\x43reatePrimaryIndex\x12\x33.couchbase.admin.query.v1.CreatePrimaryIndexRequest\x1a\x34.couchbase.admin.query.v1.CreatePrimaryIndexResponse\"\x00\x12l\n\x0b\x43reateIndex\x12,.couchbase.admin.query.v1.CreateIndexRequest\x1a-.couchbase.admin.query.v1.CreateIndexResponse\"\x00\x12{\n\x10\x44ropPrimaryIndex\x12\x31.couchbase.admin.query.v1.DropPrimaryIndexRequest\x1a\x32.couchbase.admin.query.v1.DropPrimaryIndexResponse\"\x00\x12\x66\n\tDropIndex\x12*.couchbase.admin.query.v1.DropIndexRequest\x1a+.couchbase.admin.query.v1.DropIndexResponse\"\x00\x12\x87\x01\n\x14\x42uildDeferredIndexes\x12\x35.couchbase.admin.query.v1.BuildDeferredIndexesRequest\x1a\x36.couchbase.admin.query.v1.BuildDeferredIndexesResponse\"\x00\x42\x91\x02\n0com.couchbase.client.protostellar.admin.query.v1P\x01ZJgithub.com/couchbase/goprotostellar/genproto/admin_query_v1;admin_query_v1\xaa\x02%Couchbase.Protostellar.Admin.Query.V1\xca\x02/Couchbase\\Protostellar\\Generated\\Admin\\Query\\V1\xea\x02\x34\x43ouchbase::Protostellar::Generated::Admin::Query::V1b\x06proto3" +descriptor_data = "\n$couchbase/admin/query/v1/query.proto\x12\x18\x63ouchbase.admin.query.v1\"\x9a\x01\n\x14GetAllIndexesRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x12\n\x10_collection_name\"\x91\x03\n\x15GetAllIndexesResponse\x12\x46\n\x07indexes\x18\x01 \x03(\x0b\x32\x35.couchbase.admin.query.v1.GetAllIndexesResponse.Index\x1a\xaf\x02\n\x05Index\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x12\n\nis_primary\x18\x05 \x01(\x08\x12\x31\n\x04type\x18\x06 \x01(\x0e\x32#.couchbase.admin.query.v1.IndexType\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32$.couchbase.admin.query.v1.IndexState\x12\x0e\n\x06\x66ields\x18\x08 \x03(\t\x12\x16\n\tcondition\x18\t \x01(\tH\x00\x88\x01\x01\x12\x16\n\tpartition\x18\n \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_conditionB\x0c\n\n_partition\"\xaa\x02\n\x19\x43reatePrimaryIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cnum_replicas\x18\x05 \x01(\x05H\x03\x88\x01\x01\x12\x15\n\x08\x64\x65\x66\x65rred\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x10ignore_if_exists\x18\x07 \x01(\x08H\x05\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x07\n\x05_nameB\x0f\n\r_num_replicasB\x0b\n\t_deferredB\x13\n\x11_ignore_if_exists\"\x1c\n\x1a\x43reatePrimaryIndexResponse\"\xa5\x02\n\x12\x43reateIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x19\n\x0cnum_replicas\x18\x05 \x01(\x05H\x02\x88\x01\x01\x12\x0e\n\x06\x66ields\x18\x06 \x03(\t\x12\x15\n\x08\x64\x65\x66\x65rred\x18\x07 \x01(\x08H\x03\x88\x01\x01\x12\x1d\n\x10ignore_if_exists\x18\x08 \x01(\x08H\x04\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x0f\n\r_num_replicasB\x0b\n\t_deferredB\x13\n\x11_ignore_if_exists\"\x15\n\x13\x43reateIndexResponse\"\xda\x01\n\x17\x44ropPrimaryIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11ignore_if_missing\x18\x05 \x01(\x08H\x03\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x07\n\x05_nameB\x14\n\x12_ignore_if_missing\"\x1a\n\x18\x44ropPrimaryIndexResponse\"\xc5\x01\n\x10\x44ropIndexRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x1e\n\x11ignore_if_missing\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_nameB\x14\n\x12_ignore_if_missing\"\x13\n\x11\x44ropIndexResponse\"\x8c\x01\n\x1b\x42uildDeferredIndexesRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_scope_nameB\x12\n\x10_collection_name\"\xf4\x01\n\x1c\x42uildDeferredIndexesResponse\x12M\n\x07indexes\x18\x01 \x03(\x0b\x32<.couchbase.admin.query.v1.BuildDeferredIndexesResponse.Index\x1a\x84\x01\n\x05Index\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x63ollection_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x04 \x01(\tB\r\n\x0b_scope_nameB\x12\n\x10_collection_name\"k\n\x19WaitForIndexOnlineRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"\x1c\n\x1aWaitForIndexOnlineResponse*4\n\tIndexType\x12\x13\n\x0fINDEX_TYPE_VIEW\x10\x00\x12\x12\n\x0eINDEX_TYPE_GSI\x10\x01*\xbf\x01\n\nIndexState\x12\x18\n\x14INDEX_STATE_DEFERRED\x10\x00\x12\x18\n\x14INDEX_STATE_BUILDING\x10\x01\x12\x17\n\x13INDEX_STATE_PENDING\x10\x02\x12\x16\n\x12INDEX_STATE_ONLINE\x10\x03\x12\x17\n\x13INDEX_STATE_OFFLINE\x10\x04\x12\x18\n\x14INDEX_STATE_ABRIDGED\x10\x05\x12\x19\n\x15INDEX_STATE_SCHEDULED\x10\x06\x32\xec\x06\n\x11QueryAdminService\x12r\n\rGetAllIndexes\x12..couchbase.admin.query.v1.GetAllIndexesRequest\x1a/.couchbase.admin.query.v1.GetAllIndexesResponse\"\x00\x12\x81\x01\n\x12\x43reatePrimaryIndex\x12\x33.couchbase.admin.query.v1.CreatePrimaryIndexRequest\x1a\x34.couchbase.admin.query.v1.CreatePrimaryIndexResponse\"\x00\x12l\n\x0b\x43reateIndex\x12,.couchbase.admin.query.v1.CreateIndexRequest\x1a-.couchbase.admin.query.v1.CreateIndexResponse\"\x00\x12{\n\x10\x44ropPrimaryIndex\x12\x31.couchbase.admin.query.v1.DropPrimaryIndexRequest\x1a\x32.couchbase.admin.query.v1.DropPrimaryIndexResponse\"\x00\x12\x66\n\tDropIndex\x12*.couchbase.admin.query.v1.DropIndexRequest\x1a+.couchbase.admin.query.v1.DropIndexResponse\"\x00\x12\x87\x01\n\x14\x42uildDeferredIndexes\x12\x35.couchbase.admin.query.v1.BuildDeferredIndexesRequest\x1a\x36.couchbase.admin.query.v1.BuildDeferredIndexesResponse\"\x00\x12\x81\x01\n\x12WaitForIndexOnline\x12\x33.couchbase.admin.query.v1.WaitForIndexOnlineRequest\x1a\x34.couchbase.admin.query.v1.WaitForIndexOnlineResponse\"\x00\x42\x91\x02\n0com.couchbase.client.protostellar.admin.query.v1P\x01ZJgithub.com/couchbase/goprotostellar/genproto/admin_query_v1;admin_query_v1\xaa\x02%Couchbase.Protostellar.Admin.Query.V1\xca\x02/Couchbase\\Protostellar\\Generated\\Admin\\Query\\V1\xea\x02\x34\x43ouchbase::Protostellar::Generated::Admin::Query::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -51,6 +30,8 @@ module V1 BuildDeferredIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.BuildDeferredIndexesRequest").msgclass BuildDeferredIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.BuildDeferredIndexesResponse").msgclass BuildDeferredIndexesResponse::Index = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.BuildDeferredIndexesResponse.Index").msgclass + WaitForIndexOnlineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.WaitForIndexOnlineRequest").msgclass + WaitForIndexOnlineResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.WaitForIndexOnlineResponse").msgclass IndexType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.IndexType").enummodule IndexState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.query.v1.IndexState").enummodule end diff --git a/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb b/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb index eb6f28c4..be9e9476 100644 --- a/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/admin/query/v1/query.proto for package 'Couchbase.Protostellar.Generated.Admin.Query.V1' +# Original file comments: +# Query Admin Service +# +# Provides N1QL / GSI index management for a Couchbase cluster. +# Supports listing, creating (primary and secondary), dropping, +# building deferred indexes, and waiting for indexes to come online. +# All operations are scoped to bucket/scope/collection. require 'grpc' require 'couchbase/protostellar/generated/admin/query/v1/query_pb' @@ -11,6 +18,7 @@ module Admin module Query module V1 module QueryAdminService + # QueryAdminService provides N1QL index lifecycle management. class Service include ::GRPC::GenericService @@ -19,12 +27,22 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.admin.query.v1.QueryAdminService' + # GetAllIndexes returns all indexes matching the optional scope filter. rpc :GetAllIndexes, ::Couchbase::Protostellar::Generated::Admin::Query::V1::GetAllIndexesRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::GetAllIndexesResponse + # CreatePrimaryIndex creates a primary index on a collection. + # A primary index indexes all document keys. rpc :CreatePrimaryIndex, ::Couchbase::Protostellar::Generated::Admin::Query::V1::CreatePrimaryIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::CreatePrimaryIndexResponse + # CreateIndex creates a secondary index on specific document fields. rpc :CreateIndex, ::Couchbase::Protostellar::Generated::Admin::Query::V1::CreateIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::CreateIndexResponse + # DropPrimaryIndex removes a primary index. rpc :DropPrimaryIndex, ::Couchbase::Protostellar::Generated::Admin::Query::V1::DropPrimaryIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::DropPrimaryIndexResponse + # DropIndex removes a named secondary index. rpc :DropIndex, ::Couchbase::Protostellar::Generated::Admin::Query::V1::DropIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::DropIndexResponse + # BuildDeferredIndexes triggers the build of all indexes that were created + # with deferred=true. Returns the list of indexes that will be built. rpc :BuildDeferredIndexes, ::Couchbase::Protostellar::Generated::Admin::Query::V1::BuildDeferredIndexesRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::BuildDeferredIndexesResponse + # WaitForIndexOnline blocks until the specified index reaches ONLINE state. + rpc :WaitForIndexOnline, ::Couchbase::Protostellar::Generated::Admin::Query::V1::WaitForIndexOnlineRequest, ::Couchbase::Protostellar::Generated::Admin::Query::V1::WaitForIndexOnlineResponse end Stub = Service.rpc_stub_class diff --git a/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb b/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb index 62adad65..92349c86 100644 --- a/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb @@ -7,29 +7,8 @@ descriptor_data = "\n&couchbase/admin/search/v1/search.proto\x12\x19\x63ouchbase.admin.search.v1\"\x96\x04\n\x05Index\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x06params\x18\x02 \x03(\x0b\x32,.couchbase.admin.search.v1.Index.ParamsEntry\x12\x45\n\x0bplan_params\x18\x03 \x03(\x0b\x32\x30.couchbase.admin.search.v1.Index.PlanParamsEntry\x12\x18\n\x0bsource_name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12I\n\rsource_params\x18\x05 \x03(\x0b\x32\x32.couchbase.admin.search.v1.Index.SourceParamsEntry\x12\x18\n\x0bsource_type\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bsource_uuid\x18\x07 \x01(\tH\x02\x88\x01\x01\x12\x0c\n\x04type\x18\x08 \x01(\t\x12\x0c\n\x04uuid\x18\t \x01(\t\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x31\n\x0fPlanParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x33\n\x11SourceParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x0e\n\x0c_source_nameB\x0e\n\x0c_source_typeB\x0e\n\x0c_source_uuid\"\xc0\x05\n\x12\x43reateIndexRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x06params\x18\x02 \x03(\x0b\x32\x39.couchbase.admin.search.v1.CreateIndexRequest.ParamsEntry\x12R\n\x0bplan_params\x18\x03 \x03(\x0b\x32=.couchbase.admin.search.v1.CreateIndexRequest.PlanParamsEntry\x12\x1c\n\x0fprev_index_uuid\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bsource_name\x18\x05 \x01(\tH\x01\x88\x01\x01\x12V\n\rsource_params\x18\x06 \x03(\x0b\x32?.couchbase.admin.search.v1.CreateIndexRequest.SourceParamsEntry\x12\x18\n\x0bsource_type\x18\x07 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0bsource_uuid\x18\x08 \x01(\tH\x03\x88\x01\x01\x12\x0c\n\x04type\x18\t \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\n \x01(\tH\x04\x88\x01\x01\x12\x17\n\nscope_name\x18\x0b \x01(\tH\x05\x88\x01\x01\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x31\n\x0fPlanParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x33\n\x11SourceParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x12\n\x10_prev_index_uuidB\x0e\n\x0c_source_nameB\x0e\n\x0c_source_typeB\x0e\n\x0c_source_uuidB\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x15\n\x13\x43reateIndexResponse\"\x97\x01\n\x12UpdateIndexRequest\x12/\n\x05index\x18\x01 \x01(\x0b\x32 .couchbase.admin.search.v1.Index\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x15\n\x13UpdateIndexResponse\"q\n\x0fGetIndexRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"C\n\x10GetIndexResponse\x12/\n\x05index\x18\x01 \x01(\x0b\x32 .couchbase.admin.search.v1.Index\"f\n\x12ListIndexesRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"H\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .couchbase.admin.search.v1.Index\"t\n\x12\x44\x65leteIndexRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x15\n\x13\x44\x65leteIndexResponse\"\x85\x01\n\x16\x41nalyzeDocumentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x64oc\x18\x02 \x01(\x0c\x12\x18\n\x0b\x62ucket_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\";\n\x17\x41nalyzeDocumentResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x10\n\x08\x61nalyzed\x18\x02 \x01(\x0c\"\x81\x01\n\x1fGetIndexedDocumentsCountRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"1\n GetIndexedDocumentsCountResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x04\"y\n\x17PauseIndexIngestRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x1a\n\x18PauseIndexIngestResponse\"z\n\x18ResumeIndexIngestRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x1b\n\x19ResumeIndexIngestResponse\"{\n\x19\x41llowIndexQueryingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x1c\n\x1a\x41llowIndexQueryingResponse\"~\n\x1c\x44isallowIndexQueryingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x1f\n\x1d\x44isallowIndexQueryingResponse\"x\n\x16\x46reezeIndexPlanRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x19\n\x17\x46reezeIndexPlanResponse\"z\n\x18UnfreezeIndexPlanRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x62ucket_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x1b\n\x19UnfreezeIndexPlanResponse2\xe5\x0c\n\x12SearchAdminService\x12\x65\n\x08GetIndex\x12*.couchbase.admin.search.v1.GetIndexRequest\x1a+.couchbase.admin.search.v1.GetIndexResponse\"\x00\x12n\n\x0bListIndexes\x12-.couchbase.admin.search.v1.ListIndexesRequest\x1a..couchbase.admin.search.v1.ListIndexesResponse\"\x00\x12n\n\x0b\x43reateIndex\x12-.couchbase.admin.search.v1.CreateIndexRequest\x1a..couchbase.admin.search.v1.CreateIndexResponse\"\x00\x12n\n\x0bUpdateIndex\x12-.couchbase.admin.search.v1.UpdateIndexRequest\x1a..couchbase.admin.search.v1.UpdateIndexResponse\"\x00\x12n\n\x0b\x44\x65leteIndex\x12-.couchbase.admin.search.v1.DeleteIndexRequest\x1a..couchbase.admin.search.v1.DeleteIndexResponse\"\x00\x12z\n\x0f\x41nalyzeDocument\x12\x31.couchbase.admin.search.v1.AnalyzeDocumentRequest\x1a\x32.couchbase.admin.search.v1.AnalyzeDocumentResponse\"\x00\x12\x95\x01\n\x18GetIndexedDocumentsCount\x12:.couchbase.admin.search.v1.GetIndexedDocumentsCountRequest\x1a;.couchbase.admin.search.v1.GetIndexedDocumentsCountResponse\"\x00\x12}\n\x10PauseIndexIngest\x12\x32.couchbase.admin.search.v1.PauseIndexIngestRequest\x1a\x33.couchbase.admin.search.v1.PauseIndexIngestResponse\"\x00\x12\x80\x01\n\x11ResumeIndexIngest\x12\x33.couchbase.admin.search.v1.ResumeIndexIngestRequest\x1a\x34.couchbase.admin.search.v1.ResumeIndexIngestResponse\"\x00\x12\x83\x01\n\x12\x41llowIndexQuerying\x12\x34.couchbase.admin.search.v1.AllowIndexQueryingRequest\x1a\x35.couchbase.admin.search.v1.AllowIndexQueryingResponse\"\x00\x12\x8c\x01\n\x15\x44isallowIndexQuerying\x12\x37.couchbase.admin.search.v1.DisallowIndexQueryingRequest\x1a\x38.couchbase.admin.search.v1.DisallowIndexQueryingResponse\"\x00\x12z\n\x0f\x46reezeIndexPlan\x12\x31.couchbase.admin.search.v1.FreezeIndexPlanRequest\x1a\x32.couchbase.admin.search.v1.FreezeIndexPlanResponse\"\x00\x12\x80\x01\n\x11UnfreezeIndexPlan\x12\x33.couchbase.admin.search.v1.UnfreezeIndexPlanRequest\x1a\x34.couchbase.admin.search.v1.UnfreezeIndexPlanResponse\"\x00\x42\x97\x02\n1com.couchbase.client.protostellar.admin.search.v1P\x01ZLgithub.com/couchbase/goprotostellar/genproto/admin_search_v1;admin_search_v1\xaa\x02&Couchbase.Protostellar.Admin.Search.V1\xca\x02\x30\x43ouchbase\\Protostellar\\Generated\\Admin\\Search\\V1\xea\x02\x35\x43ouchbase::Protostellar::Generated::Admin::Search::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar diff --git a/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb b/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb index e1169f5b..5b5ded98 100644 --- a/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb +++ b/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/admin/search/v1/search.proto for package 'Couchbase.Protostellar.Generated.Admin.Search.V1' +# Original file comments: +# Search Admin Service +# +# Provides full-text search (FTS) index lifecycle management and control +# operations. Supports CRUD for search indexes, document analysis, +# document count, and operational controls (pause/resume ingest, +# allow/disallow querying, freeze/unfreeze plan). require 'grpc' require 'couchbase/protostellar/generated/admin/search/v1/search_pb' @@ -11,6 +18,7 @@ module Admin module Search module V1 module SearchAdminService + # SearchAdminService provides search index management and control. class Service include ::GRPC::GenericService @@ -19,18 +27,33 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.admin.search.v1.SearchAdminService' + # GetIndex retrieves a single search index by name. rpc :GetIndex, ::Couchbase::Protostellar::Generated::Admin::Search::V1::GetIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::GetIndexResponse + # ListIndexes returns all search indexes, optionally scoped. rpc :ListIndexes, ::Couchbase::Protostellar::Generated::Admin::Search::V1::ListIndexesRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::ListIndexesResponse + # CreateIndex creates a new search index. rpc :CreateIndex, ::Couchbase::Protostellar::Generated::Admin::Search::V1::CreateIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::CreateIndexResponse + # UpdateIndex updates an existing search index definition. rpc :UpdateIndex, ::Couchbase::Protostellar::Generated::Admin::Search::V1::UpdateIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::UpdateIndexResponse + # DeleteIndex deletes a search index. rpc :DeleteIndex, ::Couchbase::Protostellar::Generated::Admin::Search::V1::DeleteIndexRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::DeleteIndexResponse + # AnalyzeDocument analyzes a document against an index definition, + # returning the tokens that would be indexed. rpc :AnalyzeDocument, ::Couchbase::Protostellar::Generated::Admin::Search::V1::AnalyzeDocumentRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::AnalyzeDocumentResponse + # GetIndexedDocumentsCount returns the number of documents indexed + # by a specific search index. rpc :GetIndexedDocumentsCount, ::Couchbase::Protostellar::Generated::Admin::Search::V1::GetIndexedDocumentsCountRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::GetIndexedDocumentsCountResponse + # PauseIndexIngest pauses document ingestion for an index. rpc :PauseIndexIngest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::PauseIndexIngestRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::PauseIndexIngestResponse + # ResumeIndexIngest resumes document ingestion for a paused index. rpc :ResumeIndexIngest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::ResumeIndexIngestRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::ResumeIndexIngestResponse + # AllowIndexQuerying allows queries against an index. rpc :AllowIndexQuerying, ::Couchbase::Protostellar::Generated::Admin::Search::V1::AllowIndexQueryingRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::AllowIndexQueryingResponse + # DisallowIndexQuerying prevents queries against an index. rpc :DisallowIndexQuerying, ::Couchbase::Protostellar::Generated::Admin::Search::V1::DisallowIndexQueryingRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::DisallowIndexQueryingResponse + # FreezeIndexPlan prevents the index plan from being reassigned. rpc :FreezeIndexPlan, ::Couchbase::Protostellar::Generated::Admin::Search::V1::FreezeIndexPlanRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::FreezeIndexPlanResponse + # UnfreezeIndexPlan allows the index plan to be reassigned. rpc :UnfreezeIndexPlan, ::Couchbase::Protostellar::Generated::Admin::Search::V1::UnfreezeIndexPlanRequest, ::Couchbase::Protostellar::Generated::Admin::Search::V1::UnfreezeIndexPlanResponse end diff --git a/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb b/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb index 66480303..647ce5df 100644 --- a/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb +++ b/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb @@ -7,32 +7,10 @@ require 'google/protobuf/duration_pb' -descriptor_data = "\n&couchbase/analytics/v1/analytics.proto\x12\x16\x63ouchbase.analytics.v1\x1a\x1egoogle/protobuf/duration.proto\"\xfc\x04\n\x15\x41nalyticsQueryRequest\x12\x18\n\x0b\x62ucket_name\x18\x08 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\t \x01(\tH\x01\x88\x01\x01\x12\x11\n\tstatement\x18\x01 \x01(\t\x12\x16\n\tread_only\x18\x02 \x01(\x08H\x02\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08priority\x18\x04 \x01(\x08H\x04\x88\x01\x01\x12\\\n\x10scan_consistency\x18\x05 \x01(\x0e\x32=.couchbase.analytics.v1.AnalyticsQueryRequest.ScanConsistencyH\x05\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\x06 \x03(\x0c\x12\\\n\x10named_parameters\x18\x07 \x03(\x0b\x32\x42.couchbase.analytics.v1.AnalyticsQueryRequest.NamedParametersEntry\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x0c\n\n_read_onlyB\x14\n\x12_client_context_idB\x0b\n\t_priorityB\x13\n\x11_scan_consistency\"\xb8\x05\n\x16\x41nalyticsQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12O\n\tmeta_data\x18\x02 \x01(\x0b\x32\x37.couchbase.analytics.v1.AnalyticsQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\x8b\x02\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\x12\x19\n\x11processed_objects\x18\t \x01(\x04\x1a\xa2\x02\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12G\n\x07metrics\x18\x03 \x01(\x0b\x32\x36.couchbase.analytics.v1.AnalyticsQueryResponse.Metrics\x12\x11\n\tsignature\x18\x04 \x01(\x0c\x12Q\n\x08warnings\x18\x05 \x03(\x0b\x32?.couchbase.analytics.v1.AnalyticsQueryResponse.MetaData.Warning\x12\x0e\n\x06status\x18\x06 \x01(\t\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\tB\x0c\n\n_meta_data2\x87\x01\n\x10\x41nalyticsService\x12s\n\x0e\x41nalyticsQuery\x12-.couchbase.analytics.v1.AnalyticsQueryRequest\x1a..couchbase.analytics.v1.AnalyticsQueryResponse\"\x00\x30\x01\x42\x84\x02\n.com.couchbase.client.protostellar.analytics.v1P\x01ZFgithub.com/couchbase/goprotostellar/genproto/analytics_v1;analytics_v1\xaa\x02#Couchbase.Protostellar.Analytics.V1\xca\x02-Couchbase\\Protostellar\\Generated\\Analytics\\V1\xea\x02\x31\x43ouchbase::Protostellar::Generated::Analytics::V1b\x06proto3" +descriptor_data = "\n&couchbase/analytics/v1/analytics.proto\x12\x16\x63ouchbase.analytics.v1\x1a\x1egoogle/protobuf/duration.proto\"\xdc\x08\n\x15\x41nalyticsQueryRequest\x12!\n\x14\x61nalytics_scope_name\x18\t \x01(\tH\x00\x88\x01\x01\x12\x11\n\tstatement\x18\x01 \x01(\t\x12\x16\n\tread_only\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08priority\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\\\n\x10scan_consistency\x18\x05 \x01(\x0e\x32=.couchbase.analytics.v1.AnalyticsQueryRequest.ScanConsistencyH\x04\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\x06 \x03(\x0c\x12\\\n\x10named_parameters\x18\x07 \x03(\x0b\x32\x42.couchbase.analytics.v1.AnalyticsQueryRequest.NamedParametersEntry\x12R\n\x0bplan_format\x18\n \x01(\x0e\x32\x38.couchbase.analytics.v1.AnalyticsQueryRequest.PlanFormatH\x05\x88\x01\x01\x12!\n\x14include_logical_plan\x18\x0b \x01(\x08H\x06\x88\x01\x01\x12+\n\x1einclude_organized_logical_plan\x18\x0c \x01(\x08H\x07\x88\x01\x01\x12$\n\x17include_expression_tree\x18\r \x01(\x08H\x08\x88\x01\x01\x12.\n!include_rewritten_expression_tree\x18\x0e \x01(\x08H\t\x88\x01\x01\x12\x19\n\x0cmax_warnings\x18\x0f \x01(\x05H\n\x88\x01\x01\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\":\n\nPlanFormat\x12\x14\n\x10PLAN_FORMAT_JSON\x10\x00\x12\x16\n\x12PLAN_FORMAT_STRING\x10\x01\x42\x17\n\x15_analytics_scope_nameB\x0c\n\n_read_onlyB\x14\n\x12_client_context_idB\x0b\n\t_priorityB\x13\n\x11_scan_consistencyB\x0e\n\x0c_plan_formatB\x17\n\x15_include_logical_planB!\n\x1f_include_organized_logical_planB\x1a\n\x18_include_expression_treeB$\n\"_include_rewritten_expression_treeB\x0f\n\r_max_warningsJ\x04\x08\x08\x10\t\"\x9c\x07\n\x16\x41nalyticsQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12O\n\tmeta_data\x18\x02 \x01(\x0b\x32\x37.couchbase.analytics.v1.AnalyticsQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\x8b\x02\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\x12\x19\n\x11processed_objects\x18\t \x01(\x04\x1a\x86\x04\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12G\n\x07metrics\x18\x03 \x01(\x0b\x32\x36.couchbase.analytics.v1.AnalyticsQueryResponse.Metrics\x12\x11\n\tsignature\x18\x04 \x01(\x0c\x12Q\n\x08warnings\x18\x05 \x03(\x0b\x32?.couchbase.analytics.v1.AnalyticsQueryResponse.MetaData.Warning\x12\x0e\n\x06status\x18\x06 \x01(\t\x12\x19\n\x0clogical_plan\x18\x07 \x01(\x0cH\x00\x88\x01\x01\x12#\n\x16optimized_logical_plan\x18\x08 \x01(\x0cH\x01\x88\x01\x01\x12\x1c\n\x0f\x65xpression_tree\x18\t \x01(\tH\x02\x88\x01\x01\x12&\n\x19rewritten_expression_tree\x18\n \x01(\tH\x03\x88\x01\x01\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\tB\x0f\n\r_logical_planB\x19\n\x17_optimized_logical_planB\x12\n\x10_expression_treeB\x1c\n\x1a_rewritten_expression_treeB\x0c\n\n_meta_data2\x87\x01\n\x10\x41nalyticsService\x12s\n\x0e\x41nalyticsQuery\x12-.couchbase.analytics.v1.AnalyticsQueryRequest\x1a..couchbase.analytics.v1.AnalyticsQueryResponse\"\x00\x30\x01\x42\x84\x02\n.com.couchbase.client.protostellar.analytics.v1P\x01ZFgithub.com/couchbase/goprotostellar/genproto/analytics_v1;analytics_v1\xaa\x02#Couchbase.Protostellar.Analytics.V1\xca\x02-Couchbase\\Protostellar\\Generated\\Analytics\\V1\xea\x02\x31\x43ouchbase::Protostellar::Generated::Analytics::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -41,6 +19,7 @@ module Analytics module V1 AnalyticsQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryRequest").msgclass AnalyticsQueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryRequest.ScanConsistency").enummodule + AnalyticsQueryRequest::PlanFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryRequest.PlanFormat").enummodule AnalyticsQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryResponse").msgclass AnalyticsQueryResponse::Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryResponse.Metrics").msgclass AnalyticsQueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.analytics.v1.AnalyticsQueryResponse.MetaData").msgclass diff --git a/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb b/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb index 892abcc8..20cd0705 100644 --- a/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb +++ b/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/analytics/v1/analytics.proto for package 'Couchbase.Protostellar.Generated.Analytics.V1' +# Original file comments: +# Analytics Service +# +# Provides Analytics (CBAS) query execution against a Couchbase cluster. +# Analytics queries use SQL++ syntax and are executed against the +# Analytics service, which maintains its own copy of data independent +# of the KV and Query services. Results are server-streamed. require 'grpc' require 'couchbase/protostellar/generated/analytics/v1/analytics_pb' @@ -10,6 +17,7 @@ module Generated module Analytics module V1 module AnalyticsService + # AnalyticsService provides SQL++ analytics query execution. class Service include ::GRPC::GenericService @@ -18,6 +26,8 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.analytics.v1.AnalyticsService' + # AnalyticsQuery executes an analytics statement and streams back result + # rows and metadata. The final streamed response contains MetaData. rpc :AnalyticsQuery, ::Couchbase::Protostellar::Generated::Analytics::V1::AnalyticsQueryRequest, stream(::Couchbase::Protostellar::Generated::Analytics::V1::AnalyticsQueryResponse) end diff --git a/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb b/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb index 05fdc703..759fe466 100644 --- a/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb +++ b/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb @@ -7,32 +7,10 @@ require 'google/protobuf/any_pb' -descriptor_data = "\n\'couchbase/internal/hooks/v1/hooks.proto\x12\x1b\x63ouchbase.internal.hooks.v1\x1a\x19google/protobuf/any.proto\"\'\n\x19\x43reateHooksContextRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x1c\n\x1a\x43reateHooksContextResponse\"(\n\x1a\x44\x65stroyHooksContextRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x1d\n\x1b\x44\x65stroyHooksContextResponse\"[\n\x08ValueRef\x12\x17\n\rrequest_field\x18\x01 \x01(\tH\x00\x12\x17\n\rcounter_value\x18\x02 \x01(\tH\x00\x12\x14\n\njson_value\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05value\"\xb7\x01\n\rHookCondition\x12\x33\n\x04left\x18\x01 \x01(\x0b\x32%.couchbase.internal.hooks.v1.ValueRef\x12;\n\x02op\x18\x02 \x01(\x0e\x32/.couchbase.internal.hooks.v1.ComparisonOperator\x12\x34\n\x05right\x18\x03 \x01(\x0b\x32%.couchbase.internal.hooks.v1.ValueRef\"\xf2\x07\n\nHookAction\x12\x38\n\x02if\x18\x01 \x01(\x0b\x32*.couchbase.internal.hooks.v1.HookAction.IfH\x00\x12\x42\n\x07\x63ounter\x18\x02 \x01(\x0b\x32/.couchbase.internal.hooks.v1.HookAction.CounterH\x00\x12P\n\x0fwait_on_barrier\x18\x03 \x01(\x0b\x32\x35.couchbase.internal.hooks.v1.HookAction.WaitOnBarrierH\x00\x12O\n\x0esignal_barrier\x18\x04 \x01(\x0b\x32\x35.couchbase.internal.hooks.v1.HookAction.SignalBarrierH\x00\x12Q\n\x0freturn_response\x18\x05 \x01(\x0b\x32\x36.couchbase.internal.hooks.v1.HookAction.ReturnResponseH\x00\x12K\n\x0creturn_error\x18\x06 \x01(\x0b\x32\x33.couchbase.internal.hooks.v1.HookAction.ReturnErrorH\x00\x12\x42\n\x07\x65xecute\x18\x07 \x01(\x0b\x32/.couchbase.internal.hooks.v1.HookAction.ExecuteH\x00\x1a\xb1\x01\n\x02If\x12\x38\n\x04\x63ond\x18\x01 \x03(\x0b\x32*.couchbase.internal.hooks.v1.HookCondition\x12\x36\n\x05match\x18\x02 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\x12\x39\n\x08no_match\x18\x03 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\x1a,\n\x07\x43ounter\x12\x12\n\ncounter_id\x18\x01 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x02 \x01(\x03\x1a#\n\rWaitOnBarrier\x12\x12\n\nbarrier_id\x18\x01 \x01(\t\x1a\x37\n\rSignalBarrier\x12\x12\n\nbarrier_id\x18\x01 \x01(\t\x12\x12\n\nsignal_all\x18\x02 \x01(\x08\x1a\x35\n\x0eReturnResponse\x12#\n\x05value\x18\x01 \x01(\x0b\x32\x14.google.protobuf.Any\x1aS\n\x0bReturnError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Any\x1a\t\n\x07\x45xecuteB\x08\n\x06\x61\x63tion\"z\n\x04Hook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rtarget_method\x18\x03 \x01(\t\x12\x38\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\"]\n\x0f\x41\x64\x64HooksRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x30\n\x05hooks\x18\x02 \x03(\x0b\x32!.couchbase.internal.hooks.v1.Hook\"\x12\n\x10\x41\x64\x64HooksResponse\"C\n\x13WatchBarrierRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x12\n\nbarrier_id\x18\x02 \x01(\t\"\'\n\x14WatchBarrierResponse\x12\x0f\n\x07wait_id\x18\x02 \x01(\t\"f\n\x14SignalBarrierRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x12\n\nbarrier_id\x18\x02 \x01(\t\x12\x14\n\x07wait_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_wait_id\"\x17\n\x15SignalBarrierResponse*\xfa\x01\n\x12\x43omparisonOperator\x12\x1d\n\x19\x43OMPARISON_OPERATOR_EQUAL\x10\x00\x12!\n\x1d\x43OMPARISON_OPERATOR_NOT_EQUAL\x10\x01\x12$\n COMPARISON_OPERATOR_GREATER_THAN\x10\x02\x12-\n)COMPARISON_OPERATOR_GREATER_THAN_OR_EQUAL\x10\x03\x12!\n\x1d\x43OMPARISON_OPERATOR_LESS_THAN\x10\x04\x12*\n&COMPARISON_OPERATOR_LESS_THAN_OR_EQUAL\x10\x05\x32\x83\x05\n\x0cHooksService\x12\x87\x01\n\x12\x43reateHooksContext\x12\x36.couchbase.internal.hooks.v1.CreateHooksContextRequest\x1a\x37.couchbase.internal.hooks.v1.CreateHooksContextResponse\"\x00\x12\x8a\x01\n\x13\x44\x65stroyHooksContext\x12\x37.couchbase.internal.hooks.v1.DestroyHooksContextRequest\x1a\x38.couchbase.internal.hooks.v1.DestroyHooksContextResponse\"\x00\x12i\n\x08\x41\x64\x64Hooks\x12,.couchbase.internal.hooks.v1.AddHooksRequest\x1a-.couchbase.internal.hooks.v1.AddHooksResponse\"\x00\x12w\n\x0cWatchBarrier\x12\x30.couchbase.internal.hooks.v1.WatchBarrierRequest\x1a\x31.couchbase.internal.hooks.v1.WatchBarrierResponse\"\x00\x30\x01\x12x\n\rSignalBarrier\x12\x31.couchbase.internal.hooks.v1.SignalBarrierRequest\x1a\x32.couchbase.internal.hooks.v1.SignalBarrierResponse\"\x00\x42\xa3\x02\n3com.couchbase.client.protostellar.internal.hooks.v1P\x01ZPgithub.com/couchbase/goprotostellar/genproto/internal_hooks_v1;internal_hooks_v1\xaa\x02(Couchbase.Protostellar.Internal.Hooks.V1\xca\x02\x32\x43ouchbase\\Protostellar\\Generated\\Internal\\Hooks\\V1\xea\x02\x37\x43ouchbase::Protostellar::Generated::Internal::Hooks::V1b\x06proto3" +descriptor_data = "\n\'couchbase/internal/hooks/v1/hooks.proto\x12\x1b\x63ouchbase.internal.hooks.v1\x1a\x19google/protobuf/any.proto\"\'\n\x19\x43reateHooksContextRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x1c\n\x1a\x43reateHooksContextResponse\"(\n\x1a\x44\x65stroyHooksContextRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x1d\n\x1b\x44\x65stroyHooksContextResponse\"[\n\x08ValueRef\x12\x17\n\rrequest_field\x18\x01 \x01(\tH\x00\x12\x17\n\rcounter_value\x18\x02 \x01(\tH\x00\x12\x14\n\njson_value\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05value\"\xb7\x01\n\rHookCondition\x12\x33\n\x04left\x18\x01 \x01(\x0b\x32%.couchbase.internal.hooks.v1.ValueRef\x12;\n\x02op\x18\x02 \x01(\x0e\x32/.couchbase.internal.hooks.v1.ComparisonOperator\x12\x34\n\x05right\x18\x03 \x01(\x0b\x32%.couchbase.internal.hooks.v1.ValueRef\"\xf2\x07\n\nHookAction\x12\x38\n\x02if\x18\x01 \x01(\x0b\x32*.couchbase.internal.hooks.v1.HookAction.IfH\x00\x12\x42\n\x07\x63ounter\x18\x02 \x01(\x0b\x32/.couchbase.internal.hooks.v1.HookAction.CounterH\x00\x12P\n\x0fwait_on_barrier\x18\x03 \x01(\x0b\x32\x35.couchbase.internal.hooks.v1.HookAction.WaitOnBarrierH\x00\x12O\n\x0esignal_barrier\x18\x04 \x01(\x0b\x32\x35.couchbase.internal.hooks.v1.HookAction.SignalBarrierH\x00\x12Q\n\x0freturn_response\x18\x05 \x01(\x0b\x32\x36.couchbase.internal.hooks.v1.HookAction.ReturnResponseH\x00\x12K\n\x0creturn_error\x18\x06 \x01(\x0b\x32\x33.couchbase.internal.hooks.v1.HookAction.ReturnErrorH\x00\x12\x42\n\x07\x65xecute\x18\x07 \x01(\x0b\x32/.couchbase.internal.hooks.v1.HookAction.ExecuteH\x00\x1a\xb1\x01\n\x02If\x12\x38\n\x04\x63ond\x18\x01 \x03(\x0b\x32*.couchbase.internal.hooks.v1.HookCondition\x12\x36\n\x05match\x18\x02 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\x12\x39\n\x08no_match\x18\x03 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\x1a,\n\x07\x43ounter\x12\x12\n\ncounter_id\x18\x01 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x02 \x01(\x03\x1a#\n\rWaitOnBarrier\x12\x12\n\nbarrier_id\x18\x01 \x01(\t\x1a\x37\n\rSignalBarrier\x12\x12\n\nbarrier_id\x18\x01 \x01(\t\x12\x12\n\nsignal_all\x18\x02 \x01(\x08\x1a\x35\n\x0eReturnResponse\x12#\n\x05value\x18\x01 \x01(\x0b\x32\x14.google.protobuf.Any\x1aS\n\x0bReturnError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Any\x1a\t\n\x07\x45xecuteB\x08\n\x06\x61\x63tion\"z\n\x04Hook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rtarget_method\x18\x03 \x01(\t\x12\x38\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32\'.couchbase.internal.hooks.v1.HookAction\"]\n\x0f\x41\x64\x64HooksRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x30\n\x05hooks\x18\x02 \x03(\x0b\x32!.couchbase.internal.hooks.v1.Hook\"\x12\n\x10\x41\x64\x64HooksResponse\"C\n\x13WatchBarrierRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x12\n\nbarrier_id\x18\x02 \x01(\t\"\'\n\x14WatchBarrierResponse\x12\x0f\n\x07wait_id\x18\x02 \x01(\t\"f\n\x14SignalBarrierRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\x12\x12\n\nbarrier_id\x18\x02 \x01(\t\x12\x14\n\x07wait_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_wait_id\"\x17\n\x15SignalBarrierResponse\"0\n\x14WatchRequestsRequest\x12\x18\n\x10hooks_context_id\x18\x01 \x01(\t\"\xd5\x01\n\x15WatchRequestsResponse\x12S\n\tmeta_data\x18\x01 \x03(\x0b\x32@.couchbase.internal.hooks.v1.WatchRequestsResponse.MetaDataEntry\x12\x13\n\x0b\x66ull_method\x18\x02 \x01(\t\x12%\n\x07payload\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x1a+\n\rMetaDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t*\xfa\x01\n\x12\x43omparisonOperator\x12\x1d\n\x19\x43OMPARISON_OPERATOR_EQUAL\x10\x00\x12!\n\x1d\x43OMPARISON_OPERATOR_NOT_EQUAL\x10\x01\x12$\n COMPARISON_OPERATOR_GREATER_THAN\x10\x02\x12-\n)COMPARISON_OPERATOR_GREATER_THAN_OR_EQUAL\x10\x03\x12!\n\x1d\x43OMPARISON_OPERATOR_LESS_THAN\x10\x04\x12*\n&COMPARISON_OPERATOR_LESS_THAN_OR_EQUAL\x10\x05\x32\xff\x05\n\x0cHooksService\x12\x87\x01\n\x12\x43reateHooksContext\x12\x36.couchbase.internal.hooks.v1.CreateHooksContextRequest\x1a\x37.couchbase.internal.hooks.v1.CreateHooksContextResponse\"\x00\x12\x8a\x01\n\x13\x44\x65stroyHooksContext\x12\x37.couchbase.internal.hooks.v1.DestroyHooksContextRequest\x1a\x38.couchbase.internal.hooks.v1.DestroyHooksContextResponse\"\x00\x12i\n\x08\x41\x64\x64Hooks\x12,.couchbase.internal.hooks.v1.AddHooksRequest\x1a-.couchbase.internal.hooks.v1.AddHooksResponse\"\x00\x12w\n\x0cWatchBarrier\x12\x30.couchbase.internal.hooks.v1.WatchBarrierRequest\x1a\x31.couchbase.internal.hooks.v1.WatchBarrierResponse\"\x00\x30\x01\x12x\n\rSignalBarrier\x12\x31.couchbase.internal.hooks.v1.SignalBarrierRequest\x1a\x32.couchbase.internal.hooks.v1.SignalBarrierResponse\"\x00\x12z\n\rWatchRequests\x12\x31.couchbase.internal.hooks.v1.WatchRequestsRequest\x1a\x32.couchbase.internal.hooks.v1.WatchRequestsResponse\"\x00\x30\x01\x42\xa3\x02\n3com.couchbase.client.protostellar.internal.hooks.v1P\x01ZPgithub.com/couchbase/goprotostellar/genproto/internal_hooks_v1;internal_hooks_v1\xaa\x02(Couchbase.Protostellar.Internal.Hooks.V1\xca\x02\x32\x43ouchbase\\Protostellar\\Generated\\Internal\\Hooks\\V1\xea\x02\x37\x43ouchbase::Protostellar::Generated::Internal::Hooks::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Any", "google/protobuf/any.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -61,6 +39,9 @@ module V1 WatchBarrierResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.WatchBarrierResponse").msgclass SignalBarrierRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.SignalBarrierRequest").msgclass SignalBarrierResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.SignalBarrierResponse").msgclass + WatchRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.WatchRequestsRequest").msgclass + WatchRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.WatchRequestsResponse").msgclass + WatchRequestsResponse::MetaDataEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.WatchRequestsResponse.MetaDataEntry").msgclass ComparisonOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.hooks.v1.ComparisonOperator").enummodule end end diff --git a/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb b/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb index 593b9d9a..a0831734 100644 --- a/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb +++ b/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb @@ -1,5 +1,14 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/internal/hooks/v1/hooks.proto for package 'Couchbase.Protostellar.Generated.Internal.Hooks.V1' +# Original file comments: +# Hooks Service (Internal / Debug Only) +# +# Provides a testing hooks framework for intercepting, modifying, and +# controlling gateway behavior during integration testing. Hooks use a +# small DSL of actions (conditions, counters, barriers, response/error +# injection) that can be attached to specific gRPC methods. +# +# This service is only available when the gateway is started in debug mode. require 'grpc' require 'couchbase/protostellar/generated/internal/hooks/v1/hooks_pb' @@ -11,6 +20,7 @@ module Internal module Hooks module V1 module HooksService + # HooksService provides test hook registration and synchronization primitives. class Service include ::GRPC::GenericService @@ -19,11 +29,19 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.internal.hooks.v1.HooksService' + # CreateHooksContext creates a new isolated hooks context with its own + # hooks, counters, and barriers. rpc :CreateHooksContext, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::CreateHooksContextRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::CreateHooksContextResponse + # DestroyHooksContext tears down a hooks context and all its state. rpc :DestroyHooksContext, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::DestroyHooksContextRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::DestroyHooksContextResponse + # AddHooks registers one or more hooks within a context. rpc :AddHooks, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::AddHooksRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::AddHooksResponse + # WatchBarrier streams messages each time a request reaches a barrier. rpc :WatchBarrier, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchBarrierRequest, stream(::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchBarrierResponse) + # SignalBarrier signals a barrier to release waiting requests. rpc :SignalBarrier, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::SignalBarrierRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::SignalBarrierResponse + # WatchRequests streams intercepted requests matching registered hooks. + rpc :WatchRequests, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchRequestsRequest, stream(::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchRequestsResponse) end Stub = Service.rpc_stub_class diff --git a/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb b/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb new file mode 100644 index 00000000..0aae7eb2 --- /dev/null +++ b/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: couchbase/internal/xdcr/v1/xdcr.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n%couchbase/internal/xdcr/v1/xdcr.proto\x12\x1a\x63ouchbase.internal.xdcr.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x10HeartbeatRequest\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\"\x13\n\x11HeartbeatResponse\"\x17\n\x15GetClusterInfoRequest\"|\n\x16GetClusterInfoResponse\x12\x14\n\x0c\x63luster_uuid\x18\x01 \x01(\t\x12@\n\x07\x65\x64ition\x18\x02 \x01(\x0e\x32*.couchbase.internal.xdcr.v1.ClusterEditionH\x00\x88\x01\x01\x42\n\n\x08_edition\"+\n\x14GetBucketInfoRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x94\x02\n\x15GetBucketInfoResponse\x12\x13\n\x0b\x62ucket_uuid\x18\x02 \x01(\t\x12\x14\n\x0cnum_vbuckets\x18\x03 \x01(\r\x12T\n\x18\x63onflict_resolution_type\x18\x04 \x01(\x0e\x32\x32.couchbase.internal.xdcr.v1.ConflictResolutionType\x12(\n cross_cluster_versioning_enabled\x18\x05 \x01(\x08\x12@\n\x0b\x62ucket_type\x18\x06 \x01(\x0e\x32&.couchbase.internal.xdcr.v1.BucketTypeH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_type\"\xa5\x01\n\x15GetVbucketInfoRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x13\n\x0bvbucket_ids\x18\x02 \x03(\r\x12\x1c\n\x0finclude_history\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0finclude_max_cas\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_include_historyB\x12\n\x10_include_max_cas\"\xd3\x02\n\x16GetVbucketInfoResponse\x12Q\n\x08vbuckets\x18\x02 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.GetVbucketInfoResponse.VbucketState\x1a+\n\x0cHistoryEntry\x12\x0c\n\x04uuid\x18\x01 \x01(\x04\x12\r\n\x05seqno\x18\x02 \x01(\x04\x1a\xb8\x01\n\x0cVbucketState\x12\x12\n\nvbucket_id\x18\x01 \x01(\r\x12\x0c\n\x04uuid\x18\x02 \x01(\x04\x12\x12\n\nhigh_seqno\x18\x03 \x01(\x04\x12P\n\x07history\x18\x04 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.GetVbucketInfoResponse.HistoryEntry\x12\x14\n\x07max_cas\x18\x05 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_max_cas\".\n\x17WatchCollectionsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\xc0\x02\n\x18WatchCollectionsResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\r\x12J\n\x06scopes\x18\x02 \x03(\x0b\x32:.couchbase.internal.xdcr.v1.WatchCollectionsResponse.Scope\x1a<\n\nCollection\x12\x15\n\rcollection_id\x18\x01 \x01(\r\x12\x17\n\x0f\x63ollection_name\x18\x02 \x01(\t\x1a\x83\x01\n\x05Scope\x12\x10\n\x08scope_id\x18\x01 \x01(\r\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12T\n\x0b\x63ollections\x18\x03 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.WatchCollectionsResponse.Collection\"\xac\x01\n\x12GetDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x05 \x01(\t\x12\x17\n\x0finclude_content\x18\x06 \x01(\x08\x12\x1b\n\x0einclude_xattrs\x18\x07 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_include_xattrs\"\xce\x02\n\x13GetDocumentResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12*\n\x06\x65xpiry\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nis_deleted\x18\x03 \x01(\x08\x12\x10\n\x08\x64\x61tatype\x18\x05 \x01(\r\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x1f\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05revno\x18\x08 \x01(\x04\x12K\n\x06xattrs\x18\t \x03(\x0b\x32;.couchbase.internal.xdcr.v1.GetDocumentResponse.XattrsEntry\x1a-\n\x0bXattrsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x15\n\x13_content_compressed\"\xae\x02\n\x14\x43heckDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x11\n\tstore_cas\x18\x05 \x01(\x04\x12\r\n\x05revno\x18\x06 \x01(\x04\x12\x15\n\rcontent_flags\x18\x07 \x01(\r\x12\x12\n\nhas_xattrs\x18\x08 \x01(\x08\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x12\n\nis_deleted\x18\n \x01(\x08\x12\x14\n\x07vb_uuid\x18\x0b \x01(\x04H\x01\x88\x01\x01\x42\x0e\n\x0c_expiry_timeB\n\n\x08_vb_uuid\"\'\n\x15\x43heckDocumentResponse\x12\x0e\n\x06\x65xists\x18\x01 \x01(\x08\"\xc3\x04\n\x13PushDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x16\n\tcheck_cas\x18\x05 \x01(\x04H\x01\x88\x01\x01\x12\x11\n\tstore_cas\x18\x06 \x01(\x04\x12\r\n\x05revno\x18\x07 \x01(\x04\x12\x15\n\rcontent_flags\x18\x08 \x01(\r\x12=\n\x0c\x63ontent_type\x18\t \x01(\x0e\x32\'.couchbase.internal.xdcr.v1.ContentType\x12\x1e\n\x14\x63ontent_uncompressed\x18\x0f \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\n \x01(\x0cH\x00\x12K\n\x06xattrs\x18\x10 \x03(\x0b\x32;.couchbase.internal.xdcr.v1.PushDocumentRequest.XattrsEntry\x12\x34\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08\x12\x14\n\x07vb_uuid\x18\r \x01(\x04H\x03\x88\x01\x01\x1a-\n\x0bXattrsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\t\n\x07\x63ontentB\x0c\n\n_check_casB\x0e\n\x0c_expiry_timeB\n\n\x08_vb_uuid\"2\n\x14PushDocumentResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\r\n\x05seqno\x18\x02 \x01(\x04*O\n\x0e\x43lusterEdition\x12\x1d\n\x19\x43LUSTER_EDITION_COMMUNITY\x10\x00\x12\x1e\n\x1a\x43LUSTER_EDITION_ENTERPRISE\x10\x01*\x93\x01\n\x16\x43onflictResolutionType\x12&\n\"CONFLICT_RESOLUTION_TYPE_TIMESTAMP\x10\x00\x12,\n(CONFLICT_RESOLUTION_TYPE_SEQUENCE_NUMBER\x10\x01\x12#\n\x1f\x43ONFLICT_RESOLUTION_TYPE_CUSTOM\x10\x02*B\n\nBucketType\x12\x19\n\x15\x42UCKET_TYPE_COUCHBASE\x10\x00\x12\x19\n\x15\x42UCKET_TYPE_EPHEMERAL\x10\x01*>\n\x0b\x43ontentType\x12\x18\n\x14\x43ONTENT_TYPE_NONJSON\x10\x00\x12\x15\n\x11\x43ONTENT_TYPE_JSON\x10\x01\x32\xcc\x07\n\x0bXdcrService\x12j\n\tHeartbeat\x12,.couchbase.internal.xdcr.v1.HeartbeatRequest\x1a-.couchbase.internal.xdcr.v1.HeartbeatResponse\"\x00\x12y\n\x0eGetClusterInfo\x12\x31.couchbase.internal.xdcr.v1.GetClusterInfoRequest\x1a\x32.couchbase.internal.xdcr.v1.GetClusterInfoResponse\"\x00\x12v\n\rGetBucketInfo\x12\x30.couchbase.internal.xdcr.v1.GetBucketInfoRequest\x1a\x31.couchbase.internal.xdcr.v1.GetBucketInfoResponse\"\x00\x12{\n\x0eGetVbucketInfo\x12\x31.couchbase.internal.xdcr.v1.GetVbucketInfoRequest\x1a\x32.couchbase.internal.xdcr.v1.GetVbucketInfoResponse\"\x00\x30\x01\x12\x81\x01\n\x10WatchCollections\x12\x33.couchbase.internal.xdcr.v1.WatchCollectionsRequest\x1a\x34.couchbase.internal.xdcr.v1.WatchCollectionsResponse\"\x00\x30\x01\x12p\n\x0bGetDocument\x12..couchbase.internal.xdcr.v1.GetDocumentRequest\x1a/.couchbase.internal.xdcr.v1.GetDocumentResponse\"\x00\x12v\n\rCheckDocument\x12\x30.couchbase.internal.xdcr.v1.CheckDocumentRequest\x1a\x31.couchbase.internal.xdcr.v1.CheckDocumentResponse\"\x00\x12s\n\x0cPushDocument\x12/.couchbase.internal.xdcr.v1.PushDocumentRequest\x1a\x30.couchbase.internal.xdcr.v1.PushDocumentResponse\"\x00\x42PZNgithub.com/couchbase/goprotostellar/genproto/internal_xdcr_v1;internal_xdcr_v1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Couchbase + module Internal + module Xdcr + module V1 + HeartbeatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.HeartbeatRequest").msgclass + HeartbeatResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.HeartbeatResponse").msgclass + GetClusterInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetClusterInfoRequest").msgclass + GetClusterInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetClusterInfoResponse").msgclass + GetBucketInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetBucketInfoRequest").msgclass + GetBucketInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetBucketInfoResponse").msgclass + GetVbucketInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoRequest").msgclass + GetVbucketInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse").msgclass + GetVbucketInfoResponse::HistoryEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse.HistoryEntry").msgclass + GetVbucketInfoResponse::VbucketState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse.VbucketState").msgclass + WatchCollectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsRequest").msgclass + WatchCollectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse").msgclass + WatchCollectionsResponse::Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse.Collection").msgclass + WatchCollectionsResponse::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse.Scope").msgclass + GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetDocumentRequest").msgclass + GetDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetDocumentResponse").msgclass + CheckDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.CheckDocumentRequest").msgclass + CheckDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.CheckDocumentResponse").msgclass + PushDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.PushDocumentRequest").msgclass + PushDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.PushDocumentResponse").msgclass + ClusterEdition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ClusterEdition").enummodule + ConflictResolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ConflictResolutionType").enummodule + BucketType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.BucketType").enummodule + ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ContentType").enummodule + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb b/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb new file mode 100644 index 00000000..1d32ddfe --- /dev/null +++ b/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: couchbase/internal/xdcr/v1/xdcr.proto for package 'couchbase.internal.xdcr.v1' +# Original file comments: +# XDCR Service (Internal / Unstable) +# +# Provides cross-datacenter replication (XDCR) primitives for +# replicating documents between Couchbase clusters. Includes +# cluster/bucket/vbucket info discovery, collection watching, +# and document get/check/push operations. +# +# @uncommitted This service is not yet stable and may change without warning. + +require 'grpc' +require 'couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb' + +module Couchbase + module Internal + module Xdcr + module V1 + module XdcrService + # XdcrService provides XDCR replication operations. + # @uncommitted This service is not yet stable and may change without warning. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'couchbase.internal.xdcr.v1.XdcrService' + + # Heartbeat sends a payload to verify the XDCR connection is alive. + rpc :Heartbeat, ::Couchbase::Internal::Xdcr::V1::HeartbeatRequest, ::Couchbase::Internal::Xdcr::V1::HeartbeatResponse + # GetClusterInfo returns the cluster UUID for identity verification. + rpc :GetClusterInfo, ::Couchbase::Internal::Xdcr::V1::GetClusterInfoRequest, ::Couchbase::Internal::Xdcr::V1::GetClusterInfoResponse + # GetBucketInfo returns bucket metadata needed for XDCR setup. + rpc :GetBucketInfo, ::Couchbase::Internal::Xdcr::V1::GetBucketInfoRequest, ::Couchbase::Internal::Xdcr::V1::GetBucketInfoResponse + # GetVbucketInfo streams vbucket state (UUIDs, seqnos, history) + # for the requested vbucket IDs. + rpc :GetVbucketInfo, ::Couchbase::Internal::Xdcr::V1::GetVbucketInfoRequest, stream(::Couchbase::Internal::Xdcr::V1::GetVbucketInfoResponse) + # WatchCollections streams collection manifest updates for a bucket. + rpc :WatchCollections, ::Couchbase::Internal::Xdcr::V1::WatchCollectionsRequest, stream(::Couchbase::Internal::Xdcr::V1::WatchCollectionsResponse) + # GetDocument retrieves a document with full metadata for replication. + rpc :GetDocument, ::Couchbase::Internal::Xdcr::V1::GetDocumentRequest, ::Couchbase::Internal::Xdcr::V1::GetDocumentResponse + # CheckDocument checks if a document exists with the given metadata, + # used for conflict resolution before pushing. + rpc :CheckDocument, ::Couchbase::Internal::Xdcr::V1::CheckDocumentRequest, ::Couchbase::Internal::Xdcr::V1::CheckDocumentResponse + # PushDocument pushes a replicated document to the target cluster. + rpc :PushDocument, ::Couchbase::Internal::Xdcr::V1::PushDocumentRequest, ::Couchbase::Internal::Xdcr::V1::PushDocumentResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb b/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb index c2622404..cd3443cf 100644 --- a/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb +++ b/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb @@ -8,33 +8,10 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n\x18\x63ouchbase/kv/v1/kv.proto\x12\x0f\x63ouchbase.kv.v1\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"E\n\x14LegacyDurabilitySpec\x12\x16\n\x0enum_replicated\x18\x01 \x01(\r\x12\x15\n\rnum_persisted\x18\x02 \x01(\r\"^\n\rMutationToken\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nvbucket_id\x18\x02 \x01(\r\x12\x14\n\x0cvbucket_uuid\x18\x03 \x01(\x04\x12\x0e\n\x06seq_no\x18\x04 \x01(\x04\"\xbb\x01\n\nGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07project\x18\x05 \x03(\t\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb2\x01\n\x0bGetResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\x86\x02\n\x12GetAndTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x12=\n\x0b\x63ompression\x18\x07 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x01\x88\x01\x01\x42\x08\n\x06\x65xpiryB\x0e\n\x0c_compression\"\xba\x01\n\x13GetAndTouchResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\xc4\x01\n\x11GetAndLockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x11\n\tlock_time\x18\x05 \x01(\r\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb9\x01\n\x12GetAndLockResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"k\n\rUnlockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x05 \x01(\x04\"\x10\n\x0eUnlockResponse\"\xb1\x01\n\x0cTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x42\x08\n\x06\x65xpiry\"T\n\rTouchResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"^\n\rExistsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"-\n\x0e\x45xistsResponse\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\"\xee\x02\n\rInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x0c \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xb8\x03\n\rUpsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12(\n\x1bpreserve_expiry_on_existing\x18\x0c \x01(\x08H\x02\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x1e\n\x1c_preserve_expiry_on_existingB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eUpsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\x89\x03\n\x0eReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0c \x01(\r\x12\x10\n\x03\x63\x61s\x18\x07 \x01(\x04H\x02\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\x0b \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x06\n\x04_casB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"V\n\x0fReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xce\x01\n\rRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x10\n\x03\x63\x61s\x18\x05 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x07 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0eRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10IncrementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11IncrementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10\x44\x65\x63rementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11\x44\x65\x63rementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xdf\x01\n\rAppendRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0e\x41ppendResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xe0\x01\n\x0ePrependRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"V\n\x0fPrependResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xad\x04\n\x0fLookupInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.LookupInRequest.Spec\x12:\n\x05\x66lags\x18\x06 \x01(\x0b\x32&.couchbase.kv.v1.LookupInRequest.FlagsH\x00\x88\x01\x01\x1a\x95\x02\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.LookupInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12?\n\x05\x66lags\x18\x03 \x01(\x0b\x32+.couchbase.kv.v1.LookupInRequest.Spec.FlagsH\x00\x88\x01\x01\x1a%\n\x05\x46lags\x12\x12\n\x05xattr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x08\n\x06_xattr\"I\n\tOperation\x12\x11\n\rOPERATION_GET\x10\x00\x12\x14\n\x10OPERATION_EXISTS\x10\x01\x12\x13\n\x0fOPERATION_COUNT\x10\x02\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deletedB\x08\n\x06_flags\"\x93\x01\n\x10LookupInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.LookupInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x1a;\n\x04Spec\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"\x97\t\n\x0fMutateInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.MutateInRequest.Spec\x12K\n\x0estore_semantic\x18\x06 \x01(\x0e\x32..couchbase.kv.v1.MutateInRequest.StoreSemanticH\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x12\x10\n\x03\x63\x61s\x18\t \x01(\x04H\x03\x88\x01\x01\x12:\n\x05\x66lags\x18\n \x01(\x0b\x32&.couchbase.kv.v1.MutateInRequest.FlagsH\x04\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x0c \x01(\rH\x00\x1a\xf8\x03\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.MutateInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12?\n\x05\x66lags\x18\x04 \x01(\x0b\x32+.couchbase.kv.v1.MutateInRequest.Spec.FlagsH\x00\x88\x01\x01\x1aO\n\x05\x46lags\x12\x18\n\x0b\x63reate_path\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05xattr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x0e\n\x0c_create_pathB\x08\n\x06_xattr\"\xf0\x01\n\tOperation\x12\x14\n\x10OPERATION_INSERT\x10\x00\x12\x14\n\x10OPERATION_UPSERT\x10\x01\x12\x15\n\x11OPERATION_REPLACE\x10\x02\x12\x14\n\x10OPERATION_REMOVE\x10\x03\x12\x1a\n\x16OPERATION_ARRAY_APPEND\x10\x04\x12\x1b\n\x17OPERATION_ARRAY_PREPEND\x10\x05\x12\x1a\n\x16OPERATION_ARRAY_INSERT\x10\x06\x12\x1e\n\x1aOPERATION_ARRAY_ADD_UNIQUE\x10\x07\x12\x15\n\x11OPERATION_COUNTER\x10\x08\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deleted\"a\n\rStoreSemantic\x12\x1a\n\x16STORE_SEMANTIC_REPLACE\x10\x00\x12\x19\n\x15STORE_SEMANTIC_UPSERT\x10\x01\x12\x19\n\x15STORE_SEMANTIC_INSERT\x10\x02\x42\x08\n\x06\x65xpiryB\x11\n\x0f_store_semanticB\x13\n\x11_durability_levelB\x06\n\x04_casB\x08\n\x06_flags\"\xb8\x01\n\x10MutateInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.MutateInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x1a(\n\x04Spec\x12\x14\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_content\"f\n\x15GetAllReplicasRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"a\n\x16GetAllReplicasResponse\x12\x12\n\nis_replica\x18\x01 \x01(\x08\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\x12\x15\n\rcontent_flags\x18\x03 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x04 \x01(\x04*\x8f\x01\n\x0f\x44urabilityLevel\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x00\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x01\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x02*V\n\x12\x43ompressionEnabled\x12 \n\x1c\x43OMPRESSION_ENABLED_OPTIONAL\x10\x00\x12\x1e\n\x1a\x43OMPRESSION_ENABLED_ALWAYS\x10\x01\x32\xf5\n\n\tKvService\x12\x42\n\x03Get\x12\x1b.couchbase.kv.v1.GetRequest\x1a\x1c.couchbase.kv.v1.GetResponse\"\x00\x12Z\n\x0bGetAndTouch\x12#.couchbase.kv.v1.GetAndTouchRequest\x1a$.couchbase.kv.v1.GetAndTouchResponse\"\x00\x12W\n\nGetAndLock\x12\".couchbase.kv.v1.GetAndLockRequest\x1a#.couchbase.kv.v1.GetAndLockResponse\"\x00\x12K\n\x06Unlock\x12\x1e.couchbase.kv.v1.UnlockRequest\x1a\x1f.couchbase.kv.v1.UnlockResponse\"\x00\x12H\n\x05Touch\x12\x1d.couchbase.kv.v1.TouchRequest\x1a\x1e.couchbase.kv.v1.TouchResponse\"\x00\x12K\n\x06\x45xists\x12\x1e.couchbase.kv.v1.ExistsRequest\x1a\x1f.couchbase.kv.v1.ExistsResponse\"\x00\x12K\n\x06Insert\x12\x1e.couchbase.kv.v1.InsertRequest\x1a\x1f.couchbase.kv.v1.InsertResponse\"\x00\x12K\n\x06Upsert\x12\x1e.couchbase.kv.v1.UpsertRequest\x1a\x1f.couchbase.kv.v1.UpsertResponse\"\x00\x12N\n\x07Replace\x12\x1f.couchbase.kv.v1.ReplaceRequest\x1a .couchbase.kv.v1.ReplaceResponse\"\x00\x12K\n\x06Remove\x12\x1e.couchbase.kv.v1.RemoveRequest\x1a\x1f.couchbase.kv.v1.RemoveResponse\"\x00\x12T\n\tIncrement\x12!.couchbase.kv.v1.IncrementRequest\x1a\".couchbase.kv.v1.IncrementResponse\"\x00\x12T\n\tDecrement\x12!.couchbase.kv.v1.DecrementRequest\x1a\".couchbase.kv.v1.DecrementResponse\"\x00\x12K\n\x06\x41ppend\x12\x1e.couchbase.kv.v1.AppendRequest\x1a\x1f.couchbase.kv.v1.AppendResponse\"\x00\x12N\n\x07Prepend\x12\x1f.couchbase.kv.v1.PrependRequest\x1a .couchbase.kv.v1.PrependResponse\"\x00\x12Q\n\x08LookupIn\x12 .couchbase.kv.v1.LookupInRequest\x1a!.couchbase.kv.v1.LookupInResponse\"\x00\x12Q\n\x08MutateIn\x12 .couchbase.kv.v1.MutateInRequest\x1a!.couchbase.kv.v1.MutateInResponse\"\x00\x12\x65\n\x0eGetAllReplicas\x12&.couchbase.kv.v1.GetAllReplicasRequest\x1a\'.couchbase.kv.v1.GetAllReplicasResponse\"\x00\x30\x01\x42\xda\x01\n\'com.couchbase.client.protostellar.kv.v1P\x01Z8github.com/couchbase/goprotostellar/genproto/kv_v1;kv_v1\xaa\x02\x1c\x43ouchbase.Protostellar.KV.V1\xca\x02&Couchbase\\Protostellar\\Generated\\KV\\V1\xea\x02*Couchbase::Protostellar::Generated::KV::V1b\x06proto3" +descriptor_data = "\n\x18\x63ouchbase/kv/v1/kv.proto\x12\x0f\x63ouchbase.kv.v1\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"E\n\x14LegacyDurabilitySpec\x12\x16\n\x0enum_replicated\x18\x01 \x01(\r\x12\x15\n\rnum_persisted\x18\x02 \x01(\r\"^\n\rMutationToken\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nvbucket_id\x18\x02 \x01(\r\x12\x14\n\x0cvbucket_uuid\x18\x03 \x01(\x04\x12\x0e\n\x06seq_no\x18\x04 \x01(\x04\"\xbb\x01\n\nGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07project\x18\x05 \x03(\t\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb2\x01\n\x0bGetResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\x86\x02\n\x12GetAndTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x12=\n\x0b\x63ompression\x18\x07 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x01\x88\x01\x01\x42\x08\n\x06\x65xpiryB\x0e\n\x0c_compression\"\xba\x01\n\x13GetAndTouchResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\xc9\x01\n\x11GetAndLockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x16\n\x0elock_time_secs\x18\x05 \x01(\r\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb9\x01\n\x12GetAndLockResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"k\n\rUnlockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x05 \x01(\x04\"\x10\n\x0eUnlockResponse\"\xb1\x01\n\x0cTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x42\x08\n\x06\x65xpiry\"T\n\rTouchResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"^\n\rExistsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"-\n\x0e\x45xistsResponse\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\"\xee\x02\n\rInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x0c \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xb8\x03\n\rUpsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12(\n\x1bpreserve_expiry_on_existing\x18\x0c \x01(\x08H\x02\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x1e\n\x1c_preserve_expiry_on_existingB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eUpsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\x89\x03\n\x0eReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0c \x01(\r\x12\x10\n\x03\x63\x61s\x18\x07 \x01(\x04H\x02\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\x0b \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x06\n\x04_casB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"V\n\x0fReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xce\x01\n\rRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x10\n\x03\x63\x61s\x18\x05 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x07 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0eRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10IncrementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11IncrementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10\x44\x65\x63rementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11\x44\x65\x63rementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xdf\x01\n\rAppendRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0e\x41ppendResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xe0\x01\n\x0ePrependRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"V\n\x0fPrependResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xad\x04\n\x0fLookupInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.LookupInRequest.Spec\x12:\n\x05\x66lags\x18\x06 \x01(\x0b\x32&.couchbase.kv.v1.LookupInRequest.FlagsH\x00\x88\x01\x01\x1a\x95\x02\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.LookupInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12?\n\x05\x66lags\x18\x03 \x01(\x0b\x32+.couchbase.kv.v1.LookupInRequest.Spec.FlagsH\x00\x88\x01\x01\x1a%\n\x05\x46lags\x12\x12\n\x05xattr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x08\n\x06_xattr\"I\n\tOperation\x12\x11\n\rOPERATION_GET\x10\x00\x12\x14\n\x10OPERATION_EXISTS\x10\x01\x12\x13\n\x0fOPERATION_COUNT\x10\x02\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deletedB\x08\n\x06_flags\"\x93\x01\n\x10LookupInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.LookupInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x1a;\n\x04Spec\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"\x97\t\n\x0fMutateInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.MutateInRequest.Spec\x12K\n\x0estore_semantic\x18\x06 \x01(\x0e\x32..couchbase.kv.v1.MutateInRequest.StoreSemanticH\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x12\x10\n\x03\x63\x61s\x18\t \x01(\x04H\x03\x88\x01\x01\x12:\n\x05\x66lags\x18\n \x01(\x0b\x32&.couchbase.kv.v1.MutateInRequest.FlagsH\x04\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x0c \x01(\rH\x00\x1a\xf8\x03\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.MutateInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12?\n\x05\x66lags\x18\x04 \x01(\x0b\x32+.couchbase.kv.v1.MutateInRequest.Spec.FlagsH\x00\x88\x01\x01\x1aO\n\x05\x46lags\x12\x18\n\x0b\x63reate_path\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05xattr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x0e\n\x0c_create_pathB\x08\n\x06_xattr\"\xf0\x01\n\tOperation\x12\x14\n\x10OPERATION_INSERT\x10\x00\x12\x14\n\x10OPERATION_UPSERT\x10\x01\x12\x15\n\x11OPERATION_REPLACE\x10\x02\x12\x14\n\x10OPERATION_REMOVE\x10\x03\x12\x1a\n\x16OPERATION_ARRAY_APPEND\x10\x04\x12\x1b\n\x17OPERATION_ARRAY_PREPEND\x10\x05\x12\x1a\n\x16OPERATION_ARRAY_INSERT\x10\x06\x12\x1e\n\x1aOPERATION_ARRAY_ADD_UNIQUE\x10\x07\x12\x15\n\x11OPERATION_COUNTER\x10\x08\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deleted\"a\n\rStoreSemantic\x12\x1a\n\x16STORE_SEMANTIC_REPLACE\x10\x00\x12\x19\n\x15STORE_SEMANTIC_UPSERT\x10\x01\x12\x19\n\x15STORE_SEMANTIC_INSERT\x10\x02\x42\x08\n\x06\x65xpiryB\x11\n\x0f_store_semanticB\x13\n\x11_durability_levelB\x06\n\x04_casB\x08\n\x06_flags\"\xb8\x01\n\x10MutateInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.MutateInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x1a(\n\x04Spec\x12\x14\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_content\"f\n\x15GetAllReplicasRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"a\n\x16GetAllReplicasResponse\x12\x12\n\nis_replica\x18\x01 \x01(\x08\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\x12\x15\n\rcontent_flags\x18\x03 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x04 \x01(\x04*\x8f\x01\n\x0f\x44urabilityLevel\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x00\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x01\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x02*V\n\x12\x43ompressionEnabled\x12 \n\x1c\x43OMPRESSION_ENABLED_OPTIONAL\x10\x00\x12\x1e\n\x1a\x43OMPRESSION_ENABLED_ALWAYS\x10\x01\x32\xf5\n\n\tKvService\x12\x42\n\x03Get\x12\x1b.couchbase.kv.v1.GetRequest\x1a\x1c.couchbase.kv.v1.GetResponse\"\x00\x12Z\n\x0bGetAndTouch\x12#.couchbase.kv.v1.GetAndTouchRequest\x1a$.couchbase.kv.v1.GetAndTouchResponse\"\x00\x12W\n\nGetAndLock\x12\".couchbase.kv.v1.GetAndLockRequest\x1a#.couchbase.kv.v1.GetAndLockResponse\"\x00\x12K\n\x06Unlock\x12\x1e.couchbase.kv.v1.UnlockRequest\x1a\x1f.couchbase.kv.v1.UnlockResponse\"\x00\x12H\n\x05Touch\x12\x1d.couchbase.kv.v1.TouchRequest\x1a\x1e.couchbase.kv.v1.TouchResponse\"\x00\x12K\n\x06\x45xists\x12\x1e.couchbase.kv.v1.ExistsRequest\x1a\x1f.couchbase.kv.v1.ExistsResponse\"\x00\x12K\n\x06Insert\x12\x1e.couchbase.kv.v1.InsertRequest\x1a\x1f.couchbase.kv.v1.InsertResponse\"\x00\x12K\n\x06Upsert\x12\x1e.couchbase.kv.v1.UpsertRequest\x1a\x1f.couchbase.kv.v1.UpsertResponse\"\x00\x12N\n\x07Replace\x12\x1f.couchbase.kv.v1.ReplaceRequest\x1a .couchbase.kv.v1.ReplaceResponse\"\x00\x12K\n\x06Remove\x12\x1e.couchbase.kv.v1.RemoveRequest\x1a\x1f.couchbase.kv.v1.RemoveResponse\"\x00\x12T\n\tIncrement\x12!.couchbase.kv.v1.IncrementRequest\x1a\".couchbase.kv.v1.IncrementResponse\"\x00\x12T\n\tDecrement\x12!.couchbase.kv.v1.DecrementRequest\x1a\".couchbase.kv.v1.DecrementResponse\"\x00\x12K\n\x06\x41ppend\x12\x1e.couchbase.kv.v1.AppendRequest\x1a\x1f.couchbase.kv.v1.AppendResponse\"\x00\x12N\n\x07Prepend\x12\x1f.couchbase.kv.v1.PrependRequest\x1a .couchbase.kv.v1.PrependResponse\"\x00\x12Q\n\x08LookupIn\x12 .couchbase.kv.v1.LookupInRequest\x1a!.couchbase.kv.v1.LookupInResponse\"\x00\x12Q\n\x08MutateIn\x12 .couchbase.kv.v1.MutateInRequest\x1a!.couchbase.kv.v1.MutateInResponse\"\x00\x12\x65\n\x0eGetAllReplicas\x12&.couchbase.kv.v1.GetAllReplicasRequest\x1a\'.couchbase.kv.v1.GetAllReplicasResponse\"\x00\x30\x01\x42\xda\x01\n\'com.couchbase.client.protostellar.kv.v1P\x01Z8github.com/couchbase/goprotostellar/genproto/kv_v1;kv_v1\xaa\x02\x1c\x43ouchbase.Protostellar.KV.V1\xca\x02&Couchbase\\Protostellar\\Generated\\KV\\V1\xea\x02*Couchbase::Protostellar::Generated::KV::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar diff --git a/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb b/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb index a9c4c472..d4fa3ef4 100644 --- a/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb +++ b/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb @@ -1,5 +1,12 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/kv/v1/kv.proto for package 'Couchbase.Protostellar.Generated.KV.V1' +# Original file comments: +# Key-Value (KV) Service +# +# Provides full key-value document operations for Couchbase, including +# CRUD, sub-document lookups and mutations, binary append/prepend, +# atomic counters, pessimistic locking, and replica reads. +# All operations are scoped to a bucket/scope/collection/key address. require 'grpc' require 'couchbase/protostellar/generated/kv/v1/kv_pb' @@ -10,6 +17,9 @@ module Generated module KV module V1 module KvService + # KvService provides key-value document operations against a Couchbase cluster. + # Operations are organized into reads, mutations, counters, binary operations, + # sub-document operations, and replica reads. class Service include ::GRPC::GenericService @@ -18,22 +28,59 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.kv.v1.KvService' + # Get retrieves a document by key. Supports field-level projection via the + # `project` field and optional compressed responses. rpc :Get, ::Couchbase::Protostellar::Generated::KV::V1::GetRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetResponse + # GetAndTouch retrieves a document and simultaneously resets its expiry. rpc :GetAndTouch, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchResponse + # GetAndLock retrieves a document and acquires a pessimistic lock for the + # specified duration. The lock must be released via Unlock or will + # auto-expire after lock_time_secs. rpc :GetAndLock, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockResponse + # Unlock releases a pessimistic lock previously acquired by GetAndLock. + # Requires the CAS value returned by the locking operation. rpc :Unlock, ::Couchbase::Protostellar::Generated::KV::V1::UnlockRequest, ::Couchbase::Protostellar::Generated::KV::V1::UnlockResponse + # Touch resets a document's expiry without retrieving its content. rpc :Touch, ::Couchbase::Protostellar::Generated::KV::V1::TouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::TouchResponse + # Exists checks whether a document exists without retrieving its content. + # Returns a boolean result and the current CAS. rpc :Exists, ::Couchbase::Protostellar::Generated::KV::V1::ExistsRequest, ::Couchbase::Protostellar::Generated::KV::V1::ExistsResponse + # Insert creates a new document. Fails if the document already exists. + # Supports durability requirements. rpc :Insert, ::Couchbase::Protostellar::Generated::KV::V1::InsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::InsertResponse + # Upsert creates or replaces a document unconditionally. + # Supports preserving the existing expiry on update. rpc :Upsert, ::Couchbase::Protostellar::Generated::KV::V1::UpsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::UpsertResponse + # Replace updates an existing document. Fails if the document does not exist. + # Supports optimistic locking via optional CAS. rpc :Replace, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceRequest, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceResponse + # Remove deletes a document. Supports optimistic locking via optional CAS + # and durability requirements. rpc :Remove, ::Couchbase::Protostellar::Generated::KV::V1::RemoveRequest, ::Couchbase::Protostellar::Generated::KV::V1::RemoveResponse + # Increment atomically increments a counter document by the specified delta. + # If the document does not exist and an initial value is provided, it is + # created with that value. rpc :Increment, ::Couchbase::Protostellar::Generated::KV::V1::IncrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::IncrementResponse + # Decrement atomically decrements a counter document by the specified delta. + # If the document does not exist and an initial value is provided, it is + # created with that value. rpc :Decrement, ::Couchbase::Protostellar::Generated::KV::V1::DecrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::DecrementResponse + # Append appends raw bytes to the end of an existing document's value. rpc :Append, ::Couchbase::Protostellar::Generated::KV::V1::AppendRequest, ::Couchbase::Protostellar::Generated::KV::V1::AppendResponse + # Prepend prepends raw bytes to the beginning of an existing document's + # value. rpc :Prepend, ::Couchbase::Protostellar::Generated::KV::V1::PrependRequest, ::Couchbase::Protostellar::Generated::KV::V1::PrependResponse + # LookupIn performs one or more sub-document lookup operations (get, exists, + # count) on paths within a JSON document. Supports xattr and access_deleted + # flags. rpc :LookupIn, ::Couchbase::Protostellar::Generated::KV::V1::LookupInRequest, ::Couchbase::Protostellar::Generated::KV::V1::LookupInResponse + # MutateIn performs one or more sub-document mutation operations on paths + # within a JSON document. Supports insert, upsert, replace, remove, array + # operations, and counters at the sub-document level. rpc :MutateIn, ::Couchbase::Protostellar::Generated::KV::V1::MutateInRequest, ::Couchbase::Protostellar::Generated::KV::V1::MutateInResponse + # GetAllReplicas returns the document from the active node and all replica + # nodes as a server-streamed response. Each response indicates whether it + # is from a replica via the is_replica flag. rpc :GetAllReplicas, ::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasRequest, stream(::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasResponse) end diff --git a/lib/couchbase/protostellar/generated/query/v1/query_pb.rb b/lib/couchbase/protostellar/generated/query/v1/query_pb.rb index 7dd8efb7..d2b4c043 100644 --- a/lib/couchbase/protostellar/generated/query/v1/query_pb.rb +++ b/lib/couchbase/protostellar/generated/query/v1/query_pb.rb @@ -8,33 +8,10 @@ require 'couchbase/protostellar/generated/kv/v1/kv_pb' -descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\xb5\n\n\x0cQueryRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tstatement\x18\x03 \x01(\t\x12\x16\n\tread_only\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x15\n\x08prepared\x18\x05 \x01(\x08H\x03\x88\x01\x01\x12K\n\x0etuning_options\x18\x06 \x01(\x0b\x32..couchbase.query.v1.QueryRequest.TuningOptionsH\x04\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x07 \x01(\tH\x05\x88\x01\x01\x12O\n\x10scan_consistency\x18\x08 \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.ScanConsistencyH\x06\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\t \x03(\x0c\x12O\n\x10named_parameters\x18\n \x03(\x0b\x32\x35.couchbase.query.v1.QueryRequest.NamedParametersEntry\x12\x17\n\nflex_index\x18\x0b \x01(\x08H\x07\x88\x01\x01\x12\x1c\n\x0fpreserve_expiry\x18\x0c \x01(\x08H\x08\x88\x01\x01\x12\x37\n\x0f\x63onsistent_with\x18\r \x03(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x12G\n\x0cprofile_mode\x18\x0e \x01(\x0e\x32,.couchbase.query.v1.QueryRequest.ProfileModeH\t\x88\x01\x01\x1a\xb4\x02\n\rTuningOptions\x12\x1c\n\x0fmax_parallelism\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0epipeline_batch\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cpipeline_cap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x31\n\tscan_wait\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationH\x03\x88\x01\x01\x12\x15\n\x08scan_cap\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1c\n\x0f\x64isable_metrics\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x12\n\x10_max_parallelismB\x11\n\x0f_pipeline_batchB\x0f\n\r_pipeline_capB\x0c\n\n_scan_waitB\x0b\n\t_scan_capB\x12\n\x10_disable_metrics\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\"V\n\x0bProfileMode\x12\x14\n\x10PROFILE_MODE_OFF\x10\x00\x12\x17\n\x13PROFILE_MODE_PHASES\x10\x01\x12\x18\n\x14PROFILE_MODE_TIMINGS\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x0c\n\n_read_onlyB\x0b\n\t_preparedB\x11\n\x0f_tuning_optionsB\x14\n\x12_client_context_idB\x13\n\x11_scan_consistencyB\r\n\x0b_flex_indexB\x12\n\x10_preserve_expiryB\x0f\n\r_profile_mode\"\xad\x07\n\rQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12\x42\n\tmeta_data\x18\x02 \x01(\x0b\x32*.couchbase.query.v1.QueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xbb\x06\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12H\n\x07metrics\x18\x03 \x01(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.MetricsH\x00\x88\x01\x01\x12\x41\n\x06status\x18\x04 \x01(\x0e\x32\x31.couchbase.query.v1.QueryResponse.MetaData.Status\x12\x44\n\x08warnings\x18\x05 \x03(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.Warning\x12\x14\n\x07profile\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12\x11\n\tsignature\x18\x07 \x01(\x0c\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x1a\xf0\x01\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\"\xce\x01\n\x06Status\x12\x12\n\x0eSTATUS_RUNNING\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x11\n\rSTATUS_ERRORS\x10\x02\x12\x14\n\x10STATUS_COMPLETED\x10\x03\x12\x12\n\x0eSTATUS_STOPPED\x10\x04\x12\x12\n\x0eSTATUS_TIMEOUT\x10\x05\x12\x11\n\rSTATUS_CLOSED\x10\x06\x12\x10\n\x0cSTATUS_FATAL\x10\x07\x12\x12\n\x0eSTATUS_ABORTED\x10\x08\x12\x12\n\x0eSTATUS_UNKNOWN\x10\tB\n\n\x08_metricsB\n\n\x08_profileB\x0c\n\n_meta_data2`\n\x0cQueryService\x12P\n\x05Query\x12 .couchbase.query.v1.QueryRequest\x1a!.couchbase.query.v1.QueryResponse\"\x00\x30\x01\x42\xec\x01\n*com.couchbase.client.protostellar.query.v1P\x01Z>github.com/couchbase/goprotostellar/genproto/query_v1;query_v1\xaa\x02\x1f\x43ouchbase.Protostellar.Query.V1\xca\x02)Couchbase\\Protostellar\\Generated\\Query\\V1\xea\x02-Couchbase::Protostellar::Generated::Query::V1b\x06proto3" +descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\xc8\x0c\n\x0cQueryRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tstatement\x18\x03 \x01(\t\x12\x16\n\tread_only\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x15\n\x08prepared\x18\x05 \x01(\x08H\x03\x88\x01\x01\x12K\n\x0etuning_options\x18\x06 \x01(\x0b\x32..couchbase.query.v1.QueryRequest.TuningOptionsH\x04\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x07 \x01(\tH\x05\x88\x01\x01\x12O\n\x10scan_consistency\x18\x08 \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.ScanConsistencyH\x06\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\t \x03(\x0c\x12O\n\x10named_parameters\x18\n \x03(\x0b\x32\x35.couchbase.query.v1.QueryRequest.NamedParametersEntry\x12\x17\n\nflex_index\x18\x0b \x01(\x08H\x07\x88\x01\x01\x12\x1c\n\x0fpreserve_expiry\x18\x0c \x01(\x08H\x08\x88\x01\x01\x12\x37\n\x0f\x63onsistent_with\x18\r \x03(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x12O\n\x10\x64urability_level\x18\x0f \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.DurabilityLevelH\t\x88\x01\x01\x12G\n\x0cprofile_mode\x18\x0e \x01(\x0e\x32,.couchbase.query.v1.QueryRequest.ProfileModeH\n\x88\x01\x01\x1a\xb4\x02\n\rTuningOptions\x12\x1c\n\x0fmax_parallelism\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0epipeline_batch\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cpipeline_cap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x31\n\tscan_wait\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationH\x03\x88\x01\x01\x12\x15\n\x08scan_cap\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1c\n\x0f\x64isable_metrics\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x12\n\x10_max_parallelismB\x11\n\x0f_pipeline_batchB\x0f\n\r_pipeline_capB\x0c\n\n_scan_waitB\x0b\n\t_scan_capB\x12\n\x10_disable_metrics\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\"\xaa\x01\n\x0f\x44urabilityLevel\x12\x19\n\x15\x44URABILITY_LEVEL_NONE\x10\x00\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x01\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x02\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x03\"V\n\x0bProfileMode\x12\x14\n\x10PROFILE_MODE_OFF\x10\x00\x12\x17\n\x13PROFILE_MODE_PHASES\x10\x01\x12\x18\n\x14PROFILE_MODE_TIMINGS\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x0c\n\n_read_onlyB\x0b\n\t_preparedB\x11\n\x0f_tuning_optionsB\x14\n\x12_client_context_idB\x13\n\x11_scan_consistencyB\r\n\x0b_flex_indexB\x12\n\x10_preserve_expiryB\x13\n\x11_durability_levelB\x0f\n\r_profile_mode\"\xad\x07\n\rQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12\x42\n\tmeta_data\x18\x02 \x01(\x0b\x32*.couchbase.query.v1.QueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xbb\x06\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12H\n\x07metrics\x18\x03 \x01(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.MetricsH\x00\x88\x01\x01\x12\x41\n\x06status\x18\x04 \x01(\x0e\x32\x31.couchbase.query.v1.QueryResponse.MetaData.Status\x12\x44\n\x08warnings\x18\x05 \x03(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.Warning\x12\x14\n\x07profile\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12\x11\n\tsignature\x18\x07 \x01(\x0c\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x1a\xf0\x01\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\"\xce\x01\n\x06Status\x12\x12\n\x0eSTATUS_RUNNING\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x11\n\rSTATUS_ERRORS\x10\x02\x12\x14\n\x10STATUS_COMPLETED\x10\x03\x12\x12\n\x0eSTATUS_STOPPED\x10\x04\x12\x12\n\x0eSTATUS_TIMEOUT\x10\x05\x12\x11\n\rSTATUS_CLOSED\x10\x06\x12\x10\n\x0cSTATUS_FATAL\x10\x07\x12\x12\n\x0eSTATUS_ABORTED\x10\x08\x12\x12\n\x0eSTATUS_UNKNOWN\x10\tB\n\n\x08_metricsB\n\n\x08_profileB\x0c\n\n_meta_data2`\n\x0cQueryService\x12P\n\x05Query\x12 .couchbase.query.v1.QueryRequest\x1a!.couchbase.query.v1.QueryResponse\"\x00\x30\x01\x42\xec\x01\n*com.couchbase.client.protostellar.query.v1P\x01Z>github.com/couchbase/goprotostellar/genproto/query_v1;query_v1\xaa\x02\x1f\x43ouchbase.Protostellar.Query.V1\xca\x02)Couchbase\\Protostellar\\Generated\\Query\\V1\xea\x02-Couchbase::Protostellar::Generated::Query::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["couchbase.kv.v1.MutationToken", "couchbase/kv/v1/kv.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -44,6 +21,7 @@ module V1 QueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest").msgclass QueryRequest::TuningOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.TuningOptions").msgclass QueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ScanConsistency").enummodule + QueryRequest::DurabilityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.DurabilityLevel").enummodule QueryRequest::ProfileMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ProfileMode").enummodule QueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse").msgclass QueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse.MetaData").msgclass diff --git a/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb b/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb index b345d087..396f01f1 100644 --- a/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb +++ b/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb @@ -1,5 +1,11 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/query/v1/query.proto for package 'Couchbase.Protostellar.Generated.Query.V1' +# Original file comments: +# Query Service +# +# Provides N1QL query execution against a Couchbase cluster. +# Queries are submitted as statements and results are returned as a +# server-streamed sequence of row batches with optional metadata. require 'grpc' require 'couchbase/protostellar/generated/query/v1/query_pb' @@ -10,6 +16,7 @@ module Generated module Query module V1 module QueryService + # QueryService provides N1QL (SQL++) query execution. class Service include ::GRPC::GenericService @@ -18,6 +25,9 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.query.v1.QueryService' + # Query executes a N1QL statement and streams back result rows and metadata. + # Results are delivered incrementally — rows arrive first, followed by a + # final response containing MetaData (status, metrics, warnings). rpc :Query, ::Couchbase::Protostellar::Generated::Query::V1::QueryRequest, stream(::Couchbase::Protostellar::Generated::Query::V1::QueryResponse) end diff --git a/lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb b/lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb deleted file mode 100644 index c01a0e42..00000000 --- a/lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: couchbase/routing/v1/routing.proto - -require 'google/protobuf' - - -descriptor_data = "\n\"couchbase/routing/v1/routing.proto\x12\x14\x63ouchbase.routing.v1\"D\n\x0fRoutingEndpoint\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0cserver_group\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\"[\n\x13\x44\x61taRoutingEndpoint\x12\x14\n\x0c\x65ndpoint_idx\x18\x01 \x01(\r\x12\x16\n\x0elocal_vbuckets\x18\x02 \x03(\r\x12\x16\n\x0egroup_vbuckets\x18\x03 \x03(\r\"p\n\x1aVbucketDataRoutingStrategy\x12<\n\tendpoints\x18\x01 \x03(\x0b\x32).couchbase.routing.v1.DataRoutingEndpoint\x12\x14\n\x0cnum_vbuckets\x18\x03 \x01(\r\",\n\x14QueryRoutingEndpoint\x12\x14\n\x0c\x65ndpoint_idx\x18\x01 \x01(\r\"M\n\x0cQueryRouting\x12=\n\tendpoints\x18\x01 \x03(\x0b\x32*.couchbase.routing.v1.QueryRoutingEndpoint\",\n\x14ViewsRoutingEndpoint\x12\x14\n\x0c\x65ndpoint_idx\x18\x01 \x01(\r\"M\n\x0cViewsRouting\x12=\n\tendpoints\x18\x01 \x03(\x0b\x32*.couchbase.routing.v1.ViewsRoutingEndpoint\"?\n\x13WatchRoutingRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_name\"\xe8\x02\n\x14WatchRoutingResponse\x12\x10\n\x08revision\x18\x01 \x03(\x04\x12\x38\n\tendpoints\x18\x02 \x03(\x0b\x32%.couchbase.routing.v1.RoutingEndpoint\x12P\n\x14vbucket_data_routing\x18\x03 \x01(\x0b\x32\x30.couchbase.routing.v1.VbucketDataRoutingStrategyH\x00\x12>\n\rquery_routing\x18\x04 \x01(\x0b\x32\".couchbase.routing.v1.QueryRoutingH\x01\x88\x01\x01\x12>\n\rviews_routing\x18\x05 \x01(\x0b\x32\".couchbase.routing.v1.ViewsRoutingH\x02\x88\x01\x01\x42\x0e\n\x0c\x64\x61ta_routingB\x10\n\x0e_query_routingB\x10\n\x0e_views_routing2{\n\x0eRoutingService\x12i\n\x0cWatchRouting\x12).couchbase.routing.v1.WatchRoutingRequest\x1a*.couchbase.routing.v1.WatchRoutingResponse\"\x00\x30\x01\x42\xf8\x01\n,com.couchbase.client.protostellar.routing.v1P\x01ZBgithub.com/couchbase/goprotostellar/genproto/routing_v1;routing_v1\xaa\x02!Couchbase.Protostellar.Routing.V1\xca\x02+Couchbase\\Protostellar\\Generated\\Routing\\V1\xea\x02/Couchbase::Protostellar::Generated::Routing::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Couchbase - module Protostellar - module Generated - module Routing - module V1 - RoutingEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.RoutingEndpoint").msgclass - DataRoutingEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.DataRoutingEndpoint").msgclass - VbucketDataRoutingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.VbucketDataRoutingStrategy").msgclass - QueryRoutingEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.QueryRoutingEndpoint").msgclass - QueryRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.QueryRouting").msgclass - ViewsRoutingEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.ViewsRoutingEndpoint").msgclass - ViewsRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.ViewsRouting").msgclass - WatchRoutingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.WatchRoutingRequest").msgclass - WatchRoutingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v1.WatchRoutingResponse").msgclass - end - end - end - end -end diff --git a/lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb b/lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb deleted file mode 100644 index e8b4db56..00000000 --- a/lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: couchbase/routing/v1/routing.proto for package 'Couchbase.Protostellar.Generated.Routing.V1' - -require 'grpc' -require 'couchbase/protostellar/generated/routing/v1/routing_pb' - -module Couchbase - module Protostellar - module Generated - module Routing - module V1 - module RoutingService - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'couchbase.routing.v1.RoutingService' - - rpc :WatchRouting, ::Couchbase::Protostellar::Generated::Routing::V1::WatchRoutingRequest, stream(::Couchbase::Protostellar::Generated::Routing::V1::WatchRoutingResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb b/lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb new file mode 100644 index 00000000..60729f6d --- /dev/null +++ b/lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: couchbase/routing/v2/routing.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"couchbase/routing/v2/routing.proto\x12\x14\x63ouchbase.routing.v2\"?\n\x13WatchRoutingRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_name\"E\n\rServerRouting\x12\x19\n\x11num_local_servers\x18\x01 \x01(\r\x12\x19\n\x11num_group_servers\x18\x02 \x01(\r\"V\n\x0eVbucketRouting\x12\x14\n\x0cnum_vbuckets\x18\x01 \x01(\r\x12\x16\n\x0elocal_vbuckets\x18\x02 \x03(\r\x12\x16\n\x0egroup_vbuckets\x18\x03 \x03(\r\"\xa3\x04\n\x14WatchRoutingResponse\x12@\n\x0eserver_routing\x18\x01 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x00\x88\x01\x01\x12?\n\rviews_routing\x18\x02 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x01\x88\x01\x01\x12?\n\rquery_routing\x18\x03 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x02\x88\x01\x01\x12@\n\x0esearch_routing\x18\x04 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x03\x88\x01\x01\x12\x43\n\x11\x61nalytics_routing\x18\x05 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x04\x88\x01\x01\x12G\n\x14vbucket_data_routing\x18\x06 \x01(\x0b\x32$.couchbase.routing.v2.VbucketRoutingH\x05\x88\x01\x01\x42\x11\n\x0f_server_routingB\x10\n\x0e_views_routingB\x10\n\x0e_query_routingB\x11\n\x0f_search_routingB\x14\n\x12_analytics_routingB\x17\n\x15_vbucket_data_routing2{\n\x0eRoutingService\x12i\n\x0cWatchRouting\x12).couchbase.routing.v2.WatchRoutingRequest\x1a*.couchbase.routing.v2.WatchRoutingResponse\"\x00\x30\x01\x42\xf8\x01\n,com.couchbase.client.protostellar.routing.v2P\x01ZBgithub.com/couchbase/goprotostellar/genproto/routing_v2;routing_v2\xaa\x02!Couchbase.Protostellar.Routing.V2\xca\x02+Couchbase\\Protostellar\\Generated\\Routing\\V2\xea\x02/Couchbase::Protostellar::Generated::Routing::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Couchbase + module Protostellar + module Generated + module Routing + module V2 + WatchRoutingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingRequest").msgclass + ServerRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.ServerRouting").msgclass + VbucketRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.VbucketRouting").msgclass + WatchRoutingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingResponse").msgclass + end + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb b/lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb new file mode 100644 index 00000000..9133bab5 --- /dev/null +++ b/lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb @@ -0,0 +1,43 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: couchbase/routing/v2/routing.proto for package 'Couchbase.Protostellar.Generated.Routing.V2' +# Original file comments: +# Routing Service (v2) +# +# Provides cluster topology and routing information via a long-lived +# server-streamed connection. Clients use this to discover which +# services are available, how many servers serve each service, and +# the vbucket distribution for data routing. + +require 'grpc' +require 'couchbase/protostellar/generated/routing/v2/routing_pb' + +module Couchbase + module Protostellar + module Generated + module Routing + module V2 + module RoutingService + # RoutingService provides cluster topology updates as a server-streamed + # response. The stream emits a new WatchRoutingResponse whenever the + # cluster topology changes. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'couchbase.routing.v2.RoutingService' + + # WatchRouting opens a long-lived stream that delivers routing + # configuration updates. If bucket_name is specified, the response + # includes vbucket routing for that specific bucket. + rpc :WatchRouting, ::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingRequest, stream(::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/couchbase/protostellar/generated/search/v1/search_pb.rb b/lib/couchbase/protostellar/generated/search/v1/search_pb.rb index db3307b5..40e8ad5c 100644 --- a/lib/couchbase/protostellar/generated/search/v1/search_pb.rb +++ b/lib/couchbase/protostellar/generated/search/v1/search_pb.rb @@ -8,33 +8,10 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n couchbase/search/v1/search.proto\x12\x13\x63ouchbase.search.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"^\n\x11\x42ooleanFieldQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x06 \x01(\x08\x42\x08\n\x06_boostB\x08\n\x06_field\"\x81\x02\n\x0c\x42ooleanQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x38\n\x04must\x18\x02 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x01\x88\x01\x01\x12<\n\x08must_not\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x02\x88\x01\x01\x12:\n\x06should\x18\x04 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x03\x88\x01\x01\x42\x08\n\x06_boostB\x07\n\x05_mustB\x0b\n\t_must_notB\t\n\x07_should\"]\n\x10\x43onjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.QueryB\x08\n\x06_boost\"\xcc\x01\n\x0e\x44\x61teRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x64\x61te_time_parser\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nstart_date\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x13\n\x11_date_time_parserB\r\n\x0b_start_dateB\x0b\n\t_end_date\"\x7f\n\x10\x44isjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.Query\x12\x14\n\x07minimum\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_boostB\n\n\x08_minimum\"7\n\nDocIdQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x03 \x03(\tB\x08\n\x06_boost\"-\n\x06LatLng\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"\xb3\x01\n\x13GeoBoundingBoxQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08top_left\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x31\n\x0c\x62ottom_right\x18\x04 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x8d\x01\n\x10GeoDistanceQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x10\n\x08\x64istance\x18\x04 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"|\n\x0fGeoPolygonQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08vertices\x18\x03 \x03(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x0f\n\rMatchAllQuery\"\x10\n\x0eMatchNoneQuery\"\x82\x01\n\x10MatchPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06phrase\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzer\"\xcc\x02\n\nMatchQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tfuzziness\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12?\n\x08operator\x18\x06 \x01(\x0e\x32(.couchbase.search.v1.MatchQuery.OperatorH\x04\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x07 \x01(\x04H\x05\x88\x01\x01\"-\n\x08Operator\x12\x0f\n\x0bOPERATOR_OR\x10\x00\x12\x10\n\x0cOPERATOR_AND\x10\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzerB\x0c\n\n_fuzzinessB\x0b\n\t_operatorB\x10\n\x0e_prefix_length\"\xdf\x01\n\x11NumericRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x10\n\x03max\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"X\n\x0bPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05terms\x18\x03 \x03(\tB\x08\n\x06_boostB\x08\n\x06_field\"Y\n\x0bPrefixQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06prefix\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"F\n\x10QueryStringQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x0cquery_string\x18\x03 \x01(\tB\x08\n\x06_boost\"Y\n\x0bRegexpQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06regexp\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xa9\x01\n\tTermQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04term\x18\x03 \x01(\t\x12\x16\n\tfuzziness\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0c\n\n_fuzzinessB\x10\n\x0e_prefix_length\"\xdc\x01\n\x0eTermRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03max\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x08 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"]\n\rWildcardQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08wildcard\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xd5\n\n\x05Query\x12\x45\n\x13\x62oolean_field_query\x18\x01 \x01(\x0b\x32&.couchbase.search.v1.BooleanFieldQueryH\x00\x12:\n\rboolean_query\x18\x02 \x01(\x0b\x32!.couchbase.search.v1.BooleanQueryH\x00\x12\x42\n\x11\x63onjunction_query\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x00\x12?\n\x10\x64\x61te_range_query\x18\x04 \x01(\x0b\x32#.couchbase.search.v1.DateRangeQueryH\x00\x12\x42\n\x11\x64isjunction_query\x18\x05 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x00\x12\x37\n\x0c\x64oc_id_query\x18\x06 \x01(\x0b\x32\x1f.couchbase.search.v1.DocIdQueryH\x00\x12J\n\x16geo_bounding_box_query\x18\x07 \x01(\x0b\x32(.couchbase.search.v1.GeoBoundingBoxQueryH\x00\x12\x43\n\x12geo_distance_query\x18\x08 \x01(\x0b\x32%.couchbase.search.v1.GeoDistanceQueryH\x00\x12\x41\n\x11geo_polygon_query\x18\t \x01(\x0b\x32$.couchbase.search.v1.GeoPolygonQueryH\x00\x12=\n\x0fmatch_all_query\x18\n \x01(\x0b\x32\".couchbase.search.v1.MatchAllQueryH\x00\x12?\n\x10match_none_query\x18\x0b \x01(\x0b\x32#.couchbase.search.v1.MatchNoneQueryH\x00\x12\x43\n\x12match_phrase_query\x18\x0c \x01(\x0b\x32%.couchbase.search.v1.MatchPhraseQueryH\x00\x12\x36\n\x0bmatch_query\x18\r \x01(\x0b\x32\x1f.couchbase.search.v1.MatchQueryH\x00\x12\x45\n\x13numeric_range_query\x18\x0e \x01(\x0b\x32&.couchbase.search.v1.NumericRangeQueryH\x00\x12\x38\n\x0cphrase_query\x18\x0f \x01(\x0b\x32 .couchbase.search.v1.PhraseQueryH\x00\x12\x38\n\x0cprefix_query\x18\x10 \x01(\x0b\x32 .couchbase.search.v1.PrefixQueryH\x00\x12\x43\n\x12query_string_query\x18\x11 \x01(\x0b\x32%.couchbase.search.v1.QueryStringQueryH\x00\x12\x38\n\x0cregexp_query\x18\x12 \x01(\x0b\x32 .couchbase.search.v1.RegexpQueryH\x00\x12\x34\n\nterm_query\x18\x13 \x01(\x0b\x32\x1e.couchbase.search.v1.TermQueryH\x00\x12?\n\x10term_range_query\x18\x14 \x01(\x0b\x32#.couchbase.search.v1.TermRangeQueryH\x00\x12<\n\x0ewildcard_query\x18\x15 \x01(\x0b\x32\".couchbase.search.v1.WildcardQueryH\x00\x42\x07\n\x05query\"^\n\x0c\x46ieldSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12\x0f\n\x07missing\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\x12\x0c\n\x04type\x18\x05 \x01(\t\"r\n\x12GeoDistanceSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x0c\n\x04unit\x18\x04 \x01(\t\"\x1f\n\tIdSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\"\n\x0cScoreSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\x8b\x02\n\x07Sorting\x12:\n\rfield_sorting\x18\x01 \x01(\x0b\x32!.couchbase.search.v1.FieldSortingH\x00\x12G\n\x14geo_distance_sorting\x18\x02 \x01(\x0b\x32\'.couchbase.search.v1.GeoDistanceSortingH\x00\x12\x34\n\nid_sorting\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.IdSortingH\x00\x12:\n\rscore_sorting\x18\x04 \x01(\x0b\x32!.couchbase.search.v1.ScoreSortingH\x00\x42\t\n\x07sorting\"Q\n\tDateRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05start\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"b\n\x0e\x44\x61teRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x33\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x1e.couchbase.search.v1.DateRange\"P\n\x0cNumericRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03min\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x03 \x01(\x02H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"k\n\x11NumericRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x39\n\x0enumeric_ranges\x18\x03 \x03(\x0b\x32!.couchbase.search.v1.NumericRange\"(\n\tTermFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\"\xce\x01\n\x05\x46\x61\x63\x65t\x12?\n\x10\x64\x61te_range_facet\x18\x01 \x01(\x0b\x32#.couchbase.search.v1.DateRangeFacetH\x00\x12\x45\n\x13numeric_range_facet\x18\x02 \x01(\x0b\x32&.couchbase.search.v1.NumericRangeFacetH\x00\x12\x34\n\nterm_facet\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.TermFacetH\x00\x42\x07\n\x05\x66\x61\x63\x65t\"\xca\x06\n\x12SearchQueryRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12)\n\x05query\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Query\x12Q\n\x10scan_consistency\x18\x03 \x01(\x0e\x32\x37.couchbase.search.v1.SearchQueryRequest.ScanConsistency\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x0c\n\x04skip\x18\x05 \x01(\r\x12\x1b\n\x13include_explanation\x18\x06 \x01(\x08\x12O\n\x0fhighlight_style\x18\x07 \x01(\x0e\x32\x36.couchbase.search.v1.SearchQueryRequest.HighlightStyle\x12\x18\n\x10highlight_fields\x18\x08 \x03(\t\x12\x0e\n\x06\x66ields\x18\t \x03(\t\x12*\n\x04sort\x18\n \x03(\x0b\x32\x1c.couchbase.search.v1.Sorting\x12\x17\n\x0f\x64isable_scoring\x18\x0b \x01(\x08\x12\x13\n\x0b\x63ollections\x18\x0c \x03(\t\x12\x19\n\x11include_locations\x18\r \x01(\x08\x12\x43\n\x06\x66\x61\x63\x65ts\x18\x0e \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryRequest.FacetsEntry\x12\x18\n\x0b\x62ucket_name\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x10 \x01(\tH\x01\x88\x01\x01\x1aI\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Facet:\x02\x38\x01\"3\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\"a\n\x0eHighlightStyle\x12\x1b\n\x17HIGHLIGHT_STYLE_DEFAULT\x10\x00\x12\x18\n\x14HIGHLIGHT_STYLE_HTML\x10\x01\x12\x18\n\x14HIGHLIGHT_STYLE_ANSI\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x9a\x13\n\x13SearchQueryResponse\x12\x45\n\x04hits\x18\x01 \x03(\x0b\x32\x37.couchbase.search.v1.SearchQueryResponse.SearchQueryRow\x12\x44\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetsEntry\x12I\n\tmeta_data\x18\x03 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xd9\x03\n\x0eSearchQueryRow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x01\x12\r\n\x05index\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\x0c\x12\x44\n\tlocations\x18\x05 \x03(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Location\x12Y\n\tfragments\x18\x06 \x03(\x0b\x32\x46.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FragmentsEntry\x12S\n\x06\x66ields\x18\x07 \x03(\x0b\x32\x43.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FieldsEntry\x1a\x63\n\x0e\x46ragmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Fragment:\x02\x38\x01\x1a-\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1an\n\x08Location\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x10\n\x08position\x18\x03 \x01(\r\x12\r\n\x05start\x18\x04 \x01(\r\x12\x0b\n\x03\x65nd\x18\x05 \x01(\r\x12\x17\n\x0f\x61rray_positions\x18\x06 \x03(\r\x1a\x1b\n\x08\x46ragment\x12\x0f\n\x07\x63ontent\x18\x01 \x03(\t\x1a\xa9\x02\n\x0b\x46\x61\x63\x65tResult\x12N\n\nterm_facet\x18\x01 \x01(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.TermFacetResultH\x00\x12Y\n\x10\x64\x61te_range_facet\x18\x02 \x01(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.DateRangeFacetResultH\x00\x12_\n\x13numeric_range_facet\x18\x03 \x01(\x0b\x32@.couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResultH\x00\x42\x0e\n\x0csearch_facet\x1a\x37\n\nTermResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x1a\x99\x01\n\x0fTermFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12\x42\n\x05terms\x18\x06 \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryResponse.TermResultJ\x04\x08\x01\x10\x02\x1a\x81\x01\n\x0f\x44\x61teRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12)\n\x05start\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xa9\x01\n\x14\x44\x61teRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12M\n\x0b\x64\x61te_ranges\x18\x06 \x03(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.DateRangeResultJ\x04\x08\x01\x10\x02\x1aJ\n\x12NumericRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12\x0b\n\x03min\x18\x03 \x01(\x04\x12\x0b\n\x03max\x18\x04 \x01(\x04\x1a\xb2\x01\n\x17NumericRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12S\n\x0enumeric_ranges\x18\x06 \x03(\x0b\x32;.couchbase.search.v1.SearchQueryResponse.NumericRangeResultJ\x04\x08\x01\x10\x02\x1a\xd1\x01\n\x08MetaData\x12G\n\x07metrics\x18\x01 \x01(\x0b\x32\x36.couchbase.search.v1.SearchQueryResponse.SearchMetrics\x12M\n\x06\x65rrors\x18\x02 \x03(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.MetaData.ErrorsEntry\x1a-\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xc8\x01\n\rSearchMetrics\x12\x31\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\ntotal_rows\x18\x02 \x01(\x04\x12\x11\n\tmax_score\x18\x03 \x01(\x01\x12\x1d\n\x15total_partition_count\x18\x04 \x01(\x04\x12\x1f\n\x17success_partition_count\x18\x05 \x01(\x04\x12\x1d\n\x15\x65rror_partition_count\x18\x06 \x01(\x04\x1a\x63\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetResult:\x02\x38\x01\x42\x0c\n\n_meta_data2u\n\rSearchService\x12\x64\n\x0bSearchQuery\x12\'.couchbase.search.v1.SearchQueryRequest\x1a(.couchbase.search.v1.SearchQueryResponse\"\x00\x30\x01\x42\xf2\x01\n+com.couchbase.client.protostellar.search.v1P\x01Z@github.com/couchbase/goprotostellar/genproto/search_v1;search_v1\xaa\x02 Couchbase.Protostellar.Search.V1\xca\x02*Couchbase\\Protostellar\\Generated\\Search\\V1\xea\x02.Couchbase::Protostellar::Generated::Search::V1b\x06proto3" +descriptor_data = "\n couchbase/search/v1/search.proto\x12\x13\x63ouchbase.search.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"^\n\x11\x42ooleanFieldQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x06 \x01(\x08\x42\x08\n\x06_boostB\x08\n\x06_field\"\x81\x02\n\x0c\x42ooleanQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x38\n\x04must\x18\x02 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x01\x88\x01\x01\x12<\n\x08must_not\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x02\x88\x01\x01\x12:\n\x06should\x18\x04 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x03\x88\x01\x01\x42\x08\n\x06_boostB\x07\n\x05_mustB\x0b\n\t_must_notB\t\n\x07_should\"]\n\x10\x43onjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.QueryB\x08\n\x06_boost\"\xcc\x01\n\x0e\x44\x61teRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x64\x61te_time_parser\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nstart_date\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x05 \x01(\tH\x04\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x13\n\x11_date_time_parserB\r\n\x0b_start_dateB\x0b\n\t_end_date\"\x7f\n\x10\x44isjunctionQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12+\n\x07queries\x18\x02 \x03(\x0b\x32\x1a.couchbase.search.v1.Query\x12\x14\n\x07minimum\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_boostB\n\n\x08_minimum\"7\n\nDocIdQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x03 \x03(\tB\x08\n\x06_boost\"-\n\x06LatLng\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"\xb3\x01\n\x13GeoBoundingBoxQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08top_left\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x31\n\x0c\x62ottom_right\x18\x04 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x8d\x01\n\x10GeoDistanceQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x10\n\x08\x64istance\x18\x04 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"|\n\x0fGeoPolygonQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12-\n\x08vertices\x18\x03 \x03(\x0b\x32\x1b.couchbase.search.v1.LatLngB\x08\n\x06_boostB\x08\n\x06_field\"\x0f\n\rMatchAllQuery\"\x10\n\x0eMatchNoneQuery\"\x82\x01\n\x10MatchPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06phrase\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzer\"\xcc\x02\n\nMatchQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\x08\x61nalyzer\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tfuzziness\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12?\n\x08operator\x18\x06 \x01(\x0e\x32(.couchbase.search.v1.MatchQuery.OperatorH\x04\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x07 \x01(\x04H\x05\x88\x01\x01\"-\n\x08Operator\x12\x0f\n\x0bOPERATOR_OR\x10\x00\x12\x10\n\x0cOPERATOR_AND\x10\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0b\n\t_analyzerB\x0c\n\n_fuzzinessB\x0b\n\t_operatorB\x10\n\x0e_prefix_length\"\xdf\x01\n\x11NumericRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x10\n\x03max\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"X\n\x0bPhraseQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\r\n\x05terms\x18\x03 \x03(\tB\x08\n\x06_boostB\x08\n\x06_field\"Y\n\x0bPrefixQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06prefix\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"F\n\x10QueryStringQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x0cquery_string\x18\x03 \x01(\tB\x08\n\x06_boost\"Y\n\x0bRegexpQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06regexp\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xa9\x01\n\tTermQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0c\n\x04term\x18\x03 \x01(\t\x12\x16\n\tfuzziness\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x05 \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x0c\n\n_fuzzinessB\x10\n\x0e_prefix_length\"\xdc\x01\n\x0eTermRangeQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03min\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x03max\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rinclusive_min\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rinclusive_max\x18\x08 \x01(\x08H\x05\x88\x01\x01\x42\x08\n\x06_boostB\x08\n\x06_fieldB\x06\n\x04_minB\x06\n\x04_maxB\x10\n\x0e_inclusive_minB\x10\n\x0e_inclusive_max\"]\n\rWildcardQuery\x12\x12\n\x05\x62oost\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x66ield\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08wildcard\x18\x03 \x01(\tB\x08\n\x06_boostB\x08\n\x06_field\"\xd5\n\n\x05Query\x12\x45\n\x13\x62oolean_field_query\x18\x01 \x01(\x0b\x32&.couchbase.search.v1.BooleanFieldQueryH\x00\x12:\n\rboolean_query\x18\x02 \x01(\x0b\x32!.couchbase.search.v1.BooleanQueryH\x00\x12\x42\n\x11\x63onjunction_query\x18\x03 \x01(\x0b\x32%.couchbase.search.v1.ConjunctionQueryH\x00\x12?\n\x10\x64\x61te_range_query\x18\x04 \x01(\x0b\x32#.couchbase.search.v1.DateRangeQueryH\x00\x12\x42\n\x11\x64isjunction_query\x18\x05 \x01(\x0b\x32%.couchbase.search.v1.DisjunctionQueryH\x00\x12\x37\n\x0c\x64oc_id_query\x18\x06 \x01(\x0b\x32\x1f.couchbase.search.v1.DocIdQueryH\x00\x12J\n\x16geo_bounding_box_query\x18\x07 \x01(\x0b\x32(.couchbase.search.v1.GeoBoundingBoxQueryH\x00\x12\x43\n\x12geo_distance_query\x18\x08 \x01(\x0b\x32%.couchbase.search.v1.GeoDistanceQueryH\x00\x12\x41\n\x11geo_polygon_query\x18\t \x01(\x0b\x32$.couchbase.search.v1.GeoPolygonQueryH\x00\x12=\n\x0fmatch_all_query\x18\n \x01(\x0b\x32\".couchbase.search.v1.MatchAllQueryH\x00\x12?\n\x10match_none_query\x18\x0b \x01(\x0b\x32#.couchbase.search.v1.MatchNoneQueryH\x00\x12\x43\n\x12match_phrase_query\x18\x0c \x01(\x0b\x32%.couchbase.search.v1.MatchPhraseQueryH\x00\x12\x36\n\x0bmatch_query\x18\r \x01(\x0b\x32\x1f.couchbase.search.v1.MatchQueryH\x00\x12\x45\n\x13numeric_range_query\x18\x0e \x01(\x0b\x32&.couchbase.search.v1.NumericRangeQueryH\x00\x12\x38\n\x0cphrase_query\x18\x0f \x01(\x0b\x32 .couchbase.search.v1.PhraseQueryH\x00\x12\x38\n\x0cprefix_query\x18\x10 \x01(\x0b\x32 .couchbase.search.v1.PrefixQueryH\x00\x12\x43\n\x12query_string_query\x18\x11 \x01(\x0b\x32%.couchbase.search.v1.QueryStringQueryH\x00\x12\x38\n\x0cregexp_query\x18\x12 \x01(\x0b\x32 .couchbase.search.v1.RegexpQueryH\x00\x12\x34\n\nterm_query\x18\x13 \x01(\x0b\x32\x1e.couchbase.search.v1.TermQueryH\x00\x12?\n\x10term_range_query\x18\x14 \x01(\x0b\x32#.couchbase.search.v1.TermRangeQueryH\x00\x12<\n\x0ewildcard_query\x18\x15 \x01(\x0b\x32\".couchbase.search.v1.WildcardQueryH\x00\x42\x07\n\x05query\"^\n\x0c\x46ieldSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12\x0f\n\x07missing\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\x12\x0c\n\x04type\x18\x05 \x01(\t\"r\n\x12GeoDistanceSorting\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x12\n\ndescending\x18\x02 \x01(\x08\x12+\n\x06\x63\x65nter\x18\x03 \x01(\x0b\x32\x1b.couchbase.search.v1.LatLng\x12\x0c\n\x04unit\x18\x04 \x01(\t\"\x1f\n\tIdSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\"\n\x0cScoreSorting\x12\x12\n\ndescending\x18\x01 \x01(\x08\"\x8b\x02\n\x07Sorting\x12:\n\rfield_sorting\x18\x01 \x01(\x0b\x32!.couchbase.search.v1.FieldSortingH\x00\x12G\n\x14geo_distance_sorting\x18\x02 \x01(\x0b\x32\'.couchbase.search.v1.GeoDistanceSortingH\x00\x12\x34\n\nid_sorting\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.IdSortingH\x00\x12:\n\rscore_sorting\x18\x04 \x01(\x0b\x32!.couchbase.search.v1.ScoreSortingH\x00\x42\t\n\x07sorting\"Q\n\tDateRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05start\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"b\n\x0e\x44\x61teRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x33\n\x0b\x64\x61te_ranges\x18\x03 \x03(\x0b\x32\x1e.couchbase.search.v1.DateRange\"P\n\x0cNumericRange\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03min\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x03 \x01(\x02H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"k\n\x11NumericRangeFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x39\n\x0enumeric_ranges\x18\x03 \x03(\x0b\x32!.couchbase.search.v1.NumericRange\"(\n\tTermFacet\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\"\xce\x01\n\x05\x46\x61\x63\x65t\x12?\n\x10\x64\x61te_range_facet\x18\x01 \x01(\x0b\x32#.couchbase.search.v1.DateRangeFacetH\x00\x12\x45\n\x13numeric_range_facet\x18\x02 \x01(\x0b\x32&.couchbase.search.v1.NumericRangeFacetH\x00\x12\x34\n\nterm_facet\x18\x03 \x01(\x0b\x32\x1e.couchbase.search.v1.TermFacetH\x00\x42\x07\n\x05\x66\x61\x63\x65t\"R\n\x08KnnQuery\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\t\n\x01k\x18\x02 \x01(\x03\x12\x0e\n\x06vector\x18\x03 \x03(\x02\x12\x12\n\x05\x62oost\x18\x04 \x01(\x02H\x00\x88\x01\x01\x42\x08\n\x06_boost\"\xc4\x07\n\x12SearchQueryRequest\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12)\n\x05query\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Query\x12Q\n\x10scan_consistency\x18\x03 \x01(\x0e\x32\x37.couchbase.search.v1.SearchQueryRequest.ScanConsistency\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x0c\n\x04skip\x18\x05 \x01(\r\x12\x1b\n\x13include_explanation\x18\x06 \x01(\x08\x12O\n\x0fhighlight_style\x18\x07 \x01(\x0e\x32\x36.couchbase.search.v1.SearchQueryRequest.HighlightStyle\x12\x18\n\x10highlight_fields\x18\x08 \x03(\t\x12\x0e\n\x06\x66ields\x18\t \x03(\t\x12*\n\x04sort\x18\n \x03(\x0b\x32\x1c.couchbase.search.v1.Sorting\x12\x17\n\x0f\x64isable_scoring\x18\x0b \x01(\x08\x12\x13\n\x0b\x63ollections\x18\x0c \x03(\t\x12\x19\n\x11include_locations\x18\r \x01(\x08\x12\x43\n\x06\x66\x61\x63\x65ts\x18\x0e \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryRequest.FacetsEntry\x12*\n\x03knn\x18\x11 \x03(\x0b\x32\x1d.couchbase.search.v1.KnnQuery\x12;\n\x0cknn_operator\x18\x12 \x01(\x0e\x32 .couchbase.search.v1.KnnOperatorH\x00\x88\x01\x01\x12\x18\n\x0b\x62ucket_name\x18\x0f \x01(\tH\x01\x88\x01\x01\x12\x17\n\nscope_name\x18\x10 \x01(\tH\x02\x88\x01\x01\x1aI\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.couchbase.search.v1.Facet:\x02\x38\x01\"3\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\"a\n\x0eHighlightStyle\x12\x1b\n\x17HIGHLIGHT_STYLE_DEFAULT\x10\x00\x12\x18\n\x14HIGHLIGHT_STYLE_HTML\x10\x01\x12\x18\n\x14HIGHLIGHT_STYLE_ANSI\x10\x02\x42\x0f\n\r_knn_operatorB\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_name\"\x9a\x13\n\x13SearchQueryResponse\x12\x45\n\x04hits\x18\x01 \x03(\x0b\x32\x37.couchbase.search.v1.SearchQueryResponse.SearchQueryRow\x12\x44\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetsEntry\x12I\n\tmeta_data\x18\x03 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xd9\x03\n\x0eSearchQueryRow\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x01\x12\r\n\x05index\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\x0c\x12\x44\n\tlocations\x18\x05 \x03(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Location\x12Y\n\tfragments\x18\x06 \x03(\x0b\x32\x46.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FragmentsEntry\x12S\n\x06\x66ields\x18\x07 \x03(\x0b\x32\x43.couchbase.search.v1.SearchQueryResponse.SearchQueryRow.FieldsEntry\x1a\x63\n\x0e\x46ragmentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.couchbase.search.v1.SearchQueryResponse.Fragment:\x02\x38\x01\x1a-\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1an\n\x08Location\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0c\n\x04term\x18\x02 \x01(\t\x12\x10\n\x08position\x18\x03 \x01(\r\x12\r\n\x05start\x18\x04 \x01(\r\x12\x0b\n\x03\x65nd\x18\x05 \x01(\r\x12\x17\n\x0f\x61rray_positions\x18\x06 \x03(\r\x1a\x1b\n\x08\x46ragment\x12\x0f\n\x07\x63ontent\x18\x01 \x03(\t\x1a\xa9\x02\n\x0b\x46\x61\x63\x65tResult\x12N\n\nterm_facet\x18\x01 \x01(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.TermFacetResultH\x00\x12Y\n\x10\x64\x61te_range_facet\x18\x02 \x01(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.DateRangeFacetResultH\x00\x12_\n\x13numeric_range_facet\x18\x03 \x01(\x0b\x32@.couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResultH\x00\x42\x0e\n\x0csearch_facet\x1a\x37\n\nTermResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x1a\x99\x01\n\x0fTermFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12\x42\n\x05terms\x18\x06 \x03(\x0b\x32\x33.couchbase.search.v1.SearchQueryResponse.TermResultJ\x04\x08\x01\x10\x02\x1a\x81\x01\n\x0f\x44\x61teRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12)\n\x05start\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xa9\x01\n\x14\x44\x61teRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12M\n\x0b\x64\x61te_ranges\x18\x06 \x03(\x0b\x32\x38.couchbase.search.v1.SearchQueryResponse.DateRangeResultJ\x04\x08\x01\x10\x02\x1aJ\n\x12NumericRangeResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x04\x12\x0b\n\x03min\x18\x03 \x01(\x04\x12\x0b\n\x03max\x18\x04 \x01(\x04\x1a\xb2\x01\n\x17NumericRangeFacetResult\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\x0f\n\x07missing\x18\x04 \x01(\x03\x12\r\n\x05other\x18\x05 \x01(\x03\x12S\n\x0enumeric_ranges\x18\x06 \x03(\x0b\x32;.couchbase.search.v1.SearchQueryResponse.NumericRangeResultJ\x04\x08\x01\x10\x02\x1a\xd1\x01\n\x08MetaData\x12G\n\x07metrics\x18\x01 \x01(\x0b\x32\x36.couchbase.search.v1.SearchQueryResponse.SearchMetrics\x12M\n\x06\x65rrors\x18\x02 \x03(\x0b\x32=.couchbase.search.v1.SearchQueryResponse.MetaData.ErrorsEntry\x1a-\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xc8\x01\n\rSearchMetrics\x12\x31\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\ntotal_rows\x18\x02 \x01(\x04\x12\x11\n\tmax_score\x18\x03 \x01(\x01\x12\x1d\n\x15total_partition_count\x18\x04 \x01(\x04\x12\x1f\n\x17success_partition_count\x18\x05 \x01(\x04\x12\x1d\n\x15\x65rror_partition_count\x18\x06 \x01(\x04\x1a\x63\n\x0b\x46\x61\x63\x65tsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x43\n\x05value\x18\x02 \x01(\x0b\x32\x34.couchbase.search.v1.SearchQueryResponse.FacetResult:\x02\x38\x01\x42\x0c\n\n_meta_data*8\n\x0bKnnOperator\x12\x13\n\x0fKNN_OPERATOR_OR\x10\x00\x12\x14\n\x10KNN_OPERATOR_AND\x10\x01\x32u\n\rSearchService\x12\x64\n\x0bSearchQuery\x12\'.couchbase.search.v1.SearchQueryRequest\x1a(.couchbase.search.v1.SearchQueryResponse\"\x00\x30\x01\x42\xf2\x01\n+com.couchbase.client.protostellar.search.v1P\x01Z@github.com/couchbase/goprotostellar/genproto/search_v1;search_v1\xaa\x02 Couchbase.Protostellar.Search.V1\xca\x02*Couchbase\\Protostellar\\Generated\\Search\\V1\xea\x02.Couchbase::Protostellar::Generated::Search::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar @@ -76,6 +53,7 @@ module V1 NumericRangeFacet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.NumericRangeFacet").msgclass TermFacet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.TermFacet").msgclass Facet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.Facet").msgclass + KnnQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.KnnQuery").msgclass SearchQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest").msgclass SearchQueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest.ScanConsistency").enummodule SearchQueryRequest::HighlightStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryRequest.HighlightStyle").enummodule @@ -92,6 +70,7 @@ module V1 SearchQueryResponse::NumericRangeFacetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.NumericRangeFacetResult").msgclass SearchQueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.MetaData").msgclass SearchQueryResponse::SearchMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.SearchQueryResponse.SearchMetrics").msgclass + KnnOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.search.v1.KnnOperator").enummodule end end end diff --git a/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb b/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb index d95c64ba..e10f5a51 100644 --- a/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb +++ b/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb @@ -1,5 +1,11 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/search/v1/search.proto for package 'Couchbase.Protostellar.Generated.Search.V1' +# Original file comments: +# Search (Full-Text Search) Service +# +# Provides full-text search (FTS) queries against Couchbase search indexes. +# Supports 21 query types, geo queries, KNN vector search, sorting, facets, +# and highlighting. Results are server-streamed. require 'grpc' require 'couchbase/protostellar/generated/search/v1/search_pb' @@ -10,6 +16,9 @@ module Generated module Search module V1 module SearchService + # ---- Service ---- + # + # SearchService provides full-text search query execution. class Service include ::GRPC::GenericService @@ -18,6 +27,8 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.search.v1.SearchService' + # SearchQuery executes a search query against a named index and streams + # back hits, facet results, and metadata. rpc :SearchQuery, ::Couchbase::Protostellar::Generated::Search::V1::SearchQueryRequest, stream(::Couchbase::Protostellar::Generated::Search::V1::SearchQueryResponse) end diff --git a/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb b/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb index e668de90..586cb78a 100644 --- a/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb +++ b/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb @@ -7,29 +7,8 @@ descriptor_data = "\n,couchbase/transactions/v1/transactions.proto\x12\x19\x63ouchbase.transactions.v1\"e\n\x1eTransactionBeginAttemptRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_transaction_id\"M\n\x1fTransactionBeginAttemptResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\x12\x12\n\nattempt_id\x18\x02 \x01(\t\"[\n\x18TransactionCommitRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\"\x1b\n\x19TransactionCommitResponse\"]\n\x1aTransactionRollbackRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\"\x1d\n\x1bTransactionRollbackResponse\"\x92\x01\n\x15TransactionGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\"4\n\x16TransactionGetResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"\xa4\x01\n\x18TransactionInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\r\n\x05value\x18\x07 \x01(\x0c\"(\n\x19TransactionInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\"\xb2\x01\n\x19TransactionReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x07 \x01(\x04\x12\r\n\x05value\x18\x08 \x01(\x0c\")\n\x1aTransactionReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\"\xa2\x01\n\x18TransactionRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x16\n\x0etransaction_id\x18\x02 \x01(\t\x12\x12\n\nattempt_id\x18\x03 \x01(\t\x12\x12\n\nscope_name\x18\x04 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x05 \x01(\t\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x07 \x01(\x04\"(\n\x19TransactionRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x32\xbb\x07\n\x13TransactionsService\x12\x92\x01\n\x17TransactionBeginAttempt\x12\x39.couchbase.transactions.v1.TransactionBeginAttemptRequest\x1a:.couchbase.transactions.v1.TransactionBeginAttemptResponse\"\x00\x12\x80\x01\n\x11TransactionCommit\x12\x33.couchbase.transactions.v1.TransactionCommitRequest\x1a\x34.couchbase.transactions.v1.TransactionCommitResponse\"\x00\x12\x86\x01\n\x13TransactionRollback\x12\x35.couchbase.transactions.v1.TransactionRollbackRequest\x1a\x36.couchbase.transactions.v1.TransactionRollbackResponse\"\x00\x12w\n\x0eTransactionGet\x12\x30.couchbase.transactions.v1.TransactionGetRequest\x1a\x31.couchbase.transactions.v1.TransactionGetResponse\"\x00\x12\x80\x01\n\x11TransactionInsert\x12\x33.couchbase.transactions.v1.TransactionInsertRequest\x1a\x34.couchbase.transactions.v1.TransactionInsertResponse\"\x00\x12\x83\x01\n\x12TransactionReplace\x12\x34.couchbase.transactions.v1.TransactionReplaceRequest\x1a\x35.couchbase.transactions.v1.TransactionReplaceResponse\"\x00\x12\x80\x01\n\x11TransactionRemove\x12\x33.couchbase.transactions.v1.TransactionRemoveRequest\x1a\x34.couchbase.transactions.v1.TransactionRemoveResponse\"\x00\x42\x96\x02\n1com.couchbase.client.protostellar.transactions.v1P\x01ZLgithub.com/couchbase/goprotostellar/genproto/transactions_v1;transactions_v1\xaa\x02&Couchbase.Protostellar.Transactions.V1\xca\x02\x30\x43ouchbase\\Protostellar\\Generated\\Transactions\\V1\xea\x02\x34\x43ouchbase::Protostellar::Generated::Transactions::V1b\x06proto3" -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError => e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar diff --git a/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb b/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb index bc7d5d60..44716923 100644 --- a/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb +++ b/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb @@ -1,5 +1,15 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/transactions/v1/transactions.proto for package 'Couchbase.Protostellar.Generated.Transactions.V1' +# Original file comments: +# Transactions Service +# +# Provides server-managed distributed ACID transactions against a +# Couchbase cluster. The transaction lifecycle is: +# 1. BeginAttempt — start a new transaction attempt. +# 2. Perform data operations (Get, Insert, Replace, Remove) within +# the transaction context. +# 3. Commit or Rollback the transaction attempt. +# Each attempt is identified by a (transaction_id, attempt_id) pair. require 'grpc' require 'couchbase/protostellar/generated/transactions/v1/transactions_pb' @@ -10,6 +20,9 @@ module Generated module Transactions module V1 module TransactionsService + # TransactionsService provides distributed ACID transactions. + # All data operations must reference a valid transaction_id and attempt_id + # obtained from TransactionBeginAttempt. class Service include ::GRPC::GenericService @@ -18,12 +31,29 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.transactions.v1.TransactionsService' + # TransactionBeginAttempt starts a new transaction attempt. Returns + # a transaction_id and attempt_id to use for all subsequent operations. + # If transaction_id is provided, this begins a retry attempt for an + # existing transaction. rpc :TransactionBeginAttempt, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionBeginAttemptRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionBeginAttemptResponse + # TransactionCommit commits all mutations made within the transaction + # attempt, making them visible to other operations. rpc :TransactionCommit, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionCommitRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionCommitResponse + # TransactionRollback aborts the transaction attempt and discards + # all uncommitted mutations. rpc :TransactionRollback, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRollbackRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRollbackResponse + # TransactionGet retrieves a document within the transaction context. + # The returned CAS must be used for subsequent Replace or Remove + # operations on this document within the same transaction. rpc :TransactionGet, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionGetRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionGetResponse + # TransactionInsert creates a new document within the transaction. + # Fails if the document already exists. rpc :TransactionInsert, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionInsertRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionInsertResponse + # TransactionReplace replaces an existing document within the transaction. + # Requires the CAS from a prior TransactionGet. rpc :TransactionReplace, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionReplaceRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionReplaceResponse + # TransactionRemove removes a document within the transaction. + # Requires the CAS from a prior TransactionGet. rpc :TransactionRemove, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRemoveRequest, ::Couchbase::Protostellar::Generated::Transactions::V1::TransactionRemoveResponse end diff --git a/lib/couchbase/protostellar/generated/view/v1/view_pb.rb b/lib/couchbase/protostellar/generated/view/v1/view_pb.rb index 8820b16a..b180e5fe 100644 --- a/lib/couchbase/protostellar/generated/view/v1/view_pb.rb +++ b/lib/couchbase/protostellar/generated/view/v1/view_pb.rb @@ -7,29 +7,8 @@ descriptor_data = "\n\x1c\x63ouchbase/view/v1/view.proto\x12\x11\x63ouchbase.view.v1\"\xa0\t\n\x10ViewQueryRequest\x12\x13\n\x0b\x62ucket_name\x18\x08 \x01(\t\x12\x1c\n\x14\x64\x65sign_document_name\x18\x01 \x01(\t\x12\x11\n\tview_name\x18\x02 \x01(\t\x12\x11\n\x04skip\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x04 \x01(\rH\x01\x88\x01\x01\x12R\n\x10scan_consistency\x18\x05 \x01(\x0e\x32\x33.couchbase.view.v1.ViewQueryRequest.ScanConsistencyH\x02\x88\x01\x01\x12\x13\n\x06reduce\x18\x06 \x01(\x08H\x03\x88\x01\x01\x12\x12\n\x05group\x18\x07 \x01(\x08H\x04\x88\x01\x01\x12\x18\n\x0bgroup_level\x18\t \x01(\rH\x05\x88\x01\x01\x12\x10\n\x03key\x18\n \x01(\x0cH\x06\x88\x01\x01\x12\x0c\n\x04keys\x18\x0b \x03(\x0c\x12\x16\n\tstart_key\x18\x0c \x01(\x0cH\x07\x88\x01\x01\x12\x14\n\x07\x65nd_key\x18\r \x01(\x0cH\x08\x88\x01\x01\x12\x1a\n\rinclusive_end\x18\x0e \x01(\x08H\t\x88\x01\x01\x12\x1d\n\x10start_key_doc_id\x18\x0f \x01(\tH\n\x88\x01\x01\x12\x1b\n\x0e\x65nd_key_doc_id\x18\x10 \x01(\tH\x0b\x88\x01\x01\x12\x44\n\x08on_error\x18\x11 \x01(\x0e\x32-.couchbase.view.v1.ViewQueryRequest.ErrorModeH\x0c\x88\x01\x01\x12\x12\n\x05\x64\x65\x62ug\x18\x12 \x01(\x08H\r\x88\x01\x01\x12\x45\n\tnamespace\x18\x13 \x01(\x0e\x32-.couchbase.view.v1.ViewQueryRequest.NamespaceH\x0e\x88\x01\x01\x12=\n\x05order\x18\x14 \x01(\x0e\x32).couchbase.view.v1.ViewQueryRequest.OrderH\x0f\x88\x01\x01\"y\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\x12!\n\x1dSCAN_CONSISTENCY_UPDATE_AFTER\x10\x02\"9\n\tErrorMode\x12\x17\n\x13\x45RROR_MODE_CONTINUE\x10\x00\x12\x13\n\x0f\x45RROR_MODE_STOP\x10\x01\"@\n\tNamespace\x12\x18\n\x14NAMESPACE_PRODUCTION\x10\x00\x12\x19\n\x15NAMESPACE_DEVELOPMENT\x10\x01\"2\n\x05Order\x12\x13\n\x0fORDER_ASCENDING\x10\x00\x12\x14\n\x10ORDER_DESCENDING\x10\x01\x42\x07\n\x05_skipB\x08\n\x06_limitB\x13\n\x11_scan_consistencyB\t\n\x07_reduceB\x08\n\x06_groupB\x0e\n\x0c_group_levelB\x06\n\x04_keyB\x0c\n\n_start_keyB\n\n\x08_end_keyB\x10\n\x0e_inclusive_endB\x13\n\x11_start_key_doc_idB\x11\n\x0f_end_key_doc_idB\x0b\n\t_on_errorB\x08\n\x06_debugB\x0c\n\n_namespaceB\x08\n\x06_order\"\xfe\x01\n\x11ViewQueryResponse\x12\x36\n\x04rows\x18\x01 \x03(\x0b\x32(.couchbase.view.v1.ViewQueryResponse.Row\x12\x45\n\tmeta_data\x18\x02 \x01(\x0b\x32-.couchbase.view.v1.ViewQueryResponse.MetaDataH\x00\x88\x01\x01\x1a-\n\x03Row\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x1a-\n\x08MetaData\x12\x12\n\ntotal_rows\x18\x01 \x01(\x04\x12\r\n\x05\x64\x65\x62ug\x18\x02 \x01(\x0c\x42\x0c\n\n_meta_data2i\n\x0bViewService\x12Z\n\tViewQuery\x12#.couchbase.view.v1.ViewQueryRequest\x1a$.couchbase.view.v1.ViewQueryResponse\"\x00\x30\x01\x42\xe6\x01\n)com.couchbase.client.protostellar.view.v1P\x01Z e - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Couchbase module Protostellar diff --git a/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb b/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb index fca5f014..7fe6c2d7 100644 --- a/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb +++ b/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb @@ -1,5 +1,11 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: couchbase/view/v1/view.proto for package 'Couchbase.Protostellar.Generated.View.V1' +# Original file comments: +# View Service +# +# Provides MapReduce view query execution against a Couchbase cluster. +# Views are defined in design documents and produce key-value results +# via map and optional reduce functions. Results are server-streamed. require 'grpc' require 'couchbase/protostellar/generated/view/v1/view_pb' @@ -10,6 +16,7 @@ module Generated module View module V1 module ViewService + # ViewService provides MapReduce view query execution. class Service include ::GRPC::GenericService @@ -18,6 +25,8 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'couchbase.view.v1.ViewService' + # ViewQuery executes a MapReduce view query and streams back result rows + # and metadata. The final streamed response contains MetaData. rpc :ViewQuery, ::Couchbase::Protostellar::Generated::View::V1::ViewQueryRequest, stream(::Couchbase::Protostellar::Generated::View::V1::ViewQueryResponse) end diff --git a/lib/couchbase/protostellar/request_generator/admin/collection.rb b/lib/couchbase/protostellar/request_generator/admin/collection.rb index 2e8efc16..ff2ec1b0 100644 --- a/lib/couchbase/protostellar/request_generator/admin/collection.rb +++ b/lib/couchbase/protostellar/request_generator/admin/collection.rb @@ -52,11 +52,13 @@ def delete_scope_request(scope_name, options) end def create_collection_request(scope_name, collection_name, settings, options) - proto_opts = {} - proto_opts[:max_expiry_secs] = settings.max_expiry unless settings.max_expiry.nil? unless settings.history.nil? raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support the history setting" end + raise Couchbase::Error::InvalidArgument, "max_expiry must be a non-negative integer" if settings.max_expiry&.negative? + + proto_opts = {} + proto_opts[:max_expiry_secs] = settings.max_expiry unless settings.max_expiry.nil? proto_req = Generated::Admin::Collection::V1::CreateCollectionRequest.new( bucket_name: @bucket_name, diff --git a/lib/couchbase/protostellar/request_generator/admin/query.rb b/lib/couchbase/protostellar/request_generator/admin/query.rb index 25370247..e0a04495 100644 --- a/lib/couchbase/protostellar/request_generator/admin/query.rb +++ b/lib/couchbase/protostellar/request_generator/admin/query.rb @@ -41,6 +41,7 @@ def get_all_indexes_request(options, bucket_name = nil) def create_primary_index_request(options, bucket_name = nil) proto_opts = { deferred: options.deferred, + ignore_if_exists: options.ignore_if_exists, } proto_opts[:name] = options.index_name unless options.index_name.nil? proto_opts[:num_replicas] = options.num_replicas unless options.num_replicas.nil? @@ -58,6 +59,7 @@ def create_primary_index_request(options, bucket_name = nil) def create_index_request(index_name, fields, options, bucket_name = nil) proto_opts = { deferred: options.deferred, + ignore_if_exists: options.ignore_if_exists, } proto_opts[:num_replicas] = options.num_replicas unless options.num_replicas.nil? diff --git a/lib/couchbase/protostellar/request_generator/kv.rb b/lib/couchbase/protostellar/request_generator/kv.rb index 6f437db8..929d310b 100644 --- a/lib/couchbase/protostellar/request_generator/kv.rb +++ b/lib/couchbase/protostellar/request_generator/kv.rb @@ -110,7 +110,7 @@ def get_and_lock_request(id, lock_time, options) proto_req = Generated::KV::V1::GetAndLockRequest.new( **location, key: id, - lock_time: lock_time.respond_to?(:in_seconds) ? lock_time.in_seconds : lock_time, + lock_time_secs: lock_time.respond_to?(:in_seconds) ? lock_time.in_seconds : lock_time, ) create_kv_request(proto_req, :get_and_lock, options) diff --git a/lib/couchbase/protostellar/scope.rb b/lib/couchbase/protostellar/scope.rb index 26c6b860..a115fe9b 100644 --- a/lib/couchbase/protostellar/scope.rb +++ b/lib/couchbase/protostellar/scope.rb @@ -52,6 +52,10 @@ def search_query(...) def search(...) raise Error::FeatureNotAvailable, "scope search not supported in #{Protostellar::NAME} mode" end + + def search_indexes(...) + raise Error::FeatureNotAvailable, "scope search indexes not supported in #{Protostellar::NAME} mode" + end end end end diff --git a/lib/couchbase/utils/observability.rb b/lib/couchbase/utils/observability.rb index 5deaf452..504258b5 100644 --- a/lib/couchbase/utils/observability.rb +++ b/lib/couchbase/utils/observability.rb @@ -16,6 +16,8 @@ require "couchbase/tracing/request_span" require "couchbase/tracing/request_tracer" +require "couchbase/tracing/noop_tracer" +require "couchbase/metrics/noop_meter" require_relative "observability_constants" @@ -30,7 +32,7 @@ class Wrapper attr_accessor :tracer attr_accessor :meter - def initialize(backend:, tracer: nil, meter: nil) + def initialize(backend: nil, tracer: nil, meter: nil) @backend = backend @tracer = tracer @meter = meter @@ -67,10 +69,14 @@ class Handler def initialize(backend, op_name, parent_span, receiver, tracer, meter) @tracer = tracer @meter = meter + @tracer = Tracing::NoopTracer.new if @tracer.nil? + @meter = Metrics::NoopMeter.new if @meter.nil? - cluster_labels = backend.cluster_labels - @cluster_name = cluster_labels[:cluster_name] - @cluster_uuid = cluster_labels[:cluster_uuid] + unless backend.nil? + cluster_labels = backend.cluster_labels + @cluster_name = cluster_labels[:cluster_name] + @cluster_uuid = cluster_labels[:cluster_uuid] + end @op_span = create_span(op_name, parent_span) @meter_attributes = create_meter_attributes diff --git a/test/collection_query_index_manager_test.rb b/test/collection_query_index_manager_test.rb index 0e4baf2f..d5ee46e0 100644 --- a/test/collection_query_index_manager_test.rb +++ b/test/collection_query_index_manager_test.rb @@ -74,6 +74,10 @@ def test_get_all_indexes end def test_collection_query_indexes + if env.protostellar? + skip("#{name}: Failing for #{Couchbase::Protostellar::NAME} because of a CNG issue. Skipping until ING-1495 is resolved") + end + @idx_mgr.create_primary_index @idx_mgr.create_index("test_index", ["test"]) res1 = @idx_mgr.get_all_indexes diff --git a/test/crud_test.rb b/test/crud_test.rb index 2647b37b..26a68d3c 100644 --- a/test/crud_test.rb +++ b/test/crud_test.rb @@ -78,12 +78,20 @@ def test_reads_from_replica end end - def test_reads_from_replica_does_not_exist + def test_get_any_replica_does_not_exist + skip("Failing for #{Couchbase::Protostellar::NAME} because of a CNG issue. Skipping until ING-1496 is resolved") if env.protostellar? + doc_id = uniq_id(:foo) assert_raises(Couchbase::Error::DocumentIrretrievable) do @collection.get_any_replica(doc_id) end + end + + def test_get_all_replicas_does_not_exist + skip("Failing for #{Couchbase::Protostellar::NAME} because of a CNG issue. Skipping until ING-1496 is resolved") if env.protostellar? + + doc_id = uniq_id(:foo) if env.protostellar? assert_empty @collection.get_all_replicas(doc_id) diff --git a/test/metrics_test.rb b/test/metrics_test.rb index 6631d895..f4303435 100644 --- a/test/metrics_test.rb +++ b/test/metrics_test.rb @@ -24,6 +24,8 @@ class MetricsTest < Minitest::Test EXISTING_DOC_ID = "metrics-test-doc" def setup + skip("#{name}: Metrics are not supported in couchbase2 mode") if env.protostellar? + @meter = TestMeter.new connect(Options::Cluster.new(meter: @meter)) @bucket = @cluster.bucket(env.bucket) diff --git a/test/opentelemetry_test.rb b/test/opentelemetry_test.rb index dc3e3fea..2b1bf89e 100644 --- a/test/opentelemetry_test.rb +++ b/test/opentelemetry_test.rb @@ -86,6 +86,8 @@ def assert_otel_span( end def test_opentelemetry_tracer + skip("#{name}: Tracing and metrics are not supported in couchbase2 mode") if env.protostellar? + res = @collection.upsert(uniq_id(:otel_test), {foo: "bar"}, Options::Upsert.new(parent_span: @parent_span)) assert_predicate res.cas, :positive? @@ -159,6 +161,8 @@ def test_opentelemetry_tracer end def test_opentelemetry_meter + skip("#{name}: Tracing and metrics are not supported in couchbase2 mode") if env.protostellar? + assert_raises(Error::DocumentNotFound) do @collection.get(uniq_id(:does_not_exist)) end diff --git a/test/query_index_manager_test.rb b/test/query_index_manager_test.rb index b2f6729c..7def3eb1 100644 --- a/test/query_index_manager_test.rb +++ b/test/query_index_manager_test.rb @@ -25,8 +25,13 @@ class QueryIndexManagerTest < Minitest::Test def setup return if use_caves? - @tracer = TestTracer.new - connect(Couchbase::Options::Cluster.new(tracer: @tracer)) + if env.protostellar? + connect + else + @tracer = TestTracer.new + connect(Couchbase::Options::Cluster.new(tracer: @tracer)) + end + @bucket_name = "query-idx-#{SecureRandom.uuid[0..5]}" @cluster.buckets.create_bucket( Couchbase::Management::BucketSettings.new do |s| @@ -37,6 +42,9 @@ def setup env.consistency.wait_until_bucket_present(@bucket_name) env.consistency.wait_until_bucket_present_in_indexes(@bucket_name) @idx_mgr = @cluster.query_indexes + + return if env.protostellar? + @parent_span = @tracer.request_span("parent_span") @tracer.reset end @@ -63,6 +71,8 @@ def test_get_all_indexes assert_includes(res.map(&:name), idx_name) end + return if env.protostellar? # rubocop:disable Minitest/ReturnInTestMethod + get_all_indexes_spans = @tracer.spans("manager_query_get_all_indexes") assert_equal 1, get_all_indexes_spans.size @@ -92,6 +102,9 @@ def test_get_all_indexes def test_query_indexes skip("#{name}: CAVES does not support query service yet") if use_caves? + if env.protostellar? + skip("#{name}: Failing for #{Couchbase::Protostellar::NAME} because of a CNG issue. Skipping until ING-1495 is resolved") + end @idx_mgr.create_primary_index(@bucket_name, Management::Options::Query::CreatePrimaryIndex.new(parent_span: @parent_span)) @idx_mgr.create_index(@bucket_name, "test_index", ["test"], Management::Options::Query::CreateIndex.new(parent_span: @parent_span)) @@ -126,6 +139,8 @@ def test_query_indexes assert_equal 1, res4.size + return if env.protostellar? # rubocop:disable Minitest/ReturnInTestMethod + get_all_indexes_root_spans = @tracer.spans("manager_query_get_all_indexes", parent: @parent_span) assert_equal 4, get_all_indexes_root_spans.size diff --git a/test/query_test.rb b/test/query_test.rb index de0521cc..68b87bf3 100644 --- a/test/query_test.rb +++ b/test/query_test.rb @@ -24,8 +24,12 @@ def setup if env.server_version.is_rcbc_408_applicable? skip("skipped for (#{env.server_version}) because of query_context known issue, see RCBC-408") end + if env.protostellar? + skip("#{name}: Primary index creation failing in couchbase2 because of a CNG issue. Skipping until ING-1495 is resolved") + end connect skip("#{name}: CAVES does not support query service yet") if use_caves? + @bucket = @cluster.bucket(env.bucket) @collection = @bucket.default_collection options = Management::QueryIndexManager::CreatePrimaryIndexOptions.new diff --git a/test/scope_search_index_manager_test.rb b/test/scope_search_index_manager_test.rb index 7e57adca..7812d992 100644 --- a/test/scope_search_index_manager_test.rb +++ b/test/scope_search_index_manager_test.rb @@ -21,6 +21,8 @@ class ScopeSearchIndexManagerTest < Minitest::Test include TestUtilities def setup + return if use_caves? || env.protostellar? + @index_names = [] connect @@ -30,6 +32,8 @@ def setup end def teardown + return if use_caves? || env.protostellar? + @index_names.each do |name| @mgr.drop_index(name) rescue StandardError @@ -46,6 +50,7 @@ def get_search_index_name def test_index_not_found skip("#{name}: CAVES does not support query service yet") if use_caves? + skip("#{name}: There is no support for scope search indexes in couchbase2") if env.protostellar? unless env.server_version.supports_scoped_search_indexes? skip("skipped for (#{env.server_version}) as the ScopeSearchIndexManagerTest requires scoped search index support") end @@ -68,6 +73,7 @@ def test_index_not_found def test_index_crud skip("#{name}: CAVES does not support query service yet") if use_caves? + skip("#{name}: There is no support for scope search indexes in couchbase2") if env.protostellar? unless env.server_version.supports_scoped_search_indexes? skip("skipped for (#{env.server_version}) as the ScopeSearchIndexManagerTest requires scoped search index support") end diff --git a/test/search_test.rb b/test/search_test.rb index dabc2c63..166ccff0 100644 --- a/test/search_test.rb +++ b/test/search_test.rb @@ -21,7 +21,7 @@ class SearchTest < Minitest::Test include TestUtilities def setup - return if use_caves? + return if use_caves? || env.protostellar? connect @bucket = @cluster.bucket(env.bucket) @@ -71,7 +71,7 @@ def setup end def teardown - return if use_caves? + return if use_caves? || env.protostellar? @cluster.search_indexes.drop_index(@index_name) disconnect diff --git a/test/test_helper.rb b/test/test_helper.rb index 19ee3e47..1a75e8e5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -209,12 +209,12 @@ def server_version end def protostellar? - Couchbase::Protostellar::SCHEMES.any? { |s| !@connection_string[s].nil? } + Couchbase::Protostellar::SCHEMES.any? { |s| !connection_string[s].nil? } end def consistency @consistency ||= - if ENV.fetch("TEST_CONNECTION_STRING", nil) + if ENV.fetch("TEST_CONNECTION_STRING", nil) && !protostellar? TestUtilities::ConsistencyHelper.new(management_endpoint, username, password) else TestUtilities::MockConsistencyHelper.new diff --git a/test/tracing_test.rb b/test/tracing_test.rb index 9e8ee3fb..b1133dfe 100644 --- a/test/tracing_test.rb +++ b/test/tracing_test.rb @@ -22,6 +22,8 @@ class TracingTest < Minitest::Test include TestUtilities def setup + skip("#{name}: Tracing is not supported in couchbase2 mode") if env.protostellar? + @tracer = TestTracer.new connect(Options::Cluster.new(tracer: @tracer)) @bucket = @cluster.bucket(env.bucket) @@ -74,7 +76,7 @@ def test_replace def test_replace_durable doc_id = uniq_id(:foo) assert_raises(Couchbase::Error::DocumentNotFound) do - @collection.replace(doc_id, {foo: "bar"}, Options::Upsert.new( + @collection.replace(doc_id, {foo: "bar"}, Options::Replace.new( parent_span: @parent_span, durability_level: :persist_to_majority, ))