diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml index df8a559fc17320..ae4e6f6c9acd52 100644 --- a/.github/pr_labeler.yml +++ b/.github/pr_labeler.yml @@ -32,10 +32,14 @@ heroku: - plugins/source/heroku/**/* okta: - plugins/source/okta/**/* +oracle: + - plugins/source/oracle/**/* slack: - plugins/source/slack/**/* shopify: - plugins/source/shopify/**/* +stripe: + - plugins/source/stripe/**/* pagerduty: - plugins/source/pagerduty/**/* terraform: diff --git a/.github/styles/Vocab/Base/accept.txt b/.github/styles/Vocab/Base/accept.txt index 46c0cae55367bb..704f385fcf7047 100644 --- a/.github/styles/Vocab/Base/accept.txt +++ b/.github/styles/Vocab/Base/accept.txt @@ -3,6 +3,7 @@ ACLs Airbyte Ajv anonymized +Alibaba API APIs architected @@ -14,6 +15,7 @@ Autoscaling aws AWS backoff +backend_spec Boldstart bool browsable @@ -37,6 +39,7 @@ CrowdStrike CSPM CSPMs Cybersecurity +deduplication Datadog datasource Datasource @@ -133,6 +136,7 @@ Snyk SRE SREs Steampipe +Stripe subfolder subnet subpolicies diff --git a/.github/workflows/release_scaffold.yml b/.github/workflows/release_scaffold.yml new file mode 100644 index 00000000000000..470230edc41b14 --- /dev/null +++ b/.github/workflows/release_scaffold.yml @@ -0,0 +1,90 @@ +name: release-scaffold +on: + push: + tags: + - 'scaffold-v*.*.*' +env: + CGO_ENABLED: 0 + +jobs: + release-scaffold: + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + # Tag format is scaffold- + - name: Split tag + id: split + run: | + tag=${{github.ref_name}} + echo "version=$(echo $tag | cut -d- -f2-)" >> $GITHUB_OUTPUT + # Fail if not a valid SemVer string + - name: Parse semver string + id: semver_parser + uses: booxmedialtd/ws-action-parse-semver@e81ad80123156d7ddd4f6c8383e63f497f857deb + with: + input_string: ${{steps.split.outputs.version}} + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-1.19.4-release-cache-${{ hashFiles('scaffold/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-1.19.4-release-cache-scaffold + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version-file: scaffold/go.mod + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser-pro + version: latest + install-only: true + - name: Run GoReleaser Dry-Run + run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish -f ./scaffold/.goreleaser.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + + # Publish to GitHub and Homebrew + - name: Run GoReleaser Release + if: steps.semver_parser.outputs.prerelease == '' + run: goreleaser release --rm-dist -f ./scaffold/.goreleaser.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + # A custom token is required for publishing to Homebrew + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + + # Publish only to GitHub + - name: Run GoReleaser PreRelease + if: steps.semver_parser.outputs.prerelease != '' + run: goreleaser release --rm-dist -f ./scaffold/.goreleaser.prerelease.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + # A custom token is required for publishing to Homebrew + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + + - name: Update version file + if: steps.semver_parser.outputs.prerelease == '' + run: 'echo "{ \"latest\": \"${{github.ref_name}}\" }" > ./website/versions/scaffold.json' + + - name: Create Pull Request + if: steps.semver_parser.outputs.prerelease == '' + uses: peter-evans/create-pull-request@v4 + with: + # required so the PR triggers workflow runs + token: ${{ secrets.GH_CQ_BOT }} + branch: chore/update-scaffold-version + base: main + title: "chore: Update Scaffold version to ${{steps.split.outputs.version}}" + commit-message: "chore: Update Scaffold version to ${{steps.split.outputs.version}}" + body: Updates Scaffold latest version to ${{steps.split.outputs.version}} + labels: automerge + author: cq-bot diff --git a/.github/workflows/scaffold.yml b/.github/workflows/scaffold.yml new file mode 100644 index 00000000000000..a21b45abf99023 --- /dev/null +++ b/.github/workflows/scaffold.yml @@ -0,0 +1,81 @@ +name: Scaffold Workflow + +on: + pull_request: + paths: + - "scaffold/**" + - ".github/workflows/scaffold.yml" + push: + branches: + - main + paths: + - "scaffold/**" + - ".github/workflows/scaffold.yml" + +jobs: + scaffold: + timeout-minutes: 30 + name: "scaffold" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./scaffold + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version-file: scaffold/go.mod + cache: true + cache-dependency-path: scaffold/go.sum + - name: golangci-lint + uses: cloudquery/golangci-lint-action@master + if: matrix.os == 'ubuntu-latest' + with: + version: v1.50.1 + working-directory: cli + skip-pkg-cache: true + skip-build-cache: true + - name: Get dependencies + run: go get -t -d ./... + - name: Build + run: go build . + - name: Test + run: make test + validate-release: + timeout-minutes: 30 + runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + steps: + - name: Checkout + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/checkout@v3 + - uses: actions/cache@v3 + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-1.19.4-release-cache-${{ hashFiles('scaffold/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-1.19.4-release-cache-scaffold + - name: Set up Go + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/setup-go@v3 + with: + go-version-file: scaffold/go.mod + - name: Install GoReleaser + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser-pro + version: latest + install-only: true + - name: Run GoReleaser Dry-Run + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./scaffold/.goreleaser.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/source_oracle.yml b/.github/workflows/source_oracle.yml new file mode 100644 index 00000000000000..22c9fc8005932f --- /dev/null +++ b/.github/workflows/source_oracle.yml @@ -0,0 +1,85 @@ +name: Source Plugin Oracle Workflow + +on: + pull_request: + paths: + - "plugins/source/oracle/**" + - ".github/workflows/source_oracle.yml" + push: + branches: + - main + paths: + - "plugins/source/oracle/**" + - ".github/workflows/source_oracle.yml" + +jobs: + plugins-source-oracle: + timeout-minutes: 30 + name: "plugins/source/oracle" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./plugins/source/oracle + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version-file: plugins/source/oracle/go.mod + cache: true + cache-dependency-path: plugins/source/oracle/go.sum + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.50.1 + working-directory: plugins/source/oracle + args: "--config ../../.golangci.yml" + - name: Get dependencies + run: go get -t -d ./... + - name: Build + run: go build . + - name: Test + run: make test + - name: gen-docs + if: github.event_name == 'pull_request' + run: make gen-docs + - name: Fail if generation updated files + if: github.event_name == 'pull_request' + run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; exit 1) + validate-release: + timeout-minutes: 30 + runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + steps: + - name: Checkout + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/checkout@v3 + - uses: actions/cache@v3 + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-1.19.3-release-cache-${{ hashFiles('plugins/source/oracle/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-1.19.3-release-cache-plugins-source-oracle + - name: Set up Go + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/setup-go@v3 + with: + go-version-file: plugins/source/oracle/go.mod + - name: Install GoReleaser + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser-pro + version: latest + install-only: true + - name: Run GoReleaser Dry-Run + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./plugins/source/oracle/.goreleaser.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.github/workflows/source_stripe.yml b/.github/workflows/source_stripe.yml new file mode 100644 index 00000000000000..6bac91e3a23915 --- /dev/null +++ b/.github/workflows/source_stripe.yml @@ -0,0 +1,85 @@ +name: Source Plugin Stripe Workflow + +on: + pull_request: + paths: + - "plugins/source/stripe/**" + - ".github/workflows/source_stripe.yml" + push: + branches: + - main + paths: + - "plugins/source/stripe/**" + - ".github/workflows/source_stripe.yml" + +jobs: + plugins-source-stripe: + timeout-minutes: 30 + name: "plugins/source/stripe" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./plugins/source/stripe + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version-file: plugins/source/stripe/go.mod + cache: true + cache-dependency-path: plugins/source/stripe/go.sum + - name: golangci-lint + uses: cloudquery/golangci-lint-action@master + with: + version: v1.50.1 + working-directory: plugins/source/stripe + args: "--config ../../.golangci.yml" + - name: Get dependencies + run: go get -t -d ./... + - name: Build + run: go build . + - name: Test + run: make test + - name: gen + if: github.event_name == 'pull_request' + run: make gen + - name: Fail if generation updated files + if: github.event_name == 'pull_request' + run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; exit 1) + validate-release: + timeout-minutes: 30 + runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + steps: + - name: Checkout + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/checkout@v3 + - uses: actions/cache@v3 + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-1.19.3-release-cache-${{ hashFiles('plugins/source/stripe/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-1.19.3-release-cache-plugins-source-stripe + - name: Set up Go + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: actions/setup-go@v3 + with: + go-version-file: plugins/source/stripe/go.mod + - name: Install GoReleaser + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser-pro + version: latest + install-only: true + - name: Run GoReleaser Dry-Run + if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push' + run: goreleaser release --snapshot --rm-dist --skip-validate --skip-publish --skip-sign -f ./plugins/source/stripe/.goreleaser.yaml + env: + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/wait_for_required_workflows.yml b/.github/workflows/wait_for_required_workflows.yml index c2788f4fe8a1ea..1d84651b4ce461 100644 --- a/.github/workflows/wait_for_required_workflows.yml +++ b/.github/workflows/wait_for_required_workflows.yml @@ -40,6 +40,7 @@ jobs: return files.some(file => file.startsWith(`${action}/`) || matchesWorkflow(file, action)) } let actions = ["cli", + "scaffold", "plugins/source/aws", "plugins/source/azure", "plugins/source/azuredevops", @@ -57,9 +58,11 @@ jobs: "plugins/source/k8s", "plugins/source/okta", "plugins/source/shopify", + "plugins/source/oracle", "plugins/source/slack", "plugins/source/salesforce", "plugins/source/snyk", + "plugins/source/stripe", "plugins/source/tailscale", "plugins/source/pagerduty", "plugins/source/terraform", diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 34ed6294d99860..f831e886f1d3f2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,21 +1,21 @@ { - "cli": "2.1.0", + "cli": "2.1.1", "cli+FILLER": "0.0.0", - "plugins/source/aws": "10.0.0", + "plugins/source/aws": "11.0.1", "plugins/source/aws+FILLER": "0.0.0", - "plugins/source/azure": "3.2.0", + "plugins/source/azure": "3.3.0", "plugins/source/azure+FILLER": "0.0.0", - "plugins/source/cloudflare": "3.0.0", + "plugins/source/cloudflare": "3.1.0", "plugins/source/cloudflare+FILLER": "0.0.0", - "plugins/source/digitalocean": "4.0.2", + "plugins/source/digitalocean": "4.1.0", "plugins/source/digitalocean+FILLER": "0.0.0", - "plugins/source/gcp": "7.0.0", + "plugins/source/gcp": "7.1.1", "plugins/source/gcp+FILLER": "0.0.0", - "plugins/source/github": "2.0.0", + "plugins/source/github": "2.1.1", "plugins/source/github+FILLER": "0.0.0", "plugins/source/heroku": "3.1.5", "plugins/source/heroku+FILLER": "0.0.0", - "plugins/source/k8s": "2.5.4", + "plugins/source/k8s": "3.0.0", "plugins/source/k8s+FILLER": "0.0.0", "plugins/source/okta": "2.1.0", "plugins/source/okta+FILLER": "0.0.0", @@ -29,48 +29,52 @@ "plugins/destination/test+FILLER": "0.0.0", "plugins/destination/csv": "1.2.2", "plugins/destination/csv+FILLER": "0.0.0", - "plugins/destination/sqlite": "1.1.4", + "plugins/destination/sqlite": "1.1.5", "plugins/destination/sqlite+FILLER": "0.0.0", - "plugins/destination/snowflake": "1.1.5", + "plugins/destination/snowflake": "1.1.6", "plugins/destination/snowflake+FILLER": "0.0.0", "plugins/source/gandi": "1.1.5", "plugins/source/gandi+FILLER": "0.0.0", "plugins/source/datadog": "1.1.0", "plugins/source/datadog+FILLER": "0.0.0", - "plugins/destination/bigquery": "2.0.4", + "plugins/destination/bigquery": "2.1.1", "plugins/destination/bigquery+FILLER": "0.0.0", - "plugins/source/tailscale": "1.1.0", + "plugins/source/tailscale": "1.2.0", "plugins/source/tailscale+FILLER": "0.0.0", "plugins/source/vercel": "1.0.4", "plugins/source/vercel+FILLER": "0.0.0", - "plugins/source/slack": "1.0.2", + "plugins/source/slack": "1.1.0", "plugins/source/slack+FILLER": "0.0.0", - "plugins/source/crowdstrike": "1.0.2", + "plugins/source/crowdstrike": "1.1.0", "plugins/source/crowdstrike+FILLER": "0.0.0", "plugins/source/pagerduty": "1.2.0", - "plugins/destination/mongodb": "1.0.4", + "plugins/source/pagerduty+FILLER": "0.0.0", + "plugins/destination/mongodb": "1.0.6", "plugins/destination/mongodb+FILLTER": "0.0.0", - "plugins/source/gitlab": "1.1.0", + "plugins/source/gitlab": "2.0.0", "plugins/source/gitlab+FILLER": "0.0.0", "plugins/source/azuredevops": "1.1.0", "plugins/source/azuredevops+FILLER": "0.0.0", - "plugins/source/salesforce": "1.0.1", + "plugins/source/salesforce": "1.0.2", "plugins/source/salesforce+FILLER": "0.0.0", "plugins/source/fastly": "1.1.0", "plugins/source/fastly+FILLER": "0.0.0", "plugins/source/snyk": "1.1.0", "plugins/source/snyk+FILLER": "0.0.0", - "plugins/destination/gcs": "1.0.3", + "plugins/destination/gcs": "1.0.4", "plugins/destination/gcs+FILLER": "0.0.0", - "plugins/destination/s3": "1.0.3", + "plugins/destination/s3": "1.0.4", "plugins/destination/s3+FILLER": "0.0.0", - "plugins/destination/file": "1.0.3", + "plugins/destination/file": "1.0.4", "plugins/destination/file+FILLER": "0.0.0", - "plugins/destination/azblob": "1.0.2", + "plugins/destination/azblob": "1.0.3", "plugins/destination/azblob+FILLER": "0.0.0", "plugins/destination/neo4j": "1.0.2", "plugins/destination/neo4j+FILLER": "0.0.0", - "plugins/destination/kafka": "1.0.0", + "plugins/destination/kafka": "1.0.2", "plugins/destination/kafka+FILLER": "0.0.0", - "plugins/source/hackernews": "1.0.0" + "plugins/source/hackernews": "1.1.1", + "plugins/source/hackernews+FILLER": "0.0.0", + "scaffold": "1.0.0", + "plugins/source/oracle": "1.0.0" } diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 305846958afae2..3c9b2e7cbf48dc 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to CloudQuery will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.1](https://github.com/cloudquery/cloudquery/compare/cli-v2.1.0...cli-v2.1.1) (2023-01-17) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.0 ([#6745](https://github.com/cloudquery/cloudquery/issues/6745)) ([9c41854](https://github.com/cloudquery/cloudquery/commit/9c418547c3bbff97449765e337182230fb5e40d5)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.1 ([#6805](https://github.com/cloudquery/cloudquery/issues/6805)) ([9da0ce2](https://github.com/cloudquery/cloudquery/commit/9da0ce283f50410eb9274375ec1d22131a80d937)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.26.0 ([#6839](https://github.com/cloudquery/cloudquery/issues/6839)) ([6ccda8d](https://github.com/cloudquery/cloudquery/commit/6ccda8d0bc6e7ce75f4a64a18911e349ccaac277)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.27.0 ([#6856](https://github.com/cloudquery/cloudquery/issues/6856)) ([545799b](https://github.com/cloudquery/cloudquery/commit/545799bb0481087e187b5f27c88f5dde9c99f2f0)) + ## [2.1.0](https://github.com/cloudquery/cloudquery/compare/cli-v2.0.31...cli-v2.1.0) (2023-01-10) diff --git a/cli/cmd/sync2.go b/cli/cmd/sync2.go index 071a2ccd7cebdc..acd57ddfd4874b 100644 --- a/cli/cmd/sync2.go +++ b/cli/cmd/sync2.go @@ -107,7 +107,7 @@ func syncConnectionV2(ctx context.Context, cqDir string, sourceClient *clients.S g.Go(func() error { var destFailedWrites uint64 var err error - if err = destClients[i].Write2(gctx, selectedTables, sourceSpec.Name, syncTime, destSubscriptions[i]); err != nil { + if err = destClients[i].Write2(gctx, sourceSpec, selectedTables, syncTime, destSubscriptions[i]); err != nil { return fmt.Errorf("failed to write for %s->%s: %w", sourceSpec.Name, destination, err) } // call Close on destination client using the outer context, so that it happens even if writes get cancelled diff --git a/cli/cmd/testdata/sync-missing-path-error.yml b/cli/cmd/testdata/sync-missing-path-error.yml index 35284944224db9..1d29ad2c311188 100644 --- a/cli/cmd/testdata/sync-missing-path-error.yml +++ b/cli/cmd/testdata/sync-missing-path-error.yml @@ -3,9 +3,9 @@ spec: name: "test" path: "cloudquery/test" destinations: [test] - version: "v1.3.27" # latest version of source test plugin + version: "v1.3.28" # latest version of source test plugin --- kind: "destination" spec: name: "test" - version: "v1.3.13" # latest version of destination test plugin + version: "v1.3.14" # latest version of destination test plugin diff --git a/cli/cmd/testdata/sync-success.yml b/cli/cmd/testdata/sync-success.yml index 928503da309e33..9e33a7f136dba7 100644 --- a/cli/cmd/testdata/sync-success.yml +++ b/cli/cmd/testdata/sync-success.yml @@ -3,10 +3,10 @@ spec: name: "test" path: "cloudquery/test" destinations: [test] - version: "v1.3.27" # latest version of source test plugin + version: "v1.3.28" # latest version of source test plugin --- kind: "destination" spec: name: "test" path: "cloudquery/test" - version: "v1.3.13" # latest version of destination test plugin + version: "v1.3.14" # latest version of destination test plugin diff --git a/cli/go.mod b/cli/go.mod index 934e5558a0e6a6..c44c503503e1c7 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/cli go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/getsentry/sentry-go v0.16.0 github.com/google/uuid v1.3.0 github.com/rs/zerolog v1.28.0 diff --git a/cli/go.sum b/cli/go.sum index 5101cecbe8f9d1..9f37017510c12f 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -1,8 +1,8 @@ github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE= github.com/avast/retry-go/v4 v4.3.1/go.mod h1:rg6XFaiuFYII0Xu3RDbZQkxCofFwruZKW8oEF1jpWiU= github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -73,6 +73,7 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= diff --git a/plugins/.golangci.yml b/plugins/.golangci.yml index e8c3f7a1e8e081..86fe56fced3d81 100644 --- a/plugins/.golangci.yml +++ b/plugins/.golangci.yml @@ -21,6 +21,10 @@ linters-settings: # tokens count to trigger issue, 150 by default threshold: 500 + misspell: + ignore-words: + - hdinsight + revive: enable-all-rules: true rules: diff --git a/plugins/destination/azblob/CHANGELOG.md b/plugins/destination/azblob/CHANGELOG.md index 3e793b923ed50c..354b1859e549e0 100644 --- a/plugins/destination/azblob/CHANGELOG.md +++ b/plugins/destination/azblob/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.3](https://github.com/cloudquery/cloudquery/compare/plugins-destination-azblob-v1.0.2...plugins-destination-azblob-v1.0.3) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.5 ([#6681](https://github.com/cloudquery/cloudquery/issues/6681)) ([32adfa2](https://github.com/cloudquery/cloudquery/commit/32adfa259912f24f555fbb49b45ac697bdb4c9b3)) + ## [1.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-destination-azblob-v1.0.1...plugins-destination-azblob-v1.0.2) (2023-01-10) diff --git a/plugins/destination/azblob/client/migrate.go b/plugins/destination/azblob/client/migrate.go index 14460ebb19ec9c..eab91b81f0215d 100644 --- a/plugins/destination/azblob/client/migrate.go +++ b/plugins/destination/azblob/client/migrate.go @@ -7,6 +7,6 @@ import ( ) func (*Client) Migrate(ctx context.Context, tables schema.Tables) error { - // migrate is not needed in migrate mode + // migrate is not needed in append mode return nil } diff --git a/plugins/destination/azblob/go.mod b/plugins/destination/azblob/go.mod index d6450ef68800de..d7c1b2561a44f2 100644 --- a/plugins/destination/azblob/go.mod +++ b/plugins/destination/azblob/go.mod @@ -5,8 +5,8 @@ go 1.19 require ( github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 - github.com/cloudquery/filetypes v1.0.4 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/filetypes v1.0.6 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/azblob/go.sum b/plugins/destination/azblob/go.sum index d13ae563812baf..b1820af0e089d7 100644 --- a/plugins/destination/azblob/go.sum +++ b/plugins/destination/azblob/go.sum @@ -50,10 +50,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/filetypes v1.0.4 h1:m7yAXxwdKH3JgvXJHaylTZhjN22WfkPk+kY84MxK0bE= -github.com/cloudquery/filetypes v1.0.4/go.mod h1:enlU/oIhZfi1F7vuHbm2sTlOWzRueaTMwy7qAEzktwA= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/filetypes v1.0.6 h1:Jy93/hrSS7FEIQnAl9DSS18dh8xCeP7bUS/Ufrm27j0= +github.com/cloudquery/filetypes v1.0.6/go.mod h1:J+aAJCqYnBsD0s5R350GORkL2od8rilOYu6vKBD5l8M= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -222,6 +222,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/bigquery/CHANGELOG.md b/plugins/destination/bigquery/CHANGELOG.md index 96236be825c144..48e5f7c797ada6 100644 --- a/plugins/destination/bigquery/CHANGELOG.md +++ b/plugins/destination/bigquery/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [2.1.1](https://github.com/cloudquery/cloudquery/compare/plugins-destination-bigquery-v2.1.0...plugins-destination-bigquery-v2.1.1) (2023-01-17) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.0 ([#6745](https://github.com/cloudquery/cloudquery/issues/6745)) ([9c41854](https://github.com/cloudquery/cloudquery/commit/9c418547c3bbff97449765e337182230fb5e40d5)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.1 ([#6805](https://github.com/cloudquery/cloudquery/issues/6805)) ([9da0ce2](https://github.com/cloudquery/cloudquery/commit/9da0ce283f50410eb9274375ec1d22131a80d937)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.26.0 ([#6839](https://github.com/cloudquery/cloudquery/issues/6839)) ([6ccda8d](https://github.com/cloudquery/cloudquery/commit/6ccda8d0bc6e7ce75f4a64a18911e349ccaac277)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.27.0 ([#6856](https://github.com/cloudquery/cloudquery/issues/6856)) ([545799b](https://github.com/cloudquery/cloudquery/commit/545799bb0481087e187b5f27c88f5dde9c99f2f0)) + +## [2.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-destination-bigquery-v2.0.4...plugins-destination-bigquery-v2.1.0) (2023-01-10) + + +### Features + +* **bigquery:** Add call to action to type change error message ([#6644](https://github.com/cloudquery/cloudquery/issues/6644)) ([9daa552](https://github.com/cloudquery/cloudquery/commit/9daa5522f07b300d63deaeca62b4eb710cb1d5a0)) +* **bigquery:** Add table name to auto migrate error messages ([#6638](https://github.com/cloudquery/cloudquery/issues/6638)) ([e5edf0d](https://github.com/cloudquery/cloudquery/commit/e5edf0d284adbcce9c708977c417051c0da5f732)) + ## [2.0.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-bigquery-v2.0.3...plugins-destination-bigquery-v2.0.4) (2023-01-10) diff --git a/plugins/destination/bigquery/client/migrate.go b/plugins/destination/bigquery/client/migrate.go index 7ea921d5a5f619..7d951faba32ca2 100644 --- a/plugins/destination/bigquery/client/migrate.go +++ b/plugins/destination/bigquery/client/migrate.go @@ -123,13 +123,13 @@ func (c *Client) autoMigrateTable(ctx context.Context, client *bigquery.Client, bqTable := client.Dataset(c.pluginSpec.DatasetID).Table(table.Name) md, err := bqTable.Metadata(ctx) if err != nil { - return fmt.Errorf("failed to get table metadata: %w", err) + return fmt.Errorf("failed to get metadata for table %q with error: %w", table.Name, err) } haveSchema := md.Schema wantSchema := c.bigQuerySchemaForTable(table) wantSchema, err = mergeSchemas(haveSchema, wantSchema) if err != nil { - return fmt.Errorf("failed to migrate table schema: %w", err) + return fmt.Errorf("failed to migrate schema for table %q with error: %w", table.Name, err) } tm := bigquery.TableMetadataToUpdate{ Name: table.Name, @@ -138,7 +138,7 @@ func (c *Client) autoMigrateTable(ctx context.Context, client *bigquery.Client, } _, err = bqTable.Update(ctx, tm, "") if err != nil { - return fmt.Errorf("failed to update table schema: %w", err) + return fmt.Errorf("failed to update schema for table %q with error: %w", table.Name, err) } return nil } @@ -178,10 +178,10 @@ func mergeSchemas(haveSchema, wantSchema bigquery.Schema) (bigquery.Schema, erro for _, f := range haveSchema { if want, ok := wantMap[f.Name]; ok { if want.Type != f.Type { - return nil, fmt.Errorf("field %v changed type from %v to %v", f.Name, f.Type, want.Type) + return nil, fmt.Errorf("column %v changed type from %v to %v. Try dropping the column and re-running", f.Name, f.Type, want.Type) } } else if f.Required { - return nil, fmt.Errorf("field %v is required but not in new schema", f.Name) + return nil, fmt.Errorf("column %v is required but not in new schema", f.Name) } merged = append(merged, f) } diff --git a/plugins/destination/bigquery/go.mod b/plugins/destination/bigquery/go.mod index 56df802d879074..c36bd5d030bd90 100644 --- a/plugins/destination/bigquery/go.mod +++ b/plugins/destination/bigquery/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( cloud.google.com/go/bigquery v1.44.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 golang.org/x/sync v0.1.0 google.golang.org/api v0.103.0 diff --git a/plugins/destination/bigquery/go.sum b/plugins/destination/bigquery/go.sum index 3daec12ea5a1ef..478ef713b81ada 100644 --- a/plugins/destination/bigquery/go.sum +++ b/plugins/destination/bigquery/go.sum @@ -53,8 +53,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -233,6 +233,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/file/CHANGELOG.md b/plugins/destination/file/CHANGELOG.md index 61b7b75c656134..79f250ea4ba66a 100644 --- a/plugins/destination/file/CHANGELOG.md +++ b/plugins/destination/file/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-file-v1.0.3...plugins-destination-file-v1.0.4) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.5 ([#6681](https://github.com/cloudquery/cloudquery/issues/6681)) ([32adfa2](https://github.com/cloudquery/cloudquery/commit/32adfa259912f24f555fbb49b45ac697bdb4c9b3)) + ## [1.0.3](https://github.com/cloudquery/cloudquery/compare/plugins-destination-file-v1.0.2...plugins-destination-file-v1.0.3) (2023-01-10) diff --git a/plugins/destination/file/client/migrate.go b/plugins/destination/file/client/migrate.go index 14460ebb19ec9c..eab91b81f0215d 100644 --- a/plugins/destination/file/client/migrate.go +++ b/plugins/destination/file/client/migrate.go @@ -7,6 +7,6 @@ import ( ) func (*Client) Migrate(ctx context.Context, tables schema.Tables) error { - // migrate is not needed in migrate mode + // migrate is not needed in append mode return nil } diff --git a/plugins/destination/file/go.mod b/plugins/destination/file/go.mod index 48fe7b259cb22c..f978d5fdef5b7f 100644 --- a/plugins/destination/file/go.mod +++ b/plugins/destination/file/go.mod @@ -3,8 +3,8 @@ module github.com/cloudquery/cloudquery/plugins/destination/file go 1.19 require ( - github.com/cloudquery/filetypes v1.0.4 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/filetypes v1.0.6 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/file/go.sum b/plugins/destination/file/go.sum index 6a349605e55322..07d3887756ea59 100644 --- a/plugins/destination/file/go.sum +++ b/plugins/destination/file/go.sum @@ -40,10 +40,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/filetypes v1.0.4 h1:m7yAXxwdKH3JgvXJHaylTZhjN22WfkPk+kY84MxK0bE= -github.com/cloudquery/filetypes v1.0.4/go.mod h1:enlU/oIhZfi1F7vuHbm2sTlOWzRueaTMwy7qAEzktwA= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/filetypes v1.0.6 h1:Jy93/hrSS7FEIQnAl9DSS18dh8xCeP7bUS/Ufrm27j0= +github.com/cloudquery/filetypes v1.0.6/go.mod h1:J+aAJCqYnBsD0s5R350GORkL2od8rilOYu6vKBD5l8M= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -203,6 +203,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/gcs/CHANGELOG.md b/plugins/destination/gcs/CHANGELOG.md index 10166eb4f4a83a..64b132fe58a264 100644 --- a/plugins/destination/gcs/CHANGELOG.md +++ b/plugins/destination/gcs/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-gcs-v1.0.3...plugins-destination-gcs-v1.0.4) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.5 ([#6681](https://github.com/cloudquery/cloudquery/issues/6681)) ([32adfa2](https://github.com/cloudquery/cloudquery/commit/32adfa259912f24f555fbb49b45ac697bdb4c9b3)) + ## [1.0.3](https://github.com/cloudquery/cloudquery/compare/plugins-destination-gcs-v1.0.2...plugins-destination-gcs-v1.0.3) (2023-01-10) diff --git a/plugins/destination/gcs/client/migrate.go b/plugins/destination/gcs/client/migrate.go index 14460ebb19ec9c..eab91b81f0215d 100644 --- a/plugins/destination/gcs/client/migrate.go +++ b/plugins/destination/gcs/client/migrate.go @@ -7,6 +7,6 @@ import ( ) func (*Client) Migrate(ctx context.Context, tables schema.Tables) error { - // migrate is not needed in migrate mode + // migrate is not needed in append mode return nil } diff --git a/plugins/destination/gcs/go.mod b/plugins/destination/gcs/go.mod index d11f9d900e2981..534846dda980a7 100644 --- a/plugins/destination/gcs/go.mod +++ b/plugins/destination/gcs/go.mod @@ -4,8 +4,8 @@ go 1.19 require ( cloud.google.com/go/storage v1.27.0 - github.com/cloudquery/filetypes v1.0.4 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/filetypes v1.0.6 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/gcs/go.sum b/plugins/destination/gcs/go.sum index 1b1d8a1b8123f8..ce437e76d326bf 100644 --- a/plugins/destination/gcs/go.sum +++ b/plugins/destination/gcs/go.sum @@ -51,10 +51,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/filetypes v1.0.4 h1:m7yAXxwdKH3JgvXJHaylTZhjN22WfkPk+kY84MxK0bE= -github.com/cloudquery/filetypes v1.0.4/go.mod h1:enlU/oIhZfi1F7vuHbm2sTlOWzRueaTMwy7qAEzktwA= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/filetypes v1.0.6 h1:Jy93/hrSS7FEIQnAl9DSS18dh8xCeP7bUS/Ufrm27j0= +github.com/cloudquery/filetypes v1.0.6/go.mod h1:J+aAJCqYnBsD0s5R350GORkL2od8rilOYu6vKBD5l8M= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -233,6 +233,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/kafka/CHANGELOG.md b/plugins/destination/kafka/CHANGELOG.md index 42b63ccd9e22c8..d66da970c2f49f 100644 --- a/plugins/destination/kafka/CHANGELOG.md +++ b/plugins/destination/kafka/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [1.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-destination-kafka-v1.0.1...plugins-destination-kafka-v1.0.2) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.5 ([#6681](https://github.com/cloudquery/cloudquery/issues/6681)) ([32adfa2](https://github.com/cloudquery/cloudquery/commit/32adfa259912f24f555fbb49b45ac697bdb4c9b3)) + +## [1.0.1](https://github.com/cloudquery/cloudquery/compare/plugins-destination-kafka-v1.0.0...plugins-destination-kafka-v1.0.1) (2023-01-10) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.1 ([#6264](https://github.com/cloudquery/cloudquery/issues/6264)) ([da3a1f0](https://github.com/cloudquery/cloudquery/commit/da3a1f0135370e3086bdaed357588955cb0094e8)) +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.2 ([#6340](https://github.com/cloudquery/cloudquery/issues/6340)) ([d0d867b](https://github.com/cloudquery/cloudquery/commit/d0d867b0cd6c8b2968133d62e99b3abc498e9a17)) +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.3 ([#6523](https://github.com/cloudquery/cloudquery/issues/6523)) ([5378f3b](https://github.com/cloudquery/cloudquery/commit/5378f3be6d9d0ee3eb899244e1c2800326477a53)) +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.4 ([#6565](https://github.com/cloudquery/cloudquery/issues/6565)) ([80c7c06](https://github.com/cloudquery/cloudquery/commit/80c7c069d2d078d2635707dfbb000221d788e354)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/thoas/go-funk to v0.9.3 ([#6259](https://github.com/cloudquery/cloudquery/issues/6259)) ([998e30f](https://github.com/cloudquery/cloudquery/commit/998e30f44bdc84a6ed23db25d7396c6ede75a839)) +* **deps:** Update plugin-sdk to v1.21.0 for destinations ([#6419](https://github.com/cloudquery/cloudquery/issues/6419)) ([f3b989f](https://github.com/cloudquery/cloudquery/commit/f3b989f7cbe335481dc01ad2a56cf7eff48e01d5)) + ## 1.0.0 (2023-01-02) diff --git a/plugins/destination/kafka/go.mod b/plugins/destination/kafka/go.mod index 300647da9d82fe..3f33004be5cea7 100644 --- a/plugins/destination/kafka/go.mod +++ b/plugins/destination/kafka/go.mod @@ -4,8 +4,8 @@ go 1.19 require ( github.com/Shopify/sarama v1.37.2 - github.com/cloudquery/filetypes v1.0.4 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/filetypes v1.0.6 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/kafka/go.sum b/plugins/destination/kafka/go.sum index 4ea2548fb1add4..8d164276a60977 100644 --- a/plugins/destination/kafka/go.sum +++ b/plugins/destination/kafka/go.sum @@ -43,10 +43,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/filetypes v1.0.4 h1:m7yAXxwdKH3JgvXJHaylTZhjN22WfkPk+kY84MxK0bE= -github.com/cloudquery/filetypes v1.0.4/go.mod h1:enlU/oIhZfi1F7vuHbm2sTlOWzRueaTMwy7qAEzktwA= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/filetypes v1.0.6 h1:Jy93/hrSS7FEIQnAl9DSS18dh8xCeP7bUS/Ufrm27j0= +github.com/cloudquery/filetypes v1.0.6/go.mod h1:J+aAJCqYnBsD0s5R350GORkL2od8rilOYu6vKBD5l8M= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -249,6 +249,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/mongodb/CHANGELOG.md b/plugins/destination/mongodb/CHANGELOG.md index d48ae7dc4388f6..dc68fffad7d571 100644 --- a/plugins/destination/mongodb/CHANGELOG.md +++ b/plugins/destination/mongodb/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [1.0.6](https://github.com/cloudquery/cloudquery/compare/plugins-destination-mongodb-v1.0.5...plugins-destination-mongodb-v1.0.6) (2023-01-17) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.0 ([#6745](https://github.com/cloudquery/cloudquery/issues/6745)) ([9c41854](https://github.com/cloudquery/cloudquery/commit/9c418547c3bbff97449765e337182230fb5e40d5)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.1 ([#6805](https://github.com/cloudquery/cloudquery/issues/6805)) ([9da0ce2](https://github.com/cloudquery/cloudquery/commit/9da0ce283f50410eb9274375ec1d22131a80d937)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.26.0 ([#6839](https://github.com/cloudquery/cloudquery/issues/6839)) ([6ccda8d](https://github.com/cloudquery/cloudquery/commit/6ccda8d0bc6e7ce75f4a64a18911e349ccaac277)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.27.0 ([#6856](https://github.com/cloudquery/cloudquery/issues/6856)) ([545799b](https://github.com/cloudquery/cloudquery/commit/545799bb0481087e187b5f27c88f5dde9c99f2f0)) + +## [1.0.5](https://github.com/cloudquery/cloudquery/compare/plugins-destination-mongodb-v1.0.4...plugins-destination-mongodb-v1.0.5) (2023-01-10) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) +* **deps:** Update plugin-sdk to v1.21.0 for destinations ([#6419](https://github.com/cloudquery/cloudquery/issues/6419)) ([f3b989f](https://github.com/cloudquery/cloudquery/commit/f3b989f7cbe335481dc01ad2a56cf7eff48e01d5)) +* **destinations:** Handle nulls in JSONs ([#6466](https://github.com/cloudquery/cloudquery/issues/6466)) ([f434f00](https://github.com/cloudquery/cloudquery/commit/f434f00285ed8fc5edbacf03194fb983d4d98f86)) + ## [1.0.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-mongodb-v1.0.3...plugins-destination-mongodb-v1.0.4) (2023-01-03) diff --git a/plugins/destination/mongodb/go.mod b/plugins/destination/mongodb/go.mod index f64f1034db142e..5d8bad88ca35fc 100644 --- a/plugins/destination/mongodb/go.mod +++ b/plugins/destination/mongodb/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/mongodb go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 go.mongodb.org/mongo-driver v1.11.1 ) diff --git a/plugins/destination/mongodb/go.sum b/plugins/destination/mongodb/go.sum index 765f70f1ba9b6e..3220d01fc3f640 100644 --- a/plugins/destination/mongodb/go.sum +++ b/plugins/destination/mongodb/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -229,6 +229,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/neo4j/go.mod b/plugins/destination/neo4j/go.mod index 6188024cd5f965..5bd81f3baabadf 100644 --- a/plugins/destination/neo4j/go.mod +++ b/plugins/destination/neo4j/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/neo4j go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/neo4j/neo4j-go-driver/v5 v5.3.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/neo4j/go.sum b/plugins/destination/neo4j/go.sum index 3610166e3050fd..5dbb43f53e3b01 100644 --- a/plugins/destination/neo4j/go.sum +++ b/plugins/destination/neo4j/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -203,6 +203,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/postgresql/client/write.go b/plugins/destination/postgresql/client/write.go index 53222a44dc5db7..85abe1189667bc 100644 --- a/plugins/destination/postgresql/client/write.go +++ b/plugins/destination/postgresql/client/write.go @@ -69,7 +69,8 @@ func (c *Client) Write(ctx context.Context, tables schema.Tables, res <-chan *de sql = c.upsert(table) } batch.Queue(sql, r.Data...) - if batch.Len() >= c.batchSize { + batchSize := batch.Len() + if batchSize >= c.batchSize { br := c.conn.SendBatch(ctx, batch) if err := br.Close(); err != nil { var pgErr *pgconn.PgError @@ -79,12 +80,13 @@ func (c *Client) Write(ctx context.Context, tables schema.Tables, res <-chan *de } return fmt.Errorf("failed to execute batch with pgerror: %s: %w", pgErrToStr(pgErr), err) } - atomic.AddUint64(&c.metrics.Writes, uint64(c.batchSize)) + atomic.AddUint64(&c.metrics.Writes, uint64(batchSize)) batch = &pgx.Batch{} } } - if batch.Len() > 0 { + batchSize := batch.Len() + if batchSize > 0 { br := c.conn.SendBatch(ctx, batch) if err := br.Close(); err != nil { var pgErr *pgconn.PgError @@ -94,7 +96,7 @@ func (c *Client) Write(ctx context.Context, tables schema.Tables, res <-chan *de } return fmt.Errorf("failed to execute batch with pgerror: %s: %w", pgErrToStr(pgErr), err) } - atomic.AddUint64(&c.metrics.Writes, uint64(c.batchSize)) + atomic.AddUint64(&c.metrics.Writes, uint64(batchSize)) } return nil diff --git a/plugins/destination/postgresql/go.mod b/plugins/destination/postgresql/go.mod index 76ef917de601c4..594da2738b709b 100644 --- a/plugins/destination/postgresql/go.mod +++ b/plugins/destination/postgresql/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/postgresql go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/jackc/pgx-zerolog v0.0.0-20220923130014-7856b90a65ae github.com/jackc/pgx/v5 v5.2.0 github.com/rs/zerolog v1.28.0 diff --git a/plugins/destination/postgresql/go.sum b/plugins/destination/postgresql/go.sum index b5c694e67dac55..0d094df9ddb186 100644 --- a/plugins/destination/postgresql/go.sum +++ b/plugins/destination/postgresql/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -222,6 +222,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/s3/CHANGELOG.md b/plugins/destination/s3/CHANGELOG.md index 64e9de927e8a2d..91bbe6f1f4cba1 100644 --- a/plugins/destination/s3/CHANGELOG.md +++ b/plugins/destination/s3/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-s3-v1.0.3...plugins-destination-s3-v1.0.4) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/filetypes to v1.0.5 ([#6681](https://github.com/cloudquery/cloudquery/issues/6681)) ([32adfa2](https://github.com/cloudquery/cloudquery/commit/32adfa259912f24f555fbb49b45ac697bdb4c9b3)) + ## [1.0.3](https://github.com/cloudquery/cloudquery/compare/plugins-destination-s3-v1.0.2...plugins-destination-s3-v1.0.3) (2023-01-10) diff --git a/plugins/destination/s3/client/migrate.go b/plugins/destination/s3/client/migrate.go index 14460ebb19ec9c..eab91b81f0215d 100644 --- a/plugins/destination/s3/client/migrate.go +++ b/plugins/destination/s3/client/migrate.go @@ -7,6 +7,6 @@ import ( ) func (*Client) Migrate(ctx context.Context, tables schema.Tables) error { - // migrate is not needed in migrate mode + // migrate is not needed in append mode return nil } diff --git a/plugins/destination/s3/go.mod b/plugins/destination/s3/go.mod index 678b76f38ff3f9..0c6e9d0c899f52 100644 --- a/plugins/destination/s3/go.mod +++ b/plugins/destination/s3/go.mod @@ -7,8 +7,8 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.18.8 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.47 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 - github.com/cloudquery/filetypes v1.0.4 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/filetypes v1.0.6 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/s3/go.sum b/plugins/destination/s3/go.sum index 1e04ef4f92334f..a579e99b9d51fb 100644 --- a/plugins/destination/s3/go.sum +++ b/plugins/destination/s3/go.sum @@ -78,10 +78,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/filetypes v1.0.4 h1:m7yAXxwdKH3JgvXJHaylTZhjN22WfkPk+kY84MxK0bE= -github.com/cloudquery/filetypes v1.0.4/go.mod h1:enlU/oIhZfi1F7vuHbm2sTlOWzRueaTMwy7qAEzktwA= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/filetypes v1.0.6 h1:Jy93/hrSS7FEIQnAl9DSS18dh8xCeP7bUS/Ufrm27j0= +github.com/cloudquery/filetypes v1.0.6/go.mod h1:J+aAJCqYnBsD0s5R350GORkL2od8rilOYu6vKBD5l8M= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -246,6 +246,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/snowflake/CHANGELOG.md b/plugins/destination/snowflake/CHANGELOG.md index a6f11fe8526611..1da5f49d9773b4 100644 --- a/plugins/destination/snowflake/CHANGELOG.md +++ b/plugins/destination/snowflake/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.6](https://github.com/cloudquery/cloudquery/compare/plugins-destination-snowflake-v1.1.5...plugins-destination-snowflake-v1.1.6) (2023-01-10) + + +### Bug Fixes + +* Correct error message in migration ([#6612](https://github.com/cloudquery/cloudquery/issues/6612)) ([434fe4d](https://github.com/cloudquery/cloudquery/commit/434fe4d15746277e903edd3ce5635fe2323ed413)) + ## [1.1.5](https://github.com/cloudquery/cloudquery/compare/plugins-destination-snowflake-v1.1.4...plugins-destination-snowflake-v1.1.5) (2023-01-10) diff --git a/plugins/destination/snowflake/client/migrate.go b/plugins/destination/snowflake/client/migrate.go index afaa05d2020aba..7a40919265107a 100644 --- a/plugins/destination/snowflake/client/migrate.go +++ b/plugins/destination/snowflake/client/migrate.go @@ -88,7 +88,7 @@ func (c *Client) autoMigrateTable(_ context.Context, table *schema.Table) error return fmt.Errorf("failed to add column %s on table %s: %w", col.Name, table.Name, err) } case snowflakeColumn.typ != columnType: - return fmt.Errorf("column %s on table %s has different type than schema, expected %s got %s. trying dropping table and re-running", col.Name, table.Name, columnType, snowflakeColumn.typ) + return fmt.Errorf("column %s on table %s has different type than schema, expected %s got %s. Try dropping the column and re-running", col.Name, table.Name, columnType, snowflakeColumn.typ) } } return nil diff --git a/plugins/destination/snowflake/go.mod b/plugins/destination/snowflake/go.mod index bc27ced10839d6..fe6abeb537a129 100644 --- a/plugins/destination/snowflake/go.mod +++ b/plugins/destination/snowflake/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/snowflake go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 github.com/snowflakedb/gosnowflake v1.6.16 ) diff --git a/plugins/destination/snowflake/go.sum b/plugins/destination/snowflake/go.sum index 783c6216e8f898..88e7193e49f917 100644 --- a/plugins/destination/snowflake/go.sum +++ b/plugins/destination/snowflake/go.sum @@ -103,8 +103,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= diff --git a/plugins/destination/sqlite/CHANGELOG.md b/plugins/destination/sqlite/CHANGELOG.md index 6ba7403bf7123a..24bd7858d44d5c 100644 --- a/plugins/destination/sqlite/CHANGELOG.md +++ b/plugins/destination/sqlite/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.5](https://github.com/cloudquery/cloudquery/compare/plugins-destination-sqlite-v1.1.4...plugins-destination-sqlite-v1.1.5) (2023-01-10) + + +### Bug Fixes + +* Correct error message in migration ([#6612](https://github.com/cloudquery/cloudquery/issues/6612)) ([434fe4d](https://github.com/cloudquery/cloudquery/commit/434fe4d15746277e903edd3ce5635fe2323ed413)) + ## [1.1.4](https://github.com/cloudquery/cloudquery/compare/plugins-destination-sqlite-v1.1.3...plugins-destination-sqlite-v1.1.4) (2023-01-10) diff --git a/plugins/destination/sqlite/client/client.go b/plugins/destination/sqlite/client/client.go index 531c14ce6166dd..8ba90c0a09d29a 100644 --- a/plugins/destination/sqlite/client/client.go +++ b/plugins/destination/sqlite/client/client.go @@ -25,13 +25,13 @@ type Client struct { func New(ctx context.Context, logger zerolog.Logger, spec specs.Destination) (destination.Client, error) { c := &Client{ - logger: logger.With().Str("module", "pg-dest").Logger(), + logger: logger.With().Str("module", "sqlite-dest").Logger(), } var sqliteSpec Spec c.spec = spec if err := spec.UnmarshalSpec(&sqliteSpec); err != nil { - return nil, fmt.Errorf("failed to unmarshal postgresql spec: %w", err) + return nil, fmt.Errorf("failed to unmarshal sqlite spec: %w", err) } sqliteSpec.SetDefaults() diff --git a/plugins/destination/sqlite/client/client_test.go b/plugins/destination/sqlite/client/client_test.go index 051866eabbed49..75d0a6cfa3d05d 100644 --- a/plugins/destination/sqlite/client/client_test.go +++ b/plugins/destination/sqlite/client/client_test.go @@ -1,13 +1,17 @@ package client import ( + "context" "testing" "github.com/cloudquery/plugin-sdk/plugins/destination" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/rs/zerolog" ) func TestPlugin(t *testing.T) { - p := destination.NewPlugin("postgresql", "development", New) + p := destination.NewPlugin("sqlite", "development", New) destination.PluginTestSuiteRunner(t, p, Spec{ @@ -15,3 +19,33 @@ func TestPlugin(t *testing.T) { }, destination.PluginTestSuiteTests{}) } + +func TestPluginMigrateMultiplePKs(t *testing.T) { + table := schema.Table{ + Name: "table_1", + Columns: []schema.Column{ + {Name: "id", Type: schema.TypeUUID, CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}}, + {Name: "name", Type: schema.TypeString, CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}}, + {Name: "age", Type: schema.TypeInt}, + }, + } + p := destination.NewPlugin("sqlite", "development", New) + ctx := context.Background() + + spec := Spec{ + ConnectionString: ":memory:", + } + + // Init the plugin so we can call migrate + if err := p.Init(ctx, zerolog.Logger{}, specs.Destination{Name: "cq_test_migrate_multiple_pks", Spec: spec}); err != nil { + t.Fatal(err) + } + + if err := p.Migrate(ctx, []*schema.Table{&table}); err != nil { + t.Fatal(err) + } + + if err := p.Migrate(ctx, []*schema.Table{&table}); err != nil { + t.Fatal(err) + } +} diff --git a/plugins/destination/sqlite/client/migrate.go b/plugins/destination/sqlite/client/migrate.go index f7629ecca649b6..ffaa90e306ff3a 100644 --- a/plugins/destination/sqlite/client/migrate.go +++ b/plugins/destination/sqlite/client/migrate.go @@ -11,9 +11,7 @@ import ( const ( isTableExistSQL = "SELECT count(name) FROM sqlite_master WHERE type='table' AND name=?;" - - // https://wiki.postgresql.org/wiki/Retrieve_primary_key_columns - sqlTableInfo = "PRAGMA table_info('%s');" + sqlTableInfo = "PRAGMA table_info('%s');" ) type columnInfo struct { @@ -22,7 +20,7 @@ type columnInfo struct { typ string notNull bool defaultValue any - pk bool + pk int } type tableInfo struct { @@ -96,7 +94,7 @@ func (c *Client) autoMigrateTable(_ context.Context, table *schema.Table) error return fmt.Errorf("failed to add column %s on table %s: %w", col.Name, table.Name, err) } case sqliteColumn.typ != columnType: - return fmt.Errorf("column %s on table %s has different type than schema, expected %s got %s. trying dropping table and re-running", col.Name, table.Name, columnType, sqliteColumn.typ) + return fmt.Errorf("column %s on table %s has different type than schema, expected %s got %s. Try dropping the column and re-running", col.Name, table.Name, columnType, sqliteColumn.typ) } } return nil diff --git a/plugins/destination/sqlite/go.mod b/plugins/destination/sqlite/go.mod index 5fd047ddac65b6..723a861a2b2e9d 100644 --- a/plugins/destination/sqlite/go.mod +++ b/plugins/destination/sqlite/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/sqlite go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/mattn/go-sqlite3 v1.14.16 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/sqlite/go.sum b/plugins/destination/sqlite/go.sum index 28a19c21fcea96..66e71d568b2cdc 100644 --- a/plugins/destination/sqlite/go.sum +++ b/plugins/destination/sqlite/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -203,6 +203,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/destination/test/go.mod b/plugins/destination/test/go.mod index 29525acca6f460..46053b872cb630 100644 --- a/plugins/destination/test/go.mod +++ b/plugins/destination/test/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/destination/test go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/destination/test/go.sum b/plugins/destination/test/go.sum index ce244f243952ec..8787fd966e9ece 100644 --- a/plugins/destination/test/go.sum +++ b/plugins/destination/test/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -201,6 +201,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/source/alicloud/.gitignore b/plugins/source/alicloud/.gitignore new file mode 100644 index 00000000000000..6a63dfca4fc539 --- /dev/null +++ b/plugins/source/alicloud/.gitignore @@ -0,0 +1,4 @@ +test +dist +cq_csv_output +alicloud \ No newline at end of file diff --git a/plugins/source/alicloud/.goreleaser.yaml b/plugins/source/alicloud/.goreleaser.yaml new file mode 100644 index 00000000000000..9dd6228de23ac6 --- /dev/null +++ b/plugins/source/alicloud/.goreleaser.yaml @@ -0,0 +1,14 @@ +variables: + component: source/alicloud + binary: alicloud + +project_name: plugins/source/alicloud + +monorepo: + tag_prefix: plugins-source-alicloud- + dir: plugins/source/alicloud + +includes: + - from_file: + # Relative to the directory Go Releaser is run from (which is the root of the repository) + path: ./plugins/.goreleaser.yaml diff --git a/plugins/source/alicloud/CHANGELOG.md b/plugins/source/alicloud/CHANGELOG.md new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/plugins/source/alicloud/Makefile b/plugins/source/alicloud/Makefile new file mode 100644 index 00000000000000..915b9c1ae0f67c --- /dev/null +++ b/plugins/source/alicloud/Makefile @@ -0,0 +1,48 @@ +# Test unit +.PHONY: test +test: + go test -timeout 3m ./... + +# Install tools +.PHONY: install-tools +install-tools: + @echo Installing tools from tools/tool.go + @cat tools/tool.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install % + +# Install pre-commit hooks. This requires pre-commit to be installed (https://pre-commit.com/) +.PHONY: install-hooks +install-hooks: + pre-commit install + +.PHONY: lint +lint: + @golangci-lint run --timeout 10m --verbose + +.PHONY: gen-mocks +gen-mocks: + go install github.com/golang/mock/mockgen@v1.6.0 + grep -rl '// Code generated by codegen; DO NOT EDIT.' ./client/services/* | xargs rm + go run codegen/main.go + grep -rl '// Code generated by MockGen. DO NOT EDIT.' ./client/mocks/* | xargs rm + go generate ./client/... + +.PHONY: gen-docs +gen-docs: + rm -rf ./docs/tables/* + go run main.go doc ./docs/tables + +.PHONY: build +build: + go build -o cloudquery-alicloud main.go + +.PHONY: run +run: + cloudquery sync ./config/alicloud.yaml + +.PHONY: clean +clean: + rm -fr cloudquery.log cq_csv_output + +# All gen targets +.PHONY: gen +gen: gen-mocks gen-docs diff --git a/plugins/source/alicloud/README.md b/plugins/source/alicloud/README.md new file mode 100644 index 00000000000000..84fdbee9a83871 --- /dev/null +++ b/plugins/source/alicloud/README.md @@ -0,0 +1,8 @@ +# Alibaba Cloud Source Plugin + +The `alicloud` source plugin extracts information from many of the supported services by Alibaba Cloud (阿里云). + +## Links + +- [User Guide](https://cloudquery.io/docs/plugins/sources/alicloud/overview) + diff --git a/plugins/source/alicloud/client/client.go b/plugins/source/alicloud/client/client.go new file mode 100644 index 00000000000000..1102cea6627d73 --- /dev/null +++ b/plugins/source/alicloud/client/client.go @@ -0,0 +1,77 @@ +package client + +import ( + "context" + "fmt" + "strings" + + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/rs/zerolog" +) + +type Client struct { + services map[string]map[string]*Services // account id -> region id -> Services + logger zerolog.Logger + Spec Spec + AccountID string + Region string +} + +func (c *Client) Logger() *zerolog.Logger { + return &c.logger +} + +func (c *Client) ID() string { + return strings.Join([]string{c.AccountID, c.Region}, ":") +} + +func (c *Client) Services() *Services { + return c.services[c.AccountID][c.Region] +} + +func (c *Client) WithAccountIDAndRegion(accountID, region string) *Client { + return &Client{ + services: c.services, + logger: c.logger.With().Str("account_id", accountID).Str("region", region).Logger(), + Spec: c.Spec, + AccountID: accountID, + Region: region, + } +} + +func New(_ context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { + var spec Spec + err := s.UnmarshalSpec(&spec) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal alicloud spec: %w", err) + } + spec.SetDefaults() + if err := spec.Validate(); err != nil { + return nil, err + } + + services := make(map[string]map[string]*Services) + for _, account := range spec.Accounts { + for _, region := range account.Regions { + if _, ok := services[account.Name]; !ok { + services[account.Name] = make(map[string]*Services) + } + services[account.Name][region], err = initServices(account, region) + if err != nil { + return nil, err + } + } + } + return &Client{logger: logger, Spec: spec, services: services}, nil +} + +// used for updating services in testing +func (c *Client) updateServices(svcs Services) { + for accountID := range c.services { + for region := range c.services[accountID] { + c.services[accountID][region] = &svcs + } + } +} diff --git a/plugins/source/alicloud/client/mocks/bssopenapi.go b/plugins/source/alicloud/client/mocks/bssopenapi.go new file mode 100644 index 00000000000000..32cdeb1138b299 --- /dev/null +++ b/plugins/source/alicloud/client/mocks/bssopenapi.go @@ -0,0 +1,2568 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: bssopenapi.go + +// Package mocks is a generated GoMock package. +package mocks + +import ( + reflect "reflect" + + bssopenapi "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + gomock "github.com/golang/mock/gomock" +) + +// MockBssopenapiClient is a mock of BssopenapiClient interface. +type MockBssopenapiClient struct { + ctrl *gomock.Controller + recorder *MockBssopenapiClientMockRecorder +} + +// MockBssopenapiClientMockRecorder is the mock recorder for MockBssopenapiClient. +type MockBssopenapiClientMockRecorder struct { + mock *MockBssopenapiClient +} + +// NewMockBssopenapiClient creates a new mock instance. +func NewMockBssopenapiClient(ctrl *gomock.Controller) *MockBssopenapiClient { + mock := &MockBssopenapiClient{ctrl: ctrl} + mock.recorder = &MockBssopenapiClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBssopenapiClient) EXPECT() *MockBssopenapiClientMockRecorder { + return m.recorder +} + +// DescribeInstanceBill mocks base method. +func (m *MockBssopenapiClient) DescribeInstanceBill(arg0 *bssopenapi.DescribeInstanceBillRequest) (*bssopenapi.DescribeInstanceBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceBill", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeInstanceBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstanceBill indicates an expected call of DescribeInstanceBill. +func (mr *MockBssopenapiClientMockRecorder) DescribeInstanceBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceBill", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeInstanceBill), arg0) +} + +// DescribeInstanceBillWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeInstanceBillWithCallback(arg0 *bssopenapi.DescribeInstanceBillRequest, arg1 func(*bssopenapi.DescribeInstanceBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeInstanceBillWithCallback indicates an expected call of DescribeInstanceBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeInstanceBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeInstanceBillWithCallback), arg0, arg1) +} + +// DescribeInstanceBillWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeInstanceBillWithChan(arg0 *bssopenapi.DescribeInstanceBillRequest) (<-chan *bssopenapi.DescribeInstanceBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeInstanceBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeInstanceBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeInstanceBillWithChan indicates an expected call of DescribeInstanceBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeInstanceBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeInstanceBillWithChan), arg0) +} + +// DescribePricingModule mocks base method. +func (m *MockBssopenapiClient) DescribePricingModule(arg0 *bssopenapi.DescribePricingModuleRequest) (*bssopenapi.DescribePricingModuleResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribePricingModule", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribePricingModuleResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribePricingModule indicates an expected call of DescribePricingModule. +func (mr *MockBssopenapiClientMockRecorder) DescribePricingModule(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribePricingModule", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribePricingModule), arg0) +} + +// DescribePricingModuleWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribePricingModuleWithCallback(arg0 *bssopenapi.DescribePricingModuleRequest, arg1 func(*bssopenapi.DescribePricingModuleResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribePricingModuleWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribePricingModuleWithCallback indicates an expected call of DescribePricingModuleWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribePricingModuleWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribePricingModuleWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribePricingModuleWithCallback), arg0, arg1) +} + +// DescribePricingModuleWithChan mocks base method. +func (m *MockBssopenapiClient) DescribePricingModuleWithChan(arg0 *bssopenapi.DescribePricingModuleRequest) (<-chan *bssopenapi.DescribePricingModuleResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribePricingModuleWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribePricingModuleResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribePricingModuleWithChan indicates an expected call of DescribePricingModuleWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribePricingModuleWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribePricingModuleWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribePricingModuleWithChan), arg0) +} + +// DescribeResourceCoverageDetail mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageDetail(arg0 *bssopenapi.DescribeResourceCoverageDetailRequest) (*bssopenapi.DescribeResourceCoverageDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeResourceCoverageDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceCoverageDetail indicates an expected call of DescribeResourceCoverageDetail. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageDetail), arg0) +} + +// DescribeResourceCoverageDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageDetailWithCallback(arg0 *bssopenapi.DescribeResourceCoverageDetailRequest, arg1 func(*bssopenapi.DescribeResourceCoverageDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeResourceCoverageDetailWithCallback indicates an expected call of DescribeResourceCoverageDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageDetailWithCallback), arg0, arg1) +} + +// DescribeResourceCoverageDetailWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageDetailWithChan(arg0 *bssopenapi.DescribeResourceCoverageDetailRequest) (<-chan *bssopenapi.DescribeResourceCoverageDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeResourceCoverageDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeResourceCoverageDetailWithChan indicates an expected call of DescribeResourceCoverageDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageDetailWithChan), arg0) +} + +// DescribeResourceCoverageTotal mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageTotal(arg0 *bssopenapi.DescribeResourceCoverageTotalRequest) (*bssopenapi.DescribeResourceCoverageTotalResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageTotal", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeResourceCoverageTotalResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceCoverageTotal indicates an expected call of DescribeResourceCoverageTotal. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageTotal(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageTotal", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageTotal), arg0) +} + +// DescribeResourceCoverageTotalWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageTotalWithCallback(arg0 *bssopenapi.DescribeResourceCoverageTotalRequest, arg1 func(*bssopenapi.DescribeResourceCoverageTotalResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageTotalWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeResourceCoverageTotalWithCallback indicates an expected call of DescribeResourceCoverageTotalWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageTotalWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageTotalWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageTotalWithCallback), arg0, arg1) +} + +// DescribeResourceCoverageTotalWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeResourceCoverageTotalWithChan(arg0 *bssopenapi.DescribeResourceCoverageTotalRequest) (<-chan *bssopenapi.DescribeResourceCoverageTotalResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceCoverageTotalWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeResourceCoverageTotalResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeResourceCoverageTotalWithChan indicates an expected call of DescribeResourceCoverageTotalWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceCoverageTotalWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceCoverageTotalWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceCoverageTotalWithChan), arg0) +} + +// DescribeResourcePackageProduct mocks base method. +func (m *MockBssopenapiClient) DescribeResourcePackageProduct(arg0 *bssopenapi.DescribeResourcePackageProductRequest) (*bssopenapi.DescribeResourcePackageProductResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourcePackageProduct", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeResourcePackageProductResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourcePackageProduct indicates an expected call of DescribeResourcePackageProduct. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourcePackageProduct(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourcePackageProduct", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourcePackageProduct), arg0) +} + +// DescribeResourcePackageProductWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeResourcePackageProductWithCallback(arg0 *bssopenapi.DescribeResourcePackageProductRequest, arg1 func(*bssopenapi.DescribeResourcePackageProductResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourcePackageProductWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeResourcePackageProductWithCallback indicates an expected call of DescribeResourcePackageProductWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourcePackageProductWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourcePackageProductWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourcePackageProductWithCallback), arg0, arg1) +} + +// DescribeResourcePackageProductWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeResourcePackageProductWithChan(arg0 *bssopenapi.DescribeResourcePackageProductRequest) (<-chan *bssopenapi.DescribeResourcePackageProductResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourcePackageProductWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeResourcePackageProductResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeResourcePackageProductWithChan indicates an expected call of DescribeResourcePackageProductWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourcePackageProductWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourcePackageProductWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourcePackageProductWithChan), arg0) +} + +// DescribeResourceUsageDetail mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageDetail(arg0 *bssopenapi.DescribeResourceUsageDetailRequest) (*bssopenapi.DescribeResourceUsageDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeResourceUsageDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceUsageDetail indicates an expected call of DescribeResourceUsageDetail. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageDetail), arg0) +} + +// DescribeResourceUsageDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageDetailWithCallback(arg0 *bssopenapi.DescribeResourceUsageDetailRequest, arg1 func(*bssopenapi.DescribeResourceUsageDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeResourceUsageDetailWithCallback indicates an expected call of DescribeResourceUsageDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageDetailWithCallback), arg0, arg1) +} + +// DescribeResourceUsageDetailWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageDetailWithChan(arg0 *bssopenapi.DescribeResourceUsageDetailRequest) (<-chan *bssopenapi.DescribeResourceUsageDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeResourceUsageDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeResourceUsageDetailWithChan indicates an expected call of DescribeResourceUsageDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageDetailWithChan), arg0) +} + +// DescribeResourceUsageTotal mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageTotal(arg0 *bssopenapi.DescribeResourceUsageTotalRequest) (*bssopenapi.DescribeResourceUsageTotalResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageTotal", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeResourceUsageTotalResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceUsageTotal indicates an expected call of DescribeResourceUsageTotal. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageTotal(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageTotal", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageTotal), arg0) +} + +// DescribeResourceUsageTotalWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageTotalWithCallback(arg0 *bssopenapi.DescribeResourceUsageTotalRequest, arg1 func(*bssopenapi.DescribeResourceUsageTotalResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageTotalWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeResourceUsageTotalWithCallback indicates an expected call of DescribeResourceUsageTotalWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageTotalWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageTotalWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageTotalWithCallback), arg0, arg1) +} + +// DescribeResourceUsageTotalWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeResourceUsageTotalWithChan(arg0 *bssopenapi.DescribeResourceUsageTotalRequest) (<-chan *bssopenapi.DescribeResourceUsageTotalResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceUsageTotalWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeResourceUsageTotalResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeResourceUsageTotalWithChan indicates an expected call of DescribeResourceUsageTotalWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeResourceUsageTotalWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceUsageTotalWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeResourceUsageTotalWithChan), arg0) +} + +// DescribeSavingsPlansCoverageDetail mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageDetail(arg0 *bssopenapi.DescribeSavingsPlansCoverageDetailRequest) (*bssopenapi.DescribeSavingsPlansCoverageDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeSavingsPlansCoverageDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansCoverageDetail indicates an expected call of DescribeSavingsPlansCoverageDetail. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageDetail), arg0) +} + +// DescribeSavingsPlansCoverageDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageDetailWithCallback(arg0 *bssopenapi.DescribeSavingsPlansCoverageDetailRequest, arg1 func(*bssopenapi.DescribeSavingsPlansCoverageDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeSavingsPlansCoverageDetailWithCallback indicates an expected call of DescribeSavingsPlansCoverageDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageDetailWithCallback), arg0, arg1) +} + +// DescribeSavingsPlansCoverageDetailWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageDetailWithChan(arg0 *bssopenapi.DescribeSavingsPlansCoverageDetailRequest) (<-chan *bssopenapi.DescribeSavingsPlansCoverageDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeSavingsPlansCoverageDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeSavingsPlansCoverageDetailWithChan indicates an expected call of DescribeSavingsPlansCoverageDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageDetailWithChan), arg0) +} + +// DescribeSavingsPlansCoverageTotal mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageTotal(arg0 *bssopenapi.DescribeSavingsPlansCoverageTotalRequest) (*bssopenapi.DescribeSavingsPlansCoverageTotalResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageTotal", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeSavingsPlansCoverageTotalResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansCoverageTotal indicates an expected call of DescribeSavingsPlansCoverageTotal. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageTotal(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageTotal", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageTotal), arg0) +} + +// DescribeSavingsPlansCoverageTotalWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageTotalWithCallback(arg0 *bssopenapi.DescribeSavingsPlansCoverageTotalRequest, arg1 func(*bssopenapi.DescribeSavingsPlansCoverageTotalResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageTotalWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeSavingsPlansCoverageTotalWithCallback indicates an expected call of DescribeSavingsPlansCoverageTotalWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageTotalWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageTotalWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageTotalWithCallback), arg0, arg1) +} + +// DescribeSavingsPlansCoverageTotalWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansCoverageTotalWithChan(arg0 *bssopenapi.DescribeSavingsPlansCoverageTotalRequest) (<-chan *bssopenapi.DescribeSavingsPlansCoverageTotalResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansCoverageTotalWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeSavingsPlansCoverageTotalResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeSavingsPlansCoverageTotalWithChan indicates an expected call of DescribeSavingsPlansCoverageTotalWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansCoverageTotalWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansCoverageTotalWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansCoverageTotalWithChan), arg0) +} + +// DescribeSavingsPlansUsageDetail mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageDetail(arg0 *bssopenapi.DescribeSavingsPlansUsageDetailRequest) (*bssopenapi.DescribeSavingsPlansUsageDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeSavingsPlansUsageDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansUsageDetail indicates an expected call of DescribeSavingsPlansUsageDetail. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageDetail), arg0) +} + +// DescribeSavingsPlansUsageDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageDetailWithCallback(arg0 *bssopenapi.DescribeSavingsPlansUsageDetailRequest, arg1 func(*bssopenapi.DescribeSavingsPlansUsageDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeSavingsPlansUsageDetailWithCallback indicates an expected call of DescribeSavingsPlansUsageDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageDetailWithCallback), arg0, arg1) +} + +// DescribeSavingsPlansUsageDetailWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageDetailWithChan(arg0 *bssopenapi.DescribeSavingsPlansUsageDetailRequest) (<-chan *bssopenapi.DescribeSavingsPlansUsageDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeSavingsPlansUsageDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeSavingsPlansUsageDetailWithChan indicates an expected call of DescribeSavingsPlansUsageDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageDetailWithChan), arg0) +} + +// DescribeSavingsPlansUsageTotal mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageTotal(arg0 *bssopenapi.DescribeSavingsPlansUsageTotalRequest) (*bssopenapi.DescribeSavingsPlansUsageTotalResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageTotal", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeSavingsPlansUsageTotalResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansUsageTotal indicates an expected call of DescribeSavingsPlansUsageTotal. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageTotal(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageTotal", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageTotal), arg0) +} + +// DescribeSavingsPlansUsageTotalWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageTotalWithCallback(arg0 *bssopenapi.DescribeSavingsPlansUsageTotalRequest, arg1 func(*bssopenapi.DescribeSavingsPlansUsageTotalResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageTotalWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeSavingsPlansUsageTotalWithCallback indicates an expected call of DescribeSavingsPlansUsageTotalWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageTotalWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageTotalWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageTotalWithCallback), arg0, arg1) +} + +// DescribeSavingsPlansUsageTotalWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeSavingsPlansUsageTotalWithChan(arg0 *bssopenapi.DescribeSavingsPlansUsageTotalRequest) (<-chan *bssopenapi.DescribeSavingsPlansUsageTotalResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSavingsPlansUsageTotalWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeSavingsPlansUsageTotalResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeSavingsPlansUsageTotalWithChan indicates an expected call of DescribeSavingsPlansUsageTotalWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeSavingsPlansUsageTotalWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansUsageTotalWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSavingsPlansUsageTotalWithChan), arg0) +} + +// DescribeSplitItemBill mocks base method. +func (m *MockBssopenapiClient) DescribeSplitItemBill(arg0 *bssopenapi.DescribeSplitItemBillRequest) (*bssopenapi.DescribeSplitItemBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSplitItemBill", arg0) + ret0, _ := ret[0].(*bssopenapi.DescribeSplitItemBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSplitItemBill indicates an expected call of DescribeSplitItemBill. +func (mr *MockBssopenapiClientMockRecorder) DescribeSplitItemBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSplitItemBill", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSplitItemBill), arg0) +} + +// DescribeSplitItemBillWithCallback mocks base method. +func (m *MockBssopenapiClient) DescribeSplitItemBillWithCallback(arg0 *bssopenapi.DescribeSplitItemBillRequest, arg1 func(*bssopenapi.DescribeSplitItemBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSplitItemBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// DescribeSplitItemBillWithCallback indicates an expected call of DescribeSplitItemBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) DescribeSplitItemBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSplitItemBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSplitItemBillWithCallback), arg0, arg1) +} + +// DescribeSplitItemBillWithChan mocks base method. +func (m *MockBssopenapiClient) DescribeSplitItemBillWithChan(arg0 *bssopenapi.DescribeSplitItemBillRequest) (<-chan *bssopenapi.DescribeSplitItemBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeSplitItemBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.DescribeSplitItemBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// DescribeSplitItemBillWithChan indicates an expected call of DescribeSplitItemBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) DescribeSplitItemBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSplitItemBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).DescribeSplitItemBillWithChan), arg0) +} + +// GetAccountRelation mocks base method. +func (m *MockBssopenapiClient) GetAccountRelation(arg0 *bssopenapi.GetAccountRelationRequest) (*bssopenapi.GetAccountRelationResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccountRelation", arg0) + ret0, _ := ret[0].(*bssopenapi.GetAccountRelationResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAccountRelation indicates an expected call of GetAccountRelation. +func (mr *MockBssopenapiClientMockRecorder) GetAccountRelation(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRelation", reflect.TypeOf((*MockBssopenapiClient)(nil).GetAccountRelation), arg0) +} + +// GetAccountRelationWithCallback mocks base method. +func (m *MockBssopenapiClient) GetAccountRelationWithCallback(arg0 *bssopenapi.GetAccountRelationRequest, arg1 func(*bssopenapi.GetAccountRelationResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccountRelationWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetAccountRelationWithCallback indicates an expected call of GetAccountRelationWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetAccountRelationWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRelationWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetAccountRelationWithCallback), arg0, arg1) +} + +// GetAccountRelationWithChan mocks base method. +func (m *MockBssopenapiClient) GetAccountRelationWithChan(arg0 *bssopenapi.GetAccountRelationRequest) (<-chan *bssopenapi.GetAccountRelationResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccountRelationWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetAccountRelationResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetAccountRelationWithChan indicates an expected call of GetAccountRelationWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetAccountRelationWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRelationWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetAccountRelationWithChan), arg0) +} + +// GetCloseTrace mocks base method. +func (m *MockBssopenapiClient) GetCloseTrace() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCloseTrace") + ret0, _ := ret[0].(bool) + return ret0 +} + +// GetCloseTrace indicates an expected call of GetCloseTrace. +func (mr *MockBssopenapiClientMockRecorder) GetCloseTrace() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCloseTrace", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCloseTrace)) +} + +// GetCustomerAccountInfo mocks base method. +func (m *MockBssopenapiClient) GetCustomerAccountInfo(arg0 *bssopenapi.GetCustomerAccountInfoRequest) (*bssopenapi.GetCustomerAccountInfoResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerAccountInfo", arg0) + ret0, _ := ret[0].(*bssopenapi.GetCustomerAccountInfoResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCustomerAccountInfo indicates an expected call of GetCustomerAccountInfo. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerAccountInfo(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerAccountInfo", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerAccountInfo), arg0) +} + +// GetCustomerAccountInfoWithCallback mocks base method. +func (m *MockBssopenapiClient) GetCustomerAccountInfoWithCallback(arg0 *bssopenapi.GetCustomerAccountInfoRequest, arg1 func(*bssopenapi.GetCustomerAccountInfoResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerAccountInfoWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetCustomerAccountInfoWithCallback indicates an expected call of GetCustomerAccountInfoWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerAccountInfoWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerAccountInfoWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerAccountInfoWithCallback), arg0, arg1) +} + +// GetCustomerAccountInfoWithChan mocks base method. +func (m *MockBssopenapiClient) GetCustomerAccountInfoWithChan(arg0 *bssopenapi.GetCustomerAccountInfoRequest) (<-chan *bssopenapi.GetCustomerAccountInfoResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerAccountInfoWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetCustomerAccountInfoResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetCustomerAccountInfoWithChan indicates an expected call of GetCustomerAccountInfoWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerAccountInfoWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerAccountInfoWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerAccountInfoWithChan), arg0) +} + +// GetCustomerList mocks base method. +func (m *MockBssopenapiClient) GetCustomerList(arg0 *bssopenapi.GetCustomerListRequest) (*bssopenapi.GetCustomerListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerList", arg0) + ret0, _ := ret[0].(*bssopenapi.GetCustomerListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCustomerList indicates an expected call of GetCustomerList. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerList", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerList), arg0) +} + +// GetCustomerListWithCallback mocks base method. +func (m *MockBssopenapiClient) GetCustomerListWithCallback(arg0 *bssopenapi.GetCustomerListRequest, arg1 func(*bssopenapi.GetCustomerListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetCustomerListWithCallback indicates an expected call of GetCustomerListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerListWithCallback), arg0, arg1) +} + +// GetCustomerListWithChan mocks base method. +func (m *MockBssopenapiClient) GetCustomerListWithChan(arg0 *bssopenapi.GetCustomerListRequest) (<-chan *bssopenapi.GetCustomerListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCustomerListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetCustomerListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetCustomerListWithChan indicates an expected call of GetCustomerListWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetCustomerListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomerListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetCustomerListWithChan), arg0) +} + +// GetEndpointRules mocks base method. +func (m *MockBssopenapiClient) GetEndpointRules(arg0, arg1 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetEndpointRules", arg0, arg1) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetEndpointRules indicates an expected call of GetEndpointRules. +func (mr *MockBssopenapiClientMockRecorder) GetEndpointRules(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEndpointRules", reflect.TypeOf((*MockBssopenapiClient)(nil).GetEndpointRules), arg0, arg1) +} + +// GetHTTPSInsecure mocks base method. +func (m *MockBssopenapiClient) GetHTTPSInsecure() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHTTPSInsecure") + ret0, _ := ret[0].(bool) + return ret0 +} + +// GetHTTPSInsecure indicates an expected call of GetHTTPSInsecure. +func (mr *MockBssopenapiClientMockRecorder) GetHTTPSInsecure() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHTTPSInsecure", reflect.TypeOf((*MockBssopenapiClient)(nil).GetHTTPSInsecure)) +} + +// GetHttpProxy mocks base method. +func (m *MockBssopenapiClient) GetHttpProxy() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHttpProxy") + ret0, _ := ret[0].(string) + return ret0 +} + +// GetHttpProxy indicates an expected call of GetHttpProxy. +func (mr *MockBssopenapiClientMockRecorder) GetHttpProxy() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHttpProxy", reflect.TypeOf((*MockBssopenapiClient)(nil).GetHttpProxy)) +} + +// GetHttpsProxy mocks base method. +func (m *MockBssopenapiClient) GetHttpsProxy() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHttpsProxy") + ret0, _ := ret[0].(string) + return ret0 +} + +// GetHttpsProxy indicates an expected call of GetHttpsProxy. +func (mr *MockBssopenapiClientMockRecorder) GetHttpsProxy() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHttpsProxy", reflect.TypeOf((*MockBssopenapiClient)(nil).GetHttpsProxy)) +} + +// GetLoggerMsg mocks base method. +func (m *MockBssopenapiClient) GetLoggerMsg() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetLoggerMsg") + ret0, _ := ret[0].(string) + return ret0 +} + +// GetLoggerMsg indicates an expected call of GetLoggerMsg. +func (mr *MockBssopenapiClientMockRecorder) GetLoggerMsg() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLoggerMsg", reflect.TypeOf((*MockBssopenapiClient)(nil).GetLoggerMsg)) +} + +// GetNoProxy mocks base method. +func (m *MockBssopenapiClient) GetNoProxy() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNoProxy") + ret0, _ := ret[0].(string) + return ret0 +} + +// GetNoProxy indicates an expected call of GetNoProxy. +func (mr *MockBssopenapiClientMockRecorder) GetNoProxy() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNoProxy", reflect.TypeOf((*MockBssopenapiClient)(nil).GetNoProxy)) +} + +// GetOrderDetail mocks base method. +func (m *MockBssopenapiClient) GetOrderDetail(arg0 *bssopenapi.GetOrderDetailRequest) (*bssopenapi.GetOrderDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOrderDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.GetOrderDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOrderDetail indicates an expected call of GetOrderDetail. +func (mr *MockBssopenapiClientMockRecorder) GetOrderDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrderDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).GetOrderDetail), arg0) +} + +// GetOrderDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) GetOrderDetailWithCallback(arg0 *bssopenapi.GetOrderDetailRequest, arg1 func(*bssopenapi.GetOrderDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOrderDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetOrderDetailWithCallback indicates an expected call of GetOrderDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetOrderDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrderDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetOrderDetailWithCallback), arg0, arg1) +} + +// GetOrderDetailWithChan mocks base method. +func (m *MockBssopenapiClient) GetOrderDetailWithChan(arg0 *bssopenapi.GetOrderDetailRequest) (<-chan *bssopenapi.GetOrderDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOrderDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetOrderDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetOrderDetailWithChan indicates an expected call of GetOrderDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetOrderDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrderDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetOrderDetailWithChan), arg0) +} + +// GetPayAsYouGoPrice mocks base method. +func (m *MockBssopenapiClient) GetPayAsYouGoPrice(arg0 *bssopenapi.GetPayAsYouGoPriceRequest) (*bssopenapi.GetPayAsYouGoPriceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPayAsYouGoPrice", arg0) + ret0, _ := ret[0].(*bssopenapi.GetPayAsYouGoPriceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPayAsYouGoPrice indicates an expected call of GetPayAsYouGoPrice. +func (mr *MockBssopenapiClientMockRecorder) GetPayAsYouGoPrice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayAsYouGoPrice", reflect.TypeOf((*MockBssopenapiClient)(nil).GetPayAsYouGoPrice), arg0) +} + +// GetPayAsYouGoPriceWithCallback mocks base method. +func (m *MockBssopenapiClient) GetPayAsYouGoPriceWithCallback(arg0 *bssopenapi.GetPayAsYouGoPriceRequest, arg1 func(*bssopenapi.GetPayAsYouGoPriceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPayAsYouGoPriceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetPayAsYouGoPriceWithCallback indicates an expected call of GetPayAsYouGoPriceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetPayAsYouGoPriceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayAsYouGoPriceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetPayAsYouGoPriceWithCallback), arg0, arg1) +} + +// GetPayAsYouGoPriceWithChan mocks base method. +func (m *MockBssopenapiClient) GetPayAsYouGoPriceWithChan(arg0 *bssopenapi.GetPayAsYouGoPriceRequest) (<-chan *bssopenapi.GetPayAsYouGoPriceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPayAsYouGoPriceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetPayAsYouGoPriceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetPayAsYouGoPriceWithChan indicates an expected call of GetPayAsYouGoPriceWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetPayAsYouGoPriceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayAsYouGoPriceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetPayAsYouGoPriceWithChan), arg0) +} + +// GetResourcePackagePrice mocks base method. +func (m *MockBssopenapiClient) GetResourcePackagePrice(arg0 *bssopenapi.GetResourcePackagePriceRequest) (*bssopenapi.GetResourcePackagePriceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetResourcePackagePrice", arg0) + ret0, _ := ret[0].(*bssopenapi.GetResourcePackagePriceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetResourcePackagePrice indicates an expected call of GetResourcePackagePrice. +func (mr *MockBssopenapiClientMockRecorder) GetResourcePackagePrice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResourcePackagePrice", reflect.TypeOf((*MockBssopenapiClient)(nil).GetResourcePackagePrice), arg0) +} + +// GetResourcePackagePriceWithCallback mocks base method. +func (m *MockBssopenapiClient) GetResourcePackagePriceWithCallback(arg0 *bssopenapi.GetResourcePackagePriceRequest, arg1 func(*bssopenapi.GetResourcePackagePriceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetResourcePackagePriceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetResourcePackagePriceWithCallback indicates an expected call of GetResourcePackagePriceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetResourcePackagePriceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResourcePackagePriceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetResourcePackagePriceWithCallback), arg0, arg1) +} + +// GetResourcePackagePriceWithChan mocks base method. +func (m *MockBssopenapiClient) GetResourcePackagePriceWithChan(arg0 *bssopenapi.GetResourcePackagePriceRequest) (<-chan *bssopenapi.GetResourcePackagePriceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetResourcePackagePriceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetResourcePackagePriceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetResourcePackagePriceWithChan indicates an expected call of GetResourcePackagePriceWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetResourcePackagePriceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResourcePackagePriceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetResourcePackagePriceWithChan), arg0) +} + +// GetSubscriptionPrice mocks base method. +func (m *MockBssopenapiClient) GetSubscriptionPrice(arg0 *bssopenapi.GetSubscriptionPriceRequest) (*bssopenapi.GetSubscriptionPriceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubscriptionPrice", arg0) + ret0, _ := ret[0].(*bssopenapi.GetSubscriptionPriceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSubscriptionPrice indicates an expected call of GetSubscriptionPrice. +func (mr *MockBssopenapiClientMockRecorder) GetSubscriptionPrice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPrice", reflect.TypeOf((*MockBssopenapiClient)(nil).GetSubscriptionPrice), arg0) +} + +// GetSubscriptionPriceWithCallback mocks base method. +func (m *MockBssopenapiClient) GetSubscriptionPriceWithCallback(arg0 *bssopenapi.GetSubscriptionPriceRequest, arg1 func(*bssopenapi.GetSubscriptionPriceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubscriptionPriceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// GetSubscriptionPriceWithCallback indicates an expected call of GetSubscriptionPriceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) GetSubscriptionPriceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPriceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).GetSubscriptionPriceWithCallback), arg0, arg1) +} + +// GetSubscriptionPriceWithChan mocks base method. +func (m *MockBssopenapiClient) GetSubscriptionPriceWithChan(arg0 *bssopenapi.GetSubscriptionPriceRequest) (<-chan *bssopenapi.GetSubscriptionPriceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubscriptionPriceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.GetSubscriptionPriceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// GetSubscriptionPriceWithChan indicates an expected call of GetSubscriptionPriceWithChan. +func (mr *MockBssopenapiClientMockRecorder) GetSubscriptionPriceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPriceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).GetSubscriptionPriceWithChan), arg0) +} + +// GetTemplate mocks base method. +func (m *MockBssopenapiClient) GetTemplate() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTemplate") + ret0, _ := ret[0].(string) + return ret0 +} + +// GetTemplate indicates an expected call of GetTemplate. +func (mr *MockBssopenapiClientMockRecorder) GetTemplate() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTemplate", reflect.TypeOf((*MockBssopenapiClient)(nil).GetTemplate)) +} + +// QueryAccountBalance mocks base method. +func (m *MockBssopenapiClient) QueryAccountBalance(arg0 *bssopenapi.QueryAccountBalanceRequest) (*bssopenapi.QueryAccountBalanceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBalance", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryAccountBalanceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryAccountBalance indicates an expected call of QueryAccountBalance. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBalance(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalance", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBalance), arg0) +} + +// QueryAccountBalanceWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryAccountBalanceWithCallback(arg0 *bssopenapi.QueryAccountBalanceRequest, arg1 func(*bssopenapi.QueryAccountBalanceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBalanceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryAccountBalanceWithCallback indicates an expected call of QueryAccountBalanceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBalanceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalanceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBalanceWithCallback), arg0, arg1) +} + +// QueryAccountBalanceWithChan mocks base method. +func (m *MockBssopenapiClient) QueryAccountBalanceWithChan(arg0 *bssopenapi.QueryAccountBalanceRequest) (<-chan *bssopenapi.QueryAccountBalanceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBalanceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryAccountBalanceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryAccountBalanceWithChan indicates an expected call of QueryAccountBalanceWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBalanceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBalanceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBalanceWithChan), arg0) +} + +// QueryAccountBill mocks base method. +func (m *MockBssopenapiClient) QueryAccountBill(arg0 *bssopenapi.QueryAccountBillRequest) (*bssopenapi.QueryAccountBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryAccountBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryAccountBill indicates an expected call of QueryAccountBill. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBill), arg0) +} + +// QueryAccountBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryAccountBillWithCallback(arg0 *bssopenapi.QueryAccountBillRequest, arg1 func(*bssopenapi.QueryAccountBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryAccountBillWithCallback indicates an expected call of QueryAccountBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBillWithCallback), arg0, arg1) +} + +// QueryAccountBillWithChan mocks base method. +func (m *MockBssopenapiClient) QueryAccountBillWithChan(arg0 *bssopenapi.QueryAccountBillRequest) (<-chan *bssopenapi.QueryAccountBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryAccountBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryAccountBillWithChan indicates an expected call of QueryAccountBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountBillWithChan), arg0) +} + +// QueryAccountTransactionDetails mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactionDetails(arg0 *bssopenapi.QueryAccountTransactionDetailsRequest) (*bssopenapi.QueryAccountTransactionDetailsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactionDetails", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryAccountTransactionDetailsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryAccountTransactionDetails indicates an expected call of QueryAccountTransactionDetails. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactionDetails(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactionDetails", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactionDetails), arg0) +} + +// QueryAccountTransactionDetailsWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactionDetailsWithCallback(arg0 *bssopenapi.QueryAccountTransactionDetailsRequest, arg1 func(*bssopenapi.QueryAccountTransactionDetailsResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactionDetailsWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryAccountTransactionDetailsWithCallback indicates an expected call of QueryAccountTransactionDetailsWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactionDetailsWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactionDetailsWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactionDetailsWithCallback), arg0, arg1) +} + +// QueryAccountTransactionDetailsWithChan mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactionDetailsWithChan(arg0 *bssopenapi.QueryAccountTransactionDetailsRequest) (<-chan *bssopenapi.QueryAccountTransactionDetailsResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactionDetailsWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryAccountTransactionDetailsResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryAccountTransactionDetailsWithChan indicates an expected call of QueryAccountTransactionDetailsWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactionDetailsWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactionDetailsWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactionDetailsWithChan), arg0) +} + +// QueryAccountTransactions mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactions(arg0 *bssopenapi.QueryAccountTransactionsRequest) (*bssopenapi.QueryAccountTransactionsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactions", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryAccountTransactionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryAccountTransactions indicates an expected call of QueryAccountTransactions. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactions", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactions), arg0) +} + +// QueryAccountTransactionsWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactionsWithCallback(arg0 *bssopenapi.QueryAccountTransactionsRequest, arg1 func(*bssopenapi.QueryAccountTransactionsResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactionsWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryAccountTransactionsWithCallback indicates an expected call of QueryAccountTransactionsWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactionsWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactionsWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactionsWithCallback), arg0, arg1) +} + +// QueryAccountTransactionsWithChan mocks base method. +func (m *MockBssopenapiClient) QueryAccountTransactionsWithChan(arg0 *bssopenapi.QueryAccountTransactionsRequest) (<-chan *bssopenapi.QueryAccountTransactionsResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAccountTransactionsWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryAccountTransactionsResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryAccountTransactionsWithChan indicates an expected call of QueryAccountTransactionsWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryAccountTransactionsWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAccountTransactionsWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAccountTransactionsWithChan), arg0) +} + +// QueryAvailableInstances mocks base method. +func (m *MockBssopenapiClient) QueryAvailableInstances(arg0 *bssopenapi.QueryAvailableInstancesRequest) (*bssopenapi.QueryAvailableInstancesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAvailableInstances", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryAvailableInstancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryAvailableInstances indicates an expected call of QueryAvailableInstances. +func (mr *MockBssopenapiClientMockRecorder) QueryAvailableInstances(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAvailableInstances", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAvailableInstances), arg0) +} + +// QueryAvailableInstancesWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryAvailableInstancesWithCallback(arg0 *bssopenapi.QueryAvailableInstancesRequest, arg1 func(*bssopenapi.QueryAvailableInstancesResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAvailableInstancesWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryAvailableInstancesWithCallback indicates an expected call of QueryAvailableInstancesWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryAvailableInstancesWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAvailableInstancesWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAvailableInstancesWithCallback), arg0, arg1) +} + +// QueryAvailableInstancesWithChan mocks base method. +func (m *MockBssopenapiClient) QueryAvailableInstancesWithChan(arg0 *bssopenapi.QueryAvailableInstancesRequest) (<-chan *bssopenapi.QueryAvailableInstancesResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryAvailableInstancesWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryAvailableInstancesResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryAvailableInstancesWithChan indicates an expected call of QueryAvailableInstancesWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryAvailableInstancesWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryAvailableInstancesWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryAvailableInstancesWithChan), arg0) +} + +// QueryBill mocks base method. +func (m *MockBssopenapiClient) QueryBill(arg0 *bssopenapi.QueryBillRequest) (*bssopenapi.QueryBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryBill indicates an expected call of QueryBill. +func (mr *MockBssopenapiClientMockRecorder) QueryBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBill), arg0) +} + +// QueryBillOverview mocks base method. +func (m *MockBssopenapiClient) QueryBillOverview(arg0 *bssopenapi.QueryBillOverviewRequest) (*bssopenapi.QueryBillOverviewResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillOverview", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryBillOverviewResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryBillOverview indicates an expected call of QueryBillOverview. +func (mr *MockBssopenapiClientMockRecorder) QueryBillOverview(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillOverview", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillOverview), arg0) +} + +// QueryBillOverviewWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryBillOverviewWithCallback(arg0 *bssopenapi.QueryBillOverviewRequest, arg1 func(*bssopenapi.QueryBillOverviewResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillOverviewWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryBillOverviewWithCallback indicates an expected call of QueryBillOverviewWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryBillOverviewWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillOverviewWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillOverviewWithCallback), arg0, arg1) +} + +// QueryBillOverviewWithChan mocks base method. +func (m *MockBssopenapiClient) QueryBillOverviewWithChan(arg0 *bssopenapi.QueryBillOverviewRequest) (<-chan *bssopenapi.QueryBillOverviewResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillOverviewWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryBillOverviewResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryBillOverviewWithChan indicates an expected call of QueryBillOverviewWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryBillOverviewWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillOverviewWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillOverviewWithChan), arg0) +} + +// QueryBillToOSSSubscription mocks base method. +func (m *MockBssopenapiClient) QueryBillToOSSSubscription(arg0 *bssopenapi.QueryBillToOSSSubscriptionRequest) (*bssopenapi.QueryBillToOSSSubscriptionResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillToOSSSubscription", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryBillToOSSSubscriptionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryBillToOSSSubscription indicates an expected call of QueryBillToOSSSubscription. +func (mr *MockBssopenapiClientMockRecorder) QueryBillToOSSSubscription(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillToOSSSubscription", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillToOSSSubscription), arg0) +} + +// QueryBillToOSSSubscriptionWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryBillToOSSSubscriptionWithCallback(arg0 *bssopenapi.QueryBillToOSSSubscriptionRequest, arg1 func(*bssopenapi.QueryBillToOSSSubscriptionResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillToOSSSubscriptionWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryBillToOSSSubscriptionWithCallback indicates an expected call of QueryBillToOSSSubscriptionWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryBillToOSSSubscriptionWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillToOSSSubscriptionWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillToOSSSubscriptionWithCallback), arg0, arg1) +} + +// QueryBillToOSSSubscriptionWithChan mocks base method. +func (m *MockBssopenapiClient) QueryBillToOSSSubscriptionWithChan(arg0 *bssopenapi.QueryBillToOSSSubscriptionRequest) (<-chan *bssopenapi.QueryBillToOSSSubscriptionResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillToOSSSubscriptionWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryBillToOSSSubscriptionResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryBillToOSSSubscriptionWithChan indicates an expected call of QueryBillToOSSSubscriptionWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryBillToOSSSubscriptionWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillToOSSSubscriptionWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillToOSSSubscriptionWithChan), arg0) +} + +// QueryBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryBillWithCallback(arg0 *bssopenapi.QueryBillRequest, arg1 func(*bssopenapi.QueryBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryBillWithCallback indicates an expected call of QueryBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillWithCallback), arg0, arg1) +} + +// QueryBillWithChan mocks base method. +func (m *MockBssopenapiClient) QueryBillWithChan(arg0 *bssopenapi.QueryBillRequest) (<-chan *bssopenapi.QueryBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryBillWithChan indicates an expected call of QueryBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryBillWithChan), arg0) +} + +// QueryCashCoupons mocks base method. +func (m *MockBssopenapiClient) QueryCashCoupons(arg0 *bssopenapi.QueryCashCouponsRequest) (*bssopenapi.QueryCashCouponsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCashCoupons", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryCashCouponsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryCashCoupons indicates an expected call of QueryCashCoupons. +func (mr *MockBssopenapiClientMockRecorder) QueryCashCoupons(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCashCoupons", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCashCoupons), arg0) +} + +// QueryCashCouponsWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryCashCouponsWithCallback(arg0 *bssopenapi.QueryCashCouponsRequest, arg1 func(*bssopenapi.QueryCashCouponsResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCashCouponsWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryCashCouponsWithCallback indicates an expected call of QueryCashCouponsWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryCashCouponsWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCashCouponsWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCashCouponsWithCallback), arg0, arg1) +} + +// QueryCashCouponsWithChan mocks base method. +func (m *MockBssopenapiClient) QueryCashCouponsWithChan(arg0 *bssopenapi.QueryCashCouponsRequest) (<-chan *bssopenapi.QueryCashCouponsResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCashCouponsWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryCashCouponsResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryCashCouponsWithChan indicates an expected call of QueryCashCouponsWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryCashCouponsWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCashCouponsWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCashCouponsWithChan), arg0) +} + +// QueryCostUnit mocks base method. +func (m *MockBssopenapiClient) QueryCostUnit(arg0 *bssopenapi.QueryCostUnitRequest) (*bssopenapi.QueryCostUnitResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnit", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryCostUnitResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryCostUnit indicates an expected call of QueryCostUnit. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnit(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnit", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnit), arg0) +} + +// QueryCostUnitResource mocks base method. +func (m *MockBssopenapiClient) QueryCostUnitResource(arg0 *bssopenapi.QueryCostUnitResourceRequest) (*bssopenapi.QueryCostUnitResourceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnitResource", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryCostUnitResourceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryCostUnitResource indicates an expected call of QueryCostUnitResource. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnitResource(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnitResource", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnitResource), arg0) +} + +// QueryCostUnitResourceWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryCostUnitResourceWithCallback(arg0 *bssopenapi.QueryCostUnitResourceRequest, arg1 func(*bssopenapi.QueryCostUnitResourceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnitResourceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryCostUnitResourceWithCallback indicates an expected call of QueryCostUnitResourceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnitResourceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnitResourceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnitResourceWithCallback), arg0, arg1) +} + +// QueryCostUnitResourceWithChan mocks base method. +func (m *MockBssopenapiClient) QueryCostUnitResourceWithChan(arg0 *bssopenapi.QueryCostUnitResourceRequest) (<-chan *bssopenapi.QueryCostUnitResourceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnitResourceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryCostUnitResourceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryCostUnitResourceWithChan indicates an expected call of QueryCostUnitResourceWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnitResourceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnitResourceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnitResourceWithChan), arg0) +} + +// QueryCostUnitWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryCostUnitWithCallback(arg0 *bssopenapi.QueryCostUnitRequest, arg1 func(*bssopenapi.QueryCostUnitResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnitWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryCostUnitWithCallback indicates an expected call of QueryCostUnitWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnitWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnitWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnitWithCallback), arg0, arg1) +} + +// QueryCostUnitWithChan mocks base method. +func (m *MockBssopenapiClient) QueryCostUnitWithChan(arg0 *bssopenapi.QueryCostUnitRequest) (<-chan *bssopenapi.QueryCostUnitResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCostUnitWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryCostUnitResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryCostUnitWithChan indicates an expected call of QueryCostUnitWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryCostUnitWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCostUnitWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCostUnitWithChan), arg0) +} + +// QueryCustomerAddressList mocks base method. +func (m *MockBssopenapiClient) QueryCustomerAddressList(arg0 *bssopenapi.QueryCustomerAddressListRequest) (*bssopenapi.QueryCustomerAddressListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCustomerAddressList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryCustomerAddressListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryCustomerAddressList indicates an expected call of QueryCustomerAddressList. +func (mr *MockBssopenapiClientMockRecorder) QueryCustomerAddressList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCustomerAddressList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCustomerAddressList), arg0) +} + +// QueryCustomerAddressListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryCustomerAddressListWithCallback(arg0 *bssopenapi.QueryCustomerAddressListRequest, arg1 func(*bssopenapi.QueryCustomerAddressListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCustomerAddressListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryCustomerAddressListWithCallback indicates an expected call of QueryCustomerAddressListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryCustomerAddressListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCustomerAddressListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCustomerAddressListWithCallback), arg0, arg1) +} + +// QueryCustomerAddressListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryCustomerAddressListWithChan(arg0 *bssopenapi.QueryCustomerAddressListRequest) (<-chan *bssopenapi.QueryCustomerAddressListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryCustomerAddressListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryCustomerAddressListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryCustomerAddressListWithChan indicates an expected call of QueryCustomerAddressListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryCustomerAddressListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryCustomerAddressListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryCustomerAddressListWithChan), arg0) +} + +// QueryDPUtilizationDetail mocks base method. +func (m *MockBssopenapiClient) QueryDPUtilizationDetail(arg0 *bssopenapi.QueryDPUtilizationDetailRequest) (*bssopenapi.QueryDPUtilizationDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryDPUtilizationDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryDPUtilizationDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryDPUtilizationDetail indicates an expected call of QueryDPUtilizationDetail. +func (mr *MockBssopenapiClientMockRecorder) QueryDPUtilizationDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryDPUtilizationDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryDPUtilizationDetail), arg0) +} + +// QueryDPUtilizationDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryDPUtilizationDetailWithCallback(arg0 *bssopenapi.QueryDPUtilizationDetailRequest, arg1 func(*bssopenapi.QueryDPUtilizationDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryDPUtilizationDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryDPUtilizationDetailWithCallback indicates an expected call of QueryDPUtilizationDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryDPUtilizationDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryDPUtilizationDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryDPUtilizationDetailWithCallback), arg0, arg1) +} + +// QueryDPUtilizationDetailWithChan mocks base method. +func (m *MockBssopenapiClient) QueryDPUtilizationDetailWithChan(arg0 *bssopenapi.QueryDPUtilizationDetailRequest) (<-chan *bssopenapi.QueryDPUtilizationDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryDPUtilizationDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryDPUtilizationDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryDPUtilizationDetailWithChan indicates an expected call of QueryDPUtilizationDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryDPUtilizationDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryDPUtilizationDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryDPUtilizationDetailWithChan), arg0) +} + +// QueryEvaluateList mocks base method. +func (m *MockBssopenapiClient) QueryEvaluateList(arg0 *bssopenapi.QueryEvaluateListRequest) (*bssopenapi.QueryEvaluateListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryEvaluateList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryEvaluateListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryEvaluateList indicates an expected call of QueryEvaluateList. +func (mr *MockBssopenapiClientMockRecorder) QueryEvaluateList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryEvaluateList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryEvaluateList), arg0) +} + +// QueryEvaluateListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryEvaluateListWithCallback(arg0 *bssopenapi.QueryEvaluateListRequest, arg1 func(*bssopenapi.QueryEvaluateListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryEvaluateListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryEvaluateListWithCallback indicates an expected call of QueryEvaluateListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryEvaluateListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryEvaluateListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryEvaluateListWithCallback), arg0, arg1) +} + +// QueryEvaluateListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryEvaluateListWithChan(arg0 *bssopenapi.QueryEvaluateListRequest) (<-chan *bssopenapi.QueryEvaluateListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryEvaluateListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryEvaluateListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryEvaluateListWithChan indicates an expected call of QueryEvaluateListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryEvaluateListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryEvaluateListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryEvaluateListWithChan), arg0) +} + +// QueryFinancialAccountInfo mocks base method. +func (m *MockBssopenapiClient) QueryFinancialAccountInfo(arg0 *bssopenapi.QueryFinancialAccountInfoRequest) (*bssopenapi.QueryFinancialAccountInfoResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryFinancialAccountInfo", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryFinancialAccountInfoResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryFinancialAccountInfo indicates an expected call of QueryFinancialAccountInfo. +func (mr *MockBssopenapiClientMockRecorder) QueryFinancialAccountInfo(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinancialAccountInfo", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryFinancialAccountInfo), arg0) +} + +// QueryFinancialAccountInfoWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryFinancialAccountInfoWithCallback(arg0 *bssopenapi.QueryFinancialAccountInfoRequest, arg1 func(*bssopenapi.QueryFinancialAccountInfoResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryFinancialAccountInfoWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryFinancialAccountInfoWithCallback indicates an expected call of QueryFinancialAccountInfoWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryFinancialAccountInfoWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinancialAccountInfoWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryFinancialAccountInfoWithCallback), arg0, arg1) +} + +// QueryFinancialAccountInfoWithChan mocks base method. +func (m *MockBssopenapiClient) QueryFinancialAccountInfoWithChan(arg0 *bssopenapi.QueryFinancialAccountInfoRequest) (<-chan *bssopenapi.QueryFinancialAccountInfoResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryFinancialAccountInfoWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryFinancialAccountInfoResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryFinancialAccountInfoWithChan indicates an expected call of QueryFinancialAccountInfoWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryFinancialAccountInfoWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryFinancialAccountInfoWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryFinancialAccountInfoWithChan), arg0) +} + +// QueryInstanceBill mocks base method. +func (m *MockBssopenapiClient) QueryInstanceBill(arg0 *bssopenapi.QueryInstanceBillRequest) (*bssopenapi.QueryInstanceBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryInstanceBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryInstanceBill indicates an expected call of QueryInstanceBill. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceBill), arg0) +} + +// QueryInstanceBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryInstanceBillWithCallback(arg0 *bssopenapi.QueryInstanceBillRequest, arg1 func(*bssopenapi.QueryInstanceBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryInstanceBillWithCallback indicates an expected call of QueryInstanceBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceBillWithCallback), arg0, arg1) +} + +// QueryInstanceBillWithChan mocks base method. +func (m *MockBssopenapiClient) QueryInstanceBillWithChan(arg0 *bssopenapi.QueryInstanceBillRequest) (<-chan *bssopenapi.QueryInstanceBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryInstanceBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryInstanceBillWithChan indicates an expected call of QueryInstanceBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceBillWithChan), arg0) +} + +// QueryInstanceByTag mocks base method. +func (m *MockBssopenapiClient) QueryInstanceByTag(arg0 *bssopenapi.QueryInstanceByTagRequest) (*bssopenapi.QueryInstanceByTagResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceByTag", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryInstanceByTagResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryInstanceByTag indicates an expected call of QueryInstanceByTag. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceByTag(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceByTag", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceByTag), arg0) +} + +// QueryInstanceByTagWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryInstanceByTagWithCallback(arg0 *bssopenapi.QueryInstanceByTagRequest, arg1 func(*bssopenapi.QueryInstanceByTagResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceByTagWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryInstanceByTagWithCallback indicates an expected call of QueryInstanceByTagWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceByTagWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceByTagWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceByTagWithCallback), arg0, arg1) +} + +// QueryInstanceByTagWithChan mocks base method. +func (m *MockBssopenapiClient) QueryInstanceByTagWithChan(arg0 *bssopenapi.QueryInstanceByTagRequest) (<-chan *bssopenapi.QueryInstanceByTagResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceByTagWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryInstanceByTagResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryInstanceByTagWithChan indicates an expected call of QueryInstanceByTagWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceByTagWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceByTagWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceByTagWithChan), arg0) +} + +// QueryInstanceGaapCost mocks base method. +func (m *MockBssopenapiClient) QueryInstanceGaapCost(arg0 *bssopenapi.QueryInstanceGaapCostRequest) (*bssopenapi.QueryInstanceGaapCostResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceGaapCost", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryInstanceGaapCostResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryInstanceGaapCost indicates an expected call of QueryInstanceGaapCost. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceGaapCost(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceGaapCost", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceGaapCost), arg0) +} + +// QueryInstanceGaapCostWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryInstanceGaapCostWithCallback(arg0 *bssopenapi.QueryInstanceGaapCostRequest, arg1 func(*bssopenapi.QueryInstanceGaapCostResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceGaapCostWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryInstanceGaapCostWithCallback indicates an expected call of QueryInstanceGaapCostWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceGaapCostWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceGaapCostWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceGaapCostWithCallback), arg0, arg1) +} + +// QueryInstanceGaapCostWithChan mocks base method. +func (m *MockBssopenapiClient) QueryInstanceGaapCostWithChan(arg0 *bssopenapi.QueryInstanceGaapCostRequest) (<-chan *bssopenapi.QueryInstanceGaapCostResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInstanceGaapCostWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryInstanceGaapCostResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryInstanceGaapCostWithChan indicates an expected call of QueryInstanceGaapCostWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryInstanceGaapCostWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInstanceGaapCostWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInstanceGaapCostWithChan), arg0) +} + +// QueryInvoicingCustomerList mocks base method. +func (m *MockBssopenapiClient) QueryInvoicingCustomerList(arg0 *bssopenapi.QueryInvoicingCustomerListRequest) (*bssopenapi.QueryInvoicingCustomerListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInvoicingCustomerList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryInvoicingCustomerListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryInvoicingCustomerList indicates an expected call of QueryInvoicingCustomerList. +func (mr *MockBssopenapiClientMockRecorder) QueryInvoicingCustomerList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInvoicingCustomerList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInvoicingCustomerList), arg0) +} + +// QueryInvoicingCustomerListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryInvoicingCustomerListWithCallback(arg0 *bssopenapi.QueryInvoicingCustomerListRequest, arg1 func(*bssopenapi.QueryInvoicingCustomerListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInvoicingCustomerListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryInvoicingCustomerListWithCallback indicates an expected call of QueryInvoicingCustomerListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryInvoicingCustomerListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInvoicingCustomerListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInvoicingCustomerListWithCallback), arg0, arg1) +} + +// QueryInvoicingCustomerListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryInvoicingCustomerListWithChan(arg0 *bssopenapi.QueryInvoicingCustomerListRequest) (<-chan *bssopenapi.QueryInvoicingCustomerListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryInvoicingCustomerListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryInvoicingCustomerListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryInvoicingCustomerListWithChan indicates an expected call of QueryInvoicingCustomerListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryInvoicingCustomerListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryInvoicingCustomerListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryInvoicingCustomerListWithChan), arg0) +} + +// QueryMonthlyBill mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyBill(arg0 *bssopenapi.QueryMonthlyBillRequest) (*bssopenapi.QueryMonthlyBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryMonthlyBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryMonthlyBill indicates an expected call of QueryMonthlyBill. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyBill), arg0) +} + +// QueryMonthlyBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyBillWithCallback(arg0 *bssopenapi.QueryMonthlyBillRequest, arg1 func(*bssopenapi.QueryMonthlyBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryMonthlyBillWithCallback indicates an expected call of QueryMonthlyBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyBillWithCallback), arg0, arg1) +} + +// QueryMonthlyBillWithChan mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyBillWithChan(arg0 *bssopenapi.QueryMonthlyBillRequest) (<-chan *bssopenapi.QueryMonthlyBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryMonthlyBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryMonthlyBillWithChan indicates an expected call of QueryMonthlyBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyBillWithChan), arg0) +} + +// QueryMonthlyInstanceConsumption mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyInstanceConsumption(arg0 *bssopenapi.QueryMonthlyInstanceConsumptionRequest) (*bssopenapi.QueryMonthlyInstanceConsumptionResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyInstanceConsumption", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryMonthlyInstanceConsumptionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryMonthlyInstanceConsumption indicates an expected call of QueryMonthlyInstanceConsumption. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyInstanceConsumption(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyInstanceConsumption", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyInstanceConsumption), arg0) +} + +// QueryMonthlyInstanceConsumptionWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyInstanceConsumptionWithCallback(arg0 *bssopenapi.QueryMonthlyInstanceConsumptionRequest, arg1 func(*bssopenapi.QueryMonthlyInstanceConsumptionResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyInstanceConsumptionWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryMonthlyInstanceConsumptionWithCallback indicates an expected call of QueryMonthlyInstanceConsumptionWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyInstanceConsumptionWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyInstanceConsumptionWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyInstanceConsumptionWithCallback), arg0, arg1) +} + +// QueryMonthlyInstanceConsumptionWithChan mocks base method. +func (m *MockBssopenapiClient) QueryMonthlyInstanceConsumptionWithChan(arg0 *bssopenapi.QueryMonthlyInstanceConsumptionRequest) (<-chan *bssopenapi.QueryMonthlyInstanceConsumptionResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryMonthlyInstanceConsumptionWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryMonthlyInstanceConsumptionResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryMonthlyInstanceConsumptionWithChan indicates an expected call of QueryMonthlyInstanceConsumptionWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryMonthlyInstanceConsumptionWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryMonthlyInstanceConsumptionWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryMonthlyInstanceConsumptionWithChan), arg0) +} + +// QueryOrders mocks base method. +func (m *MockBssopenapiClient) QueryOrders(arg0 *bssopenapi.QueryOrdersRequest) (*bssopenapi.QueryOrdersResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryOrders", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryOrdersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryOrders indicates an expected call of QueryOrders. +func (mr *MockBssopenapiClientMockRecorder) QueryOrders(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOrders", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryOrders), arg0) +} + +// QueryOrdersWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryOrdersWithCallback(arg0 *bssopenapi.QueryOrdersRequest, arg1 func(*bssopenapi.QueryOrdersResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryOrdersWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryOrdersWithCallback indicates an expected call of QueryOrdersWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryOrdersWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOrdersWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryOrdersWithCallback), arg0, arg1) +} + +// QueryOrdersWithChan mocks base method. +func (m *MockBssopenapiClient) QueryOrdersWithChan(arg0 *bssopenapi.QueryOrdersRequest) (<-chan *bssopenapi.QueryOrdersResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryOrdersWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryOrdersResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryOrdersWithChan indicates an expected call of QueryOrdersWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryOrdersWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOrdersWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryOrdersWithChan), arg0) +} + +// QueryPermissionList mocks base method. +func (m *MockBssopenapiClient) QueryPermissionList(arg0 *bssopenapi.QueryPermissionListRequest) (*bssopenapi.QueryPermissionListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPermissionList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryPermissionListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryPermissionList indicates an expected call of QueryPermissionList. +func (mr *MockBssopenapiClientMockRecorder) QueryPermissionList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPermissionList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPermissionList), arg0) +} + +// QueryPermissionListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryPermissionListWithCallback(arg0 *bssopenapi.QueryPermissionListRequest, arg1 func(*bssopenapi.QueryPermissionListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPermissionListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryPermissionListWithCallback indicates an expected call of QueryPermissionListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryPermissionListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPermissionListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPermissionListWithCallback), arg0, arg1) +} + +// QueryPermissionListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryPermissionListWithChan(arg0 *bssopenapi.QueryPermissionListRequest) (<-chan *bssopenapi.QueryPermissionListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPermissionListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryPermissionListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryPermissionListWithChan indicates an expected call of QueryPermissionListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryPermissionListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPermissionListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPermissionListWithChan), arg0) +} + +// QueryPrepaidCards mocks base method. +func (m *MockBssopenapiClient) QueryPrepaidCards(arg0 *bssopenapi.QueryPrepaidCardsRequest) (*bssopenapi.QueryPrepaidCardsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPrepaidCards", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryPrepaidCardsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryPrepaidCards indicates an expected call of QueryPrepaidCards. +func (mr *MockBssopenapiClientMockRecorder) QueryPrepaidCards(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPrepaidCards", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPrepaidCards), arg0) +} + +// QueryPrepaidCardsWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryPrepaidCardsWithCallback(arg0 *bssopenapi.QueryPrepaidCardsRequest, arg1 func(*bssopenapi.QueryPrepaidCardsResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPrepaidCardsWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryPrepaidCardsWithCallback indicates an expected call of QueryPrepaidCardsWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryPrepaidCardsWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPrepaidCardsWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPrepaidCardsWithCallback), arg0, arg1) +} + +// QueryPrepaidCardsWithChan mocks base method. +func (m *MockBssopenapiClient) QueryPrepaidCardsWithChan(arg0 *bssopenapi.QueryPrepaidCardsRequest) (<-chan *bssopenapi.QueryPrepaidCardsResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryPrepaidCardsWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryPrepaidCardsResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryPrepaidCardsWithChan indicates an expected call of QueryPrepaidCardsWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryPrepaidCardsWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryPrepaidCardsWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryPrepaidCardsWithChan), arg0) +} + +// QueryProductList mocks base method. +func (m *MockBssopenapiClient) QueryProductList(arg0 *bssopenapi.QueryProductListRequest) (*bssopenapi.QueryProductListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryProductList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryProductListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryProductList indicates an expected call of QueryProductList. +func (mr *MockBssopenapiClientMockRecorder) QueryProductList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProductList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryProductList), arg0) +} + +// QueryProductListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryProductListWithCallback(arg0 *bssopenapi.QueryProductListRequest, arg1 func(*bssopenapi.QueryProductListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryProductListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryProductListWithCallback indicates an expected call of QueryProductListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryProductListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProductListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryProductListWithCallback), arg0, arg1) +} + +// QueryProductListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryProductListWithChan(arg0 *bssopenapi.QueryProductListRequest) (<-chan *bssopenapi.QueryProductListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryProductListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryProductListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryProductListWithChan indicates an expected call of QueryProductListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryProductListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryProductListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryProductListWithChan), arg0) +} + +// QueryRIUtilizationDetail mocks base method. +func (m *MockBssopenapiClient) QueryRIUtilizationDetail(arg0 *bssopenapi.QueryRIUtilizationDetailRequest) (*bssopenapi.QueryRIUtilizationDetailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRIUtilizationDetail", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryRIUtilizationDetailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryRIUtilizationDetail indicates an expected call of QueryRIUtilizationDetail. +func (mr *MockBssopenapiClientMockRecorder) QueryRIUtilizationDetail(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRIUtilizationDetail", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRIUtilizationDetail), arg0) +} + +// QueryRIUtilizationDetailWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryRIUtilizationDetailWithCallback(arg0 *bssopenapi.QueryRIUtilizationDetailRequest, arg1 func(*bssopenapi.QueryRIUtilizationDetailResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRIUtilizationDetailWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryRIUtilizationDetailWithCallback indicates an expected call of QueryRIUtilizationDetailWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryRIUtilizationDetailWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRIUtilizationDetailWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRIUtilizationDetailWithCallback), arg0, arg1) +} + +// QueryRIUtilizationDetailWithChan mocks base method. +func (m *MockBssopenapiClient) QueryRIUtilizationDetailWithChan(arg0 *bssopenapi.QueryRIUtilizationDetailRequest) (<-chan *bssopenapi.QueryRIUtilizationDetailResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRIUtilizationDetailWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryRIUtilizationDetailResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryRIUtilizationDetailWithChan indicates an expected call of QueryRIUtilizationDetailWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryRIUtilizationDetailWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRIUtilizationDetailWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRIUtilizationDetailWithChan), arg0) +} + +// QueryRedeem mocks base method. +func (m *MockBssopenapiClient) QueryRedeem(arg0 *bssopenapi.QueryRedeemRequest) (*bssopenapi.QueryRedeemResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRedeem", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryRedeemResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryRedeem indicates an expected call of QueryRedeem. +func (mr *MockBssopenapiClientMockRecorder) QueryRedeem(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRedeem", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRedeem), arg0) +} + +// QueryRedeemWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryRedeemWithCallback(arg0 *bssopenapi.QueryRedeemRequest, arg1 func(*bssopenapi.QueryRedeemResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRedeemWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryRedeemWithCallback indicates an expected call of QueryRedeemWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryRedeemWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRedeemWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRedeemWithCallback), arg0, arg1) +} + +// QueryRedeemWithChan mocks base method. +func (m *MockBssopenapiClient) QueryRedeemWithChan(arg0 *bssopenapi.QueryRedeemRequest) (<-chan *bssopenapi.QueryRedeemResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRedeemWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryRedeemResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryRedeemWithChan indicates an expected call of QueryRedeemWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryRedeemWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRedeemWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRedeemWithChan), arg0) +} + +// QueryRelationList mocks base method. +func (m *MockBssopenapiClient) QueryRelationList(arg0 *bssopenapi.QueryRelationListRequest) (*bssopenapi.QueryRelationListResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRelationList", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryRelationListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryRelationList indicates an expected call of QueryRelationList. +func (mr *MockBssopenapiClientMockRecorder) QueryRelationList(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRelationList", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRelationList), arg0) +} + +// QueryRelationListWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryRelationListWithCallback(arg0 *bssopenapi.QueryRelationListRequest, arg1 func(*bssopenapi.QueryRelationListResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRelationListWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryRelationListWithCallback indicates an expected call of QueryRelationListWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryRelationListWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRelationListWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRelationListWithCallback), arg0, arg1) +} + +// QueryRelationListWithChan mocks base method. +func (m *MockBssopenapiClient) QueryRelationListWithChan(arg0 *bssopenapi.QueryRelationListRequest) (<-chan *bssopenapi.QueryRelationListResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryRelationListWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryRelationListResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryRelationListWithChan indicates an expected call of QueryRelationListWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryRelationListWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRelationListWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryRelationListWithChan), arg0) +} + +// QueryResellerAvailableQuota mocks base method. +func (m *MockBssopenapiClient) QueryResellerAvailableQuota(arg0 *bssopenapi.QueryResellerAvailableQuotaRequest) (*bssopenapi.QueryResellerAvailableQuotaResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResellerAvailableQuota", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryResellerAvailableQuotaResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryResellerAvailableQuota indicates an expected call of QueryResellerAvailableQuota. +func (mr *MockBssopenapiClientMockRecorder) QueryResellerAvailableQuota(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResellerAvailableQuota", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResellerAvailableQuota), arg0) +} + +// QueryResellerAvailableQuotaWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryResellerAvailableQuotaWithCallback(arg0 *bssopenapi.QueryResellerAvailableQuotaRequest, arg1 func(*bssopenapi.QueryResellerAvailableQuotaResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResellerAvailableQuotaWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryResellerAvailableQuotaWithCallback indicates an expected call of QueryResellerAvailableQuotaWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryResellerAvailableQuotaWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResellerAvailableQuotaWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResellerAvailableQuotaWithCallback), arg0, arg1) +} + +// QueryResellerAvailableQuotaWithChan mocks base method. +func (m *MockBssopenapiClient) QueryResellerAvailableQuotaWithChan(arg0 *bssopenapi.QueryResellerAvailableQuotaRequest) (<-chan *bssopenapi.QueryResellerAvailableQuotaResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResellerAvailableQuotaWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryResellerAvailableQuotaResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryResellerAvailableQuotaWithChan indicates an expected call of QueryResellerAvailableQuotaWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryResellerAvailableQuotaWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResellerAvailableQuotaWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResellerAvailableQuotaWithChan), arg0) +} + +// QueryResourcePackageInstances mocks base method. +func (m *MockBssopenapiClient) QueryResourcePackageInstances(arg0 *bssopenapi.QueryResourcePackageInstancesRequest) (*bssopenapi.QueryResourcePackageInstancesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResourcePackageInstances", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryResourcePackageInstancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryResourcePackageInstances indicates an expected call of QueryResourcePackageInstances. +func (mr *MockBssopenapiClientMockRecorder) QueryResourcePackageInstances(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResourcePackageInstances", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResourcePackageInstances), arg0) +} + +// QueryResourcePackageInstancesWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryResourcePackageInstancesWithCallback(arg0 *bssopenapi.QueryResourcePackageInstancesRequest, arg1 func(*bssopenapi.QueryResourcePackageInstancesResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResourcePackageInstancesWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryResourcePackageInstancesWithCallback indicates an expected call of QueryResourcePackageInstancesWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryResourcePackageInstancesWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResourcePackageInstancesWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResourcePackageInstancesWithCallback), arg0, arg1) +} + +// QueryResourcePackageInstancesWithChan mocks base method. +func (m *MockBssopenapiClient) QueryResourcePackageInstancesWithChan(arg0 *bssopenapi.QueryResourcePackageInstancesRequest) (<-chan *bssopenapi.QueryResourcePackageInstancesResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryResourcePackageInstancesWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryResourcePackageInstancesResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryResourcePackageInstancesWithChan indicates an expected call of QueryResourcePackageInstancesWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryResourcePackageInstancesWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryResourcePackageInstancesWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryResourcePackageInstancesWithChan), arg0) +} + +// QuerySavingsPlansDeductLog mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansDeductLog(arg0 *bssopenapi.QuerySavingsPlansDeductLogRequest) (*bssopenapi.QuerySavingsPlansDeductLogResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansDeductLog", arg0) + ret0, _ := ret[0].(*bssopenapi.QuerySavingsPlansDeductLogResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QuerySavingsPlansDeductLog indicates an expected call of QuerySavingsPlansDeductLog. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansDeductLog(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansDeductLog", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansDeductLog), arg0) +} + +// QuerySavingsPlansDeductLogWithCallback mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansDeductLogWithCallback(arg0 *bssopenapi.QuerySavingsPlansDeductLogRequest, arg1 func(*bssopenapi.QuerySavingsPlansDeductLogResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansDeductLogWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QuerySavingsPlansDeductLogWithCallback indicates an expected call of QuerySavingsPlansDeductLogWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansDeductLogWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansDeductLogWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansDeductLogWithCallback), arg0, arg1) +} + +// QuerySavingsPlansDeductLogWithChan mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansDeductLogWithChan(arg0 *bssopenapi.QuerySavingsPlansDeductLogRequest) (<-chan *bssopenapi.QuerySavingsPlansDeductLogResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansDeductLogWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QuerySavingsPlansDeductLogResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QuerySavingsPlansDeductLogWithChan indicates an expected call of QuerySavingsPlansDeductLogWithChan. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansDeductLogWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansDeductLogWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansDeductLogWithChan), arg0) +} + +// QuerySavingsPlansInstance mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansInstance(arg0 *bssopenapi.QuerySavingsPlansInstanceRequest) (*bssopenapi.QuerySavingsPlansInstanceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansInstance", arg0) + ret0, _ := ret[0].(*bssopenapi.QuerySavingsPlansInstanceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QuerySavingsPlansInstance indicates an expected call of QuerySavingsPlansInstance. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansInstance(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansInstance", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansInstance), arg0) +} + +// QuerySavingsPlansInstanceWithCallback mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansInstanceWithCallback(arg0 *bssopenapi.QuerySavingsPlansInstanceRequest, arg1 func(*bssopenapi.QuerySavingsPlansInstanceResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansInstanceWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QuerySavingsPlansInstanceWithCallback indicates an expected call of QuerySavingsPlansInstanceWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansInstanceWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansInstanceWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansInstanceWithCallback), arg0, arg1) +} + +// QuerySavingsPlansInstanceWithChan mocks base method. +func (m *MockBssopenapiClient) QuerySavingsPlansInstanceWithChan(arg0 *bssopenapi.QuerySavingsPlansInstanceRequest) (<-chan *bssopenapi.QuerySavingsPlansInstanceResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySavingsPlansInstanceWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QuerySavingsPlansInstanceResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QuerySavingsPlansInstanceWithChan indicates an expected call of QuerySavingsPlansInstanceWithChan. +func (mr *MockBssopenapiClientMockRecorder) QuerySavingsPlansInstanceWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySavingsPlansInstanceWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySavingsPlansInstanceWithChan), arg0) +} + +// QuerySettleBill mocks base method. +func (m *MockBssopenapiClient) QuerySettleBill(arg0 *bssopenapi.QuerySettleBillRequest) (*bssopenapi.QuerySettleBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettleBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QuerySettleBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QuerySettleBill indicates an expected call of QuerySettleBill. +func (mr *MockBssopenapiClientMockRecorder) QuerySettleBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettleBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettleBill), arg0) +} + +// QuerySettleBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QuerySettleBillWithCallback(arg0 *bssopenapi.QuerySettleBillRequest, arg1 func(*bssopenapi.QuerySettleBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettleBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QuerySettleBillWithCallback indicates an expected call of QuerySettleBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QuerySettleBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettleBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettleBillWithCallback), arg0, arg1) +} + +// QuerySettleBillWithChan mocks base method. +func (m *MockBssopenapiClient) QuerySettleBillWithChan(arg0 *bssopenapi.QuerySettleBillRequest) (<-chan *bssopenapi.QuerySettleBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettleBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QuerySettleBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QuerySettleBillWithChan indicates an expected call of QuerySettleBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QuerySettleBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettleBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettleBillWithChan), arg0) +} + +// QuerySettlementBill mocks base method. +func (m *MockBssopenapiClient) QuerySettlementBill(arg0 *bssopenapi.QuerySettlementBillRequest) (*bssopenapi.QuerySettlementBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettlementBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QuerySettlementBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QuerySettlementBill indicates an expected call of QuerySettlementBill. +func (mr *MockBssopenapiClientMockRecorder) QuerySettlementBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettlementBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettlementBill), arg0) +} + +// QuerySettlementBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QuerySettlementBillWithCallback(arg0 *bssopenapi.QuerySettlementBillRequest, arg1 func(*bssopenapi.QuerySettlementBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettlementBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QuerySettlementBillWithCallback indicates an expected call of QuerySettlementBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QuerySettlementBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettlementBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettlementBillWithCallback), arg0, arg1) +} + +// QuerySettlementBillWithChan mocks base method. +func (m *MockBssopenapiClient) QuerySettlementBillWithChan(arg0 *bssopenapi.QuerySettlementBillRequest) (<-chan *bssopenapi.QuerySettlementBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySettlementBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QuerySettlementBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QuerySettlementBillWithChan indicates an expected call of QuerySettlementBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QuerySettlementBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySettlementBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySettlementBillWithChan), arg0) +} + +// QuerySplitItemBill mocks base method. +func (m *MockBssopenapiClient) QuerySplitItemBill(arg0 *bssopenapi.QuerySplitItemBillRequest) (*bssopenapi.QuerySplitItemBillResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySplitItemBill", arg0) + ret0, _ := ret[0].(*bssopenapi.QuerySplitItemBillResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QuerySplitItemBill indicates an expected call of QuerySplitItemBill. +func (mr *MockBssopenapiClientMockRecorder) QuerySplitItemBill(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySplitItemBill", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySplitItemBill), arg0) +} + +// QuerySplitItemBillWithCallback mocks base method. +func (m *MockBssopenapiClient) QuerySplitItemBillWithCallback(arg0 *bssopenapi.QuerySplitItemBillRequest, arg1 func(*bssopenapi.QuerySplitItemBillResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySplitItemBillWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QuerySplitItemBillWithCallback indicates an expected call of QuerySplitItemBillWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QuerySplitItemBillWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySplitItemBillWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySplitItemBillWithCallback), arg0, arg1) +} + +// QuerySplitItemBillWithChan mocks base method. +func (m *MockBssopenapiClient) QuerySplitItemBillWithChan(arg0 *bssopenapi.QuerySplitItemBillRequest) (<-chan *bssopenapi.QuerySplitItemBillResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QuerySplitItemBillWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QuerySplitItemBillResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QuerySplitItemBillWithChan indicates an expected call of QuerySplitItemBillWithChan. +func (mr *MockBssopenapiClientMockRecorder) QuerySplitItemBillWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QuerySplitItemBillWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QuerySplitItemBillWithChan), arg0) +} + +// QueryUserOmsData mocks base method. +func (m *MockBssopenapiClient) QueryUserOmsData(arg0 *bssopenapi.QueryUserOmsDataRequest) (*bssopenapi.QueryUserOmsDataResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryUserOmsData", arg0) + ret0, _ := ret[0].(*bssopenapi.QueryUserOmsDataResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryUserOmsData indicates an expected call of QueryUserOmsData. +func (mr *MockBssopenapiClientMockRecorder) QueryUserOmsData(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryUserOmsData", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryUserOmsData), arg0) +} + +// QueryUserOmsDataWithCallback mocks base method. +func (m *MockBssopenapiClient) QueryUserOmsDataWithCallback(arg0 *bssopenapi.QueryUserOmsDataRequest, arg1 func(*bssopenapi.QueryUserOmsDataResponse, error)) <-chan int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryUserOmsDataWithCallback", arg0, arg1) + ret0, _ := ret[0].(<-chan int) + return ret0 +} + +// QueryUserOmsDataWithCallback indicates an expected call of QueryUserOmsDataWithCallback. +func (mr *MockBssopenapiClientMockRecorder) QueryUserOmsDataWithCallback(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryUserOmsDataWithCallback", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryUserOmsDataWithCallback), arg0, arg1) +} + +// QueryUserOmsDataWithChan mocks base method. +func (m *MockBssopenapiClient) QueryUserOmsDataWithChan(arg0 *bssopenapi.QueryUserOmsDataRequest) (<-chan *bssopenapi.QueryUserOmsDataResponse, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryUserOmsDataWithChan", arg0) + ret0, _ := ret[0].(<-chan *bssopenapi.QueryUserOmsDataResponse) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// QueryUserOmsDataWithChan indicates an expected call of QueryUserOmsDataWithChan. +func (mr *MockBssopenapiClientMockRecorder) QueryUserOmsDataWithChan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryUserOmsDataWithChan", reflect.TypeOf((*MockBssopenapiClient)(nil).QueryUserOmsDataWithChan), arg0) +} diff --git a/plugins/source/alicloud/client/mocks/oss.go b/plugins/source/alicloud/client/mocks/oss.go new file mode 100644 index 00000000000000..94fbe3691cdc31 --- /dev/null +++ b/plugins/source/alicloud/client/mocks/oss.go @@ -0,0 +1,752 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: oss.go + +// Package mocks is a generated GoMock package. +package mocks + +import ( + reflect "reflect" + + oss "github.com/aliyun/aliyun-oss-go-sdk/oss" + gomock "github.com/golang/mock/gomock" +) + +// MockOssClient is a mock of OssClient interface. +type MockOssClient struct { + ctrl *gomock.Controller + recorder *MockOssClientMockRecorder +} + +// MockOssClientMockRecorder is the mock recorder for MockOssClient. +type MockOssClientMockRecorder struct { + mock *MockOssClient +} + +// NewMockOssClient creates a new mock instance. +func NewMockOssClient(ctrl *gomock.Controller) *MockOssClient { + mock := &MockOssClient{ctrl: ctrl} + mock.recorder = &MockOssClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockOssClient) EXPECT() *MockOssClientMockRecorder { + return m.recorder +} + +// GetBucketACL mocks base method. +func (m *MockOssClient) GetBucketACL(arg0 string, arg1 ...oss.Option) (oss.GetBucketACLResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketACL", varargs...) + ret0, _ := ret[0].(oss.GetBucketACLResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketACL indicates an expected call of GetBucketACL. +func (mr *MockOssClientMockRecorder) GetBucketACL(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketACL", reflect.TypeOf((*MockOssClient)(nil).GetBucketACL), varargs...) +} + +// GetBucketAccessMonitor mocks base method. +func (m *MockOssClient) GetBucketAccessMonitor(arg0 string, arg1 ...oss.Option) (oss.GetBucketAccessMonitorResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketAccessMonitor", varargs...) + ret0, _ := ret[0].(oss.GetBucketAccessMonitorResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketAccessMonitor indicates an expected call of GetBucketAccessMonitor. +func (mr *MockOssClientMockRecorder) GetBucketAccessMonitor(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketAccessMonitor", reflect.TypeOf((*MockOssClient)(nil).GetBucketAccessMonitor), varargs...) +} + +// GetBucketAccessMonitorXml mocks base method. +func (m *MockOssClient) GetBucketAccessMonitorXml(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketAccessMonitorXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketAccessMonitorXml indicates an expected call of GetBucketAccessMonitorXml. +func (mr *MockOssClientMockRecorder) GetBucketAccessMonitorXml(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketAccessMonitorXml", reflect.TypeOf((*MockOssClient)(nil).GetBucketAccessMonitorXml), varargs...) +} + +// GetBucketAsyncTask mocks base method. +func (m *MockOssClient) GetBucketAsyncTask(arg0, arg1 string, arg2 ...oss.Option) (oss.AsynFetchTaskInfo, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketAsyncTask", varargs...) + ret0, _ := ret[0].(oss.AsynFetchTaskInfo) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketAsyncTask indicates an expected call of GetBucketAsyncTask. +func (mr *MockOssClientMockRecorder) GetBucketAsyncTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketAsyncTask", reflect.TypeOf((*MockOssClient)(nil).GetBucketAsyncTask), varargs...) +} + +// GetBucketCORS mocks base method. +func (m *MockOssClient) GetBucketCORS(arg0 string, arg1 ...oss.Option) (oss.GetBucketCORSResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketCORS", varargs...) + ret0, _ := ret[0].(oss.GetBucketCORSResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketCORS indicates an expected call of GetBucketCORS. +func (mr *MockOssClientMockRecorder) GetBucketCORS(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketCORS", reflect.TypeOf((*MockOssClient)(nil).GetBucketCORS), varargs...) +} + +// GetBucketCORSXml mocks base method. +func (m *MockOssClient) GetBucketCORSXml(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketCORSXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketCORSXml indicates an expected call of GetBucketCORSXml. +func (mr *MockOssClientMockRecorder) GetBucketCORSXml(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketCORSXml", reflect.TypeOf((*MockOssClient)(nil).GetBucketCORSXml), varargs...) +} + +// GetBucketCname mocks base method. +func (m *MockOssClient) GetBucketCname(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketCname", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketCname indicates an expected call of GetBucketCname. +func (mr *MockOssClientMockRecorder) GetBucketCname(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketCname", reflect.TypeOf((*MockOssClient)(nil).GetBucketCname), varargs...) +} + +// GetBucketCnameToken mocks base method. +func (m *MockOssClient) GetBucketCnameToken(arg0, arg1 string, arg2 ...oss.Option) (oss.GetBucketCnameTokenResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketCnameToken", varargs...) + ret0, _ := ret[0].(oss.GetBucketCnameTokenResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketCnameToken indicates an expected call of GetBucketCnameToken. +func (mr *MockOssClientMockRecorder) GetBucketCnameToken(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketCnameToken", reflect.TypeOf((*MockOssClient)(nil).GetBucketCnameToken), varargs...) +} + +// GetBucketEncryption mocks base method. +func (m *MockOssClient) GetBucketEncryption(arg0 string, arg1 ...oss.Option) (oss.GetBucketEncryptionResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketEncryption", varargs...) + ret0, _ := ret[0].(oss.GetBucketEncryptionResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketEncryption indicates an expected call of GetBucketEncryption. +func (mr *MockOssClientMockRecorder) GetBucketEncryption(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketEncryption", reflect.TypeOf((*MockOssClient)(nil).GetBucketEncryption), varargs...) +} + +// GetBucketInfo mocks base method. +func (m *MockOssClient) GetBucketInfo(arg0 string, arg1 ...oss.Option) (oss.GetBucketInfoResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketInfo", varargs...) + ret0, _ := ret[0].(oss.GetBucketInfoResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketInfo indicates an expected call of GetBucketInfo. +func (mr *MockOssClientMockRecorder) GetBucketInfo(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketInfo", reflect.TypeOf((*MockOssClient)(nil).GetBucketInfo), varargs...) +} + +// GetBucketInventory mocks base method. +func (m *MockOssClient) GetBucketInventory(arg0, arg1 string, arg2 ...oss.Option) (oss.InventoryConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketInventory", varargs...) + ret0, _ := ret[0].(oss.InventoryConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketInventory indicates an expected call of GetBucketInventory. +func (mr *MockOssClientMockRecorder) GetBucketInventory(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketInventory", reflect.TypeOf((*MockOssClient)(nil).GetBucketInventory), varargs...) +} + +// GetBucketInventoryXml mocks base method. +func (m *MockOssClient) GetBucketInventoryXml(arg0, arg1 string, arg2 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketInventoryXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketInventoryXml indicates an expected call of GetBucketInventoryXml. +func (mr *MockOssClientMockRecorder) GetBucketInventoryXml(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketInventoryXml", reflect.TypeOf((*MockOssClient)(nil).GetBucketInventoryXml), varargs...) +} + +// GetBucketLifecycle mocks base method. +func (m *MockOssClient) GetBucketLifecycle(arg0 string, arg1 ...oss.Option) (oss.GetBucketLifecycleResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketLifecycle", varargs...) + ret0, _ := ret[0].(oss.GetBucketLifecycleResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketLifecycle indicates an expected call of GetBucketLifecycle. +func (mr *MockOssClientMockRecorder) GetBucketLifecycle(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketLifecycle", reflect.TypeOf((*MockOssClient)(nil).GetBucketLifecycle), varargs...) +} + +// GetBucketLifecycleXml mocks base method. +func (m *MockOssClient) GetBucketLifecycleXml(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketLifecycleXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketLifecycleXml indicates an expected call of GetBucketLifecycleXml. +func (mr *MockOssClientMockRecorder) GetBucketLifecycleXml(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketLifecycleXml", reflect.TypeOf((*MockOssClient)(nil).GetBucketLifecycleXml), varargs...) +} + +// GetBucketLocation mocks base method. +func (m *MockOssClient) GetBucketLocation(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketLocation", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketLocation indicates an expected call of GetBucketLocation. +func (mr *MockOssClientMockRecorder) GetBucketLocation(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketLocation", reflect.TypeOf((*MockOssClient)(nil).GetBucketLocation), varargs...) +} + +// GetBucketLogging mocks base method. +func (m *MockOssClient) GetBucketLogging(arg0 string, arg1 ...oss.Option) (oss.GetBucketLoggingResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketLogging", varargs...) + ret0, _ := ret[0].(oss.GetBucketLoggingResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketLogging indicates an expected call of GetBucketLogging. +func (mr *MockOssClientMockRecorder) GetBucketLogging(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketLogging", reflect.TypeOf((*MockOssClient)(nil).GetBucketLogging), varargs...) +} + +// GetBucketPolicy mocks base method. +func (m *MockOssClient) GetBucketPolicy(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketPolicy", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketPolicy indicates an expected call of GetBucketPolicy. +func (mr *MockOssClientMockRecorder) GetBucketPolicy(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketPolicy", reflect.TypeOf((*MockOssClient)(nil).GetBucketPolicy), varargs...) +} + +// GetBucketQosInfo mocks base method. +func (m *MockOssClient) GetBucketQosInfo(arg0 string, arg1 ...oss.Option) (oss.BucketQoSConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketQosInfo", varargs...) + ret0, _ := ret[0].(oss.BucketQoSConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketQosInfo indicates an expected call of GetBucketQosInfo. +func (mr *MockOssClientMockRecorder) GetBucketQosInfo(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketQosInfo", reflect.TypeOf((*MockOssClient)(nil).GetBucketQosInfo), varargs...) +} + +// GetBucketReferer mocks base method. +func (m *MockOssClient) GetBucketReferer(arg0 string, arg1 ...oss.Option) (oss.GetBucketRefererResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketReferer", varargs...) + ret0, _ := ret[0].(oss.GetBucketRefererResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketReferer indicates an expected call of GetBucketReferer. +func (mr *MockOssClientMockRecorder) GetBucketReferer(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketReferer", reflect.TypeOf((*MockOssClient)(nil).GetBucketReferer), varargs...) +} + +// GetBucketReplication mocks base method. +func (m *MockOssClient) GetBucketReplication(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketReplication", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketReplication indicates an expected call of GetBucketReplication. +func (mr *MockOssClientMockRecorder) GetBucketReplication(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketReplication", reflect.TypeOf((*MockOssClient)(nil).GetBucketReplication), varargs...) +} + +// GetBucketReplicationLocation mocks base method. +func (m *MockOssClient) GetBucketReplicationLocation(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketReplicationLocation", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketReplicationLocation indicates an expected call of GetBucketReplicationLocation. +func (mr *MockOssClientMockRecorder) GetBucketReplicationLocation(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketReplicationLocation", reflect.TypeOf((*MockOssClient)(nil).GetBucketReplicationLocation), varargs...) +} + +// GetBucketReplicationProgress mocks base method. +func (m *MockOssClient) GetBucketReplicationProgress(arg0, arg1 string, arg2 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketReplicationProgress", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketReplicationProgress indicates an expected call of GetBucketReplicationProgress. +func (mr *MockOssClientMockRecorder) GetBucketReplicationProgress(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketReplicationProgress", reflect.TypeOf((*MockOssClient)(nil).GetBucketReplicationProgress), varargs...) +} + +// GetBucketRequestPayment mocks base method. +func (m *MockOssClient) GetBucketRequestPayment(arg0 string, arg1 ...oss.Option) (oss.RequestPaymentConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketRequestPayment", varargs...) + ret0, _ := ret[0].(oss.RequestPaymentConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketRequestPayment indicates an expected call of GetBucketRequestPayment. +func (mr *MockOssClientMockRecorder) GetBucketRequestPayment(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketRequestPayment", reflect.TypeOf((*MockOssClient)(nil).GetBucketRequestPayment), varargs...) +} + +// GetBucketStat mocks base method. +func (m *MockOssClient) GetBucketStat(arg0 string, arg1 ...oss.Option) (oss.GetBucketStatResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketStat", varargs...) + ret0, _ := ret[0].(oss.GetBucketStatResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketStat indicates an expected call of GetBucketStat. +func (mr *MockOssClientMockRecorder) GetBucketStat(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketStat", reflect.TypeOf((*MockOssClient)(nil).GetBucketStat), varargs...) +} + +// GetBucketTagging mocks base method. +func (m *MockOssClient) GetBucketTagging(arg0 string, arg1 ...oss.Option) (oss.GetBucketTaggingResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketTagging", varargs...) + ret0, _ := ret[0].(oss.GetBucketTaggingResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketTagging indicates an expected call of GetBucketTagging. +func (mr *MockOssClientMockRecorder) GetBucketTagging(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketTagging", reflect.TypeOf((*MockOssClient)(nil).GetBucketTagging), varargs...) +} + +// GetBucketTransferAcc mocks base method. +func (m *MockOssClient) GetBucketTransferAcc(arg0 string, arg1 ...oss.Option) (oss.TransferAccConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketTransferAcc", varargs...) + ret0, _ := ret[0].(oss.TransferAccConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketTransferAcc indicates an expected call of GetBucketTransferAcc. +func (mr *MockOssClientMockRecorder) GetBucketTransferAcc(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketTransferAcc", reflect.TypeOf((*MockOssClient)(nil).GetBucketTransferAcc), varargs...) +} + +// GetBucketVersioning mocks base method. +func (m *MockOssClient) GetBucketVersioning(arg0 string, arg1 ...oss.Option) (oss.GetBucketVersioningResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketVersioning", varargs...) + ret0, _ := ret[0].(oss.GetBucketVersioningResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketVersioning indicates an expected call of GetBucketVersioning. +func (mr *MockOssClientMockRecorder) GetBucketVersioning(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketVersioning", reflect.TypeOf((*MockOssClient)(nil).GetBucketVersioning), varargs...) +} + +// GetBucketWebsite mocks base method. +func (m *MockOssClient) GetBucketWebsite(arg0 string, arg1 ...oss.Option) (oss.GetBucketWebsiteResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketWebsite", varargs...) + ret0, _ := ret[0].(oss.GetBucketWebsiteResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketWebsite indicates an expected call of GetBucketWebsite. +func (mr *MockOssClientMockRecorder) GetBucketWebsite(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketWebsite", reflect.TypeOf((*MockOssClient)(nil).GetBucketWebsite), varargs...) +} + +// GetBucketWebsiteXml mocks base method. +func (m *MockOssClient) GetBucketWebsiteXml(arg0 string, arg1 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketWebsiteXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketWebsiteXml indicates an expected call of GetBucketWebsiteXml. +func (mr *MockOssClientMockRecorder) GetBucketWebsiteXml(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketWebsiteXml", reflect.TypeOf((*MockOssClient)(nil).GetBucketWebsiteXml), varargs...) +} + +// GetBucketWorm mocks base method. +func (m *MockOssClient) GetBucketWorm(arg0 string, arg1 ...oss.Option) (oss.WormConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBucketWorm", varargs...) + ret0, _ := ret[0].(oss.WormConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBucketWorm indicates an expected call of GetBucketWorm. +func (mr *MockOssClientMockRecorder) GetBucketWorm(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBucketWorm", reflect.TypeOf((*MockOssClient)(nil).GetBucketWorm), varargs...) +} + +// GetMetaQueryStatus mocks base method. +func (m *MockOssClient) GetMetaQueryStatus(arg0 string, arg1 ...oss.Option) (oss.GetMetaQueryStatusResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetMetaQueryStatus", varargs...) + ret0, _ := ret[0].(oss.GetMetaQueryStatusResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMetaQueryStatus indicates an expected call of GetMetaQueryStatus. +func (mr *MockOssClientMockRecorder) GetMetaQueryStatus(arg0 interface{}, arg1 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetaQueryStatus", reflect.TypeOf((*MockOssClient)(nil).GetMetaQueryStatus), varargs...) +} + +// GetUserQoSInfo mocks base method. +func (m *MockOssClient) GetUserQoSInfo(arg0 ...oss.Option) (oss.UserQoSConfiguration, error) { + m.ctrl.T.Helper() + varargs := []interface{}{} + for _, a := range arg0 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetUserQoSInfo", varargs...) + ret0, _ := ret[0].(oss.UserQoSConfiguration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetUserQoSInfo indicates an expected call of GetUserQoSInfo. +func (mr *MockOssClientMockRecorder) GetUserQoSInfo(arg0 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserQoSInfo", reflect.TypeOf((*MockOssClient)(nil).GetUserQoSInfo), arg0...) +} + +// ListBucketInventory mocks base method. +func (m *MockOssClient) ListBucketInventory(arg0, arg1 string, arg2 ...oss.Option) (oss.ListInventoryConfigurationsResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListBucketInventory", varargs...) + ret0, _ := ret[0].(oss.ListInventoryConfigurationsResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListBucketInventory indicates an expected call of ListBucketInventory. +func (mr *MockOssClientMockRecorder) ListBucketInventory(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBucketInventory", reflect.TypeOf((*MockOssClient)(nil).ListBucketInventory), varargs...) +} + +// ListBucketInventoryXml mocks base method. +func (m *MockOssClient) ListBucketInventoryXml(arg0, arg1 string, arg2 ...oss.Option) (string, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListBucketInventoryXml", varargs...) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListBucketInventoryXml indicates an expected call of ListBucketInventoryXml. +func (mr *MockOssClientMockRecorder) ListBucketInventoryXml(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBucketInventoryXml", reflect.TypeOf((*MockOssClient)(nil).ListBucketInventoryXml), varargs...) +} + +// ListBuckets mocks base method. +func (m *MockOssClient) ListBuckets(arg0 ...oss.Option) (oss.ListBucketsResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{} + for _, a := range arg0 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListBuckets", varargs...) + ret0, _ := ret[0].(oss.ListBucketsResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListBuckets indicates an expected call of ListBuckets. +func (mr *MockOssClientMockRecorder) ListBuckets(arg0 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBuckets", reflect.TypeOf((*MockOssClient)(nil).ListBuckets), arg0...) +} + +// ListCloudBoxes mocks base method. +func (m *MockOssClient) ListCloudBoxes(arg0 ...oss.Option) (oss.ListCloudBoxResult, error) { + m.ctrl.T.Helper() + varargs := []interface{}{} + for _, a := range arg0 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListCloudBoxes", varargs...) + ret0, _ := ret[0].(oss.ListCloudBoxResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListCloudBoxes indicates an expected call of ListCloudBoxes. +func (mr *MockOssClientMockRecorder) ListCloudBoxes(arg0 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCloudBoxes", reflect.TypeOf((*MockOssClient)(nil).ListCloudBoxes), arg0...) +} diff --git a/plugins/source/alicloud/client/multiplexers.go b/plugins/source/alicloud/client/multiplexers.go new file mode 100644 index 00000000000000..a6b6782b0de50d --- /dev/null +++ b/plugins/source/alicloud/client/multiplexers.go @@ -0,0 +1,46 @@ +package client + +import ( + "sort" + + "github.com/cloudquery/plugin-sdk/schema" +) + +// Extract region from service list +func getRegion(regionalMap map[string]*Services) string { + if len(regionalMap) == 0 { + return "" + } + regions := make([]string, 0) + for i := range regionalMap { + regions = append(regions, i) + } + sort.Strings(regions) + return regions[0] +} + +func AccountMultiplex(meta schema.ClientMeta) []schema.ClientMeta { + var l = make([]schema.ClientMeta, 0) + client := meta.(*Client) + for accountID := range client.services { + region := getRegion(client.services[accountID]) + // Ensure that the region is always set by a region that has been initialized + if region == "" { + meta.(*Client).Logger().Trace().Str("accountID", accountID).Msg("no valid regions have been specified for this account") + continue + } + l = append(l, client.WithAccountIDAndRegion(accountID, region)) + } + return l +} + +func AccountRegionMultiplex(meta schema.ClientMeta) []schema.ClientMeta { + var l = make([]schema.ClientMeta, 0) + client := meta.(*Client) + for accountID, account := range client.services { + for region := range account { + l = append(l, client.WithAccountIDAndRegion(accountID, region)) + } + } + return l +} diff --git a/plugins/source/alicloud/client/services.go b/plugins/source/alicloud/client/services.go new file mode 100644 index 00000000000000..7d65c1bc40bd81 --- /dev/null +++ b/plugins/source/alicloud/client/services.go @@ -0,0 +1,29 @@ +package client + +import ( + "fmt" + + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client/services" +) + +type Services struct { + OSS services.OssClient + BSS services.BssopenapiClient +} + +func initServices(account AccountSpec, region string) (*Services, error) { + ossCli, err := oss.New(fmt.Sprintf("oss-%s.aliyuncs.com", region), account.AccessKey, account.SecretKey, oss.Timeout(15, 30)) + if err != nil { + return nil, fmt.Errorf("failed to initialize oss client: %w", err) + } + bssCli, err := bssopenapi.NewClientWithAccessKey(region, account.AccessKey, account.SecretKey) + if err != nil { + return nil, fmt.Errorf("failed to initialize bssopenapi client: %w", err) + } + return &Services{ + OSS: ossCli, + BSS: bssCli, + }, nil +} diff --git a/plugins/source/alicloud/client/services/bssopenapi.go b/plugins/source/alicloud/client/services/bssopenapi.go new file mode 100644 index 00000000000000..d99c5286371a09 --- /dev/null +++ b/plugins/source/alicloud/client/services/bssopenapi.go @@ -0,0 +1,183 @@ +// Code generated by codegen; DO NOT EDIT. +package services + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" +) + +//go:generate mockgen -package=mocks -destination=../mocks/bssopenapi.go -source=bssopenapi.go BssopenapiClient +type BssopenapiClient interface { + DescribeInstanceBill(*bssopenapi.DescribeInstanceBillRequest) (*bssopenapi.DescribeInstanceBillResponse, error) + DescribeInstanceBillWithCallback(*bssopenapi.DescribeInstanceBillRequest, func(*bssopenapi.DescribeInstanceBillResponse, error)) <-chan int + DescribeInstanceBillWithChan(*bssopenapi.DescribeInstanceBillRequest) (<-chan *bssopenapi.DescribeInstanceBillResponse, <-chan error) + DescribePricingModule(*bssopenapi.DescribePricingModuleRequest) (*bssopenapi.DescribePricingModuleResponse, error) + DescribePricingModuleWithCallback(*bssopenapi.DescribePricingModuleRequest, func(*bssopenapi.DescribePricingModuleResponse, error)) <-chan int + DescribePricingModuleWithChan(*bssopenapi.DescribePricingModuleRequest) (<-chan *bssopenapi.DescribePricingModuleResponse, <-chan error) + DescribeResourceCoverageDetail(*bssopenapi.DescribeResourceCoverageDetailRequest) (*bssopenapi.DescribeResourceCoverageDetailResponse, error) + DescribeResourceCoverageDetailWithCallback(*bssopenapi.DescribeResourceCoverageDetailRequest, func(*bssopenapi.DescribeResourceCoverageDetailResponse, error)) <-chan int + DescribeResourceCoverageDetailWithChan(*bssopenapi.DescribeResourceCoverageDetailRequest) (<-chan *bssopenapi.DescribeResourceCoverageDetailResponse, <-chan error) + DescribeResourceCoverageTotal(*bssopenapi.DescribeResourceCoverageTotalRequest) (*bssopenapi.DescribeResourceCoverageTotalResponse, error) + DescribeResourceCoverageTotalWithCallback(*bssopenapi.DescribeResourceCoverageTotalRequest, func(*bssopenapi.DescribeResourceCoverageTotalResponse, error)) <-chan int + DescribeResourceCoverageTotalWithChan(*bssopenapi.DescribeResourceCoverageTotalRequest) (<-chan *bssopenapi.DescribeResourceCoverageTotalResponse, <-chan error) + DescribeResourcePackageProduct(*bssopenapi.DescribeResourcePackageProductRequest) (*bssopenapi.DescribeResourcePackageProductResponse, error) + DescribeResourcePackageProductWithCallback(*bssopenapi.DescribeResourcePackageProductRequest, func(*bssopenapi.DescribeResourcePackageProductResponse, error)) <-chan int + DescribeResourcePackageProductWithChan(*bssopenapi.DescribeResourcePackageProductRequest) (<-chan *bssopenapi.DescribeResourcePackageProductResponse, <-chan error) + DescribeResourceUsageDetail(*bssopenapi.DescribeResourceUsageDetailRequest) (*bssopenapi.DescribeResourceUsageDetailResponse, error) + DescribeResourceUsageDetailWithCallback(*bssopenapi.DescribeResourceUsageDetailRequest, func(*bssopenapi.DescribeResourceUsageDetailResponse, error)) <-chan int + DescribeResourceUsageDetailWithChan(*bssopenapi.DescribeResourceUsageDetailRequest) (<-chan *bssopenapi.DescribeResourceUsageDetailResponse, <-chan error) + DescribeResourceUsageTotal(*bssopenapi.DescribeResourceUsageTotalRequest) (*bssopenapi.DescribeResourceUsageTotalResponse, error) + DescribeResourceUsageTotalWithCallback(*bssopenapi.DescribeResourceUsageTotalRequest, func(*bssopenapi.DescribeResourceUsageTotalResponse, error)) <-chan int + DescribeResourceUsageTotalWithChan(*bssopenapi.DescribeResourceUsageTotalRequest) (<-chan *bssopenapi.DescribeResourceUsageTotalResponse, <-chan error) + DescribeSavingsPlansCoverageDetail(*bssopenapi.DescribeSavingsPlansCoverageDetailRequest) (*bssopenapi.DescribeSavingsPlansCoverageDetailResponse, error) + DescribeSavingsPlansCoverageDetailWithCallback(*bssopenapi.DescribeSavingsPlansCoverageDetailRequest, func(*bssopenapi.DescribeSavingsPlansCoverageDetailResponse, error)) <-chan int + DescribeSavingsPlansCoverageDetailWithChan(*bssopenapi.DescribeSavingsPlansCoverageDetailRequest) (<-chan *bssopenapi.DescribeSavingsPlansCoverageDetailResponse, <-chan error) + DescribeSavingsPlansCoverageTotal(*bssopenapi.DescribeSavingsPlansCoverageTotalRequest) (*bssopenapi.DescribeSavingsPlansCoverageTotalResponse, error) + DescribeSavingsPlansCoverageTotalWithCallback(*bssopenapi.DescribeSavingsPlansCoverageTotalRequest, func(*bssopenapi.DescribeSavingsPlansCoverageTotalResponse, error)) <-chan int + DescribeSavingsPlansCoverageTotalWithChan(*bssopenapi.DescribeSavingsPlansCoverageTotalRequest) (<-chan *bssopenapi.DescribeSavingsPlansCoverageTotalResponse, <-chan error) + DescribeSavingsPlansUsageDetail(*bssopenapi.DescribeSavingsPlansUsageDetailRequest) (*bssopenapi.DescribeSavingsPlansUsageDetailResponse, error) + DescribeSavingsPlansUsageDetailWithCallback(*bssopenapi.DescribeSavingsPlansUsageDetailRequest, func(*bssopenapi.DescribeSavingsPlansUsageDetailResponse, error)) <-chan int + DescribeSavingsPlansUsageDetailWithChan(*bssopenapi.DescribeSavingsPlansUsageDetailRequest) (<-chan *bssopenapi.DescribeSavingsPlansUsageDetailResponse, <-chan error) + DescribeSavingsPlansUsageTotal(*bssopenapi.DescribeSavingsPlansUsageTotalRequest) (*bssopenapi.DescribeSavingsPlansUsageTotalResponse, error) + DescribeSavingsPlansUsageTotalWithCallback(*bssopenapi.DescribeSavingsPlansUsageTotalRequest, func(*bssopenapi.DescribeSavingsPlansUsageTotalResponse, error)) <-chan int + DescribeSavingsPlansUsageTotalWithChan(*bssopenapi.DescribeSavingsPlansUsageTotalRequest) (<-chan *bssopenapi.DescribeSavingsPlansUsageTotalResponse, <-chan error) + DescribeSplitItemBill(*bssopenapi.DescribeSplitItemBillRequest) (*bssopenapi.DescribeSplitItemBillResponse, error) + DescribeSplitItemBillWithCallback(*bssopenapi.DescribeSplitItemBillRequest, func(*bssopenapi.DescribeSplitItemBillResponse, error)) <-chan int + DescribeSplitItemBillWithChan(*bssopenapi.DescribeSplitItemBillRequest) (<-chan *bssopenapi.DescribeSplitItemBillResponse, <-chan error) + GetAccountRelation(*bssopenapi.GetAccountRelationRequest) (*bssopenapi.GetAccountRelationResponse, error) + GetAccountRelationWithCallback(*bssopenapi.GetAccountRelationRequest, func(*bssopenapi.GetAccountRelationResponse, error)) <-chan int + GetAccountRelationWithChan(*bssopenapi.GetAccountRelationRequest) (<-chan *bssopenapi.GetAccountRelationResponse, <-chan error) + GetCloseTrace() bool + GetCustomerAccountInfo(*bssopenapi.GetCustomerAccountInfoRequest) (*bssopenapi.GetCustomerAccountInfoResponse, error) + GetCustomerAccountInfoWithCallback(*bssopenapi.GetCustomerAccountInfoRequest, func(*bssopenapi.GetCustomerAccountInfoResponse, error)) <-chan int + GetCustomerAccountInfoWithChan(*bssopenapi.GetCustomerAccountInfoRequest) (<-chan *bssopenapi.GetCustomerAccountInfoResponse, <-chan error) + GetCustomerList(*bssopenapi.GetCustomerListRequest) (*bssopenapi.GetCustomerListResponse, error) + GetCustomerListWithCallback(*bssopenapi.GetCustomerListRequest, func(*bssopenapi.GetCustomerListResponse, error)) <-chan int + GetCustomerListWithChan(*bssopenapi.GetCustomerListRequest) (<-chan *bssopenapi.GetCustomerListResponse, <-chan error) + GetEndpointRules(string, string) (string, error) + GetHTTPSInsecure() bool + GetHttpProxy() string + GetHttpsProxy() string + GetLoggerMsg() string + GetNoProxy() string + GetOrderDetail(*bssopenapi.GetOrderDetailRequest) (*bssopenapi.GetOrderDetailResponse, error) + GetOrderDetailWithCallback(*bssopenapi.GetOrderDetailRequest, func(*bssopenapi.GetOrderDetailResponse, error)) <-chan int + GetOrderDetailWithChan(*bssopenapi.GetOrderDetailRequest) (<-chan *bssopenapi.GetOrderDetailResponse, <-chan error) + GetPayAsYouGoPrice(*bssopenapi.GetPayAsYouGoPriceRequest) (*bssopenapi.GetPayAsYouGoPriceResponse, error) + GetPayAsYouGoPriceWithCallback(*bssopenapi.GetPayAsYouGoPriceRequest, func(*bssopenapi.GetPayAsYouGoPriceResponse, error)) <-chan int + GetPayAsYouGoPriceWithChan(*bssopenapi.GetPayAsYouGoPriceRequest) (<-chan *bssopenapi.GetPayAsYouGoPriceResponse, <-chan error) + GetResourcePackagePrice(*bssopenapi.GetResourcePackagePriceRequest) (*bssopenapi.GetResourcePackagePriceResponse, error) + GetResourcePackagePriceWithCallback(*bssopenapi.GetResourcePackagePriceRequest, func(*bssopenapi.GetResourcePackagePriceResponse, error)) <-chan int + GetResourcePackagePriceWithChan(*bssopenapi.GetResourcePackagePriceRequest) (<-chan *bssopenapi.GetResourcePackagePriceResponse, <-chan error) + GetSubscriptionPrice(*bssopenapi.GetSubscriptionPriceRequest) (*bssopenapi.GetSubscriptionPriceResponse, error) + GetSubscriptionPriceWithCallback(*bssopenapi.GetSubscriptionPriceRequest, func(*bssopenapi.GetSubscriptionPriceResponse, error)) <-chan int + GetSubscriptionPriceWithChan(*bssopenapi.GetSubscriptionPriceRequest) (<-chan *bssopenapi.GetSubscriptionPriceResponse, <-chan error) + GetTemplate() string + QueryAccountBalance(*bssopenapi.QueryAccountBalanceRequest) (*bssopenapi.QueryAccountBalanceResponse, error) + QueryAccountBalanceWithCallback(*bssopenapi.QueryAccountBalanceRequest, func(*bssopenapi.QueryAccountBalanceResponse, error)) <-chan int + QueryAccountBalanceWithChan(*bssopenapi.QueryAccountBalanceRequest) (<-chan *bssopenapi.QueryAccountBalanceResponse, <-chan error) + QueryAccountBill(*bssopenapi.QueryAccountBillRequest) (*bssopenapi.QueryAccountBillResponse, error) + QueryAccountBillWithCallback(*bssopenapi.QueryAccountBillRequest, func(*bssopenapi.QueryAccountBillResponse, error)) <-chan int + QueryAccountBillWithChan(*bssopenapi.QueryAccountBillRequest) (<-chan *bssopenapi.QueryAccountBillResponse, <-chan error) + QueryAccountTransactionDetails(*bssopenapi.QueryAccountTransactionDetailsRequest) (*bssopenapi.QueryAccountTransactionDetailsResponse, error) + QueryAccountTransactionDetailsWithCallback(*bssopenapi.QueryAccountTransactionDetailsRequest, func(*bssopenapi.QueryAccountTransactionDetailsResponse, error)) <-chan int + QueryAccountTransactionDetailsWithChan(*bssopenapi.QueryAccountTransactionDetailsRequest) (<-chan *bssopenapi.QueryAccountTransactionDetailsResponse, <-chan error) + QueryAccountTransactions(*bssopenapi.QueryAccountTransactionsRequest) (*bssopenapi.QueryAccountTransactionsResponse, error) + QueryAccountTransactionsWithCallback(*bssopenapi.QueryAccountTransactionsRequest, func(*bssopenapi.QueryAccountTransactionsResponse, error)) <-chan int + QueryAccountTransactionsWithChan(*bssopenapi.QueryAccountTransactionsRequest) (<-chan *bssopenapi.QueryAccountTransactionsResponse, <-chan error) + QueryAvailableInstances(*bssopenapi.QueryAvailableInstancesRequest) (*bssopenapi.QueryAvailableInstancesResponse, error) + QueryAvailableInstancesWithCallback(*bssopenapi.QueryAvailableInstancesRequest, func(*bssopenapi.QueryAvailableInstancesResponse, error)) <-chan int + QueryAvailableInstancesWithChan(*bssopenapi.QueryAvailableInstancesRequest) (<-chan *bssopenapi.QueryAvailableInstancesResponse, <-chan error) + QueryBill(*bssopenapi.QueryBillRequest) (*bssopenapi.QueryBillResponse, error) + QueryBillOverview(*bssopenapi.QueryBillOverviewRequest) (*bssopenapi.QueryBillOverviewResponse, error) + QueryBillOverviewWithCallback(*bssopenapi.QueryBillOverviewRequest, func(*bssopenapi.QueryBillOverviewResponse, error)) <-chan int + QueryBillOverviewWithChan(*bssopenapi.QueryBillOverviewRequest) (<-chan *bssopenapi.QueryBillOverviewResponse, <-chan error) + QueryBillToOSSSubscription(*bssopenapi.QueryBillToOSSSubscriptionRequest) (*bssopenapi.QueryBillToOSSSubscriptionResponse, error) + QueryBillToOSSSubscriptionWithCallback(*bssopenapi.QueryBillToOSSSubscriptionRequest, func(*bssopenapi.QueryBillToOSSSubscriptionResponse, error)) <-chan int + QueryBillToOSSSubscriptionWithChan(*bssopenapi.QueryBillToOSSSubscriptionRequest) (<-chan *bssopenapi.QueryBillToOSSSubscriptionResponse, <-chan error) + QueryBillWithCallback(*bssopenapi.QueryBillRequest, func(*bssopenapi.QueryBillResponse, error)) <-chan int + QueryBillWithChan(*bssopenapi.QueryBillRequest) (<-chan *bssopenapi.QueryBillResponse, <-chan error) + QueryCashCoupons(*bssopenapi.QueryCashCouponsRequest) (*bssopenapi.QueryCashCouponsResponse, error) + QueryCashCouponsWithCallback(*bssopenapi.QueryCashCouponsRequest, func(*bssopenapi.QueryCashCouponsResponse, error)) <-chan int + QueryCashCouponsWithChan(*bssopenapi.QueryCashCouponsRequest) (<-chan *bssopenapi.QueryCashCouponsResponse, <-chan error) + QueryCostUnit(*bssopenapi.QueryCostUnitRequest) (*bssopenapi.QueryCostUnitResponse, error) + QueryCostUnitResource(*bssopenapi.QueryCostUnitResourceRequest) (*bssopenapi.QueryCostUnitResourceResponse, error) + QueryCostUnitResourceWithCallback(*bssopenapi.QueryCostUnitResourceRequest, func(*bssopenapi.QueryCostUnitResourceResponse, error)) <-chan int + QueryCostUnitResourceWithChan(*bssopenapi.QueryCostUnitResourceRequest) (<-chan *bssopenapi.QueryCostUnitResourceResponse, <-chan error) + QueryCostUnitWithCallback(*bssopenapi.QueryCostUnitRequest, func(*bssopenapi.QueryCostUnitResponse, error)) <-chan int + QueryCostUnitWithChan(*bssopenapi.QueryCostUnitRequest) (<-chan *bssopenapi.QueryCostUnitResponse, <-chan error) + QueryCustomerAddressList(*bssopenapi.QueryCustomerAddressListRequest) (*bssopenapi.QueryCustomerAddressListResponse, error) + QueryCustomerAddressListWithCallback(*bssopenapi.QueryCustomerAddressListRequest, func(*bssopenapi.QueryCustomerAddressListResponse, error)) <-chan int + QueryCustomerAddressListWithChan(*bssopenapi.QueryCustomerAddressListRequest) (<-chan *bssopenapi.QueryCustomerAddressListResponse, <-chan error) + QueryDPUtilizationDetail(*bssopenapi.QueryDPUtilizationDetailRequest) (*bssopenapi.QueryDPUtilizationDetailResponse, error) + QueryDPUtilizationDetailWithCallback(*bssopenapi.QueryDPUtilizationDetailRequest, func(*bssopenapi.QueryDPUtilizationDetailResponse, error)) <-chan int + QueryDPUtilizationDetailWithChan(*bssopenapi.QueryDPUtilizationDetailRequest) (<-chan *bssopenapi.QueryDPUtilizationDetailResponse, <-chan error) + QueryEvaluateList(*bssopenapi.QueryEvaluateListRequest) (*bssopenapi.QueryEvaluateListResponse, error) + QueryEvaluateListWithCallback(*bssopenapi.QueryEvaluateListRequest, func(*bssopenapi.QueryEvaluateListResponse, error)) <-chan int + QueryEvaluateListWithChan(*bssopenapi.QueryEvaluateListRequest) (<-chan *bssopenapi.QueryEvaluateListResponse, <-chan error) + QueryFinancialAccountInfo(*bssopenapi.QueryFinancialAccountInfoRequest) (*bssopenapi.QueryFinancialAccountInfoResponse, error) + QueryFinancialAccountInfoWithCallback(*bssopenapi.QueryFinancialAccountInfoRequest, func(*bssopenapi.QueryFinancialAccountInfoResponse, error)) <-chan int + QueryFinancialAccountInfoWithChan(*bssopenapi.QueryFinancialAccountInfoRequest) (<-chan *bssopenapi.QueryFinancialAccountInfoResponse, <-chan error) + QueryInstanceBill(*bssopenapi.QueryInstanceBillRequest) (*bssopenapi.QueryInstanceBillResponse, error) + QueryInstanceBillWithCallback(*bssopenapi.QueryInstanceBillRequest, func(*bssopenapi.QueryInstanceBillResponse, error)) <-chan int + QueryInstanceBillWithChan(*bssopenapi.QueryInstanceBillRequest) (<-chan *bssopenapi.QueryInstanceBillResponse, <-chan error) + QueryInstanceByTag(*bssopenapi.QueryInstanceByTagRequest) (*bssopenapi.QueryInstanceByTagResponse, error) + QueryInstanceByTagWithCallback(*bssopenapi.QueryInstanceByTagRequest, func(*bssopenapi.QueryInstanceByTagResponse, error)) <-chan int + QueryInstanceByTagWithChan(*bssopenapi.QueryInstanceByTagRequest) (<-chan *bssopenapi.QueryInstanceByTagResponse, <-chan error) + QueryInstanceGaapCost(*bssopenapi.QueryInstanceGaapCostRequest) (*bssopenapi.QueryInstanceGaapCostResponse, error) + QueryInstanceGaapCostWithCallback(*bssopenapi.QueryInstanceGaapCostRequest, func(*bssopenapi.QueryInstanceGaapCostResponse, error)) <-chan int + QueryInstanceGaapCostWithChan(*bssopenapi.QueryInstanceGaapCostRequest) (<-chan *bssopenapi.QueryInstanceGaapCostResponse, <-chan error) + QueryInvoicingCustomerList(*bssopenapi.QueryInvoicingCustomerListRequest) (*bssopenapi.QueryInvoicingCustomerListResponse, error) + QueryInvoicingCustomerListWithCallback(*bssopenapi.QueryInvoicingCustomerListRequest, func(*bssopenapi.QueryInvoicingCustomerListResponse, error)) <-chan int + QueryInvoicingCustomerListWithChan(*bssopenapi.QueryInvoicingCustomerListRequest) (<-chan *bssopenapi.QueryInvoicingCustomerListResponse, <-chan error) + QueryMonthlyBill(*bssopenapi.QueryMonthlyBillRequest) (*bssopenapi.QueryMonthlyBillResponse, error) + QueryMonthlyBillWithCallback(*bssopenapi.QueryMonthlyBillRequest, func(*bssopenapi.QueryMonthlyBillResponse, error)) <-chan int + QueryMonthlyBillWithChan(*bssopenapi.QueryMonthlyBillRequest) (<-chan *bssopenapi.QueryMonthlyBillResponse, <-chan error) + QueryMonthlyInstanceConsumption(*bssopenapi.QueryMonthlyInstanceConsumptionRequest) (*bssopenapi.QueryMonthlyInstanceConsumptionResponse, error) + QueryMonthlyInstanceConsumptionWithCallback(*bssopenapi.QueryMonthlyInstanceConsumptionRequest, func(*bssopenapi.QueryMonthlyInstanceConsumptionResponse, error)) <-chan int + QueryMonthlyInstanceConsumptionWithChan(*bssopenapi.QueryMonthlyInstanceConsumptionRequest) (<-chan *bssopenapi.QueryMonthlyInstanceConsumptionResponse, <-chan error) + QueryOrders(*bssopenapi.QueryOrdersRequest) (*bssopenapi.QueryOrdersResponse, error) + QueryOrdersWithCallback(*bssopenapi.QueryOrdersRequest, func(*bssopenapi.QueryOrdersResponse, error)) <-chan int + QueryOrdersWithChan(*bssopenapi.QueryOrdersRequest) (<-chan *bssopenapi.QueryOrdersResponse, <-chan error) + QueryPermissionList(*bssopenapi.QueryPermissionListRequest) (*bssopenapi.QueryPermissionListResponse, error) + QueryPermissionListWithCallback(*bssopenapi.QueryPermissionListRequest, func(*bssopenapi.QueryPermissionListResponse, error)) <-chan int + QueryPermissionListWithChan(*bssopenapi.QueryPermissionListRequest) (<-chan *bssopenapi.QueryPermissionListResponse, <-chan error) + QueryPrepaidCards(*bssopenapi.QueryPrepaidCardsRequest) (*bssopenapi.QueryPrepaidCardsResponse, error) + QueryPrepaidCardsWithCallback(*bssopenapi.QueryPrepaidCardsRequest, func(*bssopenapi.QueryPrepaidCardsResponse, error)) <-chan int + QueryPrepaidCardsWithChan(*bssopenapi.QueryPrepaidCardsRequest) (<-chan *bssopenapi.QueryPrepaidCardsResponse, <-chan error) + QueryProductList(*bssopenapi.QueryProductListRequest) (*bssopenapi.QueryProductListResponse, error) + QueryProductListWithCallback(*bssopenapi.QueryProductListRequest, func(*bssopenapi.QueryProductListResponse, error)) <-chan int + QueryProductListWithChan(*bssopenapi.QueryProductListRequest) (<-chan *bssopenapi.QueryProductListResponse, <-chan error) + QueryRIUtilizationDetail(*bssopenapi.QueryRIUtilizationDetailRequest) (*bssopenapi.QueryRIUtilizationDetailResponse, error) + QueryRIUtilizationDetailWithCallback(*bssopenapi.QueryRIUtilizationDetailRequest, func(*bssopenapi.QueryRIUtilizationDetailResponse, error)) <-chan int + QueryRIUtilizationDetailWithChan(*bssopenapi.QueryRIUtilizationDetailRequest) (<-chan *bssopenapi.QueryRIUtilizationDetailResponse, <-chan error) + QueryRedeem(*bssopenapi.QueryRedeemRequest) (*bssopenapi.QueryRedeemResponse, error) + QueryRedeemWithCallback(*bssopenapi.QueryRedeemRequest, func(*bssopenapi.QueryRedeemResponse, error)) <-chan int + QueryRedeemWithChan(*bssopenapi.QueryRedeemRequest) (<-chan *bssopenapi.QueryRedeemResponse, <-chan error) + QueryRelationList(*bssopenapi.QueryRelationListRequest) (*bssopenapi.QueryRelationListResponse, error) + QueryRelationListWithCallback(*bssopenapi.QueryRelationListRequest, func(*bssopenapi.QueryRelationListResponse, error)) <-chan int + QueryRelationListWithChan(*bssopenapi.QueryRelationListRequest) (<-chan *bssopenapi.QueryRelationListResponse, <-chan error) + QueryResellerAvailableQuota(*bssopenapi.QueryResellerAvailableQuotaRequest) (*bssopenapi.QueryResellerAvailableQuotaResponse, error) + QueryResellerAvailableQuotaWithCallback(*bssopenapi.QueryResellerAvailableQuotaRequest, func(*bssopenapi.QueryResellerAvailableQuotaResponse, error)) <-chan int + QueryResellerAvailableQuotaWithChan(*bssopenapi.QueryResellerAvailableQuotaRequest) (<-chan *bssopenapi.QueryResellerAvailableQuotaResponse, <-chan error) + QueryResourcePackageInstances(*bssopenapi.QueryResourcePackageInstancesRequest) (*bssopenapi.QueryResourcePackageInstancesResponse, error) + QueryResourcePackageInstancesWithCallback(*bssopenapi.QueryResourcePackageInstancesRequest, func(*bssopenapi.QueryResourcePackageInstancesResponse, error)) <-chan int + QueryResourcePackageInstancesWithChan(*bssopenapi.QueryResourcePackageInstancesRequest) (<-chan *bssopenapi.QueryResourcePackageInstancesResponse, <-chan error) + QuerySavingsPlansDeductLog(*bssopenapi.QuerySavingsPlansDeductLogRequest) (*bssopenapi.QuerySavingsPlansDeductLogResponse, error) + QuerySavingsPlansDeductLogWithCallback(*bssopenapi.QuerySavingsPlansDeductLogRequest, func(*bssopenapi.QuerySavingsPlansDeductLogResponse, error)) <-chan int + QuerySavingsPlansDeductLogWithChan(*bssopenapi.QuerySavingsPlansDeductLogRequest) (<-chan *bssopenapi.QuerySavingsPlansDeductLogResponse, <-chan error) + QuerySavingsPlansInstance(*bssopenapi.QuerySavingsPlansInstanceRequest) (*bssopenapi.QuerySavingsPlansInstanceResponse, error) + QuerySavingsPlansInstanceWithCallback(*bssopenapi.QuerySavingsPlansInstanceRequest, func(*bssopenapi.QuerySavingsPlansInstanceResponse, error)) <-chan int + QuerySavingsPlansInstanceWithChan(*bssopenapi.QuerySavingsPlansInstanceRequest) (<-chan *bssopenapi.QuerySavingsPlansInstanceResponse, <-chan error) + QuerySettleBill(*bssopenapi.QuerySettleBillRequest) (*bssopenapi.QuerySettleBillResponse, error) + QuerySettleBillWithCallback(*bssopenapi.QuerySettleBillRequest, func(*bssopenapi.QuerySettleBillResponse, error)) <-chan int + QuerySettleBillWithChan(*bssopenapi.QuerySettleBillRequest) (<-chan *bssopenapi.QuerySettleBillResponse, <-chan error) + QuerySettlementBill(*bssopenapi.QuerySettlementBillRequest) (*bssopenapi.QuerySettlementBillResponse, error) + QuerySettlementBillWithCallback(*bssopenapi.QuerySettlementBillRequest, func(*bssopenapi.QuerySettlementBillResponse, error)) <-chan int + QuerySettlementBillWithChan(*bssopenapi.QuerySettlementBillRequest) (<-chan *bssopenapi.QuerySettlementBillResponse, <-chan error) + QuerySplitItemBill(*bssopenapi.QuerySplitItemBillRequest) (*bssopenapi.QuerySplitItemBillResponse, error) + QuerySplitItemBillWithCallback(*bssopenapi.QuerySplitItemBillRequest, func(*bssopenapi.QuerySplitItemBillResponse, error)) <-chan int + QuerySplitItemBillWithChan(*bssopenapi.QuerySplitItemBillRequest) (<-chan *bssopenapi.QuerySplitItemBillResponse, <-chan error) + QueryUserOmsData(*bssopenapi.QueryUserOmsDataRequest) (*bssopenapi.QueryUserOmsDataResponse, error) + QueryUserOmsDataWithCallback(*bssopenapi.QueryUserOmsDataRequest, func(*bssopenapi.QueryUserOmsDataResponse, error)) <-chan int + QueryUserOmsDataWithChan(*bssopenapi.QueryUserOmsDataRequest) (<-chan *bssopenapi.QueryUserOmsDataResponse, <-chan error) +} diff --git a/plugins/source/alicloud/client/services/oss.go b/plugins/source/alicloud/client/services/oss.go new file mode 100644 index 00000000000000..7879821032684b --- /dev/null +++ b/plugins/source/alicloud/client/services/oss.go @@ -0,0 +1,46 @@ +// Code generated by codegen; DO NOT EDIT. +package services + +import ( + "github.com/aliyun/aliyun-oss-go-sdk/oss" +) + +//go:generate mockgen -package=mocks -destination=../mocks/oss.go -source=oss.go OssClient +type OssClient interface { + GetBucketACL(string, ...oss.Option) (oss.GetBucketACLResult, error) + GetBucketAccessMonitor(string, ...oss.Option) (oss.GetBucketAccessMonitorResult, error) + GetBucketAccessMonitorXml(string, ...oss.Option) (string, error) + GetBucketAsyncTask(string, string, ...oss.Option) (oss.AsynFetchTaskInfo, error) + GetBucketCORS(string, ...oss.Option) (oss.GetBucketCORSResult, error) + GetBucketCORSXml(string, ...oss.Option) (string, error) + GetBucketCname(string, ...oss.Option) (string, error) + GetBucketCnameToken(string, string, ...oss.Option) (oss.GetBucketCnameTokenResult, error) + GetBucketEncryption(string, ...oss.Option) (oss.GetBucketEncryptionResult, error) + GetBucketInfo(string, ...oss.Option) (oss.GetBucketInfoResult, error) + GetBucketInventory(string, string, ...oss.Option) (oss.InventoryConfiguration, error) + GetBucketInventoryXml(string, string, ...oss.Option) (string, error) + GetBucketLifecycle(string, ...oss.Option) (oss.GetBucketLifecycleResult, error) + GetBucketLifecycleXml(string, ...oss.Option) (string, error) + GetBucketLocation(string, ...oss.Option) (string, error) + GetBucketLogging(string, ...oss.Option) (oss.GetBucketLoggingResult, error) + GetBucketPolicy(string, ...oss.Option) (string, error) + GetBucketQosInfo(string, ...oss.Option) (oss.BucketQoSConfiguration, error) + GetBucketReferer(string, ...oss.Option) (oss.GetBucketRefererResult, error) + GetBucketReplication(string, ...oss.Option) (string, error) + GetBucketReplicationLocation(string, ...oss.Option) (string, error) + GetBucketReplicationProgress(string, string, ...oss.Option) (string, error) + GetBucketRequestPayment(string, ...oss.Option) (oss.RequestPaymentConfiguration, error) + GetBucketStat(string, ...oss.Option) (oss.GetBucketStatResult, error) + GetBucketTagging(string, ...oss.Option) (oss.GetBucketTaggingResult, error) + GetBucketTransferAcc(string, ...oss.Option) (oss.TransferAccConfiguration, error) + GetBucketVersioning(string, ...oss.Option) (oss.GetBucketVersioningResult, error) + GetBucketWebsite(string, ...oss.Option) (oss.GetBucketWebsiteResult, error) + GetBucketWebsiteXml(string, ...oss.Option) (string, error) + GetBucketWorm(string, ...oss.Option) (oss.WormConfiguration, error) + GetMetaQueryStatus(string, ...oss.Option) (oss.GetMetaQueryStatusResult, error) + GetUserQoSInfo(...oss.Option) (oss.UserQoSConfiguration, error) + ListBucketInventory(string, string, ...oss.Option) (oss.ListInventoryConfigurationsResult, error) + ListBucketInventoryXml(string, string, ...oss.Option) (string, error) + ListBuckets(...oss.Option) (oss.ListBucketsResult, error) + ListCloudBoxes(...oss.Option) (oss.ListCloudBoxResult, error) +} diff --git a/plugins/source/alicloud/client/spec.go b/plugins/source/alicloud/client/spec.go new file mode 100644 index 00000000000000..738d9238c508c9 --- /dev/null +++ b/plugins/source/alicloud/client/spec.go @@ -0,0 +1,47 @@ +package client + +import "fmt" + +type Spec struct { + Accounts []AccountSpec `json:"accounts,omitempty"` + BillHistoryMonths int `json:"bill_history_months,omitempty"` +} + +type AccountSpec struct { + Name string `json:"name,omitempty"` + Regions []string `json:"regions,omitempty"` + AccessKey string `json:"access_key,omitempty"` + SecretKey string `json:"secret_key,omitempty"` +} + +func (s *Spec) SetDefaults() { + if s.BillHistoryMonths == 0 { + s.BillHistoryMonths = 12 + } +} + +func (s *Spec) Validate() error { + if len(s.Accounts) == 0 { + return fmt.Errorf("missing alicloud accounts in configuration") + } + accountNames := map[string]struct{}{} + for _, account := range s.Accounts { + if account.Name == "" { + return fmt.Errorf("missing alicloud account name in configuration") + } + if _, found := accountNames[account.Name]; found { + return fmt.Errorf("duplicate alicloud account name %s in configuration", account.Name) + } + accountNames[account.Name] = struct{}{} + if account.AccessKey == "" { + return fmt.Errorf("missing access_key in account configuration for account %s", account.Name) + } + if account.SecretKey == "" { + return fmt.Errorf("missing secret_key in account configuration for account %s", account.Name) + } + if len(account.Regions) == 0 { + return fmt.Errorf("missing regions in account configuration for account %s", account.Name) + } + } + return nil +} diff --git a/plugins/source/alicloud/client/testing.go b/plugins/source/alicloud/client/testing.go new file mode 100644 index 00000000000000..25ba3d150e8493 --- /dev/null +++ b/plugins/source/alicloud/client/testing.go @@ -0,0 +1,63 @@ +package client + +import ( + "context" + "fmt" + "os" + "testing" + "time" + + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/golang/mock/gomock" + "github.com/rs/zerolog" +) + +type TestOptions struct{} + +func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, *gomock.Controller) Services, _ TestOptions) { + version := "vDev" + + table.IgnoreInTests = false + t.Helper() + ctrl := gomock.NewController(t) + l := zerolog.New(zerolog.NewTestWriter(t)).Output( + zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, + ).Level(zerolog.DebugLevel).With().Timestamp().Logger() + + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { + var aliSpec Spec + if err := spec.UnmarshalSpec(&aliSpec); err != nil { + return nil, fmt.Errorf("failed to unmarshal alicloud spec: %w", err) + } + + c, err := New(ctx, l, spec, source.Options{}) + if err != nil { + return nil, err + } + c.(*Client).updateServices(builder(t, ctrl)) + return c, nil + } + + p := source.NewPlugin( + table.Name, + version, + []*schema.Table{ + table, + }, + newTestExecutionClient) + p.SetLogger(l) + source.TestPluginSync(t, p, specs.Source{ + Name: "dev", + Path: "cloudquery/dev", + Version: version, + Tables: []string{table.Name}, + Destinations: []string{"mock-destination"}, + Spec: Spec{ + Accounts: []AccountSpec{ + {Name: "test-account", Regions: []string{"test-region"}, AccessKey: "test-access-key", SecretKey: "test-secret-key"}, + }, + }, + }) +} diff --git a/plugins/source/alicloud/codegen/main.go b/plugins/source/alicloud/codegen/main.go new file mode 100644 index 00000000000000..fb04e0c212ec06 --- /dev/null +++ b/plugins/source/alicloud/codegen/main.go @@ -0,0 +1,54 @@ +package main + +import ( + "path" + "reflect" + "runtime" + + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/codegen/interfaces" + "github.com/thoas/go-funk" +) + +var clients = []any{ + &oss.Client{}, + &bssopenapi.Client{}, +} + +// Generate the service interfaces under in client/services for use with mockgen. +func main() { + _, filename, _, ok := runtime.Caller(0) + if !ok { + panic("failed to get caller information") + } + err := interfaces.Generate( + clients, + path.Join(path.Dir(filename), "../client/services"), + interfaces.WithIncludeFunc(include), + interfaces.WithExtraImports(extraImports), + ) + if err != nil { + panic(err) + } +} + +func include(m reflect.Method) bool { + // these functions require extra imports, so skipping them until they are needed + exclude := []string{ + "GetConfig", + "GetConnectTimeout", + "GetLogger", + "GetReadTimeout", + "GetSigner", + "GetTracerRootSpan", + } + if funk.ContainsString(exclude, m.Name) { + return false + } + return interfaces.MethodHasAnyPrefix(m, []string{"List", "Get", "Describe", "Query"}) +} + +func extraImports(_ reflect.Method) []string { + return []string{} +} diff --git a/plugins/source/alicloud/docs/tables/README.md b/plugins/source/alicloud/docs/tables/README.md new file mode 100644 index 00000000000000..bf251df109a082 --- /dev/null +++ b/plugins/source/alicloud/docs/tables/README.md @@ -0,0 +1,8 @@ +# Source Plugin: alicloud + +## Tables + +- [alicloud_bss_bill](alicloud_bss_bill.md) +- [alicloud_bss_bill_overview](alicloud_bss_bill_overview.md) +- [alicloud_oss_buckets](alicloud_oss_buckets.md) + - [alicloud_oss_bucket_stats](alicloud_oss_bucket_stats.md) \ No newline at end of file diff --git a/plugins/source/alicloud/docs/tables/alicloud_bss_bill.md b/plugins/source/alicloud/docs/tables/alicloud_bss_bill.md new file mode 100644 index 00000000000000..d396385d447a8e --- /dev/null +++ b/plugins/source/alicloud/docs/tables/alicloud_bss_bill.md @@ -0,0 +1,44 @@ +# Table: alicloud_bss_bill + +https://help.aliyun.com/document_detail/100400.html + +The composite primary key for this table is (**billing_cycle**, **account_id**, **subscription_type**, **commodity_code**, **product_code**, **product_type**, **pip_code**, **record_id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|billing_cycle (PK)|String| +|account_id (PK)|String| +|account_name|String| +|product_name|String| +|sub_order_id|String| +|deducted_by_cash_coupons|Float| +|payment_time|String| +|payment_amount|Float| +|deducted_by_prepaid_card|Float| +|invoice_discount|Float| +|usage_end_time|String| +|item|String| +|subscription_type (PK)|String| +|pretax_gross_amount|Float| +|currency|String| +|commodity_code (PK)|String| +|usage_start_time|String| +|adjust_amount|Float| +|status|String| +|deducted_by_coupons|Float| +|round_down_discount|String| +|product_detail|String| +|product_code (PK)|String| +|product_type (PK)|String| +|outstanding_amount|Float| +|pip_code (PK)|String| +|pretax_amount|Float| +|owner_id|String| +|record_id (PK)|String| +|cash_amount|Float| \ No newline at end of file diff --git a/plugins/source/alicloud/docs/tables/alicloud_bss_bill_overview.md b/plugins/source/alicloud/docs/tables/alicloud_bss_bill_overview.md new file mode 100644 index 00000000000000..859812629587da --- /dev/null +++ b/plugins/source/alicloud/docs/tables/alicloud_bss_bill_overview.md @@ -0,0 +1,41 @@ +# Table: alicloud_bss_bill_overview + +https://help.aliyun.com/document_detail/100400.html + +The composite primary key for this table is (**billing_cycle**, **account_id**, **product_code**, **bill_account_id**, **product_type**, **pip_code**, **subscription_type**, **commodity_code**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|billing_cycle (PK)|String| +|account_id (PK)|String| +|account_name|String| +|deducted_by_coupons|Float| +|round_down_discount|String| +|product_name|String| +|product_detail|String| +|product_code (PK)|String| +|bill_account_id (PK)|String| +|product_type (PK)|String| +|deducted_by_cash_coupons|Float| +|outstanding_amount|Float| +|biz_type|String| +|payment_amount|Float| +|pip_code (PK)|String| +|deducted_by_prepaid_card|Float| +|invoice_discount|Float| +|item|String| +|subscription_type (PK)|String| +|pretax_gross_amount|Float| +|pretax_amount|Float| +|owner_id|String| +|currency|String| +|commodity_code (PK)|String| +|bill_account_name|String| +|adjust_amount|Float| +|cash_amount|Float| \ No newline at end of file diff --git a/plugins/source/alicloud/docs/tables/alicloud_oss_bucket_stats.md b/plugins/source/alicloud/docs/tables/alicloud_oss_bucket_stats.md new file mode 100644 index 00000000000000..55545ecf2d1e45 --- /dev/null +++ b/plugins/source/alicloud/docs/tables/alicloud_oss_bucket_stats.md @@ -0,0 +1,33 @@ +# Table: alicloud_oss_bucket_stats + +The primary key for this table is **_cq_id**. + +## Relations + +This table depends on [alicloud_oss_buckets](alicloud_oss_buckets.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id (PK)|UUID| +|_cq_parent_id|UUID| +|xml_name|JSON| +|storage|Int| +|object_count|Int| +|multipart_upload_count|Int| +|live_channel_count|Int| +|last_modified_time|Int| +|standard_storage|Int| +|standard_object_count|Int| +|infrequent_access_storage|Int| +|infrequent_access_real_storage|Int| +|infrequent_access_object_count|Int| +|archive_storage|Int| +|archive_real_storage|Int| +|archive_object_count|Int| +|cold_archive_storage|Int| +|cold_archive_real_storage|Int| +|cold_archive_object_count|Int| \ No newline at end of file diff --git a/plugins/source/alicloud/docs/tables/alicloud_oss_buckets.md b/plugins/source/alicloud/docs/tables/alicloud_oss_buckets.md new file mode 100644 index 00000000000000..38adcf8c95c94b --- /dev/null +++ b/plugins/source/alicloud/docs/tables/alicloud_oss_buckets.md @@ -0,0 +1,22 @@ +# Table: alicloud_oss_buckets + +The primary key for this table is **name**. + +## Relations + +The following tables depend on alicloud_oss_buckets: + - [alicloud_oss_bucket_stats](alicloud_oss_bucket_stats.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|xml_name|JSON| +|name (PK)|String| +|location|String| +|creation_date|Timestamp| +|storage_class|String| \ No newline at end of file diff --git a/plugins/source/alicloud/go.mod b/plugins/source/alicloud/go.mod new file mode 100644 index 00000000000000..756650a5ef2033 --- /dev/null +++ b/plugins/source/alicloud/go.mod @@ -0,0 +1,47 @@ +module github.com/cloudquery/cloudquery/plugins/source/alicloud + +go 1.19 + +require ( + github.com/aliyun/alibaba-cloud-sdk-go v1.62.80 + github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible + github.com/cloudquery/codegen v0.2.1 + github.com/cloudquery/plugin-sdk v1.27.0 + github.com/golang/mock v1.4.4 + github.com/pkg/errors v0.9.1 + github.com/rs/zerolog v1.28.0 + github.com/thoas/go-funk v0.9.3 +) + +require ( + github.com/getsentry/sentry-go v0.16.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) + +replace github.com/cloudquery/plugin-sdk v1.25.1 => ../../../../plugin-sdk diff --git a/plugins/source/alicloud/go.sum b/plugins/source/alicloud/go.sum new file mode 100644 index 00000000000000..bc9dffc6f642a9 --- /dev/null +++ b/plugins/source/alicloud/go.sum @@ -0,0 +1,505 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.80 h1:gChEHVx5SZUXAMZq3gZTCIcm0E7/c1ejcbscJL4lubE= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.80/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= +github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8= +github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudquery/codegen v0.2.1 h1:AWpGNKIFUyzI7vulYADXi/3SoksUaNXgTgIMuSrTHZk= +github.com/cloudquery/codegen v0.2.1/go.mod h1:oJxzUuOC79fP36vBPU1BJ7n+jgQemS33y/mbgNq6vfM= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/getsentry/sentry-go v0.16.0 h1:owk+S+5XcgJLlGR/3+3s6N4d+uKwqYvh/eS0AIMjPWo= +github.com/getsentry/sentry-go v0.16.0/go.mod h1:ZXCloQLj0pG7mja5NK6NPf2V4A88YJ4pNlc2mOHwh6Y= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 h1:hRcWZ7716+E1tkMSZJ/QeeC2dPGGB1R/4z4m9RsL8Qg= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3/go.mod h1:54asssGY3Bohr5FRbew+bjfuQTT2WS9V7hW7gPqmcKM= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= +github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/schollz/progressbar/v3 v3.12.2 h1:yLqqqpQNMxGxHY8uEshRihaHWwa0rf0yb7/Zrpgq2C0= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= +github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/plugins/source/alicloud/main.go b/plugins/source/alicloud/main.go new file mode 100644 index 00000000000000..04295c222e5468 --- /dev/null +++ b/plugins/source/alicloud/main.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/cloudquery/cloudquery/plugins/source/alicloud/resources/plugin" + "github.com/cloudquery/plugin-sdk/serve" +) + +func main() { + serve.Source(plugin.Plugin()) +} diff --git a/plugins/source/alicloud/resources/plugin/plugin.go b/plugins/source/alicloud/resources/plugin/plugin.go new file mode 100644 index 00000000000000..9ee96ff3da4865 --- /dev/null +++ b/plugins/source/alicloud/resources/plugin/plugin.go @@ -0,0 +1,27 @@ +package plugin + +import ( + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/resources/services/bss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/resources/services/oss" + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" +) + +var ( + Version = "development" +) + +func Plugin() *source.Plugin { + return source.NewPlugin( + "alicloud", + Version, + // Note: this list should only include top-level tables + []*schema.Table{ + bss.BillOverview(), + bss.Bill(), + oss.Buckets(), + }, + client.New, + ) +} diff --git a/plugins/source/alicloud/resources/services/bss/bill.go b/plugins/source/alicloud/resources/services/bss/bill.go new file mode 100644 index 00000000000000..a367603b31adc6 --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill.go @@ -0,0 +1,56 @@ +package bss + +import ( + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func Bill() *schema.Table { + return &schema.Table{ + Name: "alicloud_bss_bill", + Resolver: fetchBssBill, + Multiplex: client.AccountMultiplex, + Description: "https://help.aliyun.com/document_detail/100400.html", + Transform: transformers.TransformWithStruct( + &BillModel{}, + transformers.WithPrimaryKeys( + "BillingCycle", "AccountID", "ProductCode", + "ProductType", "PipCode", "RecordID", "SubscriptionType", "CommodityCode", + ), + ), + } +} + +type BillModel struct { + BillingCycle string `json:"BillingCycle"` + AccountID string `json:"AccountID"` + AccountName string `json:"AccountName"` + ProductName string `json:"ProductName"` + SubOrderId string `json:"SubOrderId"` + DeductedByCashCoupons float64 `json:"DeductedByCashCoupons"` + PaymentTime string `json:"PaymentTime"` + PaymentAmount float64 `json:"PaymentAmount"` + DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard"` + InvoiceDiscount float64 `json:"InvoiceDiscount"` + UsageEndTime string `json:"UsageEndTime"` + Item string `json:"Item"` + SubscriptionType string `json:"SubscriptionType"` + PretaxGrossAmount float64 `json:"PretaxGrossAmount"` + Currency string `json:"Currency"` + CommodityCode string `json:"CommodityCode"` + UsageStartTime string `json:"UsageStartTime"` + AdjustAmount float64 `json:"AdjustAmount"` + Status string `json:"Status"` + DeductedByCoupons float64 `json:"DeductedByCoupons"` + RoundDownDiscount string `json:"RoundDownDiscount"` + ProductDetail string `json:"ProductDetail"` + ProductCode string `json:"ProductCode"` + ProductType string `json:"ProductType"` + OutstandingAmount float64 `json:"OutstandingAmount"` + PipCode string `json:"PipCode"` + PretaxAmount float64 `json:"PretaxAmount"` + OwnerID string `json:"OwnerID"` + RecordID string `json:"RecordID"` + CashAmount float64 `json:"CashAmount"` +} diff --git a/plugins/source/alicloud/resources/services/bss/bill_fetch.go b/plugins/source/alicloud/resources/services/bss/bill_fetch.go new file mode 100644 index 00000000000000..dc792ca9931f04 --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill_fetch.go @@ -0,0 +1,106 @@ +package bss + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +var ( + maxLimit = 100 +) + +/* +* https://help.aliyun.com/document_detail/100392.html + */ +func fetchBssBill(_ context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + billingCycles := getBillingCycles() + if c.Spec.BillHistoryMonths > 0 { + billingCycles = append(getHistoryBillingCycles(c.Spec.BillHistoryMonths), billingCycles...) + } + for _, billingCycle := range billingCycles { + request := bssopenapi.CreateQueryBillRequest() + request.BillingCycle = billingCycle + pageNum := 1 + total := 0 + request.PageNum = requests.NewInteger(pageNum) + request.PageSize = requests.NewInteger(maxLimit) + for { + response, err := c.Services().BSS.QueryBill(request) + if err != nil { + return err + } + if !response.Success { + code := response.GetHttpStatus() + return fmt.Errorf("got response status code %d (%v)", code, http.StatusText(code)) + } + for _, item := range response.Data.Items.Item { + res <- &BillModel{ + BillingCycle: response.Data.BillingCycle, + AccountID: response.Data.AccountID, + AccountName: response.Data.AccountName, + ProductName: item.ProductName, + SubOrderId: item.SubOrderId, + DeductedByCashCoupons: item.DeductedByCashCoupons, + PaymentTime: item.PaymentTime, + PaymentAmount: item.PaymentAmount, + DeductedByPrepaidCard: item.DeductedByPrepaidCard, + InvoiceDiscount: item.InvoiceDiscount, + UsageEndTime: item.UsageEndTime, + Item: item.Item, + SubscriptionType: item.SubscriptionType, + PretaxGrossAmount: item.PretaxGrossAmount, + Currency: item.Currency, + CommodityCode: item.CommodityCode, + UsageStartTime: item.UsageStartTime, + AdjustAmount: item.AdjustAmount, + Status: item.Status, + DeductedByCoupons: item.DeductedByCoupons, + RoundDownDiscount: item.RoundDownDiscount, + ProductDetail: item.ProductDetail, + ProductCode: item.ProductCode, + ProductType: item.ProductType, + OutstandingAmount: item.OutstandingAmount, + PipCode: item.PipCode, + PretaxAmount: item.PretaxAmount, + OwnerID: item.OwnerID, + RecordID: item.RecordID, + CashAmount: item.CashAmount, + } + } + total += len(response.Data.Items.Item) + if len(response.Data.Items.Item) == 0 || total >= response.Data.TotalCount { + break + } + pageNum++ + request.PageNum = requests.NewInteger(pageNum) + } + } + return nil +} + +func getBillingCycles() []string { + var months []string + curMonth := time.Now().Format("2006-01") + months = append(months, curMonth) + lastMonth := time.Now().AddDate(0, 0, -5).Format("2006-01") + if lastMonth != curMonth { + months = append(months, lastMonth) + } + return months +} + +func getHistoryBillingCycles(history int) []string { + var months []string + for month := 1; month <= history; month++ { + months = append(months, time.Now().AddDate(0, -month, 0).Format("2006-01")) + } + return months +} diff --git a/plugins/source/alicloud/resources/services/bss/bill_fetch_mock_test.go b/plugins/source/alicloud/resources/services/bss/bill_fetch_mock_test.go new file mode 100644 index 00000000000000..f93affbd4fdaf2 --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill_fetch_mock_test.go @@ -0,0 +1,28 @@ +package bss + +import ( + "testing" + + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildBssBill(t *testing.T, ctrl *gomock.Controller) client.Services { + mock := mocks.NewMockBssopenapiClient(ctrl) + + var b *bssopenapi.QueryBillResponse + if err := faker.FakeObject(&b); err != nil { + t.Fatal(err) + } + b.Success = true + b.Data.TotalCount = 2 + mock.EXPECT().QueryBill(gomock.Any()).Times(2).Return(b, nil) + return client.Services{BSS: mock} +} + +func TestBssBill(t *testing.T) { + client.MockTestHelper(t, Bill(), buildBssBill, client.TestOptions{}) +} diff --git a/plugins/source/alicloud/resources/services/bss/bill_overview.go b/plugins/source/alicloud/resources/services/bss/bill_overview.go new file mode 100644 index 00000000000000..77e29e438d4448 --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill_overview.go @@ -0,0 +1,56 @@ +package bss + +import ( + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + //"github.com/cloudquery/cloudquery/plugins/source/alicloud/client" +) + +func BillOverview() *schema.Table { + return &schema.Table{ + Name: "alicloud_bss_bill_overview", + Description: "https://help.aliyun.com/document_detail/100400.html", + Multiplex: client.AccountMultiplex, + Resolver: fetchBssBillOverview, + Transform: transformers.TransformWithStruct( + &BillOverviewModel{}, + transformers.WithPrimaryKeys( + "BillingCycle", "AccountID", "ProductCode", + "BillAccountID", "ProductType", "PipCode", + "SubscriptionType", "CommodityCode", + ), + ), + Columns: []schema.Column{}, + } +} + +type BillOverviewModel struct { + BillingCycle string `json:"BillingCycle"` + AccountID string `json:"AccountID"` + AccountName string `json:"AccountName"` + DeductedByCoupons float64 `json:"DeductedByCoupons"` + RoundDownDiscount string `json:"RoundDownDiscount"` + ProductName string `json:"ProductName"` + ProductDetail string `json:"ProductDetail"` + ProductCode string `json:"ProductCode"` + BillAccountID string `json:"BillAccountID"` + ProductType string `json:"ProductType"` + DeductedByCashCoupons float64 `json:"DeductedByCashCoupons"` + OutstandingAmount float64 `json:"OutstandingAmount"` + BizType string `json:"BizType"` + PaymentAmount float64 `json:"PaymentAmount"` + PipCode string `json:"PipCode"` + DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard"` + InvoiceDiscount float64 `json:"InvoiceDiscount"` + Item string `json:"Item"` + SubscriptionType string `json:"SubscriptionType"` + PretaxGrossAmount float64 `json:"PretaxGrossAmount"` + PretaxAmount float64 `json:"PretaxAmount"` + OwnerID string `json:"OwnerID"` + Currency string `json:"Currency"` + CommodityCode string `json:"CommodityCode"` + BillAccountName string `json:"BillAccountName"` + AdjustAmount float64 `json:"AdjustAmount"` + CashAmount float64 `json:"CashAmount"` +} diff --git a/plugins/source/alicloud/resources/services/bss/bill_overview_fetch.go b/plugins/source/alicloud/resources/services/bss/bill_overview_fetch.go new file mode 100644 index 00000000000000..6d5cda2ceb992b --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill_overview_fetch.go @@ -0,0 +1,64 @@ +package bss + +import ( + "context" + "fmt" + "net/http" + + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchBssBillOverview(_ context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- any) error { + spec := meta.(*client.Client).Spec + c := meta.(*client.Client) + billingCycles := getBillingCycles() + if spec.BillHistoryMonths > 0 { + billingCycles = append(getHistoryBillingCycles(spec.BillHistoryMonths), billingCycles...) + } + for _, billingCycle := range billingCycles { + request := bssopenapi.CreateQueryBillOverviewRequest() + request.BillingCycle = billingCycle + response, err := c.Services().BSS.QueryBillOverview(request) + if err != nil { + return err + } + if !response.Success { + code := response.GetHttpStatus() + return fmt.Errorf("got response status code %d (%v)", code, http.StatusText(code)) + } + for _, item := range response.Data.Items.Item { + res <- &BillOverviewModel{ + BillingCycle: response.Data.BillingCycle, + AccountID: response.Data.AccountID, + AccountName: response.Data.AccountName, + DeductedByCoupons: item.DeductedByCoupons, + RoundDownDiscount: item.RoundDownDiscount, + ProductName: item.ProductName, + ProductDetail: item.ProductDetail, + ProductCode: item.ProductCode, + BillAccountID: item.BillAccountID, + ProductType: item.ProductType, + DeductedByCashCoupons: item.DeductedByCashCoupons, + OutstandingAmount: item.OutstandingAmount, + BizType: item.BizType, + PaymentAmount: item.PaymentAmount, + PipCode: item.PipCode, + DeductedByPrepaidCard: item.DeductedByPrepaidCard, + InvoiceDiscount: item.InvoiceDiscount, + Item: item.Item, + SubscriptionType: item.SubscriptionType, + PretaxGrossAmount: item.PretaxGrossAmount, + PretaxAmount: item.PretaxAmount, + OwnerID: item.OwnerID, + Currency: item.Currency, + CommodityCode: item.CommodityCode, + BillAccountName: item.BillAccountName, + AdjustAmount: item.AdjustAmount, + CashAmount: item.CashAmount, + } + } + } + return nil +} diff --git a/plugins/source/alicloud/resources/services/bss/bill_overview_fetch_mock_test.go b/plugins/source/alicloud/resources/services/bss/bill_overview_fetch_mock_test.go new file mode 100644 index 00000000000000..8aebd4730edc1a --- /dev/null +++ b/plugins/source/alicloud/resources/services/bss/bill_overview_fetch_mock_test.go @@ -0,0 +1,27 @@ +package bss + +import ( + "testing" + + "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildBssBillOverview(t *testing.T, ctrl *gomock.Controller) client.Services { + mock := mocks.NewMockBssopenapiClient(ctrl) + + var b *bssopenapi.QueryBillOverviewResponse + if err := faker.FakeObject(&b); err != nil { + t.Fatal(err) + } + b.Success = true + mock.EXPECT().QueryBillOverview(gomock.Any()).Times(1).Return(b, nil) + return client.Services{BSS: mock} +} + +func TestBssBillOverview(t *testing.T) { + client.MockTestHelper(t, BillOverview(), buildBssBillOverview, client.TestOptions{}) +} diff --git a/plugins/source/alicloud/resources/services/oss/bucket_stats.go b/plugins/source/alicloud/resources/services/oss/bucket_stats.go new file mode 100644 index 00000000000000..64bc5343253717 --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/bucket_stats.go @@ -0,0 +1,21 @@ +package oss + +import ( + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func BucketStats() *schema.Table { + return &schema.Table{ + Name: "alicloud_oss_bucket_stats", + Resolver: fetchOssBucketStats, + Transform: transformers.TransformWithStruct( + &oss.BucketStat{}, + transformers.WithPrimaryKeys( + "Name", + ), + ), + Columns: []schema.Column{}, + } +} diff --git a/plugins/source/alicloud/resources/services/oss/buckets.go b/plugins/source/alicloud/resources/services/oss/buckets.go new file mode 100644 index 00000000000000..8b13babc659937 --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/buckets.go @@ -0,0 +1,26 @@ +package oss + +import ( + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func Buckets() *schema.Table { + return &schema.Table{ + Name: "alicloud_oss_buckets", + Multiplex: client.AccountMultiplex, + Resolver: fetchOssBuckets, + Transform: transformers.TransformWithStruct( + &oss.BucketProperties{}, + transformers.WithPrimaryKeys( + "Name", + ), + ), + Columns: []schema.Column{}, + Relations: []*schema.Table{ + BucketStats(), + }, + } +} diff --git a/plugins/source/alicloud/resources/services/oss/buckets_fetch.go b/plugins/source/alicloud/resources/services/oss/buckets_fetch.go new file mode 100644 index 00000000000000..174246e394336a --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/buckets_fetch.go @@ -0,0 +1,22 @@ +package oss + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/pkg/errors" +) + +func fetchOssBuckets(_ context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + buckets, err := c.Services().OSS.ListBuckets() + if err != nil { + return errors.Wrap(err, "failed to list all buckets") + } + for _, bucket := range buckets.Buckets { + c.Logger().Debug().Str("bucket", bucket.Name).Str("location", bucket.Location).Msg("Get bucket") + res <- bucket + } + return nil +} diff --git a/plugins/source/alicloud/resources/services/oss/buckets_fetch_mock_test.go b/plugins/source/alicloud/resources/services/oss/buckets_fetch_mock_test.go new file mode 100644 index 00000000000000..6d5ce2b1f43553 --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/buckets_fetch_mock_test.go @@ -0,0 +1,29 @@ +package oss + +import ( + "testing" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildOssBuckets(t *testing.T, ctrl *gomock.Controller) client.Services { + mock := mocks.NewMockOssClient(ctrl) + + var b oss.ListBucketsResult + if err := faker.FakeObject(&b); err != nil { + t.Fatal(err) + } + mock.EXPECT().ListBuckets().Return(b, nil) + + buildOssBucketStats(t, mock, b.Buckets[0].Name) + + return client.Services{OSS: mock} +} + +func TestOssBuckets(t *testing.T) { + client.MockTestHelper(t, Buckets(), buildOssBuckets, client.TestOptions{}) +} diff --git a/plugins/source/alicloud/resources/services/oss/buckets_stats_fetch.go b/plugins/source/alicloud/resources/services/oss/buckets_stats_fetch.go new file mode 100644 index 00000000000000..4fe75d528521ce --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/buckets_stats_fetch.go @@ -0,0 +1,30 @@ +package oss + +import ( + "context" + "fmt" + "strings" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchOssBucketStats(_ context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + // bucket stats must be called from the region the bucket is in + bucket := parent.Item.(oss.BucketProperties) + bucketRegion := strings.TrimPrefix(bucket.Location, "oss-") + bucketClient := c.WithAccountIDAndRegion(c.AccountID, bucketRegion) + services := bucketClient.Services() + if services == nil { + c.Logger().Warn().Str("bucket_name", bucket.Name).Str("region", bucketRegion).Msg("Skipping bucket stats, no client configured for region") + return nil + } + bucketStat, err := services.OSS.GetBucketStat(bucket.Name) + if err != nil { + return fmt.Errorf("failed to get bucket stat for %s: %w", bucket.Name, err) + } + res <- bucketStat + return nil +} diff --git a/plugins/source/alicloud/resources/services/oss/buckets_stats_mock_test.go b/plugins/source/alicloud/resources/services/oss/buckets_stats_mock_test.go new file mode 100644 index 00000000000000..ea92b1ac9d1ded --- /dev/null +++ b/plugins/source/alicloud/resources/services/oss/buckets_stats_mock_test.go @@ -0,0 +1,17 @@ +package oss + +import ( + "testing" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/cloudquery/cloudquery/plugins/source/alicloud/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" +) + +func buildOssBucketStats(t *testing.T, mock *mocks.MockOssClient, bucketName string) { + var b oss.GetBucketStatResult + if err := faker.FakeObject(&b); err != nil { + t.Fatal(err) + } + mock.EXPECT().GetBucketStat(bucketName).Return(b, nil) +} diff --git a/plugins/source/aws/CHANGELOG.md b/plugins/source/aws/CHANGELOG.md index 6d227e915e1efb..57e07c05ec5b76 100644 --- a/plugins/source/aws/CHANGELOG.md +++ b/plugins/source/aws/CHANGELOG.md @@ -6,6 +6,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [11.0.1](https://github.com/cloudquery/cloudquery/compare/plugins-source-aws-v11.0.0...plugins-source-aws-v11.0.1) (2023-01-12) + + +### Bug Fixes + +* **aws:** Correctly fill in `grantee_id` column to `aws_s3_bucket_grants` ([#6772](https://github.com/cloudquery/cloudquery/issues/6772)) ([2cf0451](https://github.com/cloudquery/cloudquery/commit/2cf0451476faaaa014fa723be0e9732cb51d21da)) +* Update endpoints ([#6774](https://github.com/cloudquery/cloudquery/issues/6774)) ([0523a1a](https://github.com/cloudquery/cloudquery/commit/0523a1a0e2b7ccd01a5222f58bbc484cf6968ca4)) + +## [11.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-aws-v10.1.0...plugins-source-aws-v11.0.0) (2023-01-12) + + +### ⚠ BREAKING CHANGES + +* introduce `aws_s3_bucket_grants` explicit primary key `(bucket_arn, grantee_id)`. If you've previously synced this table you'll need to drop it for the PK change (migration) to succeed. + +### Features + +* **aws:** Add Org resource policies ([#6743](https://github.com/cloudquery/cloudquery/issues/6743)) ([80dcf8e](https://github.com/cloudquery/cloudquery/commit/80dcf8e9c5c13adcd91f58046d712bf87d6c1d3f)) +* **aws:** Add support for xray resource policy ([#4833](https://github.com/cloudquery/cloudquery/issues/4833)) ([b68dc35](https://github.com/cloudquery/cloudquery/commit/b68dc350487194de6d5600663a147cca21123c82)) + + +### Bug Fixes + +* **aws:** Add PKs To IAM Resources ([#6741](https://github.com/cloudquery/cloudquery/issues/6741)) ([f7cdb07](https://github.com/cloudquery/cloudquery/commit/f7cdb07d19447cfc3651892b7d8d870ce3f29c15)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.0 ([#6745](https://github.com/cloudquery/cloudquery/issues/6745)) ([9c41854](https://github.com/cloudquery/cloudquery/commit/9c418547c3bbff97449765e337182230fb5e40d5)) +* introduce `aws_s3_bucket_grants` explicit primary key `(bucket_arn, grantee_id)`. If you've previously synced this table you'll need to drop it for the PK change (migration) to succeed. ([cf35801](https://github.com/cloudquery/cloudquery/commit/cf3580131cd9957b4a569e4ff44acc529b532826)) + +## [10.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-aws-v10.0.0...plugins-source-aws-v10.1.0) (2023-01-11) + + +### Features + +* **aws:** Add support for Savingsplans ([#6660](https://github.com/cloudquery/cloudquery/issues/6660)) ([6566ac5](https://github.com/cloudquery/cloudquery/commit/6566ac566816ab3de6d2a3433db88501b38b3564)) + + +### Bug Fixes + +* Update endpoints ([#6652](https://github.com/cloudquery/cloudquery/issues/6652)) ([6a53fa9](https://github.com/cloudquery/cloudquery/commit/6a53fa92f4e6b9097f5759384d07a513db1bdbbb)) + ## [10.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-aws-v9.2.0...plugins-source-aws-v10.0.0) (2023-01-10) diff --git a/plugins/source/aws/CONTRIBUTING.md b/plugins/source/aws/CONTRIBUTING.md index 86946e69f729d0..74b485162a452e 100644 --- a/plugins/source/aws/CONTRIBUTING.md +++ b/plugins/source/aws/CONTRIBUTING.md @@ -4,108 +4,48 @@ Thanks for contributing to CloudQuery! You are awesome. This document serves as There are three main steps to adding a new AWS resource: -1. [Generate interfaces for the AWS SDK function(s) that fetch the resource](#1-generate-interfaces-for-the-aws-sdk-functions-that-fetch-the-resource) -2. [Add a code generation recipe](#2-add-a-code-generation-recipe) -3. [Write the resolver function to fetch the resource using the AWS SDK](#3-setting-up-the-resource) +1. [Generate interfaces for the AWS SDK function(s) that fetch the resource](#step-1-generate-interfaces-for-the-aws-sdk-functions-that-fetch-the-resource) +2. [Add a new table](#step-2-add-a-new-table) As a prerequisite, in [aws-sdk-go-v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2) ensure API calls exist to list/describe the desired resource, and make note of: - to which aws service the resource belongs - the schema of the returned object(s) -## 1. Generate Interfaces for the AWS SDK Function(s) that Fetch the Resource +## Step 1. Generate Interfaces for the AWS SDK Function(s) that Fetch the Resource -### Before you Start - -Inside the root of this repository, run: - -```shell -make install-tools -``` - -This will install `mockgen` and any other tools necessary to complete the process. - -### Generate the Service Interface +### Generate the Service Interface (if it doesn't exist) 1. Check in [client/services.go](client/services.go) that the service you need has an interface defined. If it does, you can skip to [2. Add a Code Generation Recipe](#2-add-a-code-generation-recipe). If not, read on to learn how to generate the interface. 2. Inside [codegen/services/clients.go](codegen/services/clients.go), add the client for the AWS SDK you need to the `clients` slice. You may need to run `go get github.com/aws/aws-sdk-go-v2/service/` (e.g. `go get github.com/aws/aws-sdk-go-v2/service/dynamodb`) to add the dependency first. -3. Run `make gen-mocks`. This should add the interface for your client to [client/services.go](client/services.go) and create a mock for it that will be used in unit tests later. - -## 2. Add a Code Generation Recipe - -Every supported AWS service has a recipe file under [codegen/recipes](codegen/recipes). For example, all ECS resources are listed in [codegen/recipes/ecs.go](codegen/recipes/ecs.go). - -In the following examples, we will use the fictional `MyService` AWS service with `MyResource` resource as an example. We recommend taking a look at a few examples in [codegen/recipes](codegen/recipes) first, as these steps will make more sense with some examples to reference. - -If you are adding a service that needs a new recipe, see [Add a New Recipe File](#add-a-new-recipe-file). Otherwise, if the AWS service is already supported but is missing resource(s), you may skip to [Add a Resource to a Recipe](#add-a-resource-to-a-recipe). - -### Add a New Recipe File - -The process to follow for adding a new recipe is: - -1. Add a new file under [codegen/recipes](codegen/recipes) called `myservice.go`. -2. Inside the new file, add a function called `MyServiceResources()` that returns `[]*Resource`. -3. Call the function from [codegen/main.go](codegen/main.go) by adding - `resources = append(resources, recipes.MyServiceResources()...)` -4. Define the list of resources to be generated and return it inside this function. See - [Add a Resource to a Recipe](#add-a-resource-to-a-recipe) for more details. - -### Add a Resource to a Recipe - -`MyServiceResources()` should return a slice of `*Resource` instances. Each resource should, at a minimum, have the following fields defined: - - 1. `Service`: This will become the table prefix, and will usually be the same as the filename you chose for the recipe. - 2. `SubService`: This will be the final part of the table name, e.g. `aws_myservice_subservice` - 3. `Multiplex`: Most AWS services have resources defined per account and region. In such cases, `client.ServiceAccountRegionMultiplexer("my-service")` is usually the correct multiplexer to use. Look in [client/data/partition_service_region.json](client/data/partition_service_region.json) for the correct service name to use. - 4. `Struct`: This should be a pointer to the struct that will be synced to the destination. CloudQuery's plugin-sdk code generation will read the fields of this struct and convert it to a `Table` instance with appropriate column types. - - Deciding which struct to use takes some practice. To find the right struct, explore the return types of the SDK functions provided by the [AWS Go SDK](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2) (and that you created interface functions for in Step 1). Often there will be a `Get` or `Describe` call that returns a `GetResourceOutput` (or similar) struct. Sometimes this Output struct can be used directly. Other times, the Output struct will reference an inner type, which should then be used for defining the Resource. - -#### All Available Resource Fields - -All available Resource fields can be seen in [base.go](codegen/recipes/base.go). These closely map to the `Table` fields [defined by the plugin-sdk](https://github.com/cloudquery/plugin-sdk/blob/main/schema/table.go), which you may use as a further reference about what each field does. - -#### Common Fields - -If all the resources share the same value for a field (as is often the case for `Service` and `Multiplex`), our convention is to reduce boilerplate by setting these properties in a loop after defining the resources slice, e.g. - -```go -// set default values -for _, r := range resources { - r.Service = "myservice" - r.Multiplex = `client.ServiceAccountRegionMultiplexer("my-service")` -} -``` - -### Run Code Generation - -With the recipe file added and some resources defined, you are ready to run code generation. Run: - -```shell -make gen-code -``` - -This will update all resources and generate a new directory for your service under [resources/services](resources/services). +3. Run `make gen-mocks`. This takes a few seconds, but it should add the interface for your client to [client/services.go](client/services.go) and create a mock for it that will be used in unit tests later. -## 3. Setting up the resource +### Step 2. Add a New Table -By following the steps outlined above, you should now have generated a `myservice` directory under `resources/services`, containing a file called `myresource.go` (these names are examples, your actual filenames will differ). We will now set up the resource. This involves two steps: refining the `codegen` recipe, and writing one or more resolver functions. +The process to follow for adding a new table is: -1. Open the generated `myservice/myresource.go` and inspect the `schema.Table` that is being returned. Does it contain the appropriate columns for the resource? Does it have a primary key? If something looks off, return to the recipe for this resource (under [codegen/recipes](codegen/recipes)) and make adjustments. Then re-run code generation as described in [Run Code Generation](#run-code-generation). Repeat this process until the Table looks right. -2. Your generated `Table` will reference a `Resolver` function that needs to be implemented. The generated file should never be edited directly, so create a new file called `myresource_fetch.go` and add a resolver function with the following signature: +1. Add a new directory matching the AWS service name under [resources/services](resources/services) (e.g. `resources/services/newservice`), if one doesn't exist already +2. Create a new file under the new directory with the name of the resource (e.g. `resources/services/newservice/myresource.go`) and add a function that returns `*schema.Table`. The easiest is to copy-paste an existing table as a starting point ([`Kinesis`](resources/services/kinesis/kinesis.go) is a good example). +3. **Important**: Add a call to the new function to the list of tables in [tables.go](resources/plugin/tables.go). Otherwise, the new table will not be included in the plugin. +4. Update all the fields, taking special care to ensure that the `transformers.TransformWithStruct()` call in the `Resolver` function has the correct struct type (e.g. `transformers.TransformWithStruct(&types.MyResource{})`) +5. Implement the resolver function. This should have the signature: ```go func fetchMyResource(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error { // TODO: implement this } ``` + + The easiest is to copy-paste an existing resolver as a starting point. (Again, [`Kinesis`](resources/services/kinesis/streams_fetch.go) is a good example.) + You may use a type assertion on `meta` to obtain a reference to your interface functions, e.g.: ```go svc := meta.(*client.Client).Services().MyService ``` + With this in hand, complete the resolver function to fetch all resources. After resources are retrieved, send them to the `res` channel for the SDK to deliver to all destinations. -3. Implement a mock test in `myresource_mock_test.go`. We will not describe this in detail here; look at a few examples for similar resources to get you started. +6. Implement a mock test in `myresource_mock_test.go`. We will not describe this in detail here; look at a few examples for similar resources to get you started. -We recommend looking at other resources similar to yours to get an idea of what needs to be done in this step. +We highly recommend looking at other resources similar to yours to get an idea of what needs to be done in each step. ### Implementing Resolver Functions diff --git a/plugins/source/aws/Makefile b/plugins/source/aws/Makefile index 39b698269a9f68..926969b0ff75b3 100644 --- a/plugins/source/aws/Makefile +++ b/plugins/source/aws/Makefile @@ -16,7 +16,9 @@ lint: .PHONY: gen-mocks gen-mocks: go install github.com/golang/mock/mockgen@v1.6.0 - rm -rf ./client/mocks/* + grep -rl '// Code generated by codegen; DO NOT EDIT.' ./client/services/* | xargs rm + go run codegen/main.go + grep -rl '// Code generated by MockGen. DO NOT EDIT.' ./client/mocks/* | xargs rm go generate ./client/... .PHONY: gen-docs diff --git a/plugins/source/aws/client/client.go b/plugins/source/aws/client/client.go index 081d30c02904a1..1648a50999ac38 100644 --- a/plugins/source/aws/client/client.go +++ b/plugins/source/aws/client/client.go @@ -313,7 +313,7 @@ func configureAwsClient(ctx context.Context, logger zerolog.Logger, awsConfig *S return awsCfg, err } -func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var awsConfig Spec err := spec.UnmarshalSpec(&awsConfig) if err != nil { diff --git a/plugins/source/aws/client/data/partition_service_region.json b/plugins/source/aws/client/data/partition_service_region.json index 6b4e86712b818a..9f586c7a19fc99 100644 --- a/plugins/source/aws/client/data/partition_service_region.json +++ b/plugins/source/aws/client/data/partition_service_region.json @@ -974,6 +974,21 @@ "aws-global": {} } }, + "cleanrooms": { + "regions": { + "ap-northeast-1": {}, + "ap-northeast-2": {}, + "ap-southeast-1": {}, + "ap-southeast-2": {}, + "eu-central-1": {}, + "eu-north-1": {}, + "eu-west-1": {}, + "eu-west-2": {}, + "us-east-1": {}, + "us-east-2": {}, + "us-west-2": {} + } + }, "cloud9": { "regions": { "af-south-1": {}, @@ -3297,10 +3312,8 @@ "regions": { "af-south-1": {}, "ap-east-1": {}, - "ap-northeast-1": {}, "ap-northeast-2": {}, "ap-northeast-3": {}, - "ap-south-1": {}, "ap-south-2": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, @@ -5253,6 +5266,7 @@ "fips-us-east-2": {}, "fips-us-west-1": {}, "fips-us-west-2": {}, + "me-central-1": {}, "me-south-1": {}, "sa-east-1": {}, "us-east-1": {}, @@ -5666,6 +5680,7 @@ }, "ssm-sap": { "regions": { + "ap-southeast-2": {}, "us-east-1": {} } }, @@ -6138,12 +6153,14 @@ "fips-eu-west-1": {}, "fips-eu-west-2": {}, "fips-eu-west-3": {}, + "fips-me-central-1": {}, "fips-me-south-1": {}, "fips-sa-east-1": {}, "fips-us-east-1": {}, "fips-us-east-2": {}, "fips-us-west-1": {}, "fips-us-west-2": {}, + "me-central-1": {}, "me-south-1": {}, "sa-east-1": {}, "us-east-1": {}, @@ -6186,12 +6203,14 @@ "fips-eu-west-1": {}, "fips-eu-west-2": {}, "fips-eu-west-3": {}, + "fips-me-central-1": {}, "fips-me-south-1": {}, "fips-sa-east-1": {}, "fips-us-east-1": {}, "fips-us-east-2": {}, "fips-us-west-1": {}, "fips-us-west-2": {}, + "me-central-1": {}, "me-south-1": {}, "sa-east-1": {}, "us-east-1": {}, diff --git a/plugins/source/aws/client/helpers.go b/plugins/source/aws/client/helpers.go index d2f2d1a694d09d..825c92a6b2dd09 100644 --- a/plugins/source/aws/client/helpers.go +++ b/plugins/source/aws/client/helpers.go @@ -60,6 +60,7 @@ const ( SESService AWSService = "ses" WAFRegional AWSService = "waf-regional" WorkspacesService AWSService = "workspaces" + XRayService AWSService = "xray" ) const ( diff --git a/plugins/source/aws/client/mocks/resourcegroups.go b/plugins/source/aws/client/mocks/resourcegroups.go index 86cb54807e3bc7..ce593b7a9b1e34 100644 --- a/plugins/source/aws/client/mocks/resourcegroups.go +++ b/plugins/source/aws/client/mocks/resourcegroups.go @@ -35,6 +35,26 @@ func (m *MockResourcegroupsClient) EXPECT() *MockResourcegroupsClientMockRecorde return m.recorder } +// GetAccountSettings mocks base method. +func (m *MockResourcegroupsClient) GetAccountSettings(arg0 context.Context, arg1 *resourcegroups.GetAccountSettingsInput, arg2 ...func(*resourcegroups.Options)) (*resourcegroups.GetAccountSettingsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAccountSettings", varargs...) + ret0, _ := ret[0].(*resourcegroups.GetAccountSettingsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAccountSettings indicates an expected call of GetAccountSettings. +func (mr *MockResourcegroupsClientMockRecorder) GetAccountSettings(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountSettings", reflect.TypeOf((*MockResourcegroupsClient)(nil).GetAccountSettings), varargs...) +} + // GetGroup mocks base method. func (m *MockResourcegroupsClient) GetGroup(arg0 context.Context, arg1 *resourcegroups.GetGroupInput, arg2 ...func(*resourcegroups.Options)) (*resourcegroups.GetGroupOutput, error) { m.ctrl.T.Helper() diff --git a/plugins/source/aws/client/mocks/savingsplans.go b/plugins/source/aws/client/mocks/savingsplans.go new file mode 100644 index 00000000000000..0ac438b50ca1a6 --- /dev/null +++ b/plugins/source/aws/client/mocks/savingsplans.go @@ -0,0 +1,136 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: savingsplans.go + +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + savingsplans "github.com/aws/aws-sdk-go-v2/service/savingsplans" + gomock "github.com/golang/mock/gomock" +) + +// MockSavingsplansClient is a mock of SavingsplansClient interface. +type MockSavingsplansClient struct { + ctrl *gomock.Controller + recorder *MockSavingsplansClientMockRecorder +} + +// MockSavingsplansClientMockRecorder is the mock recorder for MockSavingsplansClient. +type MockSavingsplansClientMockRecorder struct { + mock *MockSavingsplansClient +} + +// NewMockSavingsplansClient creates a new mock instance. +func NewMockSavingsplansClient(ctrl *gomock.Controller) *MockSavingsplansClient { + mock := &MockSavingsplansClient{ctrl: ctrl} + mock.recorder = &MockSavingsplansClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSavingsplansClient) EXPECT() *MockSavingsplansClientMockRecorder { + return m.recorder +} + +// DescribeSavingsPlanRates mocks base method. +func (m *MockSavingsplansClient) DescribeSavingsPlanRates(arg0 context.Context, arg1 *savingsplans.DescribeSavingsPlanRatesInput, arg2 ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlanRatesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSavingsPlanRates", varargs...) + ret0, _ := ret[0].(*savingsplans.DescribeSavingsPlanRatesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlanRates indicates an expected call of DescribeSavingsPlanRates. +func (mr *MockSavingsplansClientMockRecorder) DescribeSavingsPlanRates(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlanRates", reflect.TypeOf((*MockSavingsplansClient)(nil).DescribeSavingsPlanRates), varargs...) +} + +// DescribeSavingsPlans mocks base method. +func (m *MockSavingsplansClient) DescribeSavingsPlans(arg0 context.Context, arg1 *savingsplans.DescribeSavingsPlansInput, arg2 ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSavingsPlans", varargs...) + ret0, _ := ret[0].(*savingsplans.DescribeSavingsPlansOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlans indicates an expected call of DescribeSavingsPlans. +func (mr *MockSavingsplansClientMockRecorder) DescribeSavingsPlans(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlans", reflect.TypeOf((*MockSavingsplansClient)(nil).DescribeSavingsPlans), varargs...) +} + +// DescribeSavingsPlansOfferingRates mocks base method. +func (m *MockSavingsplansClient) DescribeSavingsPlansOfferingRates(arg0 context.Context, arg1 *savingsplans.DescribeSavingsPlansOfferingRatesInput, arg2 ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOfferingRatesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSavingsPlansOfferingRates", varargs...) + ret0, _ := ret[0].(*savingsplans.DescribeSavingsPlansOfferingRatesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansOfferingRates indicates an expected call of DescribeSavingsPlansOfferingRates. +func (mr *MockSavingsplansClientMockRecorder) DescribeSavingsPlansOfferingRates(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansOfferingRates", reflect.TypeOf((*MockSavingsplansClient)(nil).DescribeSavingsPlansOfferingRates), varargs...) +} + +// DescribeSavingsPlansOfferings mocks base method. +func (m *MockSavingsplansClient) DescribeSavingsPlansOfferings(arg0 context.Context, arg1 *savingsplans.DescribeSavingsPlansOfferingsInput, arg2 ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOfferingsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSavingsPlansOfferings", varargs...) + ret0, _ := ret[0].(*savingsplans.DescribeSavingsPlansOfferingsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSavingsPlansOfferings indicates an expected call of DescribeSavingsPlansOfferings. +func (mr *MockSavingsplansClientMockRecorder) DescribeSavingsPlansOfferings(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSavingsPlansOfferings", reflect.TypeOf((*MockSavingsplansClient)(nil).DescribeSavingsPlansOfferings), varargs...) +} + +// ListTagsForResource mocks base method. +func (m *MockSavingsplansClient) ListTagsForResource(arg0 context.Context, arg1 *savingsplans.ListTagsForResourceInput, arg2 ...func(*savingsplans.Options)) (*savingsplans.ListTagsForResourceOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListTagsForResource", varargs...) + ret0, _ := ret[0].(*savingsplans.ListTagsForResourceOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListTagsForResource indicates an expected call of ListTagsForResource. +func (mr *MockSavingsplansClientMockRecorder) ListTagsForResource(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTagsForResource", reflect.TypeOf((*MockSavingsplansClient)(nil).ListTagsForResource), varargs...) +} diff --git a/plugins/source/aws/client/services.go b/plugins/source/aws/client/services.go index 904a996880d6f1..e6d3671c798446 100644 --- a/plugins/source/aws/client/services.go +++ b/plugins/source/aws/client/services.go @@ -77,6 +77,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3control" "github.com/aws/aws-sdk-go-v2/service/sagemaker" + "github.com/aws/aws-sdk-go-v2/service/savingsplans" "github.com/aws/aws-sdk-go-v2/service/scheduler" "github.com/aws/aws-sdk-go-v2/service/secretsmanager" "github.com/aws/aws-sdk-go-v2/service/servicecatalog" @@ -179,6 +180,7 @@ func initServices(region string, c aws.Config) Services { S3: s3.NewFromConfig(awsCfg), S3control: s3control.NewFromConfig(awsCfg), Sagemaker: sagemaker.NewFromConfig(awsCfg), + Savingsplans: savingsplans.NewFromConfig(awsCfg), Scheduler: scheduler.NewFromConfig(awsCfg), Secretsmanager: secretsmanager.NewFromConfig(awsCfg), Servicecatalog: servicecatalog.NewFromConfig(awsCfg), @@ -278,6 +280,7 @@ type Services struct { S3 services.S3Client S3control services.S3controlClient Sagemaker services.SagemakerClient + Savingsplans services.SavingsplansClient Scheduler services.SchedulerClient Secretsmanager services.SecretsmanagerClient Servicecatalog services.ServicecatalogClient diff --git a/plugins/source/aws/client/services/resourcegroups.go b/plugins/source/aws/client/services/resourcegroups.go index 87e8ce6042b44e..7722c6e7f10628 100644 --- a/plugins/source/aws/client/services/resourcegroups.go +++ b/plugins/source/aws/client/services/resourcegroups.go @@ -8,6 +8,7 @@ import ( //go:generate mockgen -package=mocks -destination=../mocks/resourcegroups.go -source=resourcegroups.go ResourcegroupsClient type ResourcegroupsClient interface { + GetAccountSettings(context.Context, *resourcegroups.GetAccountSettingsInput, ...func(*resourcegroups.Options)) (*resourcegroups.GetAccountSettingsOutput, error) GetGroup(context.Context, *resourcegroups.GetGroupInput, ...func(*resourcegroups.Options)) (*resourcegroups.GetGroupOutput, error) GetGroupConfiguration(context.Context, *resourcegroups.GetGroupConfigurationInput, ...func(*resourcegroups.Options)) (*resourcegroups.GetGroupConfigurationOutput, error) GetGroupQuery(context.Context, *resourcegroups.GetGroupQueryInput, ...func(*resourcegroups.Options)) (*resourcegroups.GetGroupQueryOutput, error) diff --git a/plugins/source/aws/client/services/s3manager.go b/plugins/source/aws/client/services/s3manager.go index 2d0bd1c74c69de..90b3641b6fd150 100644 --- a/plugins/source/aws/client/services/s3manager.go +++ b/plugins/source/aws/client/services/s3manager.go @@ -2,6 +2,7 @@ package services import ( "context" + "github.com/aws/aws-sdk-go-v2/service/s3" ) diff --git a/plugins/source/aws/client/services/savingsplans.go b/plugins/source/aws/client/services/savingsplans.go new file mode 100644 index 00000000000000..0ca6d37b66ecde --- /dev/null +++ b/plugins/source/aws/client/services/savingsplans.go @@ -0,0 +1,16 @@ +// Code generated by codegen; DO NOT EDIT. +package services + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/savingsplans" +) + +//go:generate mockgen -package=mocks -destination=../mocks/savingsplans.go -source=savingsplans.go SavingsplansClient +type SavingsplansClient interface { + DescribeSavingsPlanRates(context.Context, *savingsplans.DescribeSavingsPlanRatesInput, ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlanRatesOutput, error) + DescribeSavingsPlans(context.Context, *savingsplans.DescribeSavingsPlansInput, ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOutput, error) + DescribeSavingsPlansOfferingRates(context.Context, *savingsplans.DescribeSavingsPlansOfferingRatesInput, ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOfferingRatesOutput, error) + DescribeSavingsPlansOfferings(context.Context, *savingsplans.DescribeSavingsPlansOfferingsInput, ...func(*savingsplans.Options)) (*savingsplans.DescribeSavingsPlansOfferingsOutput, error) + ListTagsForResource(context.Context, *savingsplans.ListTagsForResourceInput, ...func(*savingsplans.Options)) (*savingsplans.ListTagsForResourceOutput, error) +} diff --git a/plugins/source/aws/client/testing.go b/plugins/source/aws/client/testing.go index a69d874032aea0..ffca11b4775a53 100644 --- a/plugins/source/aws/client/testing.go +++ b/plugins/source/aws/client/testing.go @@ -26,7 +26,7 @@ func AwsMockTestHelper(t *testing.T, table *schema.Table, builder func(*testing. zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var awsSpec Spec if err := spec.UnmarshalSpec(&awsSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal aws spec: %w", err) diff --git a/plugins/source/aws/codegen/main.go b/plugins/source/aws/codegen/main.go new file mode 100644 index 00000000000000..25e2c61605b233 --- /dev/null +++ b/plugins/source/aws/codegen/main.go @@ -0,0 +1,236 @@ +package main + +import ( + "path" + "reflect" + "runtime" + + "github.com/aws/aws-sdk-go-v2/service/accessanalyzer" + "github.com/aws/aws-sdk-go-v2/service/account" + "github.com/aws/aws-sdk-go-v2/service/acm" + "github.com/aws/aws-sdk-go-v2/service/amp" + "github.com/aws/aws-sdk-go-v2/service/apigateway" + "github.com/aws/aws-sdk-go-v2/service/apigatewayv2" + "github.com/aws/aws-sdk-go-v2/service/applicationautoscaling" + "github.com/aws/aws-sdk-go-v2/service/apprunner" + "github.com/aws/aws-sdk-go-v2/service/appstream" + "github.com/aws/aws-sdk-go-v2/service/appsync" + "github.com/aws/aws-sdk-go-v2/service/athena" + "github.com/aws/aws-sdk-go-v2/service/autoscaling" + "github.com/aws/aws-sdk-go-v2/service/backup" + "github.com/aws/aws-sdk-go-v2/service/cloudformation" + "github.com/aws/aws-sdk-go-v2/service/cloudfront" + "github.com/aws/aws-sdk-go-v2/service/cloudhsmv2" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail" + "github.com/aws/aws-sdk-go-v2/service/cloudwatch" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" + "github.com/aws/aws-sdk-go-v2/service/codebuild" + "github.com/aws/aws-sdk-go-v2/service/codepipeline" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentity" + "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider" + "github.com/aws/aws-sdk-go-v2/service/configservice" + "github.com/aws/aws-sdk-go-v2/service/databasemigrationservice" + "github.com/aws/aws-sdk-go-v2/service/dax" + "github.com/aws/aws-sdk-go-v2/service/directconnect" + "github.com/aws/aws-sdk-go-v2/service/docdb" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/aws/aws-sdk-go-v2/service/ecr" + "github.com/aws/aws-sdk-go-v2/service/ecrpublic" + "github.com/aws/aws-sdk-go-v2/service/ecs" + "github.com/aws/aws-sdk-go-v2/service/efs" + "github.com/aws/aws-sdk-go-v2/service/eks" + "github.com/aws/aws-sdk-go-v2/service/elasticache" + "github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2" + "github.com/aws/aws-sdk-go-v2/service/elasticsearchservice" + "github.com/aws/aws-sdk-go-v2/service/elastictranscoder" + "github.com/aws/aws-sdk-go-v2/service/emr" + "github.com/aws/aws-sdk-go-v2/service/eventbridge" + "github.com/aws/aws-sdk-go-v2/service/firehose" + "github.com/aws/aws-sdk-go-v2/service/frauddetector" + "github.com/aws/aws-sdk-go-v2/service/fsx" + "github.com/aws/aws-sdk-go-v2/service/glacier" + "github.com/aws/aws-sdk-go-v2/service/glue" + "github.com/aws/aws-sdk-go-v2/service/guardduty" + "github.com/aws/aws-sdk-go-v2/service/iam" + "github.com/aws/aws-sdk-go-v2/service/identitystore" + "github.com/aws/aws-sdk-go-v2/service/inspector" + "github.com/aws/aws-sdk-go-v2/service/inspector2" + "github.com/aws/aws-sdk-go-v2/service/iot" + "github.com/aws/aws-sdk-go-v2/service/kafka" + "github.com/aws/aws-sdk-go-v2/service/kinesis" + "github.com/aws/aws-sdk-go-v2/service/kms" + "github.com/aws/aws-sdk-go-v2/service/lambda" + "github.com/aws/aws-sdk-go-v2/service/lightsail" + "github.com/aws/aws-sdk-go-v2/service/mq" + "github.com/aws/aws-sdk-go-v2/service/mwaa" + "github.com/aws/aws-sdk-go-v2/service/neptune" + "github.com/aws/aws-sdk-go-v2/service/organizations" + "github.com/aws/aws-sdk-go-v2/service/qldb" + "github.com/aws/aws-sdk-go-v2/service/quicksight" + "github.com/aws/aws-sdk-go-v2/service/ram" + "github.com/aws/aws-sdk-go-v2/service/rds" + "github.com/aws/aws-sdk-go-v2/service/redshift" + "github.com/aws/aws-sdk-go-v2/service/resourcegroups" + "github.com/aws/aws-sdk-go-v2/service/route53" + "github.com/aws/aws-sdk-go-v2/service/route53domains" + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/aws-sdk-go-v2/service/s3control" + "github.com/aws/aws-sdk-go-v2/service/sagemaker" + "github.com/aws/aws-sdk-go-v2/service/savingsplans" + "github.com/aws/aws-sdk-go-v2/service/scheduler" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager" + "github.com/aws/aws-sdk-go-v2/service/servicecatalog" + "github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry" + "github.com/aws/aws-sdk-go-v2/service/servicequotas" + "github.com/aws/aws-sdk-go-v2/service/ses" + "github.com/aws/aws-sdk-go-v2/service/sesv2" + "github.com/aws/aws-sdk-go-v2/service/sfn" + "github.com/aws/aws-sdk-go-v2/service/shield" + "github.com/aws/aws-sdk-go-v2/service/sns" + "github.com/aws/aws-sdk-go-v2/service/sqs" + "github.com/aws/aws-sdk-go-v2/service/ssm" + "github.com/aws/aws-sdk-go-v2/service/ssoadmin" + "github.com/aws/aws-sdk-go-v2/service/timestreamwrite" + "github.com/aws/aws-sdk-go-v2/service/transfer" + "github.com/aws/aws-sdk-go-v2/service/waf" + "github.com/aws/aws-sdk-go-v2/service/wafregional" + "github.com/aws/aws-sdk-go-v2/service/wafv2" + "github.com/aws/aws-sdk-go-v2/service/workspaces" + "github.com/aws/aws-sdk-go-v2/service/xray" + "github.com/cloudquery/codegen/interfaces" + "github.com/thoas/go-funk" +) + +var clients = []any{ + &accessanalyzer.Client{}, + &account.Client{}, + &acm.Client{}, + &.Client{}, + &apigateway.Client{}, + &apigatewayv2.Client{}, + &applicationautoscaling.Client{}, + &apprunner.Client{}, + &appstream.Client{}, + &appsync.Client{}, + &athena.Client{}, + &autoscaling.Client{}, + &backup.Client{}, + &cloudformation.Client{}, + &cloudfront.Client{}, + &cloudhsmv2.Client{}, + &cloudtrail.Client{}, + &cloudwatch.Client{}, + &cloudwatchlogs.Client{}, + &codebuild.Client{}, + &codepipeline.Client{}, + &cognitoidentity.Client{}, + &cognitoidentityprovider.Client{}, + &configservice.Client{}, + &databasemigrationservice.Client{}, + &dax.Client{}, + &directconnect.Client{}, + &docdb.Client{}, + &dynamodb.Client{}, + &ec2.Client{}, + &ecr.Client{}, + &ecrpublic.Client{}, + &ecs.Client{}, + &efs.Client{}, + &eks.Client{}, + &elasticache.Client{}, + &elasticbeanstalk.Client{}, + &elasticloadbalancing.Client{}, + &elasticloadbalancingv2.Client{}, + &elasticsearchservice.Client{}, + &elastictranscoder.Client{}, + &emr.Client{}, + &eventbridge.Client{}, + &firehose.Client{}, + &frauddetector.Client{}, + &fsx.Client{}, + &glacier.Client{}, + &glue.Client{}, + &guardduty.Client{}, + &iam.Client{}, + &identitystore.Client{}, + &inspector.Client{}, + &inspector2.Client{}, + &iot.Client{}, + &kafka.Client{}, + &kinesis.Client{}, + &kms.Client{}, + &lambda.Client{}, + &lightsail.Client{}, + &mq.Client{}, + &mwaa.Client{}, + &neptune.Client{}, + &organizations.Client{}, + &qldb.Client{}, + &quicksight.Client{}, + &ram.Client{}, + &rds.Client{}, + &redshift.Client{}, + &resourcegroups.Client{}, + &route53.Client{}, + &route53domains.Client{}, + &s3.Client{}, + &s3control.Client{}, + &sagemaker.Client{}, + &savingsplans.Client{}, + &scheduler.Client{}, + &secretsmanager.Client{}, + &servicecatalog.Client{}, + &servicecatalogappregistry.Client{}, + &servicequotas.Client{}, + &ses.Client{}, + &sesv2.Client{}, + &sfn.Client{}, + &shield.Client{}, + &sns.Client{}, + &sqs.Client{}, + &ssm.Client{}, + &ssoadmin.Client{}, + ×treamwrite.Client{}, + &transfer.Client{}, + &waf.Client{}, + &wafregional.Client{}, + &wafv2.Client{}, + &workspaces.Client{}, + &xray.Client{}, +} + +// Generate the service interfaces under in client/services for use with mockgen. +func main() { + _, filename, _, ok := runtime.Caller(0) + if !ok { + panic("failed to get caller information") + } + err := interfaces.Generate( + clients, + path.Join(path.Dir(filename), "../client/services"), + interfaces.WithIncludeFunc(include), + interfaces.WithExtraImports(extraImports), + ) + if err != nil { + panic(err) + } +} + +func include(m reflect.Method) bool { + // these methods will be included despite not starting with an accepted prefix + var exceptions = []string{ + "QuerySchemaVersionMetadata", + "GenerateCredentialReport", + } + if funk.ContainsString(exceptions, m.Name) { + return true + } + return interfaces.MethodHasAnyPrefix(m, []string{"List", "Get", "Describe", "Search", "BatchGet"}) +} + +func extraImports(_ reflect.Method) []string { + return []string{"context"} +} diff --git a/plugins/source/aws/docs/tables/README.md b/plugins/source/aws/docs/tables/README.md index ceec3b69e74de5..2cc60ab6124fe4 100644 --- a/plugins/source/aws/docs/tables/README.md +++ b/plugins/source/aws/docs/tables/README.md @@ -3,8 +3,8 @@ ## Tables - [aws_accessanalyzer_analyzers](aws_accessanalyzer_analyzers.md) - - [aws_accessanalyzer_analyzer_findings](aws_accessanalyzer_analyzer_findings.md) - [aws_accessanalyzer_analyzer_archive_rules](aws_accessanalyzer_analyzer_archive_rules.md) + - [aws_accessanalyzer_analyzer_findings](aws_accessanalyzer_analyzer_findings.md) - [aws_account_alternate_contacts](aws_account_alternate_contacts.md) - [aws_account_contacts](aws_account_contacts.md) - [aws_acm_certificates](aws_acm_certificates.md) @@ -44,8 +44,8 @@ - [aws_apprunner_connections](aws_apprunner_connections.md) - [aws_apprunner_observability_configurations](aws_apprunner_observability_configurations.md) - [aws_apprunner_services](aws_apprunner_services.md) - - [aws_apprunner_operations](aws_apprunner_operations.md) - [aws_apprunner_custom_domains](aws_apprunner_custom_domains.md) + - [aws_apprunner_operations](aws_apprunner_operations.md) - [aws_apprunner_vpc_connectors](aws_apprunner_vpc_connectors.md) - [aws_apprunner_vpc_ingress_connections](aws_apprunner_vpc_ingress_connections.md) - [aws_appstream_app_blocks](aws_appstream_app_blocks.md) @@ -65,13 +65,13 @@ - [aws_athena_data_catalog_databases](aws_athena_data_catalog_databases.md) - [aws_athena_data_catalog_database_tables](aws_athena_data_catalog_database_tables.md) - [aws_athena_work_groups](aws_athena_work_groups.md) + - [aws_athena_work_group_named_queries](aws_athena_work_group_named_queries.md) - [aws_athena_work_group_prepared_statements](aws_athena_work_group_prepared_statements.md) - [aws_athena_work_group_query_executions](aws_athena_work_group_query_executions.md) - - [aws_athena_work_group_named_queries](aws_athena_work_group_named_queries.md) -- [aws_autoscaling_launch_configurations](aws_autoscaling_launch_configurations.md) - [aws_autoscaling_groups](aws_autoscaling_groups.md) - - [aws_autoscaling_group_scaling_policies](aws_autoscaling_group_scaling_policies.md) - [aws_autoscaling_group_lifecycle_hooks](aws_autoscaling_group_lifecycle_hooks.md) + - [aws_autoscaling_group_scaling_policies](aws_autoscaling_group_scaling_policies.md) +- [aws_autoscaling_launch_configurations](aws_autoscaling_launch_configurations.md) - [aws_autoscaling_scheduled_actions](aws_autoscaling_scheduled_actions.md) - [aws_backup_global_settings](aws_backup_global_settings.md) - [aws_backup_plans](aws_backup_plans.md) @@ -83,26 +83,27 @@ - [aws_cloudformation_stack_resources](aws_cloudformation_stack_resources.md) - [aws_cloudfront_cache_policies](aws_cloudfront_cache_policies.md) - [aws_cloudfront_distributions](aws_cloudfront_distributions.md) -- [aws_cloudhsmv2_clusters](aws_cloudhsmv2_clusters.md) - [aws_cloudhsmv2_backups](aws_cloudhsmv2_backups.md) +- [aws_cloudhsmv2_clusters](aws_cloudhsmv2_clusters.md) - [aws_cloudtrail_trails](aws_cloudtrail_trails.md) - [aws_cloudtrail_trail_event_selectors](aws_cloudtrail_trail_event_selectors.md) -- [aws_cloudwatchlogs_resource_policies](aws_cloudwatchlogs_resource_policies.md) -- [aws_cloudwatchlogs_metric_filters](aws_cloudwatchlogs_metric_filters.md) -- [aws_cloudwatchlogs_log_groups](aws_cloudwatchlogs_log_groups.md) - [aws_cloudwatch_alarms](aws_cloudwatch_alarms.md) +- [aws_cloudwatchlogs_log_groups](aws_cloudwatchlogs_log_groups.md) +- [aws_cloudwatchlogs_metric_filters](aws_cloudwatchlogs_metric_filters.md) +- [aws_cloudwatchlogs_resource_policies](aws_cloudwatchlogs_resource_policies.md) - [aws_codebuild_projects](aws_codebuild_projects.md) -- [aws_codepipeline_webhooks](aws_codepipeline_webhooks.md) - [aws_codepipeline_pipelines](aws_codepipeline_pipelines.md) +- [aws_codepipeline_webhooks](aws_codepipeline_webhooks.md) - [aws_cognito_identity_pools](aws_cognito_identity_pools.md) - [aws_cognito_user_pools](aws_cognito_user_pools.md) - [aws_cognito_user_pool_identity_providers](aws_cognito_user_pool_identity_providers.md) +- [aws_config_config_rules](aws_config_config_rules.md) + - [aws_config_config_rule_compliances](aws_config_config_rule_compliances.md) - [aws_config_configuration_recorders](aws_config_configuration_recorders.md) - [aws_config_conformance_packs](aws_config_conformance_packs.md) - [aws_config_conformance_pack_rule_compliances](aws_config_conformance_pack_rule_compliances.md) -- [aws_config_config_rules](aws_config_config_rules.md) - - [aws_config_config_rule_compliances](aws_config_config_rule_compliances.md) - [aws_dax_clusters](aws_dax_clusters.md) +- [aws_db_proxies](aws_db_proxies.md) - [aws_directconnect_connections](aws_directconnect_connections.md) - [aws_directconnect_gateways](aws_directconnect_gateways.md) - [aws_directconnect_gateway_associations](aws_directconnect_gateway_associations.md) @@ -111,23 +112,23 @@ - [aws_directconnect_virtual_gateways](aws_directconnect_virtual_gateways.md) - [aws_directconnect_virtual_interfaces](aws_directconnect_virtual_interfaces.md) - [aws_dms_replication_instances](aws_dms_replication_instances.md) +- [aws_docdb_certificates](aws_docdb_certificates.md) +- [aws_docdb_cluster_parameter_groups](aws_docdb_cluster_parameter_groups.md) - [aws_docdb_clusters](aws_docdb_clusters.md) - [aws_docdb_cluster_snapshots](aws_docdb_cluster_snapshots.md) - [aws_docdb_instances](aws_docdb_instances.md) -- [aws_docdb_cluster_parameter_groups](aws_docdb_cluster_parameter_groups.md) -- [aws_docdb_certificates](aws_docdb_certificates.md) - [aws_docdb_engine_versions](aws_docdb_engine_versions.md) - [aws_docdb_cluster_parameters](aws_docdb_cluster_parameters.md) - [aws_docdb_orderable_db_instance_options](aws_docdb_orderable_db_instance_options.md) -- [aws_docdb_subnet_groups](aws_docdb_subnet_groups.md) -- [aws_docdb_global_clusters](aws_docdb_global_clusters.md) -- [aws_docdb_events](aws_docdb_events.md) -- [aws_docdb_event_subscriptions](aws_docdb_event_subscriptions.md) - [aws_docdb_event_categories](aws_docdb_event_categories.md) +- [aws_docdb_event_subscriptions](aws_docdb_event_subscriptions.md) +- [aws_docdb_events](aws_docdb_events.md) +- [aws_docdb_global_clusters](aws_docdb_global_clusters.md) - [aws_docdb_pending_maintenance_actions](aws_docdb_pending_maintenance_actions.md) +- [aws_docdb_subnet_groups](aws_docdb_subnet_groups.md) - [aws_dynamodb_tables](aws_dynamodb_tables.md) - - [aws_dynamodb_table_replica_auto_scalings](aws_dynamodb_table_replica_auto_scalings.md) - [aws_dynamodb_table_continuous_backups](aws_dynamodb_table_continuous_backups.md) + - [aws_dynamodb_table_replica_auto_scalings](aws_dynamodb_table_replica_auto_scalings.md) - [aws_ec2_byoip_cidrs](aws_ec2_byoip_cidrs.md) - [aws_ec2_customer_gateways](aws_ec2_customer_gateways.md) - [aws_ec2_ebs_snapshots](aws_ec2_ebs_snapshots.md) @@ -138,14 +139,13 @@ - [aws_ec2_hosts](aws_ec2_hosts.md) - [aws_ec2_images](aws_ec2_images.md) - [aws_ec2_instance_statuses](aws_ec2_instance_statuses.md) -- [aws_ec2_instances](aws_ec2_instances.md) - [aws_ec2_instance_types](aws_ec2_instance_types.md) +- [aws_ec2_instances](aws_ec2_instances.md) - [aws_ec2_internet_gateways](aws_ec2_internet_gateways.md) - [aws_ec2_key_pairs](aws_ec2_key_pairs.md) - [aws_ec2_nat_gateways](aws_ec2_nat_gateways.md) - [aws_ec2_network_acls](aws_ec2_network_acls.md) - [aws_ec2_network_interfaces](aws_ec2_network_interfaces.md) -- [aws_regions](aws_regions.md) - [aws_ec2_regional_configs](aws_ec2_regional_configs.md) - [aws_ec2_reserved_instances](aws_ec2_reserved_instances.md) - [aws_ec2_route_tables](aws_ec2_route_tables.md) @@ -153,27 +153,27 @@ - [aws_ec2_subnets](aws_ec2_subnets.md) - [aws_ec2_transit_gateways](aws_ec2_transit_gateways.md) - [aws_ec2_transit_gateway_attachments](aws_ec2_transit_gateway_attachments.md) + - [aws_ec2_transit_gateway_multicast_domains](aws_ec2_transit_gateway_multicast_domains.md) + - [aws_ec2_transit_gateway_peering_attachments](aws_ec2_transit_gateway_peering_attachments.md) - [aws_ec2_transit_gateway_route_tables](aws_ec2_transit_gateway_route_tables.md) - [aws_ec2_transit_gateway_vpc_attachments](aws_ec2_transit_gateway_vpc_attachments.md) - - [aws_ec2_transit_gateway_peering_attachments](aws_ec2_transit_gateway_peering_attachments.md) - - [aws_ec2_transit_gateway_multicast_domains](aws_ec2_transit_gateway_multicast_domains.md) - [aws_ec2_vpc_endpoint_service_configurations](aws_ec2_vpc_endpoint_service_configurations.md) - [aws_ec2_vpc_endpoint_services](aws_ec2_vpc_endpoint_services.md) - [aws_ec2_vpc_endpoints](aws_ec2_vpc_endpoints.md) - [aws_ec2_vpc_peering_connections](aws_ec2_vpc_peering_connections.md) - [aws_ec2_vpcs](aws_ec2_vpcs.md) - [aws_ec2_vpn_gateways](aws_ec2_vpn_gateways.md) -- [aws_ecrpublic_repositories](aws_ecrpublic_repositories.md) - - [aws_ecrpublic_repository_images](aws_ecrpublic_repository_images.md) - [aws_ecr_registries](aws_ecr_registries.md) - [aws_ecr_registry_policies](aws_ecr_registry_policies.md) - [aws_ecr_repositories](aws_ecr_repositories.md) - [aws_ecr_repository_images](aws_ecr_repository_images.md) - [aws_ecr_repository_image_scan_findings](aws_ecr_repository_image_scan_findings.md) +- [aws_ecrpublic_repositories](aws_ecrpublic_repositories.md) + - [aws_ecrpublic_repository_images](aws_ecrpublic_repository_images.md) - [aws_ecs_clusters](aws_ecs_clusters.md) - - [aws_ecs_cluster_tasks](aws_ecs_cluster_tasks.md) - - [aws_ecs_cluster_services](aws_ecs_cluster_services.md) - [aws_ecs_cluster_container_instances](aws_ecs_cluster_container_instances.md) + - [aws_ecs_cluster_services](aws_ecs_cluster_services.md) + - [aws_ecs_cluster_tasks](aws_ecs_cluster_tasks.md) - [aws_ecs_task_definitions](aws_ecs_task_definitions.md) - [aws_efs_filesystems](aws_efs_filesystems.md) - [aws_eks_clusters](aws_eks_clusters.md) @@ -182,18 +182,18 @@ - [aws_elasticache_global_replication_groups](aws_elasticache_global_replication_groups.md) - [aws_elasticache_parameter_groups](aws_elasticache_parameter_groups.md) - [aws_elasticache_replication_groups](aws_elasticache_replication_groups.md) -- [aws_elasticache_reserved_cache_nodes_offerings](aws_elasticache_reserved_cache_nodes_offerings.md) - [aws_elasticache_reserved_cache_nodes](aws_elasticache_reserved_cache_nodes.md) +- [aws_elasticache_reserved_cache_nodes_offerings](aws_elasticache_reserved_cache_nodes_offerings.md) - [aws_elasticache_service_updates](aws_elasticache_service_updates.md) - [aws_elasticache_snapshots](aws_elasticache_snapshots.md) +- [aws_elasticache_subnet_groups](aws_elasticache_subnet_groups.md) - [aws_elasticache_user_groups](aws_elasticache_user_groups.md) - [aws_elasticache_users](aws_elasticache_users.md) -- [aws_elasticache_subnet_groups](aws_elasticache_subnet_groups.md) - [aws_elasticbeanstalk_application_versions](aws_elasticbeanstalk_application_versions.md) - [aws_elasticbeanstalk_applications](aws_elasticbeanstalk_applications.md) - [aws_elasticbeanstalk_environments](aws_elasticbeanstalk_environments.md) - - [aws_elasticbeanstalk_configuration_settings](aws_elasticbeanstalk_configuration_settings.md) - [aws_elasticbeanstalk_configuration_options](aws_elasticbeanstalk_configuration_options.md) + - [aws_elasticbeanstalk_configuration_settings](aws_elasticbeanstalk_configuration_settings.md) - [aws_elasticsearch_domains](aws_elasticsearch_domains.md) - [aws_elasticsearch_packages](aws_elasticsearch_packages.md) - [aws_elasticsearch_versions](aws_elasticsearch_versions.md) @@ -211,14 +211,14 @@ - [aws_elbv2_target_group_target_health_descriptions](aws_elbv2_target_group_target_health_descriptions.md) - [aws_emr_block_public_access_configs](aws_emr_block_public_access_configs.md) - [aws_emr_clusters](aws_emr_clusters.md) -- [aws_eventbridge_event_buses](aws_eventbridge_event_buses.md) - - [aws_eventbridge_event_bus_rules](aws_eventbridge_event_bus_rules.md) - [aws_eventbridge_api_destinations](aws_eventbridge_api_destinations.md) - [aws_eventbridge_archives](aws_eventbridge_archives.md) - [aws_eventbridge_connections](aws_eventbridge_connections.md) +- [aws_eventbridge_endpoints](aws_eventbridge_endpoints.md) +- [aws_eventbridge_event_buses](aws_eventbridge_event_buses.md) + - [aws_eventbridge_event_bus_rules](aws_eventbridge_event_bus_rules.md) - [aws_eventbridge_event_sources](aws_eventbridge_event_sources.md) - [aws_eventbridge_replays](aws_eventbridge_replays.md) -- [aws_eventbridge_endpoints](aws_eventbridge_endpoints.md) - [aws_firehose_delivery_streams](aws_firehose_delivery_streams.md) - [aws_frauddetector_batch_imports](aws_frauddetector_batch_imports.md) - [aws_frauddetector_batch_predictions](aws_frauddetector_batch_predictions.md) @@ -240,11 +240,11 @@ - [aws_fsx_snapshots](aws_fsx_snapshots.md) - [aws_fsx_storage_virtual_machines](aws_fsx_storage_virtual_machines.md) - [aws_fsx_volumes](aws_fsx_volumes.md) +- [aws_glacier_data_retrieval_policies](aws_glacier_data_retrieval_policies.md) - [aws_glacier_vaults](aws_glacier_vaults.md) - [aws_glacier_vault_access_policies](aws_glacier_vault_access_policies.md) - [aws_glacier_vault_lock_policies](aws_glacier_vault_lock_policies.md) - [aws_glacier_vault_notifications](aws_glacier_vault_notifications.md) -- [aws_glacier_data_retrieval_policies](aws_glacier_data_retrieval_policies.md) - [aws_glue_classifiers](aws_glue_classifiers.md) - [aws_glue_connections](aws_glue_connections.md) - [aws_glue_crawlers](aws_glue_crawlers.md) @@ -277,11 +277,11 @@ - [aws_iam_saml_identity_providers](aws_iam_saml_identity_providers.md) - [aws_iam_server_certificates](aws_iam_server_certificates.md) - [aws_iam_users](aws_iam_users.md) + - [aws_iam_ssh_public_keys](aws_iam_ssh_public_keys.md) - [aws_iam_user_access_keys](aws_iam_user_access_keys.md) - - [aws_iam_user_groups](aws_iam_user_groups.md) - [aws_iam_user_attached_policies](aws_iam_user_attached_policies.md) + - [aws_iam_user_groups](aws_iam_user_groups.md) - [aws_iam_user_policies](aws_iam_user_policies.md) - - [aws_iam_ssh_public_keys](aws_iam_ssh_public_keys.md) - [aws_iam_virtual_mfa_devices](aws_iam_virtual_mfa_devices.md) - [aws_identitystore_groups](aws_identitystore_groups.md) - [aws_identitystore_group_memberships](aws_identitystore_group_memberships.md) @@ -300,8 +300,8 @@ - [aws_iot_things](aws_iot_things.md) - [aws_iot_topic_rules](aws_iot_topic_rules.md) - [aws_kafka_clusters](aws_kafka_clusters.md) - - [aws_kafka_nodes](aws_kafka_nodes.md) - [aws_kafka_cluster_operations](aws_kafka_cluster_operations.md) + - [aws_kafka_nodes](aws_kafka_nodes.md) - [aws_kafka_configurations](aws_kafka_configurations.md) - [aws_kinesis_streams](aws_kinesis_streams.md) - [aws_kms_aliases](aws_kms_aliases.md) @@ -309,11 +309,11 @@ - [aws_kms_key_grants](aws_kms_key_grants.md) - [aws_kms_key_policies](aws_kms_key_policies.md) - [aws_lambda_functions](aws_lambda_functions.md) - - [aws_lambda_function_event_invoke_configs](aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_aliases](aws_lambda_function_aliases.md) - - [aws_lambda_function_versions](aws_lambda_function_versions.md) - [aws_lambda_function_concurrency_configs](aws_lambda_function_concurrency_configs.md) + - [aws_lambda_function_event_invoke_configs](aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_event_source_mappings](aws_lambda_function_event_source_mappings.md) + - [aws_lambda_function_versions](aws_lambda_function_versions.md) - [aws_lambda_layers](aws_lambda_layers.md) - [aws_lambda_layer_versions](aws_lambda_layer_versions.md) - [aws_lambda_layer_version_policies](aws_lambda_layer_version_policies.md) @@ -327,9 +327,9 @@ - [aws_lightsail_container_service_images](aws_lightsail_container_service_images.md) - [aws_lightsail_database_snapshots](aws_lightsail_database_snapshots.md) - [aws_lightsail_databases](aws_lightsail_databases.md) - - [aws_lightsail_database_parameters](aws_lightsail_database_parameters.md) - [aws_lightsail_database_events](aws_lightsail_database_events.md) - [aws_lightsail_database_log_events](aws_lightsail_database_log_events.md) + - [aws_lightsail_database_parameters](aws_lightsail_database_parameters.md) - [aws_lightsail_disks](aws_lightsail_disks.md) - [aws_lightsail_disk_snapshots](aws_lightsail_disk_snapshots.md) - [aws_lightsail_distributions](aws_lightsail_distributions.md) @@ -350,12 +350,13 @@ - [aws_neptune_clusters](aws_neptune_clusters.md) - [aws_neptune_db_parameter_groups](aws_neptune_db_parameter_groups.md) - [aws_neptune_db_parameter_group_db_parameters](aws_neptune_db_parameter_group_db_parameters.md) -- [aws_neptune_global_clusters](aws_neptune_global_clusters.md) - [aws_neptune_event_subscriptions](aws_neptune_event_subscriptions.md) +- [aws_neptune_global_clusters](aws_neptune_global_clusters.md) - [aws_neptune_instances](aws_neptune_instances.md) - [aws_neptune_subnet_groups](aws_neptune_subnet_groups.md) -- [aws_organizations_accounts](aws_organizations_accounts.md) +- [aws_organization_resource_policies](aws_organization_resource_policies.md) - [aws_organizations](aws_organizations.md) +- [aws_organizations_accounts](aws_organizations_accounts.md) - [aws_qldb_ledgers](aws_qldb_ledgers.md) - [aws_qldb_ledger_journal_kinesis_streams](aws_qldb_ledger_journal_kinesis_streams.md) - [aws_qldb_ledger_journal_s3_exports](aws_qldb_ledger_journal_s3_exports.md) @@ -370,15 +371,13 @@ - [aws_quicksight_templates](aws_quicksight_templates.md) - [aws_quicksight_users](aws_quicksight_users.md) - [aws_ram_principals](aws_ram_principals.md) -- [aws_ram_resources](aws_ram_resources.md) -- [aws_ram_resource_shares](aws_ram_resource_shares.md) - - [aws_ram_resource_share_permissions](aws_ram_resource_share_permissions.md) - [aws_ram_resource_share_associations](aws_ram_resource_share_associations.md) - [aws_ram_resource_share_invitations](aws_ram_resource_share_invitations.md) +- [aws_ram_resource_shares](aws_ram_resource_shares.md) + - [aws_ram_resource_share_permissions](aws_ram_resource_share_permissions.md) - [aws_ram_resource_types](aws_ram_resource_types.md) +- [aws_ram_resources](aws_ram_resources.md) - [aws_rds_certificates](aws_rds_certificates.md) -- [aws_rds_engine_versions](aws_rds_engine_versions.md) - - [aws_rds_cluster_parameters](aws_rds_cluster_parameters.md) - [aws_rds_cluster_parameter_groups](aws_rds_cluster_parameter_groups.md) - [aws_rds_cluster_parameter_group_parameters](aws_rds_cluster_parameter_group_parameters.md) - [aws_rds_cluster_snapshots](aws_rds_cluster_snapshots.md) @@ -387,15 +386,18 @@ - [aws_rds_db_parameter_group_db_parameters](aws_rds_db_parameter_group_db_parameters.md) - [aws_rds_db_security_groups](aws_rds_db_security_groups.md) - [aws_rds_db_snapshots](aws_rds_db_snapshots.md) +- [aws_rds_engine_versions](aws_rds_engine_versions.md) + - [aws_rds_cluster_parameters](aws_rds_cluster_parameters.md) - [aws_rds_event_subscriptions](aws_rds_event_subscriptions.md) - [aws_rds_instances](aws_rds_instances.md) - [aws_rds_subnet_groups](aws_rds_subnet_groups.md) - [aws_redshift_clusters](aws_redshift_clusters.md) - - [aws_redshift_snapshots](aws_redshift_snapshots.md) - [aws_redshift_cluster_parameter_groups](aws_redshift_cluster_parameter_groups.md) - [aws_redshift_cluster_parameters](aws_redshift_cluster_parameters.md) + - [aws_redshift_snapshots](aws_redshift_snapshots.md) - [aws_redshift_event_subscriptions](aws_redshift_event_subscriptions.md) - [aws_redshift_subnet_groups](aws_redshift_subnet_groups.md) +- [aws_regions](aws_regions.md) - [aws_resourcegroups_resource_groups](aws_resourcegroups_resource_groups.md) - [aws_route53_delegation_sets](aws_route53_delegation_sets.md) - [aws_route53_domains](aws_route53_domains.md) @@ -408,14 +410,15 @@ - [aws_route53_traffic_policy_versions](aws_route53_traffic_policy_versions.md) - [aws_s3_accounts](aws_s3_accounts.md) - [aws_s3_buckets](aws_s3_buckets.md) + - [aws_s3_bucket_cors_rules](aws_s3_bucket_cors_rules.md) - [aws_s3_bucket_encryption_rules](aws_s3_bucket_encryption_rules.md) - - [aws_s3_bucket_lifecycles](aws_s3_bucket_lifecycles.md) - [aws_s3_bucket_grants](aws_s3_bucket_grants.md) - - [aws_s3_bucket_cors_rules](aws_s3_bucket_cors_rules.md) + - [aws_s3_bucket_lifecycles](aws_s3_bucket_lifecycles.md) - [aws_sagemaker_endpoint_configurations](aws_sagemaker_endpoint_configurations.md) - [aws_sagemaker_models](aws_sagemaker_models.md) - [aws_sagemaker_notebook_instances](aws_sagemaker_notebook_instances.md) - [aws_sagemaker_training_jobs](aws_sagemaker_training_jobs.md) +- [aws_savingsplans_plans](aws_savingsplans_plans.md) - [aws_scheduler_schedule_groups](aws_scheduler_schedule_groups.md) - [aws_scheduler_schedules](aws_scheduler_schedules.md) - [aws_secretsmanager_secrets](aws_secretsmanager_secrets.md) @@ -438,15 +441,15 @@ - [aws_sns_subscriptions](aws_sns_subscriptions.md) - [aws_sns_topics](aws_sns_topics.md) - [aws_sqs_queues](aws_sqs_queues.md) +- [aws_ssm_associations](aws_ssm_associations.md) +- [aws_ssm_compliance_summary_items](aws_ssm_compliance_summary_items.md) - [aws_ssm_documents](aws_ssm_documents.md) - [aws_ssm_instances](aws_ssm_instances.md) - [aws_ssm_instance_compliance_items](aws_ssm_instance_compliance_items.md) - [aws_ssm_instance_patches](aws_ssm_instance_patches.md) -- [aws_ssm_parameters](aws_ssm_parameters.md) -- [aws_ssm_compliance_summary_items](aws_ssm_compliance_summary_items.md) -- [aws_ssm_associations](aws_ssm_associations.md) - [aws_ssm_inventories](aws_ssm_inventories.md) - [aws_ssm_inventory_schemas](aws_ssm_inventory_schemas.md) +- [aws_ssm_parameters](aws_ssm_parameters.md) - [aws_ssm_patch_baselines](aws_ssm_patch_baselines.md) - [aws_ssoadmin_instances](aws_ssoadmin_instances.md) - [aws_ssoadmin_permission_sets](aws_ssoadmin_permission_sets.md) @@ -455,21 +458,22 @@ - [aws_timestream_databases](aws_timestream_databases.md) - [aws_timestream_tables](aws_timestream_tables.md) - [aws_transfer_servers](aws_transfer_servers.md) -- [aws_wafregional_rate_based_rules](aws_wafregional_rate_based_rules.md) -- [aws_wafregional_rule_groups](aws_wafregional_rule_groups.md) -- [aws_wafregional_rules](aws_wafregional_rules.md) -- [aws_wafregional_web_acls](aws_wafregional_web_acls.md) - [aws_waf_rule_groups](aws_waf_rule_groups.md) - [aws_waf_rules](aws_waf_rules.md) - [aws_waf_subscribed_rule_groups](aws_waf_subscribed_rule_groups.md) - [aws_waf_web_acls](aws_waf_web_acls.md) +- [aws_wafregional_rate_based_rules](aws_wafregional_rate_based_rules.md) +- [aws_wafregional_rule_groups](aws_wafregional_rule_groups.md) +- [aws_wafregional_rules](aws_wafregional_rules.md) +- [aws_wafregional_web_acls](aws_wafregional_web_acls.md) - [aws_wafv2_ipsets](aws_wafv2_ipsets.md) - [aws_wafv2_managed_rule_groups](aws_wafv2_managed_rule_groups.md) - [aws_wafv2_regex_pattern_sets](aws_wafv2_regex_pattern_sets.md) - [aws_wafv2_rule_groups](aws_wafv2_rule_groups.md) - [aws_wafv2_web_acls](aws_wafv2_web_acls.md) -- [aws_workspaces_workspaces](aws_workspaces_workspaces.md) - [aws_workspaces_directories](aws_workspaces_directories.md) +- [aws_workspaces_workspaces](aws_workspaces_workspaces.md) - [aws_xray_encryption_configs](aws_xray_encryption_configs.md) - [aws_xray_groups](aws_xray_groups.md) +- [aws_xray_resource_policies](aws_xray_resource_policies.md) - [aws_xray_sampling_rules](aws_xray_sampling_rules.md) \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzers.md b/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzers.md index c37e4fceae51ab..f44f49e44c88cb 100644 --- a/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzers.md +++ b/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzers.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_accessanalyzer_analyzers: - - [aws_accessanalyzer_analyzer_findings](aws_accessanalyzer_analyzer_findings.md) - [aws_accessanalyzer_analyzer_archive_rules](aws_accessanalyzer_analyzer_archive_rules.md) + - [aws_accessanalyzer_analyzer_findings](aws_accessanalyzer_analyzer_findings.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_apprunner_services.md b/plugins/source/aws/docs/tables/aws_apprunner_services.md index e33ece3430b9f9..e42f0561613272 100644 --- a/plugins/source/aws/docs/tables/aws_apprunner_services.md +++ b/plugins/source/aws/docs/tables/aws_apprunner_services.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_apprunner_services: - - [aws_apprunner_operations](aws_apprunner_operations.md) - [aws_apprunner_custom_domains](aws_apprunner_custom_domains.md) + - [aws_apprunner_operations](aws_apprunner_operations.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_athena_work_groups.md b/plugins/source/aws/docs/tables/aws_athena_work_groups.md index a1c249fc881c93..7869b929f6c227 100644 --- a/plugins/source/aws/docs/tables/aws_athena_work_groups.md +++ b/plugins/source/aws/docs/tables/aws_athena_work_groups.md @@ -7,9 +7,9 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_athena_work_groups: + - [aws_athena_work_group_named_queries](aws_athena_work_group_named_queries.md) - [aws_athena_work_group_prepared_statements](aws_athena_work_group_prepared_statements.md) - [aws_athena_work_group_query_executions](aws_athena_work_group_query_executions.md) - - [aws_athena_work_group_named_queries](aws_athena_work_group_named_queries.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_autoscaling_groups.md b/plugins/source/aws/docs/tables/aws_autoscaling_groups.md index 81df163e29e7b6..3191c822ee4136 100644 --- a/plugins/source/aws/docs/tables/aws_autoscaling_groups.md +++ b/plugins/source/aws/docs/tables/aws_autoscaling_groups.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_autoscaling_groups: - - [aws_autoscaling_group_scaling_policies](aws_autoscaling_group_scaling_policies.md) - [aws_autoscaling_group_lifecycle_hooks](aws_autoscaling_group_lifecycle_hooks.md) + - [aws_autoscaling_group_scaling_policies](aws_autoscaling_group_scaling_policies.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_cloudwatch_alarms.md b/plugins/source/aws/docs/tables/aws_cloudwatch_alarms.md index b757bcee1d1f62..a833cac013e38b 100644 --- a/plugins/source/aws/docs/tables/aws_cloudwatch_alarms.md +++ b/plugins/source/aws/docs/tables/aws_cloudwatch_alarms.md @@ -19,6 +19,7 @@ The primary key for this table is **arn**. |dimensions|JSON| |actions_enabled|Bool| |alarm_actions|StringArray| +|alarm_arn|String| |alarm_configuration_updated_timestamp|Timestamp| |alarm_description|String| |alarm_name|String| diff --git a/plugins/source/aws/docs/tables/aws_codepipeline_pipelines.md b/plugins/source/aws/docs/tables/aws_codepipeline_pipelines.md index db1051b384bb20..70a6d1e3e9be27 100644 --- a/plugins/source/aws/docs/tables/aws_codepipeline_pipelines.md +++ b/plugins/source/aws/docs/tables/aws_codepipeline_pipelines.md @@ -1,5 +1,7 @@ # Table: aws_codepipeline_pipelines +https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_GetPipeline.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_cognito_identity_pools.md b/plugins/source/aws/docs/tables/aws_cognito_identity_pools.md index c3753457af19d3..5e407846944727 100644 --- a/plugins/source/aws/docs/tables/aws_cognito_identity_pools.md +++ b/plugins/source/aws/docs/tables/aws_cognito_identity_pools.md @@ -1,5 +1,7 @@ # Table: aws_cognito_identity_pools +https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_DescribeIdentityPool.html + The composite primary key for this table is (**account_id**, **region**, **id**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md b/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md index 283a7c0cf6f56c..ba232a3ac1f7f8 100644 --- a/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md +++ b/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md @@ -1,5 +1,7 @@ # Table: aws_config_config_rule_compliances +https://docs.aws.amazon.com/config/latest/APIReference/API_ComplianceByConfigRule.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_config_config_rules.md b/plugins/source/aws/docs/tables/aws_config_config_rules.md index d587fff53a49aa..e1659a3842f2f4 100644 --- a/plugins/source/aws/docs/tables/aws_config_config_rules.md +++ b/plugins/source/aws/docs/tables/aws_config_config_rules.md @@ -1,5 +1,7 @@ # Table: aws_config_config_rules +https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConfigRules.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_config_configuration_recorders.md b/plugins/source/aws/docs/tables/aws_config_configuration_recorders.md index aec3b845c125b5..293ff0083a7951 100644 --- a/plugins/source/aws/docs/tables/aws_config_configuration_recorders.md +++ b/plugins/source/aws/docs/tables/aws_config_configuration_recorders.md @@ -1,5 +1,7 @@ # Table: aws_config_configuration_recorders +https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigurationRecorder.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_config_conformance_pack_rule_compliances.md b/plugins/source/aws/docs/tables/aws_config_conformance_pack_rule_compliances.md index c8afd158400cbf..9c293d7f974a46 100644 --- a/plugins/source/aws/docs/tables/aws_config_conformance_pack_rule_compliances.md +++ b/plugins/source/aws/docs/tables/aws_config_conformance_pack_rule_compliances.md @@ -1,5 +1,7 @@ # Table: aws_config_conformance_pack_rule_compliances +https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConformancePackCompliance.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_db_proxies.md b/plugins/source/aws/docs/tables/aws_db_proxies.md new file mode 100644 index 00000000000000..18463a4f8d94fe --- /dev/null +++ b/plugins/source/aws/docs/tables/aws_db_proxies.md @@ -0,0 +1,33 @@ +# Table: aws_db_proxies + +https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DBProxy.html + +The primary key for this table is **arn**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|account_id|String| +|region|String| +|arn (PK)|String| +|tags|JSON| +|auth|JSON| +|created_date|Timestamp| +|db_proxy_arn|String| +|db_proxy_name|String| +|debug_logging|Bool| +|endpoint|String| +|engine_family|String| +|idle_client_timeout|Int| +|require_tls|Bool| +|role_arn|String| +|status|String| +|updated_date|Timestamp| +|vpc_id|String| +|vpc_security_group_ids|StringArray| +|vpc_subnet_ids|StringArray| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_dynamodb_tables.md b/plugins/source/aws/docs/tables/aws_dynamodb_tables.md index aeec6457ce3e57..7c04de557d1de8 100644 --- a/plugins/source/aws/docs/tables/aws_dynamodb_tables.md +++ b/plugins/source/aws/docs/tables/aws_dynamodb_tables.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_dynamodb_tables: - - [aws_dynamodb_table_replica_auto_scalings](aws_dynamodb_table_replica_auto_scalings.md) - [aws_dynamodb_table_continuous_backups](aws_dynamodb_table_continuous_backups.md) + - [aws_dynamodb_table_replica_auto_scalings](aws_dynamodb_table_replica_auto_scalings.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_vpc_attachments.md b/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_vpc_attachments.md index fd63675b3f186a..6730d1428e85b0 100644 --- a/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_vpc_attachments.md +++ b/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_vpc_attachments.md @@ -19,11 +19,11 @@ This table depends on [aws_ec2_transit_gateways](aws_ec2_transit_gateways.md). |account_id|String| |region|String| |transit_gateway_arn|String| +|tags|JSON| |creation_time|Timestamp| |options|JSON| |state|String| |subnet_ids|StringArray| -|tags|JSON| |transit_gateway_attachment_id|String| |transit_gateway_id|String| |vpc_id|String| diff --git a/plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md b/plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md index 234aaf8b10431b..5a4b124cfaf8dc 100644 --- a/plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md +++ b/plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md @@ -8,10 +8,10 @@ The primary key for this table is **arn**. The following tables depend on aws_ec2_transit_gateways: - [aws_ec2_transit_gateway_attachments](aws_ec2_transit_gateway_attachments.md) + - [aws_ec2_transit_gateway_multicast_domains](aws_ec2_transit_gateway_multicast_domains.md) + - [aws_ec2_transit_gateway_peering_attachments](aws_ec2_transit_gateway_peering_attachments.md) - [aws_ec2_transit_gateway_route_tables](aws_ec2_transit_gateway_route_tables.md) - [aws_ec2_transit_gateway_vpc_attachments](aws_ec2_transit_gateway_vpc_attachments.md) - - [aws_ec2_transit_gateway_peering_attachments](aws_ec2_transit_gateway_peering_attachments.md) - - [aws_ec2_transit_gateway_multicast_domains](aws_ec2_transit_gateway_multicast_domains.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_ecr_registries.md b/plugins/source/aws/docs/tables/aws_ecr_registries.md index d9a9c05cb0c29b..b4e01fb72bcc14 100644 --- a/plugins/source/aws/docs/tables/aws_ecr_registries.md +++ b/plugins/source/aws/docs/tables/aws_ecr_registries.md @@ -1,5 +1,7 @@ # Table: aws_ecr_registries +https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_DescribeRegistry.html + The composite primary key for this table is (**account_id**, **region**, **registry_id**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_ecr_registry_policies.md b/plugins/source/aws/docs/tables/aws_ecr_registry_policies.md index c7233fdaa5094d..ab6aed2e146423 100644 --- a/plugins/source/aws/docs/tables/aws_ecr_registry_policies.md +++ b/plugins/source/aws/docs/tables/aws_ecr_registry_policies.md @@ -1,5 +1,7 @@ # Table: aws_ecr_registry_policies +https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_GetRegistryPolicy.html + The composite primary key for this table is (**account_id**, **region**, **registry_id**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_ecs_cluster_container_instances.md b/plugins/source/aws/docs/tables/aws_ecs_cluster_container_instances.md index 528e36ce8df770..bb0cf1f8eb8a37 100644 --- a/plugins/source/aws/docs/tables/aws_ecs_cluster_container_instances.md +++ b/plugins/source/aws/docs/tables/aws_ecs_cluster_container_instances.md @@ -19,6 +19,7 @@ This table depends on [aws_ecs_clusters](aws_ecs_clusters.md). |account_id|String| |region|String| |cluster_arn|String| +|tags|JSON| |agent_connected|Bool| |agent_update_status|String| |attachments|JSON| @@ -34,6 +35,5 @@ This table depends on [aws_ecs_clusters](aws_ecs_clusters.md). |running_tasks_count|Int| |status|String| |status_reason|String| -|tags|JSON| |version|Int| |version_info|JSON| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_ecs_clusters.md b/plugins/source/aws/docs/tables/aws_ecs_clusters.md index ec34bb4702e807..7c888550393f8c 100644 --- a/plugins/source/aws/docs/tables/aws_ecs_clusters.md +++ b/plugins/source/aws/docs/tables/aws_ecs_clusters.md @@ -7,9 +7,9 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_ecs_clusters: - - [aws_ecs_cluster_tasks](aws_ecs_cluster_tasks.md) - - [aws_ecs_cluster_services](aws_ecs_cluster_services.md) - [aws_ecs_cluster_container_instances](aws_ecs_cluster_container_instances.md) + - [aws_ecs_cluster_services](aws_ecs_cluster_services.md) + - [aws_ecs_cluster_tasks](aws_ecs_cluster_tasks.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_elasticbeanstalk_environments.md b/plugins/source/aws/docs/tables/aws_elasticbeanstalk_environments.md index 89a38d5eb81b20..9b83ced26e5cf2 100644 --- a/plugins/source/aws/docs/tables/aws_elasticbeanstalk_environments.md +++ b/plugins/source/aws/docs/tables/aws_elasticbeanstalk_environments.md @@ -7,8 +7,8 @@ The composite primary key for this table is (**account_id**, **id**). ## Relations The following tables depend on aws_elasticbeanstalk_environments: - - [aws_elasticbeanstalk_configuration_settings](aws_elasticbeanstalk_configuration_settings.md) - [aws_elasticbeanstalk_configuration_options](aws_elasticbeanstalk_configuration_options.md) + - [aws_elasticbeanstalk_configuration_settings](aws_elasticbeanstalk_configuration_settings.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md b/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md index 46d50fa3596aa2..0e3e56e88e9b84 100644 --- a/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md +++ b/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md @@ -1,5 +1,7 @@ # Table: aws_glacier_data_retrieval_policies +https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetDataRetrievalPolicy.html + The composite primary key for this table is (**account_id**, **region**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glacier_vault_access_policies.md b/plugins/source/aws/docs/tables/aws_glacier_vault_access_policies.md index 5498bce8f52114..4c9da16136e862 100644 --- a/plugins/source/aws/docs/tables/aws_glacier_vault_access_policies.md +++ b/plugins/source/aws/docs/tables/aws_glacier_vault_access_policies.md @@ -1,5 +1,7 @@ # Table: aws_glacier_vault_access_policies +https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetVaultAccessPolicy.html + The primary key for this table is **vault_arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glacier_vault_lock_policies.md b/plugins/source/aws/docs/tables/aws_glacier_vault_lock_policies.md index cb9480f8507062..5035df622f0540 100644 --- a/plugins/source/aws/docs/tables/aws_glacier_vault_lock_policies.md +++ b/plugins/source/aws/docs/tables/aws_glacier_vault_lock_policies.md @@ -1,5 +1,7 @@ # Table: aws_glacier_vault_lock_policies +https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetVaultLock.html + The primary key for this table is **vault_arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glacier_vault_notifications.md b/plugins/source/aws/docs/tables/aws_glacier_vault_notifications.md index 3389a643380835..aaaaaf9b3d56e1 100644 --- a/plugins/source/aws/docs/tables/aws_glacier_vault_notifications.md +++ b/plugins/source/aws/docs/tables/aws_glacier_vault_notifications.md @@ -1,5 +1,7 @@ # Table: aws_glacier_vault_notifications +https://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html + The primary key for this table is **vault_arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glacier_vaults.md b/plugins/source/aws/docs/tables/aws_glacier_vaults.md index ae3a9d68b98056..39ff2254371964 100644 --- a/plugins/source/aws/docs/tables/aws_glacier_vaults.md +++ b/plugins/source/aws/docs/tables/aws_glacier_vaults.md @@ -1,5 +1,7 @@ # Table: aws_glacier_vaults +https://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_classifiers.md b/plugins/source/aws/docs/tables/aws_glue_classifiers.md index d6e1a73626bc92..75c26beef1aec8 100644 --- a/plugins/source/aws/docs/tables/aws_glue_classifiers.md +++ b/plugins/source/aws/docs/tables/aws_glue_classifiers.md @@ -1,5 +1,7 @@ # Table: aws_glue_classifiers +https://docs.aws.amazon.com/glue/latest/webapi/API_Classifier.html + The composite primary key for this table is (**account_id**, **region**, **name**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_connections.md b/plugins/source/aws/docs/tables/aws_glue_connections.md index cc4c1793e466e6..605379f01ba149 100644 --- a/plugins/source/aws/docs/tables/aws_glue_connections.md +++ b/plugins/source/aws/docs/tables/aws_glue_connections.md @@ -1,5 +1,7 @@ # Table: aws_glue_connections +https://docs.aws.amazon.com/glue/latest/webapi/API_Connection.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_crawlers.md b/plugins/source/aws/docs/tables/aws_glue_crawlers.md index d3c7a4d0948cf7..5eec9c3bce4b94 100644 --- a/plugins/source/aws/docs/tables/aws_glue_crawlers.md +++ b/plugins/source/aws/docs/tables/aws_glue_crawlers.md @@ -1,5 +1,7 @@ # Table: aws_glue_crawlers +https://docs.aws.amazon.com/glue/latest/webapi/API_Crawler.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_database_table_indexes.md b/plugins/source/aws/docs/tables/aws_glue_database_table_indexes.md index 484f2c7b9c8ad6..fc905f1a8d133a 100644 --- a/plugins/source/aws/docs/tables/aws_glue_database_table_indexes.md +++ b/plugins/source/aws/docs/tables/aws_glue_database_table_indexes.md @@ -1,5 +1,7 @@ # Table: aws_glue_database_table_indexes +https://docs.aws.amazon.com/glue/latest/webapi/API_PartitionIndexDescriptor.html + The composite primary key for this table is (**database_arn**, **database_table_name**, **index_name**). ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_database_tables.md b/plugins/source/aws/docs/tables/aws_glue_database_tables.md index db3e310ee10770..92203e34136e1e 100644 --- a/plugins/source/aws/docs/tables/aws_glue_database_tables.md +++ b/plugins/source/aws/docs/tables/aws_glue_database_tables.md @@ -1,5 +1,7 @@ # Table: aws_glue_database_tables +https://docs.aws.amazon.com/glue/latest/webapi/API_Table.html + The composite primary key for this table is (**database_arn**, **name**). ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_databases.md b/plugins/source/aws/docs/tables/aws_glue_databases.md index 126f735bfae10a..b50b4ae2281f22 100644 --- a/plugins/source/aws/docs/tables/aws_glue_databases.md +++ b/plugins/source/aws/docs/tables/aws_glue_databases.md @@ -1,5 +1,7 @@ # Table: aws_glue_databases +https://docs.aws.amazon.com/glue/latest/webapi/API_Database.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_dev_endpoints.md b/plugins/source/aws/docs/tables/aws_glue_dev_endpoints.md index 2d06a8ba612372..7f2d011c9eb254 100644 --- a/plugins/source/aws/docs/tables/aws_glue_dev_endpoints.md +++ b/plugins/source/aws/docs/tables/aws_glue_dev_endpoints.md @@ -1,5 +1,7 @@ # Table: aws_glue_dev_endpoints +https://docs.aws.amazon.com/glue/latest/webapi/API_DevEndpoint.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_job_runs.md b/plugins/source/aws/docs/tables/aws_glue_job_runs.md index 0dddb440d5593b..58243f2a640e16 100644 --- a/plugins/source/aws/docs/tables/aws_glue_job_runs.md +++ b/plugins/source/aws/docs/tables/aws_glue_job_runs.md @@ -1,5 +1,7 @@ # Table: aws_glue_job_runs +https://docs.aws.amazon.com/glue/latest/webapi/API_JobRun.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_jobs.md b/plugins/source/aws/docs/tables/aws_glue_jobs.md index 83ac5b0571b842..ce7c4273c836af 100644 --- a/plugins/source/aws/docs/tables/aws_glue_jobs.md +++ b/plugins/source/aws/docs/tables/aws_glue_jobs.md @@ -1,5 +1,7 @@ # Table: aws_glue_jobs +https://docs.aws.amazon.com/glue/latest/webapi/API_Job.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_ml_transform_task_runs.md b/plugins/source/aws/docs/tables/aws_glue_ml_transform_task_runs.md index e52ffe7e891c94..deea2c7f7139f7 100644 --- a/plugins/source/aws/docs/tables/aws_glue_ml_transform_task_runs.md +++ b/plugins/source/aws/docs/tables/aws_glue_ml_transform_task_runs.md @@ -1,5 +1,7 @@ # Table: aws_glue_ml_transform_task_runs +https://docs.aws.amazon.com/glue/latest/webapi/API_TaskRun.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_ml_transforms.md b/plugins/source/aws/docs/tables/aws_glue_ml_transforms.md index 4b9c7b8192a8ca..3006fd71913930 100644 --- a/plugins/source/aws/docs/tables/aws_glue_ml_transforms.md +++ b/plugins/source/aws/docs/tables/aws_glue_ml_transforms.md @@ -1,5 +1,7 @@ # Table: aws_glue_ml_transforms +https://docs.aws.amazon.com/glue/latest/webapi/API_MLTransform.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_registries.md b/plugins/source/aws/docs/tables/aws_glue_registries.md index 6fbdcc9b8b0d83..4a3a51211dc64c 100644 --- a/plugins/source/aws/docs/tables/aws_glue_registries.md +++ b/plugins/source/aws/docs/tables/aws_glue_registries.md @@ -1,5 +1,7 @@ # Table: aws_glue_registries +https://docs.aws.amazon.com/glue/latest/webapi/API_RegistryListItem.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_registry_schema_versions.md b/plugins/source/aws/docs/tables/aws_glue_registry_schema_versions.md index 2365eb00f60705..6dd01e464e9d83 100644 --- a/plugins/source/aws/docs/tables/aws_glue_registry_schema_versions.md +++ b/plugins/source/aws/docs/tables/aws_glue_registry_schema_versions.md @@ -1,5 +1,7 @@ # Table: aws_glue_registry_schema_versions +https://docs.aws.amazon.com/glue/latest/webapi/API_GetSchemaVersion.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_registry_schemas.md b/plugins/source/aws/docs/tables/aws_glue_registry_schemas.md index af7283207f95cd..d1d7712fcaa2b3 100644 --- a/plugins/source/aws/docs/tables/aws_glue_registry_schemas.md +++ b/plugins/source/aws/docs/tables/aws_glue_registry_schemas.md @@ -1,5 +1,7 @@ # Table: aws_glue_registry_schemas +https://docs.aws.amazon.com/glue/latest/webapi/API_GetSchema.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_glue_security_configurations.md b/plugins/source/aws/docs/tables/aws_glue_security_configurations.md index a6746008e5e759..edb8843e102aa2 100644 --- a/plugins/source/aws/docs/tables/aws_glue_security_configurations.md +++ b/plugins/source/aws/docs/tables/aws_glue_security_configurations.md @@ -1,5 +1,7 @@ # Table: aws_glue_security_configurations +https://docs.aws.amazon.com/glue/latest/webapi/API_SecurityConfiguration.html + The composite primary key for this table is (**account_id**, **region**, **name**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_triggers.md b/plugins/source/aws/docs/tables/aws_glue_triggers.md index e407a41f0a0ce9..ca22563bb8e97f 100644 --- a/plugins/source/aws/docs/tables/aws_glue_triggers.md +++ b/plugins/source/aws/docs/tables/aws_glue_triggers.md @@ -1,5 +1,7 @@ # Table: aws_glue_triggers +https://docs.aws.amazon.com/glue/latest/webapi/API_Trigger.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_glue_workflows.md b/plugins/source/aws/docs/tables/aws_glue_workflows.md index eb06ff59e7819d..05bd4271c6f8cd 100644 --- a/plugins/source/aws/docs/tables/aws_glue_workflows.md +++ b/plugins/source/aws/docs/tables/aws_glue_workflows.md @@ -1,5 +1,7 @@ # Table: aws_glue_workflows +https://docs.aws.amazon.com/glue/latest/webapi/API_Workflow.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iam_group_policies.md b/plugins/source/aws/docs/tables/aws_iam_group_policies.md index caf30cbfe8e05d..b0a34529153b83 100644 --- a/plugins/source/aws/docs/tables/aws_iam_group_policies.md +++ b/plugins/source/aws/docs/tables/aws_iam_group_policies.md @@ -1,5 +1,7 @@ # Table: aws_iam_group_policies +https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroupPolicy.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_iam_openid_connect_identity_providers.md b/plugins/source/aws/docs/tables/aws_iam_openid_connect_identity_providers.md index 35b3e9888f7277..6cec7ed4e95d6a 100644 --- a/plugins/source/aws/docs/tables/aws_iam_openid_connect_identity_providers.md +++ b/plugins/source/aws/docs/tables/aws_iam_openid_connect_identity_providers.md @@ -1,5 +1,7 @@ # Table: aws_iam_openid_connect_identity_providers +https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetOpenIDConnectProvider.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iam_password_policies.md b/plugins/source/aws/docs/tables/aws_iam_password_policies.md index 1a635eb7d259a1..aa8fd7f0af6c2b 100644 --- a/plugins/source/aws/docs/tables/aws_iam_password_policies.md +++ b/plugins/source/aws/docs/tables/aws_iam_password_policies.md @@ -1,5 +1,7 @@ # Table: aws_iam_password_policies +https://docs.aws.amazon.com/IAM/latest/APIReference/API_PasswordPolicy.html + The primary key for this table is **account_id**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iam_role_policies.md b/plugins/source/aws/docs/tables/aws_iam_role_policies.md index 87f1e205d8299e..353ff050dc86b8 100644 --- a/plugins/source/aws/docs/tables/aws_iam_role_policies.md +++ b/plugins/source/aws/docs/tables/aws_iam_role_policies.md @@ -1,6 +1,8 @@ # Table: aws_iam_role_policies -The primary key for this table is **_cq_id**. +https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRolePolicy.html + +The composite primary key for this table is (**account_id**, **role_arn**, **policy_name**). ## Relations @@ -12,11 +14,11 @@ This table depends on [aws_iam_roles](aws_iam_roles.md). | ------------- | ------------- | |_cq_source_name|String| |_cq_sync_time|Timestamp| -|_cq_id (PK)|UUID| +|_cq_id|UUID| |_cq_parent_id|UUID| -|account_id|String| -|role_arn|String| +|account_id (PK)|String| +|role_arn (PK)|String| +|policy_name (PK)|String| |policy_document|JSON| -|policy_name|String| |role_name|String| |result_metadata|JSON| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_iam_user_access_keys.md b/plugins/source/aws/docs/tables/aws_iam_user_access_keys.md index a70b58e9859893..4631bede434bc0 100644 --- a/plugins/source/aws/docs/tables/aws_iam_user_access_keys.md +++ b/plugins/source/aws/docs/tables/aws_iam_user_access_keys.md @@ -1,6 +1,8 @@ # Table: aws_iam_user_access_keys -The primary key for this table is **_cq_id**. +https://docs.aws.amazon.com/IAM/latest/APIReference/API_AccessKeyMetadata.html + +The composite primary key for this table is (**account_id**, **user_arn**, **access_key_id**). ## Relations @@ -12,14 +14,14 @@ This table depends on [aws_iam_users](aws_iam_users.md). | ------------- | ------------- | |_cq_source_name|String| |_cq_sync_time|Timestamp| -|_cq_id (PK)|UUID| +|_cq_id|UUID| |_cq_parent_id|UUID| -|account_id|String| -|user_arn|String| +|account_id (PK)|String| +|user_arn (PK)|String| +|access_key_id (PK)|String| |user_id|String| |last_used|Timestamp| |last_used_service_name|String| -|access_key_id|String| |create_date|Timestamp| |status|String| |user_name|String| diff --git a/plugins/source/aws/docs/tables/aws_iam_user_attached_policies.md b/plugins/source/aws/docs/tables/aws_iam_user_attached_policies.md index 1801eb3d5c116b..52fa04867fb379 100644 --- a/plugins/source/aws/docs/tables/aws_iam_user_attached_policies.md +++ b/plugins/source/aws/docs/tables/aws_iam_user_attached_policies.md @@ -2,7 +2,7 @@ https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachedPolicy.html -The primary key for this table is **_cq_id**. +The composite primary key for this table is (**account_id**, **user_arn**, **policy_name**). ## Relations @@ -14,10 +14,10 @@ This table depends on [aws_iam_users](aws_iam_users.md). | ------------- | ------------- | |_cq_source_name|String| |_cq_sync_time|Timestamp| -|_cq_id (PK)|UUID| +|_cq_id|UUID| |_cq_parent_id|UUID| -|account_id|String| -|user_arn|String| +|account_id (PK)|String| +|user_arn (PK)|String| +|policy_name (PK)|String| |user_id|String| -|policy_arn|String| -|policy_name|String| \ No newline at end of file +|policy_arn|String| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_iam_user_policies.md b/plugins/source/aws/docs/tables/aws_iam_user_policies.md index f5973bd6ccc944..2774b9bb462360 100644 --- a/plugins/source/aws/docs/tables/aws_iam_user_policies.md +++ b/plugins/source/aws/docs/tables/aws_iam_user_policies.md @@ -1,5 +1,7 @@ # Table: aws_iam_user_policies +https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUserPolicy.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_iam_users.md b/plugins/source/aws/docs/tables/aws_iam_users.md index d6a3ecce48b4b2..b76e79be336855 100644 --- a/plugins/source/aws/docs/tables/aws_iam_users.md +++ b/plugins/source/aws/docs/tables/aws_iam_users.md @@ -7,11 +7,11 @@ The composite primary key for this table is (**id**, **account_id**). ## Relations The following tables depend on aws_iam_users: + - [aws_iam_ssh_public_keys](aws_iam_ssh_public_keys.md) - [aws_iam_user_access_keys](aws_iam_user_access_keys.md) - - [aws_iam_user_groups](aws_iam_user_groups.md) - [aws_iam_user_attached_policies](aws_iam_user_attached_policies.md) + - [aws_iam_user_groups](aws_iam_user_groups.md) - [aws_iam_user_policies](aws_iam_user_policies.md) - - [aws_iam_ssh_public_keys](aws_iam_ssh_public_keys.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_identitystore_group_memberships.md b/plugins/source/aws/docs/tables/aws_identitystore_group_memberships.md index e5afdc06c09f6a..3ff92cea928a82 100644 --- a/plugins/source/aws/docs/tables/aws_identitystore_group_memberships.md +++ b/plugins/source/aws/docs/tables/aws_identitystore_group_memberships.md @@ -1,5 +1,7 @@ # Table: aws_identitystore_group_memberships +https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_GroupMembership.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_identitystore_groups.md b/plugins/source/aws/docs/tables/aws_identitystore_groups.md index d127dbf9ed57d4..5e4b3bcb1580f0 100644 --- a/plugins/source/aws/docs/tables/aws_identitystore_groups.md +++ b/plugins/source/aws/docs/tables/aws_identitystore_groups.md @@ -1,5 +1,7 @@ # Table: aws_identitystore_groups +https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_identitystore_users.md b/plugins/source/aws/docs/tables/aws_identitystore_users.md index 45bd725a4da397..a70e954c2b7a48 100644 --- a/plugins/source/aws/docs/tables/aws_identitystore_users.md +++ b/plugins/source/aws/docs/tables/aws_identitystore_users.md @@ -1,5 +1,7 @@ # Table: aws_identitystore_users +https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html + The primary key for this table is **_cq_id**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iot_billing_groups.md b/plugins/source/aws/docs/tables/aws_iot_billing_groups.md index b0df2b62878bcf..08b347e9e0c26f 100644 --- a/plugins/source/aws/docs/tables/aws_iot_billing_groups.md +++ b/plugins/source/aws/docs/tables/aws_iot_billing_groups.md @@ -1,5 +1,7 @@ # Table: aws_iot_billing_groups +https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeBillingGroup.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iot_security_profiles.md b/plugins/source/aws/docs/tables/aws_iot_security_profiles.md index c7425615f8730b..5720301f5d984e 100644 --- a/plugins/source/aws/docs/tables/aws_iot_security_profiles.md +++ b/plugins/source/aws/docs/tables/aws_iot_security_profiles.md @@ -1,5 +1,7 @@ # Table: aws_iot_security_profiles +https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeSecurityProfile.html + The primary key for this table is **arn**. ## Columns @@ -21,6 +23,7 @@ The primary key for this table is **arn**. |behaviors|JSON| |creation_date|Timestamp| |last_modified_date|Timestamp| +|security_profile_arn|String| |security_profile_description|String| |security_profile_name|String| |version|Int| diff --git a/plugins/source/aws/docs/tables/aws_iot_thing_groups.md b/plugins/source/aws/docs/tables/aws_iot_thing_groups.md index 7d9dcddb19235e..bcceb3bd245016 100644 --- a/plugins/source/aws/docs/tables/aws_iot_thing_groups.md +++ b/plugins/source/aws/docs/tables/aws_iot_thing_groups.md @@ -1,5 +1,7 @@ # Table: aws_iot_thing_groups +https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeThingGroup.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_iot_topic_rules.md b/plugins/source/aws/docs/tables/aws_iot_topic_rules.md index 0e63aba94d9f42..dd117ce5538b23 100644 --- a/plugins/source/aws/docs/tables/aws_iot_topic_rules.md +++ b/plugins/source/aws/docs/tables/aws_iot_topic_rules.md @@ -1,5 +1,7 @@ # Table: aws_iot_topic_rules +https://docs.aws.amazon.com/iot/latest/apireference/API_GetTopicRule.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_kafka_clusters.md b/plugins/source/aws/docs/tables/aws_kafka_clusters.md index e6e6f8adb16010..3b24065ab8b614 100644 --- a/plugins/source/aws/docs/tables/aws_kafka_clusters.md +++ b/plugins/source/aws/docs/tables/aws_kafka_clusters.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_kafka_clusters: - - [aws_kafka_nodes](aws_kafka_nodes.md) - [aws_kafka_cluster_operations](aws_kafka_cluster_operations.md) + - [aws_kafka_nodes](aws_kafka_nodes.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_lambda_function_aliases.md b/plugins/source/aws/docs/tables/aws_lambda_function_aliases.md index c9f95cf0f16364..3f546b4c765d8e 100644 --- a/plugins/source/aws/docs/tables/aws_lambda_function_aliases.md +++ b/plugins/source/aws/docs/tables/aws_lambda_function_aliases.md @@ -1,5 +1,7 @@ # Table: aws_lambda_function_aliases +https://docs.aws.amazon.com/lambda/latest/dg/API_AliasConfiguration.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_lambda_function_event_source_mappings.md b/plugins/source/aws/docs/tables/aws_lambda_function_event_source_mappings.md index 42f9427a702232..f3e627322c4a9a 100644 --- a/plugins/source/aws/docs/tables/aws_lambda_function_event_source_mappings.md +++ b/plugins/source/aws/docs/tables/aws_lambda_function_event_source_mappings.md @@ -33,6 +33,7 @@ This table depends on [aws_lambda_functions](aws_lambda_functions.md). |maximum_retry_attempts|Int| |parallelization_factor|Int| |queues|StringArray| +|scaling_config|JSON| |self_managed_event_source|JSON| |self_managed_kafka_event_source_config|JSON| |source_access_configurations|JSON| diff --git a/plugins/source/aws/docs/tables/aws_lambda_functions.md b/plugins/source/aws/docs/tables/aws_lambda_functions.md index 929b66fb39b780..febcdef9a3e248 100644 --- a/plugins/source/aws/docs/tables/aws_lambda_functions.md +++ b/plugins/source/aws/docs/tables/aws_lambda_functions.md @@ -1,15 +1,17 @@ # Table: aws_lambda_functions +https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunction.html + The primary key for this table is **_cq_id**. ## Relations The following tables depend on aws_lambda_functions: - - [aws_lambda_function_event_invoke_configs](aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_aliases](aws_lambda_function_aliases.md) - - [aws_lambda_function_versions](aws_lambda_function_versions.md) - [aws_lambda_function_concurrency_configs](aws_lambda_function_concurrency_configs.md) + - [aws_lambda_function_event_invoke_configs](aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_event_source_mappings](aws_lambda_function_event_source_mappings.md) + - [aws_lambda_function_versions](aws_lambda_function_versions.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_lambda_layer_version_policies.md b/plugins/source/aws/docs/tables/aws_lambda_layer_version_policies.md index d90b8e36d1b6b0..0635fdca4cc310 100644 --- a/plugins/source/aws/docs/tables/aws_lambda_layer_version_policies.md +++ b/plugins/source/aws/docs/tables/aws_lambda_layer_version_policies.md @@ -1,5 +1,7 @@ # Table: aws_lambda_layer_version_policies +https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersionPolicy.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_lightsail_database_log_events.md b/plugins/source/aws/docs/tables/aws_lightsail_database_log_events.md index 73c50f0d11965a..68b7b94a1fe2df 100644 --- a/plugins/source/aws/docs/tables/aws_lightsail_database_log_events.md +++ b/plugins/source/aws/docs/tables/aws_lightsail_database_log_events.md @@ -1,5 +1,7 @@ # Table: aws_lightsail_database_log_events +https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRelationalDatabaseLogEvents.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_lightsail_databases.md b/plugins/source/aws/docs/tables/aws_lightsail_databases.md index b5cc7d716918e3..53bd4989bb6e28 100644 --- a/plugins/source/aws/docs/tables/aws_lightsail_databases.md +++ b/plugins/source/aws/docs/tables/aws_lightsail_databases.md @@ -7,9 +7,9 @@ The primary key for this table is **_cq_id**. ## Relations The following tables depend on aws_lightsail_databases: - - [aws_lightsail_database_parameters](aws_lightsail_database_parameters.md) - [aws_lightsail_database_events](aws_lightsail_database_events.md) - [aws_lightsail_database_log_events](aws_lightsail_database_log_events.md) + - [aws_lightsail_database_parameters](aws_lightsail_database_parameters.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_lightsail_distributions.md b/plugins/source/aws/docs/tables/aws_lightsail_distributions.md index a49fdd08f723a8..db9e97105373f0 100644 --- a/plugins/source/aws/docs/tables/aws_lightsail_distributions.md +++ b/plugins/source/aws/docs/tables/aws_lightsail_distributions.md @@ -1,5 +1,7 @@ # Table: aws_lightsail_distributions +https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetDistributions.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_mq_broker_users.md b/plugins/source/aws/docs/tables/aws_mq_broker_users.md index 2f34932e7e8a9e..2d04dc50fb9f65 100644 --- a/plugins/source/aws/docs/tables/aws_mq_broker_users.md +++ b/plugins/source/aws/docs/tables/aws_mq_broker_users.md @@ -1,5 +1,7 @@ # Table: aws_mq_broker_users +https://docs.aws.amazon.com/amazon-mq/latest/api-reference/brokers-broker-id-users-username.html + The primary key for this table is **_cq_id**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_organization_resource_policies.md b/plugins/source/aws/docs/tables/aws_organization_resource_policies.md new file mode 100644 index 00000000000000..4e48882ab16b81 --- /dev/null +++ b/plugins/source/aws/docs/tables/aws_organization_resource_policies.md @@ -0,0 +1,17 @@ +# Table: aws_organization_resource_policies + +https://docs.aws.amazon.com/organizations/latest/APIReference/API_DescribeResourcePolicy.html + +The primary key for this table is **account_id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|account_id (PK)|String| +|content|String| +|resource_policy_summary|JSON| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_qldb_ledgers.md b/plugins/source/aws/docs/tables/aws_qldb_ledgers.md index de97f3dbbe8b98..9ed26fb70aa24d 100644 --- a/plugins/source/aws/docs/tables/aws_qldb_ledgers.md +++ b/plugins/source/aws/docs/tables/aws_qldb_ledgers.md @@ -1,5 +1,7 @@ # Table: aws_qldb_ledgers +https://docs.aws.amazon.com/qldb/latest/developerguide/API_DescribeLedger.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_redshift_clusters.md b/plugins/source/aws/docs/tables/aws_redshift_clusters.md index e8af9cd74596c0..5832f32bd8897c 100644 --- a/plugins/source/aws/docs/tables/aws_redshift_clusters.md +++ b/plugins/source/aws/docs/tables/aws_redshift_clusters.md @@ -7,8 +7,8 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_redshift_clusters: - - [aws_redshift_snapshots](aws_redshift_snapshots.md) - [aws_redshift_cluster_parameter_groups](aws_redshift_cluster_parameter_groups.md) + - [aws_redshift_snapshots](aws_redshift_snapshots.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_resourcegroups_resource_groups.md b/plugins/source/aws/docs/tables/aws_resourcegroups_resource_groups.md index b9470bc65f5e63..084ca49520d73d 100644 --- a/plugins/source/aws/docs/tables/aws_resourcegroups_resource_groups.md +++ b/plugins/source/aws/docs/tables/aws_resourcegroups_resource_groups.md @@ -1,5 +1,7 @@ # Table: aws_resourcegroups_resource_groups +https://docs.aws.amazon.com/ARG/latest/APIReference/API_GetGroupQuery.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_route53_domains.md b/plugins/source/aws/docs/tables/aws_route53_domains.md index 02efe7f72bd016..19699b08dfae82 100644 --- a/plugins/source/aws/docs/tables/aws_route53_domains.md +++ b/plugins/source/aws/docs/tables/aws_route53_domains.md @@ -1,5 +1,7 @@ # Table: aws_route53_domains +https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetDomainDetail.html + The composite primary key for this table is (**account_id**, **domain_name**). ## Columns diff --git a/plugins/source/aws/docs/tables/aws_route53_hosted_zones.md b/plugins/source/aws/docs/tables/aws_route53_hosted_zones.md index c7cc434e8e131c..0f89bf2589d464 100644 --- a/plugins/source/aws/docs/tables/aws_route53_hosted_zones.md +++ b/plugins/source/aws/docs/tables/aws_route53_hosted_zones.md @@ -1,5 +1,7 @@ # Table: aws_route53_hosted_zones +https://docs.aws.amazon.com/Route53/latest/APIReference/API_HostedZone.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md b/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md index 837d6dbb53da77..42bce16948c256 100644 --- a/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md +++ b/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md @@ -2,7 +2,7 @@ https://docs.aws.amazon.com/AmazonS3/latest/API/API_Grant.html -The primary key for this table is **_cq_id**. +The composite primary key for this table is (**bucket_arn**, **grantee_type**, **grantee_id**). ## Relations @@ -14,9 +14,11 @@ This table depends on [aws_s3_buckets](aws_s3_buckets.md). | ------------- | ------------- | |_cq_source_name|String| |_cq_sync_time|Timestamp| -|_cq_id (PK)|UUID| +|_cq_id|UUID| |_cq_parent_id|UUID| |account_id|String| -|bucket_arn|String| +|bucket_arn (PK)|String| +|grantee_type (PK)|String| +|grantee_id (PK)|String| |grantee|JSON| |permission|String| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_s3_buckets.md b/plugins/source/aws/docs/tables/aws_s3_buckets.md index 1e29229c002561..2ae81e91d88aa3 100644 --- a/plugins/source/aws/docs/tables/aws_s3_buckets.md +++ b/plugins/source/aws/docs/tables/aws_s3_buckets.md @@ -5,10 +5,10 @@ The primary key for this table is **arn**. ## Relations The following tables depend on aws_s3_buckets: + - [aws_s3_bucket_cors_rules](aws_s3_bucket_cors_rules.md) - [aws_s3_bucket_encryption_rules](aws_s3_bucket_encryption_rules.md) - - [aws_s3_bucket_lifecycles](aws_s3_bucket_lifecycles.md) - [aws_s3_bucket_grants](aws_s3_bucket_grants.md) - - [aws_s3_bucket_cors_rules](aws_s3_bucket_cors_rules.md) + - [aws_s3_bucket_lifecycles](aws_s3_bucket_lifecycles.md) ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sagemaker_endpoint_configurations.md b/plugins/source/aws/docs/tables/aws_sagemaker_endpoint_configurations.md index 9fa8da36984bc0..239ed55e84f395 100644 --- a/plugins/source/aws/docs/tables/aws_sagemaker_endpoint_configurations.md +++ b/plugins/source/aws/docs/tables/aws_sagemaker_endpoint_configurations.md @@ -1,5 +1,7 @@ # Table: aws_sagemaker_endpoint_configurations +https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sagemaker_models.md b/plugins/source/aws/docs/tables/aws_sagemaker_models.md index 15c1b729d415ff..225a9547505449 100644 --- a/plugins/source/aws/docs/tables/aws_sagemaker_models.md +++ b/plugins/source/aws/docs/tables/aws_sagemaker_models.md @@ -1,5 +1,7 @@ # Table: aws_sagemaker_models +https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModel.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sagemaker_notebook_instances.md b/plugins/source/aws/docs/tables/aws_sagemaker_notebook_instances.md index 5d6877680b64e7..3a873e4250bc06 100644 --- a/plugins/source/aws/docs/tables/aws_sagemaker_notebook_instances.md +++ b/plugins/source/aws/docs/tables/aws_sagemaker_notebook_instances.md @@ -1,5 +1,7 @@ # Table: aws_sagemaker_notebook_instances +https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeNotebookInstance.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sagemaker_training_jobs.md b/plugins/source/aws/docs/tables/aws_sagemaker_training_jobs.md index edab6ba3ee94d7..0adcca3ba62f1a 100644 --- a/plugins/source/aws/docs/tables/aws_sagemaker_training_jobs.md +++ b/plugins/source/aws/docs/tables/aws_sagemaker_training_jobs.md @@ -1,5 +1,7 @@ # Table: aws_sagemaker_training_jobs +https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_savingsplans_plans.md b/plugins/source/aws/docs/tables/aws_savingsplans_plans.md new file mode 100644 index 00000000000000..8beb35f829cbc6 --- /dev/null +++ b/plugins/source/aws/docs/tables/aws_savingsplans_plans.md @@ -0,0 +1,34 @@ +# Table: aws_savingsplans_plans + +https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_SavingsPlan.html + +The primary key for this table is **arn**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|account_id|String| +|arn (PK)|String| +|commitment|String| +|currency|String| +|description|String| +|ec2_instance_family|String| +|end|String| +|offering_id|String| +|payment_option|String| +|product_types|StringArray| +|recurring_payment_amount|String| +|region|String| +|savings_plan_arn|String| +|savings_plan_id|String| +|savings_plan_type|String| +|start|String| +|state|String| +|tags|JSON| +|term_duration_in_seconds|Int| +|upfront_payment_amount|String| \ No newline at end of file diff --git a/plugins/source/aws/docs/tables/aws_ses_templates.md b/plugins/source/aws/docs/tables/aws_ses_templates.md index 8dfc7eb26c9438..ab6ee1bea6f3c3 100644 --- a/plugins/source/aws/docs/tables/aws_ses_templates.md +++ b/plugins/source/aws/docs/tables/aws_ses_templates.md @@ -1,5 +1,7 @@ # Table: aws_ses_templates +https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_GetEmailTemplate.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sns_subscriptions.md b/plugins/source/aws/docs/tables/aws_sns_subscriptions.md index cf070f4a6d18fa..f505560f8a8426 100644 --- a/plugins/source/aws/docs/tables/aws_sns_subscriptions.md +++ b/plugins/source/aws/docs/tables/aws_sns_subscriptions.md @@ -1,5 +1,7 @@ # Table: aws_sns_subscriptions +https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sns_topics.md b/plugins/source/aws/docs/tables/aws_sns_topics.md index a898b367a1625c..08e0a194485d9a 100644 --- a/plugins/source/aws/docs/tables/aws_sns_topics.md +++ b/plugins/source/aws/docs/tables/aws_sns_topics.md @@ -1,5 +1,7 @@ # Table: aws_sns_topics +https://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_sqs_queues.md b/plugins/source/aws/docs/tables/aws_sqs_queues.md index 8fbd85f07a036d..0871e1461e57bb 100644 --- a/plugins/source/aws/docs/tables/aws_sqs_queues.md +++ b/plugins/source/aws/docs/tables/aws_sqs_queues.md @@ -1,5 +1,7 @@ # Table: aws_sqs_queues +https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_timestream_databases.md b/plugins/source/aws/docs/tables/aws_timestream_databases.md index a51f50572bba38..38e1f973871c4d 100644 --- a/plugins/source/aws/docs/tables/aws_timestream_databases.md +++ b/plugins/source/aws/docs/tables/aws_timestream_databases.md @@ -1,5 +1,7 @@ # Table: aws_timestream_databases +https://docs.aws.amazon.com/timestream/latest/developerguide/API_Database.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_timestream_tables.md b/plugins/source/aws/docs/tables/aws_timestream_tables.md index a2bae28a5fe527..ade43294598c65 100644 --- a/plugins/source/aws/docs/tables/aws_timestream_tables.md +++ b/plugins/source/aws/docs/tables/aws_timestream_tables.md @@ -1,5 +1,7 @@ # Table: aws_timestream_tables +https://docs.aws.amazon.com/timestream/latest/developerguide/API_Table.html + The primary key for this table is **arn**. ## Relations diff --git a/plugins/source/aws/docs/tables/aws_wafv2_web_acls.md b/plugins/source/aws/docs/tables/aws_wafv2_web_acls.md index 6eac39d45c5c76..cc7737922e8549 100644 --- a/plugins/source/aws/docs/tables/aws_wafv2_web_acls.md +++ b/plugins/source/aws/docs/tables/aws_wafv2_web_acls.md @@ -1,5 +1,7 @@ # Table: aws_wafv2_web_acls +https://docs.aws.amazon.com/waf/latest/APIReference/API_WebACL.html + The primary key for this table is **arn**. ## Columns diff --git a/plugins/source/aws/docs/tables/aws_xray_resource_policies.md b/plugins/source/aws/docs/tables/aws_xray_resource_policies.md new file mode 100644 index 00000000000000..23161ce673f871 --- /dev/null +++ b/plugins/source/aws/docs/tables/aws_xray_resource_policies.md @@ -0,0 +1,20 @@ +# Table: aws_xray_resource_policies + +https://docs.aws.amazon.com/xray/latest/api/API_ResourcePolicy.html + +The composite primary key for this table is (**account_id**, **region**, **policy_name**, **policy_revision_id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|account_id (PK)|String| +|region (PK)|String| +|policy_name (PK)|String| +|policy_revision_id (PK)|String| +|last_updated_time|Timestamp| +|policy_document|String| \ No newline at end of file diff --git a/plugins/source/aws/go.mod b/plugins/source/aws/go.mod index ac0db686d6e999..d136ed493871aa 100644 --- a/plugins/source/aws/go.mod +++ b/plugins/source/aws/go.mod @@ -23,7 +23,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/cloudhsmv2 v1.14.0 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.22.0 github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.24.0 - github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.18.0 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.19.0 github.com/aws/aws-sdk-go-v2/service/codebuild v1.20.0 github.com/aws/aws-sdk-go-v2/service/codepipeline v1.14.0 github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.15.0 @@ -34,9 +34,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/directconnect v1.18.0 github.com/aws/aws-sdk-go-v2/service/docdb v1.20.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.18.0 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.77.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.78.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.18.0 - github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.14.0 + github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.15.0 github.com/aws/aws-sdk-go-v2/service/ecs v1.23.0 github.com/aws/aws-sdk-go-v2/service/efs v1.19.0 github.com/aws/aws-sdk-go-v2/service/eks v1.27.0 @@ -61,7 +61,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kafka v1.19.0 github.com/aws/aws-sdk-go-v2/service/kinesis v1.17.0 github.com/aws/aws-sdk-go-v2/service/kms v1.20.0 - github.com/aws/aws-sdk-go-v2/service/lambda v1.27.0 + github.com/aws/aws-sdk-go-v2/service/lambda v1.28.0 github.com/aws/aws-sdk-go-v2/service/lightsail v1.25.0 github.com/aws/aws-sdk-go-v2/service/mq v1.14.0 github.com/aws/aws-sdk-go-v2/service/mwaa v1.14.0 @@ -70,35 +70,37 @@ require ( github.com/aws/aws-sdk-go-v2/service/qldb v1.15.0 github.com/aws/aws-sdk-go-v2/service/quicksight v1.29.0 github.com/aws/aws-sdk-go-v2/service/ram v1.17.0 - github.com/aws/aws-sdk-go-v2/service/rds v1.39.0 + github.com/aws/aws-sdk-go-v2/service/rds v1.40.0 github.com/aws/aws-sdk-go-v2/service/redshift v1.27.0 - github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.13.0 + github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.14.0 github.com/aws/aws-sdk-go-v2/service/route53 v1.26.0 github.com/aws/aws-sdk-go-v2/service/route53domains v1.14.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 github.com/aws/aws-sdk-go-v2/service/s3control v1.29.0 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.62.0 + github.com/aws/aws-sdk-go-v2/service/savingsplans v1.12.0 github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.0 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.0 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.1 github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.16.0 github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.16.0 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.14.0 github.com/aws/aws-sdk-go-v2/service/ses v1.15.0 github.com/aws/aws-sdk-go-v2/service/sesv2 v1.16.0 github.com/aws/aws-sdk-go-v2/service/sfn v1.17.0 - github.com/aws/aws-sdk-go-v2/service/sns v1.18.8 - github.com/aws/aws-sdk-go-v2/service/sqs v1.19.17 - github.com/aws/aws-sdk-go-v2/service/ssm v1.34.0 - github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.15.16 + github.com/aws/aws-sdk-go-v2/service/sns v1.19.0 + github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 + github.com/aws/aws-sdk-go-v2/service/ssm v1.35.0 + github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.16.0 github.com/aws/aws-sdk-go-v2/service/sts v1.18.0 - github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.14.8 - github.com/aws/aws-sdk-go-v2/service/waf v1.11.21 - github.com/aws/aws-sdk-go-v2/service/wafv2 v1.23.4 - github.com/aws/aws-sdk-go-v2/service/workspaces v1.27.2 - github.com/aws/aws-sdk-go-v2/service/xray v1.15.3 + github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.15.0 + github.com/aws/aws-sdk-go-v2/service/waf v1.12.0 + github.com/aws/aws-sdk-go-v2/service/wafv2 v1.24.1 + github.com/aws/aws-sdk-go-v2/service/workspaces v1.28.0 + github.com/aws/aws-sdk-go-v2/service/xray v1.16.0 github.com/aws/smithy-go v1.13.5 github.com/basgys/goxml2json v1.1.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/codegen v0.2.0 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gocarina/gocsv v0.0.0-20221216233619-1fea7ae8d380 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.5.9 @@ -137,10 +139,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.21 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21 // indirect - github.com/aws/aws-sdk-go-v2/service/shield v1.17.13 + github.com/aws/aws-sdk-go-v2/service/shield v1.18.0 github.com/aws/aws-sdk-go-v2/service/sso v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/transfer v1.27.0 - github.com/aws/aws-sdk-go-v2/service/wafregional v1.12.22 + github.com/aws/aws-sdk-go-v2/service/transfer v1.28.0 + github.com/aws/aws-sdk-go-v2/service/wafregional v1.13.1 github.com/davecgh/go-spew v1.1.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect diff --git a/plugins/source/aws/go.sum b/plugins/source/aws/go.sum index 461337f4b2d423..1c0abf7ed2f8fb 100644 --- a/plugins/source/aws/go.sum +++ b/plugins/source/aws/go.sum @@ -90,8 +90,8 @@ github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.22.0 h1:Hdql8h9SancrQPqJoDcaJ github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.22.0/go.mod h1:1Li52ZBEvcubmtUtUFUjamRTQt4EoFzZpHDINdQ4Xso= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.24.0 h1:U7hDPPdDP7bptV6wJ5OJkshEw8P/K2k5WCjEYlVajLw= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.24.0/go.mod h1:th8fks2kW4FFCUKUQenuEG9TEzMLVxeL0ckdJn/QVbI= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.18.0 h1:Ai+CjJw+5/s3r6k5pggzDuFhWor2U3iwtsrmvN0Hczc= -github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.18.0/go.mod h1:xHK1ta0bQEa5jL6rahKRJvsibjzDO7NTIs5itzsF4w8= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.19.0 h1:p+OcsLTwgm2nYEohXLtvgcH85uw7hZM4RS5Q3wear6E= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.19.0/go.mod h1:xHK1ta0bQEa5jL6rahKRJvsibjzDO7NTIs5itzsF4w8= github.com/aws/aws-sdk-go-v2/service/codebuild v1.20.0 h1:7v1hy+4DUc2mLhV4WMzv+YuShj0zbqLW+WMCHqzDPyk= github.com/aws/aws-sdk-go-v2/service/codebuild v1.20.0/go.mod h1:8qcyoqQjYm4jOQApmG43LtHG9ZehKXyCzAq2n+B/v2s= github.com/aws/aws-sdk-go-v2/service/codepipeline v1.14.0 h1:vuUng/+gXtRZ0LhMpgPy1D/yOcIo58hCQuukZhLFIEI= @@ -112,12 +112,12 @@ github.com/aws/aws-sdk-go-v2/service/docdb v1.20.0 h1:ig+1+lWeM02O6G7fweMxncbnPI github.com/aws/aws-sdk-go-v2/service/docdb v1.20.0/go.mod h1:L5e0d7YdvUtAiG6AAQqFi5mM1kHkLz32qkoYvZLm1qU= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.18.0 h1:ytPUxPttkqtX8ducnFlimxa75RTwWfox+y8FwhIzMQE= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.18.0/go.mod h1:uP2wpt43//qh6NqMFslaRu53A2YbnFStkV4Wn1Ldels= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.77.0 h1:m6HYlpZlTWb9vHuuRHpWRieqPHWlS0mvQ90OJNrG/Nk= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.77.0/go.mod h1:mV0E7631M1eXdB+tlGFIw6JxfsC7Pz7+7Aw15oLVhZw= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.78.0 h1:pQAJaGmq6CYduJkI078q/G1GYtJBXHlzmAeCWt8ain8= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.78.0/go.mod h1:mV0E7631M1eXdB+tlGFIw6JxfsC7Pz7+7Aw15oLVhZw= github.com/aws/aws-sdk-go-v2/service/ecr v1.18.0 h1:5RVanD+P+L2W9WU07/8J/A52vnQi7F3ClBdWQttgYlg= github.com/aws/aws-sdk-go-v2/service/ecr v1.18.0/go.mod h1:9yGOFsa2OcdyePojE89xNGtdBusTyc8ocjpiuFtFc0g= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.14.0 h1:NOTXBdCwPPCa2AnTpATUx86EQPKY3RElaCwYYwy210I= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.14.0/go.mod h1:bBy8YiBBFd549EeySGjb0vHWg80XeMSigv/dr/2HFjE= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.15.0 h1:nZ/878IgQMYFd0RIYEoUYnr9kwyDu2GcExWmyVIb7Xo= +github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.15.0/go.mod h1:bBy8YiBBFd549EeySGjb0vHWg80XeMSigv/dr/2HFjE= github.com/aws/aws-sdk-go-v2/service/ecs v1.23.0 h1:U1C52Ja15znyDMd+J5t9URqHyGBTN0hPZt1UHlDFa7U= github.com/aws/aws-sdk-go-v2/service/ecs v1.23.0/go.mod h1:YXZ3cd8LDvvQytFpWjqbgdmHRAyJi4qbIT5dYdyhfeM= github.com/aws/aws-sdk-go-v2/service/efs v1.19.0 h1:3kuyykZ/ttISUeCeCRa7QBLIknnerNNDYLrAzYAYVjM= @@ -178,8 +178,8 @@ github.com/aws/aws-sdk-go-v2/service/kinesis v1.17.0 h1:Q57meHerZDM7jLK35iQ9mZSw github.com/aws/aws-sdk-go-v2/service/kinesis v1.17.0/go.mod h1:Nsbb771f+MGZwUJRlFoxvcSJMb1lLQW3b17L01t1YZI= github.com/aws/aws-sdk-go-v2/service/kms v1.20.0 h1:1mEQ1BVRfxU2KzcUUIzqDQ8p6yPkhzHrHT++sjtLJts= github.com/aws/aws-sdk-go-v2/service/kms v1.20.0/go.mod h1:13sjgMH7Xu4e46+0BEDhSnNh+cImHSYS5PpBjV3oXcU= -github.com/aws/aws-sdk-go-v2/service/lambda v1.27.0 h1:3PrEtnvtaZcIFpjOkm155oNe6TofwkJxHDJiu+UkEYI= -github.com/aws/aws-sdk-go-v2/service/lambda v1.27.0/go.mod h1:swAeO/+tSUbMwB9EF2miaCxPDSQwzRjfnRsYaNwbeRk= +github.com/aws/aws-sdk-go-v2/service/lambda v1.28.0 h1:XKXmX8HjbyWKi8mU1LXKmPYDAVPEwWJ9pm5k4L7K9qU= +github.com/aws/aws-sdk-go-v2/service/lambda v1.28.0/go.mod h1:swAeO/+tSUbMwB9EF2miaCxPDSQwzRjfnRsYaNwbeRk= github.com/aws/aws-sdk-go-v2/service/lightsail v1.25.0 h1:7sc6Mmr/Jx6OVC79PTwro3Y46e42ZzJmMdMU1BA983o= github.com/aws/aws-sdk-go-v2/service/lightsail v1.25.0/go.mod h1:6/SjaL8UNIHaMpaHIvuYk0jsMP////YmB/I5yHWginA= github.com/aws/aws-sdk-go-v2/service/mq v1.14.0 h1:04SEqGxjXmRJ2C437T4o3GT8VOm7sYFgWfGQwjiMUaY= @@ -196,12 +196,12 @@ github.com/aws/aws-sdk-go-v2/service/quicksight v1.29.0 h1:iL7otrHmucGPfW2NzV4R4 github.com/aws/aws-sdk-go-v2/service/quicksight v1.29.0/go.mod h1:wvJpr20R/imRPZsRJMkxCYV5zquGzJbASqARtCbiKKE= github.com/aws/aws-sdk-go-v2/service/ram v1.17.0 h1:kiOOQz6ZhYrcHaYcgsIPlIfvYT44FNErJpeBtXQzHEs= github.com/aws/aws-sdk-go-v2/service/ram v1.17.0/go.mod h1:hKHJTTpBpOG9+TPPnRjsvXsPytZFmXX0FRDEMiBOcek= -github.com/aws/aws-sdk-go-v2/service/rds v1.39.0 h1:SnusHwHQWMZxlS5gvRfzsg1Odq7gWl3STP4aUIqzRGE= -github.com/aws/aws-sdk-go-v2/service/rds v1.39.0/go.mod h1:Ume9NHqT871hUdxIRojWtWsPFyCswQmSjHHhyGot7v0= +github.com/aws/aws-sdk-go-v2/service/rds v1.40.0 h1:heJr38jKwCDwSKTVcy5LQ8sWecMoEHTTugJ0PAKERBA= +github.com/aws/aws-sdk-go-v2/service/rds v1.40.0/go.mod h1:Ume9NHqT871hUdxIRojWtWsPFyCswQmSjHHhyGot7v0= github.com/aws/aws-sdk-go-v2/service/redshift v1.27.0 h1:kJDkVPtkB+gLwahLNtWs0vnjneny2Apqjrz1zdBYqb4= github.com/aws/aws-sdk-go-v2/service/redshift v1.27.0/go.mod h1:cpzzZf+cK9kF7PAbJOU491GGQO/8+oD4jtbawDUG+pc= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.13.0 h1:YJCC58cjhiXvvKSOPTP1+K6fFKbZWo8eUpdQeCPZMHs= -github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.13.0/go.mod h1:ZkZtG/eXl3leAzkIHhWJOkKaAObxOHtYe3lxUxW1WW0= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.14.0 h1:qDFV1IZIBzzuwv+W/7X7EWhxbysp2A3M9YD1PuUgCa0= +github.com/aws/aws-sdk-go-v2/service/resourcegroups v1.14.0/go.mod h1:ZkZtG/eXl3leAzkIHhWJOkKaAObxOHtYe3lxUxW1WW0= github.com/aws/aws-sdk-go-v2/service/route53 v1.26.0 h1:Lt96i6l9YONN7X0KW5AgJJ84l3gAzBZcPqCbeEGhd3Y= github.com/aws/aws-sdk-go-v2/service/route53 v1.26.0/go.mod h1:4SAHuLdh4v7pA2F6HdhUUgiLUDA6J89KWr7xAYCDiyc= github.com/aws/aws-sdk-go-v2/service/route53domains v1.14.0 h1:I/rT8QFy58zw4A/tkTPsTjkIe3LaKI6UsvDn/YdJgE0= @@ -212,10 +212,12 @@ github.com/aws/aws-sdk-go-v2/service/s3control v1.29.0 h1:pK0WPrNx459/ZDyiQh2dZg github.com/aws/aws-sdk-go-v2/service/s3control v1.29.0/go.mod h1:4DfdtJVYJj82pZdBoOwyA87ocrDYfQgAgbW6e17Xr2U= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.62.0 h1:zyZAG/kCMQMGng20RM4NXGuZhznsExxfhD12Od0eOvw= github.com/aws/aws-sdk-go-v2/service/sagemaker v1.62.0/go.mod h1:v+qgYDefdlOgci1kvpeo9jwo0J66r/i+z1WJWher+cE= +github.com/aws/aws-sdk-go-v2/service/savingsplans v1.12.0 h1:ifQgNvk9Y0Szf7/ZAH3e1vitC/sWJDBLG/YAb7+2dZc= +github.com/aws/aws-sdk-go-v2/service/savingsplans v1.12.0/go.mod h1:Iqbc/iM2QDTTre+xRMonmYeZNP2YYnp8dzTkKEKDJAU= github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.0 h1:4AYYktQrNoGvQS7hm6SYTUYIbFC/T23I54Dx8KIM5AY= github.com/aws/aws-sdk-go-v2/service/scheduler v1.1.0/go.mod h1:ZnD5i/e5nCIh1w3ivCfifQ5r4PLh3aOCElnOrZz+WnQ= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.0 h1:UQDiRZyaHQGPXIuCYqKsz/wIVZknCiZdRmPW8buD/xc= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.0/go.mod h1:jAeo/PdIJZuDSwsvxJS94G4d6h8tStj7WXVuKwLHWU8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.1 h1:g7sJnSibd3KdECc7nT6BHvisdqX8eS3H0m4Rzq6yn/0= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.18.1/go.mod h1:jAeo/PdIJZuDSwsvxJS94G4d6h8tStj7WXVuKwLHWU8= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.16.0 h1:Yo5zv0KriAoPCo4yWCrcJ7IURim9PYNrAVZ3tP+IUfw= github.com/aws/aws-sdk-go-v2/service/servicecatalog v1.16.0/go.mod h1:r0xKT6nzw2oTEZ37LdnSCRA85zZwRFt0Cmc40+b9Rmk= github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry v1.16.0 h1:FObz7TAV6hXLH9RPUgctQjBeXsQ9dlRlo+ob3s4Pbik= @@ -228,36 +230,36 @@ github.com/aws/aws-sdk-go-v2/service/sesv2 v1.16.0 h1:ZVu7clQZjixs6IYUcpgkUoigjQ github.com/aws/aws-sdk-go-v2/service/sesv2 v1.16.0/go.mod h1:Q+I4FY+sxSWRVgbNXULzRnK+REDSF8oXzY5Eya/Y33c= github.com/aws/aws-sdk-go-v2/service/sfn v1.17.0 h1:D/NRBYtylwdGLucbrKFMl3EpF8lVmC5TTlYPnYQQnio= github.com/aws/aws-sdk-go-v2/service/sfn v1.17.0/go.mod h1:8M33kWcIYN1f2bfWrvKxzxveUN7UJv3dD3rmLoDaWrE= -github.com/aws/aws-sdk-go-v2/service/shield v1.17.13 h1:Omc6xBl4m4wMZoZWlt2f2Yjk6it7VEJMsvjC4oLCMGE= -github.com/aws/aws-sdk-go-v2/service/shield v1.17.13/go.mod h1:0mYbbS2XwsqOGyD5ReNH4FV884zHQB1WcixrT0ckhRI= -github.com/aws/aws-sdk-go-v2/service/sns v1.18.8 h1:Iwbdihm8vAnNJhnggU1D98JD79ZIIaOFFB8DBiA8Z48= -github.com/aws/aws-sdk-go-v2/service/sns v1.18.8/go.mod h1:iTh9DgwDnFqF5LfFHNXWAxLe9zV0/XcWaMCWXIRDqXA= -github.com/aws/aws-sdk-go-v2/service/sqs v1.19.17 h1:bTr3F70BsgeJZW5QU0O4pVapJbgXuuiaaX9vQQfJAp8= -github.com/aws/aws-sdk-go-v2/service/sqs v1.19.17/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= -github.com/aws/aws-sdk-go-v2/service/ssm v1.34.0 h1:uAUjT+Np+B5sWwpcGd3V9xpBwEid8qYYfgmg0CsWTNM= -github.com/aws/aws-sdk-go-v2/service/ssm v1.34.0/go.mod h1:Hf7wSogKP1XCJ9GgW8erZDL6IZ1NLwLN7bYdV/Gn/LI= +github.com/aws/aws-sdk-go-v2/service/shield v1.18.0 h1:dI9aouKTKx7R6HcHrEYSkOpTfCtGt+8wE3QPCohhm2Y= +github.com/aws/aws-sdk-go-v2/service/shield v1.18.0/go.mod h1:0mYbbS2XwsqOGyD5ReNH4FV884zHQB1WcixrT0ckhRI= +github.com/aws/aws-sdk-go-v2/service/sns v1.19.0 h1:ZU8uo+/XBgJLoYMEN5iPUd+WQXLt53S46ULtRa85+uk= +github.com/aws/aws-sdk-go-v2/service/sns v1.19.0/go.mod h1:iTh9DgwDnFqF5LfFHNXWAxLe9zV0/XcWaMCWXIRDqXA= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0 h1:tQoMg8i4nFAB70cJ4wiAYEiZRYo2P6uDmU2D6ys/igo= +github.com/aws/aws-sdk-go-v2/service/sqs v1.20.0/go.mod h1:jQhN5f4p3PALMNlUtfb/0wGIFlV7vGtJlPDVfxfNfPY= +github.com/aws/aws-sdk-go-v2/service/ssm v1.35.0 h1:QWCcOeLTrjvf7UdYIadzrhNH3PI6T9jXOV64Ez5YUgg= +github.com/aws/aws-sdk-go-v2/service/ssm v1.35.0/go.mod h1:Hf7wSogKP1XCJ9GgW8erZDL6IZ1NLwLN7bYdV/Gn/LI= github.com/aws/aws-sdk-go-v2/service/sso v1.12.0 h1:/2gzjhQowRLarkkBOGPXSRnb8sQ2RVsjdG1C/UliK/c= github.com/aws/aws-sdk-go-v2/service/sso v1.12.0/go.mod h1:wo/B7uUm/7zw/dWhBJ4FXuw1sySU5lyIhVg1Bu2yL9A= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.15.16 h1:l6aWoI8UnGII7yPEHdvAF84O0upQxPum6TFycIYtKkE= -github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.15.16/go.mod h1:xH7hHxhm765Db3QuS51w9DNgN3iMpcth0o1mMmYh6eY= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.16.0 h1:YFYW7hI6XCmmPb9eqhIZk0L53mLWQw4yYf/RC9m5Juo= +github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.16.0/go.mod h1:xH7hHxhm765Db3QuS51w9DNgN3iMpcth0o1mMmYh6eY= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0 h1:Jfly6mRxk2ZOSlbCvZfKNS7TukSx1mIzhSsqZ/IGSZI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0/go.mod h1:TZSH7xLO7+phDtViY/KUp9WGCJMQkLJ/VpgkTFd5gh8= github.com/aws/aws-sdk-go-v2/service/sts v1.18.0 h1:kOO++CYo50RcTFISESluhWEi5Prhg+gaSs4whWabiZU= github.com/aws/aws-sdk-go-v2/service/sts v1.18.0/go.mod h1:+lGbb3+1ugwKrNTWcf2RT05Xmp543B06zDFTwiTLp7I= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.14.8 h1:1FPvcg1m3K7bip7WLscELLF4RKZR0Ys1iUbomhtDYJY= -github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.14.8/go.mod h1:CrQFb3Pn8vnj3GDpjKlv9ANunOJx75Km6JkP6pxc2b8= -github.com/aws/aws-sdk-go-v2/service/transfer v1.27.0 h1:E8EpFslyukXM9gQAmmiJC8lvlGWbzPmzZv69FLv9UBg= -github.com/aws/aws-sdk-go-v2/service/transfer v1.27.0/go.mod h1:/Sg7CaZ5ua+MkOUGhg0yeVIgnpKc+/ehJcoik7Yikl8= -github.com/aws/aws-sdk-go-v2/service/waf v1.11.21 h1:4g4cMwemkVh0kjgMbg4DLqYBprwzmVh7qI7bmljCcz0= -github.com/aws/aws-sdk-go-v2/service/waf v1.11.21/go.mod h1:7/L+ejelv5nOhsD/4pbaVl6jAtCgtYwgud8Pb/SeheE= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.12.22 h1:KBjYyYqdS9F4g7NxMZ6yhFkHO/eaZUs03r/pHv9nlQE= -github.com/aws/aws-sdk-go-v2/service/wafregional v1.12.22/go.mod h1:oCfqX0qay7HrOqf6viIlSqBV1CykdyArfznKg2j2utA= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.23.4 h1:uikbWWM04WHokxui8+bZoyS4srq/2b5VANN22smoy5w= -github.com/aws/aws-sdk-go-v2/service/wafv2 v1.23.4/go.mod h1:dXnnPzwqtz7h6DRUYvXpdV59mg9bwnDDWaGxo16++cU= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.27.2 h1:GaH1EkxY3IgRAzfMATr6sHy6ymoXfH+cnBuuEB9YtvM= -github.com/aws/aws-sdk-go-v2/service/workspaces v1.27.2/go.mod h1:oudvE1/KOdqMDrq9PG1QjLpvQb8S5R3y2Fci+Vuc6To= -github.com/aws/aws-sdk-go-v2/service/xray v1.15.3 h1:twjIORJccJIKXy2FFtlUDzlzaS91AAKypuuTN4gL2Ew= -github.com/aws/aws-sdk-go-v2/service/xray v1.15.3/go.mod h1:Kkt49F7NMkrNQRa/dK5Twp+UtCRViNXp7Mv7rlfac08= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.15.0 h1:2s9bsjDcaThDWfu/SmGIj9oLCtL3JrA0rt7dgTWCffs= +github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.15.0/go.mod h1:CrQFb3Pn8vnj3GDpjKlv9ANunOJx75Km6JkP6pxc2b8= +github.com/aws/aws-sdk-go-v2/service/transfer v1.28.0 h1:DUzYspmXD5qY0IgJN2vWkKmy+mc85ikusNaNZB0Dt4c= +github.com/aws/aws-sdk-go-v2/service/transfer v1.28.0/go.mod h1:/Sg7CaZ5ua+MkOUGhg0yeVIgnpKc+/ehJcoik7Yikl8= +github.com/aws/aws-sdk-go-v2/service/waf v1.12.0 h1:motSjIEk+muJFUq+jbamHME5bTc1kTNm3EgAVTp7rcQ= +github.com/aws/aws-sdk-go-v2/service/waf v1.12.0/go.mod h1:7/L+ejelv5nOhsD/4pbaVl6jAtCgtYwgud8Pb/SeheE= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.13.1 h1:PAszA6EKbNHvs8V6WFI3CL22dUIBRjfMhjbyRg/lS8M= +github.com/aws/aws-sdk-go-v2/service/wafregional v1.13.1/go.mod h1:oCfqX0qay7HrOqf6viIlSqBV1CykdyArfznKg2j2utA= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.24.1 h1:YzOhdiziSg3yxG9nQxSuCPbLehoSY7lGx/zrPLTP1BM= +github.com/aws/aws-sdk-go-v2/service/wafv2 v1.24.1/go.mod h1:dXnnPzwqtz7h6DRUYvXpdV59mg9bwnDDWaGxo16++cU= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.28.0 h1:sjfoG4ahd0yE77sKiBokTlZHd9pk1k+vPGNJo6ct2QQ= +github.com/aws/aws-sdk-go-v2/service/workspaces v1.28.0/go.mod h1:oudvE1/KOdqMDrq9PG1QjLpvQb8S5R3y2Fci+Vuc6To= +github.com/aws/aws-sdk-go-v2/service/xray v1.16.0 h1:jLrbk0oHwcL/flkJ2ZIQ1lSp0aKcj2p4IdXh+nG2mmA= +github.com/aws/aws-sdk-go-v2/service/xray v1.16.0/go.mod h1:Kkt49F7NMkrNQRa/dK5Twp+UtCRViNXp7Mv7rlfac08= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= @@ -270,8 +272,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/codegen v0.2.0 h1:IC+UA1LPzKbgzvKmUhnLGEibgojAH31AyXMjlJr5vmI= +github.com/cloudquery/codegen v0.2.0/go.mod h1:oJxzUuOC79fP36vBPU1BJ7n+jgQemS33y/mbgNq6vfM= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/aws/resources/plugin/tables.go b/plugins/source/aws/resources/plugin/tables.go index 61b8dba5117436..eda44c0f5f81b0 100644 --- a/plugins/source/aws/resources/plugin/tables.go +++ b/plugins/source/aws/resources/plugin/tables.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package plugin import ( @@ -74,6 +72,7 @@ import ( "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/route53" "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/s3" "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/sagemaker" + "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/savingsplans" "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/scheduler" "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/secretsmanager" "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/servicecatalog" @@ -336,6 +335,7 @@ func tables() []*schema.Table { neptune.SubnetGroups(), organizations.Accounts(), organizations.Organizations(), + organizations.ResourcePolicies(), qldb.Ledgers(), quicksight.Analyses(), quicksight.Dashboards(), @@ -357,6 +357,7 @@ func tables() []*schema.Table { rds.ClusterSnapshots(), rds.Clusters(), rds.DbParameterGroups(), + rds.DbProxies(), rds.DbSecurityGroups(), rds.DbSnapshots(), rds.EventSubscriptions(), @@ -377,6 +378,7 @@ func tables() []*schema.Table { sagemaker.Models(), sagemaker.NotebookInstances(), sagemaker.TrainingJobs(), + savingsplans.Plans(), scheduler.ScheduleGroups(), scheduler.Schedules(), secretsmanager.Secrets(), @@ -427,5 +429,6 @@ func tables() []*schema.Table { xray.EncryptionConfigs(), xray.Groups(), xray.SamplingRules(), + xray.ResourcePolicies(), } } diff --git a/plugins/source/aws/resources/services/apigatewayv2/domain_name_rest_api_mappings.go b/plugins/source/aws/resources/services/apigatewayv2/domain_name_rest_api_mappings.go index dbc34642a154ac..1953590971fa1c 100644 --- a/plugins/source/aws/resources/services/apigatewayv2/domain_name_rest_api_mappings.go +++ b/plugins/source/aws/resources/services/apigatewayv2/domain_name_rest_api_mappings.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package apigatewayv2 import ( + "github.com/aws/aws-sdk-go-v2/service/apigatewayv2/types" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func DomainNameRestApiMappings() *schema.Table { @@ -13,6 +13,7 @@ func DomainNameRestApiMappings() *schema.Table { Description: `https://docs.aws.amazon.com/apigateway/latest/api/API_ApiMapping.html`, Resolver: fetchApigatewayv2DomainNameRestApiMappings, Multiplex: client.ServiceAccountRegionMultiplexer("apigateway"), + Transform: transformers.TransformWithStruct(&types.ApiMapping{}), Columns: []schema.Column{ { Name: "account_id", @@ -34,26 +35,6 @@ func DomainNameRestApiMappings() *schema.Table { Type: schema.TypeString, Resolver: resolveDomainNameRestApiMappingArn(), }, - { - Name: "api_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("ApiId"), - }, - { - Name: "stage", - Type: schema.TypeString, - Resolver: schema.PathResolver("Stage"), - }, - { - Name: "api_mapping_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("ApiMappingId"), - }, - { - Name: "api_mapping_key", - Type: schema.TypeString, - Resolver: schema.PathResolver("ApiMappingKey"), - }, }, } } diff --git a/plugins/source/aws/resources/services/applicationautoscaling/policies.go b/plugins/source/aws/resources/services/applicationautoscaling/policies.go index 91c5fa242efa8c..00f07bb8f008ac 100644 --- a/plugins/source/aws/resources/services/applicationautoscaling/policies.go +++ b/plugins/source/aws/resources/services/applicationautoscaling/policies.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package applicationautoscaling import ( diff --git a/plugins/source/aws/resources/services/appstream/app_blocks_fetch.go b/plugins/source/aws/resources/services/appstream/app_blocks_fetch.go index 9c97b2d7bbeec4..22b096ca898f54 100644 --- a/plugins/source/aws/resources/services/appstream/app_blocks_fetch.go +++ b/plugins/source/aws/resources/services/appstream/app_blocks_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/app_blocks_mock_test.go b/plugins/source/aws/resources/services/appstream/app_blocks_mock_test.go index 24535fea262394..3d88f41c73fa53 100644 --- a/plugins/source/aws/resources/services/appstream/app_blocks_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/app_blocks_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/directory_configs_fetch.go b/plugins/source/aws/resources/services/appstream/directory_configs_fetch.go index b2fe247fb2a7c7..0aaf6c763f9de4 100644 --- a/plugins/source/aws/resources/services/appstream/directory_configs_fetch.go +++ b/plugins/source/aws/resources/services/appstream/directory_configs_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/directory_configs_mock_test.go b/plugins/source/aws/resources/services/appstream/directory_configs_mock_test.go index 4c3cfd9b6454c1..565bab36f1b11c 100644 --- a/plugins/source/aws/resources/services/appstream/directory_configs_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/directory_configs_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/fleets_fetch.go b/plugins/source/aws/resources/services/appstream/fleets_fetch.go index 929928b00309da..0a2e64631747c7 100644 --- a/plugins/source/aws/resources/services/appstream/fleets_fetch.go +++ b/plugins/source/aws/resources/services/appstream/fleets_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/fleets_mock_test.go b/plugins/source/aws/resources/services/appstream/fleets_mock_test.go index bae0bbb9eff314..f33783964bc582 100644 --- a/plugins/source/aws/resources/services/appstream/fleets_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/fleets_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/image_builders_fetch.go b/plugins/source/aws/resources/services/appstream/image_builders_fetch.go index 586dbd43325e6b..6485e83979a6f6 100644 --- a/plugins/source/aws/resources/services/appstream/image_builders_fetch.go +++ b/plugins/source/aws/resources/services/appstream/image_builders_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/image_builders_mock_test.go b/plugins/source/aws/resources/services/appstream/image_builders_mock_test.go index ff6e85796404bf..69169be6a54cda 100644 --- a/plugins/source/aws/resources/services/appstream/image_builders_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/image_builders_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/images_fetch.go b/plugins/source/aws/resources/services/appstream/images_fetch.go index b9337b7d0baeea..6dcab0ff8390f2 100644 --- a/plugins/source/aws/resources/services/appstream/images_fetch.go +++ b/plugins/source/aws/resources/services/appstream/images_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( @@ -12,7 +10,7 @@ import ( ) func fetchAppstreamImages(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - var input appstream.DescribeImagesInput = appstream.DescribeImagesInput{MaxResults: aws.Int32(25)} + input := appstream.DescribeImagesInput{MaxResults: aws.Int32(25)} c := meta.(*client.Client) svc := c.Services().Appstream for { diff --git a/plugins/source/aws/resources/services/appstream/images_mock_test.go b/plugins/source/aws/resources/services/appstream/images_mock_test.go index 1d9de8dbf01f8e..f4c5253896c138 100644 --- a/plugins/source/aws/resources/services/appstream/images_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/images_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_fetch.go b/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_fetch.go index a9d50574e2b76c..f01d9add2e470e 100644 --- a/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_fetch.go +++ b/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_mock_test.go b/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_mock_test.go index 629fa48f659dd0..a9ec9601356db2 100644 --- a/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_mock_test.go +++ b/plugins/source/aws/resources/services/appstream/usage_report_subscriptions_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package appstream import ( diff --git a/plugins/source/aws/resources/services/backup/plan_selections.go b/plugins/source/aws/resources/services/backup/plan_selections.go index 7cc508f4eb7986..338710c9e6125f 100644 --- a/plugins/source/aws/resources/services/backup/plan_selections.go +++ b/plugins/source/aws/resources/services/backup/plan_selections.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package backup import ( diff --git a/plugins/source/aws/resources/services/cloudwatch/alarms.go b/plugins/source/aws/resources/services/cloudwatch/alarms.go index 174d7d4bf3a3f4..5ac6816253a5ec 100644 --- a/plugins/source/aws/resources/services/cloudwatch/alarms.go +++ b/plugins/source/aws/resources/services/cloudwatch/alarms.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package cloudwatch import ( + "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func Alarms() *schema.Table { @@ -13,6 +13,7 @@ func Alarms() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricAlarm.html`, Resolver: fetchCloudwatchAlarms, Multiplex: client.ServiceAccountRegionMultiplexer("logs"), + Transform: transformers.TransformWithStruct(&types.MetricAlarm{}), Columns: []schema.Column{ { Name: "account_id", @@ -42,141 +43,6 @@ func Alarms() *schema.Table { Type: schema.TypeJSON, Resolver: resolveCloudwatchAlarmDimensions, }, - { - Name: "actions_enabled", - Type: schema.TypeBool, - Resolver: schema.PathResolver("ActionsEnabled"), - }, - { - Name: "alarm_actions", - Type: schema.TypeStringArray, - Resolver: schema.PathResolver("AlarmActions"), - }, - { - Name: "alarm_configuration_updated_timestamp", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("AlarmConfigurationUpdatedTimestamp"), - }, - { - Name: "alarm_description", - Type: schema.TypeString, - Resolver: schema.PathResolver("AlarmDescription"), - }, - { - Name: "alarm_name", - Type: schema.TypeString, - Resolver: schema.PathResolver("AlarmName"), - }, - { - Name: "comparison_operator", - Type: schema.TypeString, - Resolver: schema.PathResolver("ComparisonOperator"), - }, - { - Name: "datapoints_to_alarm", - Type: schema.TypeInt, - Resolver: schema.PathResolver("DatapointsToAlarm"), - }, - { - Name: "evaluate_low_sample_count_percentile", - Type: schema.TypeString, - Resolver: schema.PathResolver("EvaluateLowSampleCountPercentile"), - }, - { - Name: "evaluation_periods", - Type: schema.TypeInt, - Resolver: schema.PathResolver("EvaluationPeriods"), - }, - { - Name: "evaluation_state", - Type: schema.TypeString, - Resolver: schema.PathResolver("EvaluationState"), - }, - { - Name: "extended_statistic", - Type: schema.TypeString, - Resolver: schema.PathResolver("ExtendedStatistic"), - }, - { - Name: "insufficient_data_actions", - Type: schema.TypeStringArray, - Resolver: schema.PathResolver("InsufficientDataActions"), - }, - { - Name: "metric_name", - Type: schema.TypeString, - Resolver: schema.PathResolver("MetricName"), - }, - { - Name: "metrics", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Metrics"), - }, - { - Name: "namespace", - Type: schema.TypeString, - Resolver: schema.PathResolver("Namespace"), - }, - { - Name: "ok_actions", - Type: schema.TypeStringArray, - Resolver: schema.PathResolver("OKActions"), - }, - { - Name: "period", - Type: schema.TypeInt, - Resolver: schema.PathResolver("Period"), - }, - { - Name: "state_reason", - Type: schema.TypeString, - Resolver: schema.PathResolver("StateReason"), - }, - { - Name: "state_reason_data", - Type: schema.TypeString, - Resolver: schema.PathResolver("StateReasonData"), - }, - { - Name: "state_transitioned_timestamp", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("StateTransitionedTimestamp"), - }, - { - Name: "state_updated_timestamp", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("StateUpdatedTimestamp"), - }, - { - Name: "state_value", - Type: schema.TypeString, - Resolver: schema.PathResolver("StateValue"), - }, - { - Name: "statistic", - Type: schema.TypeString, - Resolver: schema.PathResolver("Statistic"), - }, - { - Name: "threshold", - Type: schema.TypeFloat, - Resolver: schema.PathResolver("Threshold"), - }, - { - Name: "threshold_metric_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("ThresholdMetricId"), - }, - { - Name: "treat_missing_data", - Type: schema.TypeString, - Resolver: schema.PathResolver("TreatMissingData"), - }, - { - Name: "unit", - Type: schema.TypeString, - Resolver: schema.PathResolver("Unit"), - }, }, } } diff --git a/plugins/source/aws/resources/services/codepipeline/pipelines.go b/plugins/source/aws/resources/services/codepipeline/pipelines.go index d14c4dc9427252..331028744b15c5 100644 --- a/plugins/source/aws/resources/services/codepipeline/pipelines.go +++ b/plugins/source/aws/resources/services/codepipeline/pipelines.go @@ -10,6 +10,7 @@ import ( func Pipelines() *schema.Table { return &schema.Table{ Name: "aws_codepipeline_pipelines", + Description: `https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_GetPipeline.html`, Resolver: fetchCodepipelinePipelines, PreResourceResolver: getPipeline, Multiplex: client.ServiceAccountRegionMultiplexer("codepipeline"), diff --git a/plugins/source/aws/resources/services/cognito/identity_pools.go b/plugins/source/aws/resources/services/cognito/identity_pools.go index 9ad6e0af878530..8a3b16e3526512 100644 --- a/plugins/source/aws/resources/services/cognito/identity_pools.go +++ b/plugins/source/aws/resources/services/cognito/identity_pools.go @@ -10,6 +10,7 @@ import ( func IdentityPools() *schema.Table { return &schema.Table{ Name: "aws_cognito_identity_pools", + Description: `https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_DescribeIdentityPool.html`, Resolver: fetchCognitoIdentityPools, PreResourceResolver: getIdentityPool, Multiplex: client.ServiceAccountRegionMultiplexer("cognito-identity"), diff --git a/plugins/source/aws/resources/services/config/config_rule_compliances.go b/plugins/source/aws/resources/services/config/config_rule_compliances.go index 68fc9bc43aece4..117550d9fd32b0 100644 --- a/plugins/source/aws/resources/services/config/config_rule_compliances.go +++ b/plugins/source/aws/resources/services/config/config_rule_compliances.go @@ -9,10 +9,11 @@ import ( func ConfigRuleCompliances() *schema.Table { return &schema.Table{ - Name: "aws_config_config_rule_compliances", - Resolver: fetchConfigConfigRuleCompliances, - Multiplex: client.ServiceAccountRegionMultiplexer("config"), - Transform: transformers.TransformWithStruct(&types.ComplianceByConfigRule{}), + Name: "aws_config_config_rule_compliances", + Description: `https://docs.aws.amazon.com/config/latest/APIReference/API_ComplianceByConfigRule.html`, + Resolver: fetchConfigConfigRuleCompliances, + Multiplex: client.ServiceAccountRegionMultiplexer("config"), + Transform: transformers.TransformWithStruct(&types.ComplianceByConfigRule{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/config/config_rules.go b/plugins/source/aws/resources/services/config/config_rules.go index 60f25a04991032..f6371a56a5fc6a 100644 --- a/plugins/source/aws/resources/services/config/config_rules.go +++ b/plugins/source/aws/resources/services/config/config_rules.go @@ -9,10 +9,11 @@ import ( func ConfigRules() *schema.Table { return &schema.Table{ - Name: "aws_config_config_rules", - Resolver: fetchConfigConfigRules, - Multiplex: client.ServiceAccountRegionMultiplexer("config"), - Transform: transformers.TransformWithStruct(&types.ConfigRule{}), + Name: "aws_config_config_rules", + Description: `https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConfigRules.html`, + Resolver: fetchConfigConfigRules, + Multiplex: client.ServiceAccountRegionMultiplexer("config"), + Transform: transformers.TransformWithStruct(&types.ConfigRule{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/config/configuration_recorders.go b/plugins/source/aws/resources/services/config/configuration_recorders.go index 8e54b3457bfd33..491d29b9a440ff 100644 --- a/plugins/source/aws/resources/services/config/configuration_recorders.go +++ b/plugins/source/aws/resources/services/config/configuration_recorders.go @@ -9,10 +9,11 @@ import ( func ConfigurationRecorders() *schema.Table { return &schema.Table{ - Name: "aws_config_configuration_recorders", - Resolver: fetchConfigConfigurationRecorders, - Multiplex: client.ServiceAccountRegionMultiplexer("config"), - Transform: transformers.TransformWithStruct(&models.ConfigurationRecorderWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), + Name: "aws_config_configuration_recorders", + Description: `https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigurationRecorder.html`, + Resolver: fetchConfigConfigurationRecorders, + Multiplex: client.ServiceAccountRegionMultiplexer("config"), + Transform: transformers.TransformWithStruct(&models.ConfigurationRecorderWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/config/conformance_pack_rule_compliances.go b/plugins/source/aws/resources/services/config/conformance_pack_rule_compliances.go index f22b830109f08f..cfc39aebee42d6 100644 --- a/plugins/source/aws/resources/services/config/conformance_pack_rule_compliances.go +++ b/plugins/source/aws/resources/services/config/conformance_pack_rule_compliances.go @@ -9,10 +9,11 @@ import ( func ConformancePackRuleCompliances() *schema.Table { return &schema.Table{ - Name: "aws_config_conformance_pack_rule_compliances", - Resolver: fetchConfigConformancePackRuleCompliances, - Multiplex: client.ServiceAccountRegionMultiplexer("config"), - Transform: transformers.TransformWithStruct(&models.ConformancePackComplianceWrapper{}), + Name: "aws_config_conformance_pack_rule_compliances", + Description: `https://docs.aws.amazon.com/config/latest/APIReference/API_DescribeConformancePackCompliance.html`, + Resolver: fetchConfigConformancePackRuleCompliances, + Multiplex: client.ServiceAccountRegionMultiplexer("config"), + Transform: transformers.TransformWithStruct(&models.ConformancePackComplianceWrapper{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/ec2/transit_gateway_vpc_attachments.go b/plugins/source/aws/resources/services/ec2/transit_gateway_vpc_attachments.go index 356c58813a025f..374c8b6bcd8c96 100644 --- a/plugins/source/aws/resources/services/ec2/transit_gateway_vpc_attachments.go +++ b/plugins/source/aws/resources/services/ec2/transit_gateway_vpc_attachments.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package ec2 import ( + "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func TransitGatewayVpcAttachments() *schema.Table { @@ -13,6 +13,7 @@ func TransitGatewayVpcAttachments() *schema.Table { Description: `https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TransitGatewayVpcAttachment.html`, Resolver: fetchEc2TransitGatewayVpcAttachments, Multiplex: client.ServiceAccountRegionMultiplexer("ec2"), + Transform: transformers.TransformWithStruct(&types.TransitGatewayVpcAttachment{}), Columns: []schema.Column{ { Name: "account_id", @@ -29,51 +30,11 @@ func TransitGatewayVpcAttachments() *schema.Table { Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), }, - { - Name: "creation_time", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("CreationTime"), - }, - { - Name: "options", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Options"), - }, - { - Name: "state", - Type: schema.TypeString, - Resolver: schema.PathResolver("State"), - }, - { - Name: "subnet_ids", - Type: schema.TypeStringArray, - Resolver: schema.PathResolver("SubnetIds"), - }, { Name: "tags", Type: schema.TypeJSON, Resolver: client.ResolveTags, }, - { - Name: "transit_gateway_attachment_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("TransitGatewayAttachmentId"), - }, - { - Name: "transit_gateway_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("TransitGatewayId"), - }, - { - Name: "vpc_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("VpcId"), - }, - { - Name: "vpc_owner_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("VpcOwnerId"), - }, }, } } diff --git a/plugins/source/aws/resources/services/ecr/registries.go b/plugins/source/aws/resources/services/ecr/registries.go index 54fe79a3d0f6da..7486595414da05 100644 --- a/plugins/source/aws/resources/services/ecr/registries.go +++ b/plugins/source/aws/resources/services/ecr/registries.go @@ -9,10 +9,11 @@ import ( func Registries() *schema.Table { return &schema.Table{ - Name: "aws_ecr_registries", - Resolver: fetchEcrRegistries, - Multiplex: client.ServiceAccountRegionMultiplexer("api.ecr"), - Transform: transformers.TransformWithStruct(&ecr.DescribeRegistryOutput{}), + Name: "aws_ecr_registries", + Description: `https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_DescribeRegistry.html`, + Resolver: fetchEcrRegistries, + Multiplex: client.ServiceAccountRegionMultiplexer("api.ecr"), + Transform: transformers.TransformWithStruct(&ecr.DescribeRegistryOutput{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/ecr/registry_policies.go b/plugins/source/aws/resources/services/ecr/registry_policies.go index 319e2300e3590e..c04207decce7b5 100644 --- a/plugins/source/aws/resources/services/ecr/registry_policies.go +++ b/plugins/source/aws/resources/services/ecr/registry_policies.go @@ -9,10 +9,11 @@ import ( func RegistryPolicies() *schema.Table { return &schema.Table{ - Name: "aws_ecr_registry_policies", - Resolver: fetchEcrRegistryPolicies, - Multiplex: client.ServiceAccountRegionMultiplexer("api.ecr"), - Transform: transformers.TransformWithStruct(&ecr.GetRegistryPolicyOutput{}), + Name: "aws_ecr_registry_policies", + Description: `https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_GetRegistryPolicy.html`, + Resolver: fetchEcrRegistryPolicies, + Multiplex: client.ServiceAccountRegionMultiplexer("api.ecr"), + Transform: transformers.TransformWithStruct(&ecr.GetRegistryPolicyOutput{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/ecr/repository_image_scan_findings.go b/plugins/source/aws/resources/services/ecr/repository_image_scan_findings.go index 5f47256133b1b0..bfa74c954d4184 100644 --- a/plugins/source/aws/resources/services/ecr/repository_image_scan_findings.go +++ b/plugins/source/aws/resources/services/ecr/repository_image_scan_findings.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package ecr import ( "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/ecr/models" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func RepositoryImageScanFindings() *schema.Table { @@ -12,6 +12,7 @@ func RepositoryImageScanFindings() *schema.Table { Name: "aws_ecr_repository_image_scan_findings", Description: `https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_ImageScanFindings.html`, Resolver: fetchEcrRepositoryImageScanFindings, + Transform: transformers.TransformWithStruct(&models.ImageScanWrapper{}), Columns: []schema.Column{ { Name: "account_id", @@ -23,36 +24,6 @@ func RepositoryImageScanFindings() *schema.Table { Type: schema.TypeString, Resolver: client.ResolveAWSRegion, }, - { - Name: "image_tag", - Type: schema.TypeString, - Resolver: schema.PathResolver("ImageTag"), - }, - { - Name: "image_digest", - Type: schema.TypeString, - Resolver: schema.PathResolver("ImageDigest"), - }, - { - Name: "image_scan_findings", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("ImageScanFindings"), - }, - { - Name: "image_scan_status", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("ImageScanStatus"), - }, - { - Name: "registry_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("RegistryId"), - }, - { - Name: "repository_name", - Type: schema.TypeString, - Resolver: schema.PathResolver("RepositoryName"), - }, }, } } diff --git a/plugins/source/aws/resources/services/ecs/cluster_container_instances.go b/plugins/source/aws/resources/services/ecs/cluster_container_instances.go index e2603151151712..edac94571de70c 100644 --- a/plugins/source/aws/resources/services/ecs/cluster_container_instances.go +++ b/plugins/source/aws/resources/services/ecs/cluster_container_instances.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package ecs import ( + "github.com/aws/aws-sdk-go-v2/service/ecs/types" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func ClusterContainerInstances() *schema.Table { @@ -13,6 +13,7 @@ func ClusterContainerInstances() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerInstance.html`, Resolver: fetchEcsClusterContainerInstances, Multiplex: client.ServiceAccountRegionMultiplexer("ecs"), + Transform: transformers.TransformWithStruct(&types.ContainerInstance{}), Columns: []schema.Column{ { Name: "account_id", @@ -29,96 +30,11 @@ func ClusterContainerInstances() *schema.Table { Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), }, - { - Name: "agent_connected", - Type: schema.TypeBool, - Resolver: schema.PathResolver("AgentConnected"), - }, - { - Name: "agent_update_status", - Type: schema.TypeString, - Resolver: schema.PathResolver("AgentUpdateStatus"), - }, - { - Name: "attachments", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Attachments"), - }, - { - Name: "attributes", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Attributes"), - }, - { - Name: "capacity_provider_name", - Type: schema.TypeString, - Resolver: schema.PathResolver("CapacityProviderName"), - }, - { - Name: "container_instance_arn", - Type: schema.TypeString, - Resolver: schema.PathResolver("ContainerInstanceArn"), - }, - { - Name: "ec2_instance_id", - Type: schema.TypeString, - Resolver: schema.PathResolver("Ec2InstanceId"), - }, - { - Name: "health_status", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("HealthStatus"), - }, - { - Name: "pending_tasks_count", - Type: schema.TypeInt, - Resolver: schema.PathResolver("PendingTasksCount"), - }, - { - Name: "registered_at", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("RegisteredAt"), - }, - { - Name: "registered_resources", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("RegisteredResources"), - }, - { - Name: "remaining_resources", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("RemainingResources"), - }, - { - Name: "running_tasks_count", - Type: schema.TypeInt, - Resolver: schema.PathResolver("RunningTasksCount"), - }, - { - Name: "status", - Type: schema.TypeString, - Resolver: schema.PathResolver("Status"), - }, - { - Name: "status_reason", - Type: schema.TypeString, - Resolver: schema.PathResolver("StatusReason"), - }, { Name: "tags", Type: schema.TypeJSON, Resolver: client.ResolveTags, }, - { - Name: "version", - Type: schema.TypeInt, - Resolver: schema.PathResolver("Version"), - }, - { - Name: "version_info", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("VersionInfo"), - }, }, } } diff --git a/plugins/source/aws/resources/services/elbv2/listener_certificates.go b/plugins/source/aws/resources/services/elbv2/listener_certificates.go index a079b8d9d26f01..1a4807a18874c3 100644 --- a/plugins/source/aws/resources/services/elbv2/listener_certificates.go +++ b/plugins/source/aws/resources/services/elbv2/listener_certificates.go @@ -1,10 +1,10 @@ -// Code generated by codegen; DO NOT EDIT. - package elbv2 import ( + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func ListenerCertificates() *schema.Table { @@ -13,6 +13,7 @@ func ListenerCertificates() *schema.Table { Description: `https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_Certificate.html`, Resolver: fetchElbv2ListenerCertificates, Multiplex: client.ServiceAccountRegionMultiplexer("elasticloadbalancing"), + Transform: transformers.TransformWithStruct(&types.Certificate{}), Columns: []schema.Column{ { Name: "account_id", @@ -29,16 +30,6 @@ func ListenerCertificates() *schema.Table { Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), }, - { - Name: "certificate_arn", - Type: schema.TypeString, - Resolver: schema.PathResolver("CertificateArn"), - }, - { - Name: "is_default", - Type: schema.TypeBool, - Resolver: schema.PathResolver("IsDefault"), - }, }, } } diff --git a/plugins/source/aws/resources/services/eventbridge/api_destinations_fetch.go b/plugins/source/aws/resources/services/eventbridge/api_destinations_fetch.go index 67b7f6bd70152e..998d0611fa085f 100644 --- a/plugins/source/aws/resources/services/eventbridge/api_destinations_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/api_destinations_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/api_destinations_mock_test.go b/plugins/source/aws/resources/services/eventbridge/api_destinations_mock_test.go index e7f4fa855f37c8..78c6660d36a40c 100644 --- a/plugins/source/aws/resources/services/eventbridge/api_destinations_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/api_destinations_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/archives_fetch.go b/plugins/source/aws/resources/services/eventbridge/archives_fetch.go index c34d30855b3e6e..08da457c447ece 100644 --- a/plugins/source/aws/resources/services/eventbridge/archives_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/archives_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/archives_mock_test.go b/plugins/source/aws/resources/services/eventbridge/archives_mock_test.go index c52de51840c26c..f6c56854ce18b7 100644 --- a/plugins/source/aws/resources/services/eventbridge/archives_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/archives_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/connections_fetch.go b/plugins/source/aws/resources/services/eventbridge/connections_fetch.go index 9e3afefe48ec42..1a9224f12fa67e 100644 --- a/plugins/source/aws/resources/services/eventbridge/connections_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/connections_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/connections_mock_test.go b/plugins/source/aws/resources/services/eventbridge/connections_mock_test.go index 9b1339160ca0db..092d9cc1ad508a 100644 --- a/plugins/source/aws/resources/services/eventbridge/connections_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/connections_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/endpoints_fetch.go b/plugins/source/aws/resources/services/eventbridge/endpoints_fetch.go index 9e61b78cd790c5..62220f9100d315 100644 --- a/plugins/source/aws/resources/services/eventbridge/endpoints_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/endpoints_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/endpoints_mock_test.go b/plugins/source/aws/resources/services/eventbridge/endpoints_mock_test.go index 3346a351107ef1..a6e1f438a71b69 100644 --- a/plugins/source/aws/resources/services/eventbridge/endpoints_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/endpoints_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/event_sources_fetch.go b/plugins/source/aws/resources/services/eventbridge/event_sources_fetch.go index d34dd00dd12781..816c9048235938 100644 --- a/plugins/source/aws/resources/services/eventbridge/event_sources_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/event_sources_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/event_sources_mock_test.go b/plugins/source/aws/resources/services/eventbridge/event_sources_mock_test.go index 76f697f4f1fe5e..bdaf7e392b88d0 100644 --- a/plugins/source/aws/resources/services/eventbridge/event_sources_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/event_sources_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/replays_fetch.go b/plugins/source/aws/resources/services/eventbridge/replays_fetch.go index 2beda4d9aaff6b..5ed6a656c5d615 100644 --- a/plugins/source/aws/resources/services/eventbridge/replays_fetch.go +++ b/plugins/source/aws/resources/services/eventbridge/replays_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/eventbridge/replays_mock_test.go b/plugins/source/aws/resources/services/eventbridge/replays_mock_test.go index 51f1905c0e958d..9adb363f84d080 100644 --- a/plugins/source/aws/resources/services/eventbridge/replays_mock_test.go +++ b/plugins/source/aws/resources/services/eventbridge/replays_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package eventbridge import ( diff --git a/plugins/source/aws/resources/services/glacier/data_retrieval_policies.go b/plugins/source/aws/resources/services/glacier/data_retrieval_policies.go index 69eefc45a8f336..a6cfdbed821ace 100644 --- a/plugins/source/aws/resources/services/glacier/data_retrieval_policies.go +++ b/plugins/source/aws/resources/services/glacier/data_retrieval_policies.go @@ -9,10 +9,11 @@ import ( func DataRetrievalPolicies() *schema.Table { return &schema.Table{ - Name: "aws_glacier_data_retrieval_policies", - Resolver: fetchGlacierDataRetrievalPolicies, - Transform: transformers.TransformWithStruct(&types.DataRetrievalPolicy{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), + Name: "aws_glacier_data_retrieval_policies", + Description: `https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetDataRetrievalPolicy.html`, + Resolver: fetchGlacierDataRetrievalPolicies, + Transform: transformers.TransformWithStruct(&types.DataRetrievalPolicy{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glacier/vault_access_policies.go b/plugins/source/aws/resources/services/glacier/vault_access_policies.go index c145e32f58ef32..3a9481cd7baf17 100644 --- a/plugins/source/aws/resources/services/glacier/vault_access_policies.go +++ b/plugins/source/aws/resources/services/glacier/vault_access_policies.go @@ -9,10 +9,11 @@ import ( func VaultAccessPolicies() *schema.Table { return &schema.Table{ - Name: "aws_glacier_vault_access_policies", - Resolver: fetchGlacierVaultAccessPolicies, - Transform: transformers.TransformWithStruct(&types.VaultAccessPolicy{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), + Name: "aws_glacier_vault_access_policies", + Description: `https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetVaultAccessPolicy.html`, + Resolver: fetchGlacierVaultAccessPolicies, + Transform: transformers.TransformWithStruct(&types.VaultAccessPolicy{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glacier/vault_lock_policies.go b/plugins/source/aws/resources/services/glacier/vault_lock_policies.go index 5709a1a57cef4e..9a7bd6c4f0ce4c 100644 --- a/plugins/source/aws/resources/services/glacier/vault_lock_policies.go +++ b/plugins/source/aws/resources/services/glacier/vault_lock_policies.go @@ -9,10 +9,11 @@ import ( func VaultLockPolicies() *schema.Table { return &schema.Table{ - Name: "aws_glacier_vault_lock_policies", - Resolver: fetchGlacierVaultLockPolicies, - Transform: transformers.TransformWithStruct(&glacier.GetVaultLockOutput{}, transformers.WithSkipFields("ResultMetadata")), - Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), + Name: "aws_glacier_vault_lock_policies", + Description: `https://docs.aws.amazon.com/amazonglacier/latest/dev/api-GetVaultLock.html`, + Resolver: fetchGlacierVaultLockPolicies, + Transform: transformers.TransformWithStruct(&glacier.GetVaultLockOutput{}, transformers.WithSkipFields("ResultMetadata")), + Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glacier/vault_notifications.go b/plugins/source/aws/resources/services/glacier/vault_notifications.go index 0d3364dc19d5c1..a5a7c3603743de 100644 --- a/plugins/source/aws/resources/services/glacier/vault_notifications.go +++ b/plugins/source/aws/resources/services/glacier/vault_notifications.go @@ -9,10 +9,11 @@ import ( func VaultNotifications() *schema.Table { return &schema.Table{ - Name: "aws_glacier_vault_notifications", - Resolver: fetchGlacierVaultNotifications, - Transform: transformers.TransformWithStruct(&types.VaultNotificationConfig{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), + Name: "aws_glacier_vault_notifications", + Description: `https://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html`, + Resolver: fetchGlacierVaultNotifications, + Transform: transformers.TransformWithStruct(&types.VaultNotificationConfig{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glacier/vaults.go b/plugins/source/aws/resources/services/glacier/vaults.go index 64ee8049902a37..fb79b92f5ea0e8 100644 --- a/plugins/source/aws/resources/services/glacier/vaults.go +++ b/plugins/source/aws/resources/services/glacier/vaults.go @@ -9,10 +9,11 @@ import ( func Vaults() *schema.Table { return &schema.Table{ - Name: "aws_glacier_vaults", - Resolver: fetchGlacierVaults, - Transform: transformers.TransformWithStruct(&types.DescribeVaultOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), + Name: "aws_glacier_vaults", + Description: `https://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html`, + Resolver: fetchGlacierVaults, + Transform: transformers.TransformWithStruct(&types.DescribeVaultOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glacier"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/classifiers.go b/plugins/source/aws/resources/services/glue/classifiers.go index d8a1fb323f52b8..e905b58b4a33de 100644 --- a/plugins/source/aws/resources/services/glue/classifiers.go +++ b/plugins/source/aws/resources/services/glue/classifiers.go @@ -9,10 +9,11 @@ import ( func Classifiers() *schema.Table { return &schema.Table{ - Name: "aws_glue_classifiers", - Resolver: fetchGlueClassifiers, - Transform: transformers.TransformWithStruct(&types.Classifier{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_classifiers", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Classifier.html`, + Resolver: fetchGlueClassifiers, + Transform: transformers.TransformWithStruct(&types.Classifier{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/connections.go b/plugins/source/aws/resources/services/glue/connections.go index 6c574f1ec9e25f..78ac4ed942bb6e 100644 --- a/plugins/source/aws/resources/services/glue/connections.go +++ b/plugins/source/aws/resources/services/glue/connections.go @@ -9,10 +9,11 @@ import ( func Connections() *schema.Table { return &schema.Table{ - Name: "aws_glue_connections", - Resolver: fetchGlueConnections, - Transform: transformers.TransformWithStruct(&types.Connection{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_connections", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Connection.html`, + Resolver: fetchGlueConnections, + Transform: transformers.TransformWithStruct(&types.Connection{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/crawlers.go b/plugins/source/aws/resources/services/glue/crawlers.go index d53f73c57e2169..d3619982868b6c 100644 --- a/plugins/source/aws/resources/services/glue/crawlers.go +++ b/plugins/source/aws/resources/services/glue/crawlers.go @@ -9,10 +9,11 @@ import ( func Crawlers() *schema.Table { return &schema.Table{ - Name: "aws_glue_crawlers", - Resolver: fetchGlueCrawlers, - Transform: transformers.TransformWithStruct(&types.Crawler{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_crawlers", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Crawler.html`, + Resolver: fetchGlueCrawlers, + Transform: transformers.TransformWithStruct(&types.Crawler{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/database_table_indexes.go b/plugins/source/aws/resources/services/glue/database_table_indexes.go index 736588a443933a..90ae6b413a7d4c 100644 --- a/plugins/source/aws/resources/services/glue/database_table_indexes.go +++ b/plugins/source/aws/resources/services/glue/database_table_indexes.go @@ -9,10 +9,11 @@ import ( func DatabaseTableIndexes() *schema.Table { return &schema.Table{ - Name: "aws_glue_database_table_indexes", - Resolver: fetchGlueDatabaseTableIndexes, - Transform: transformers.TransformWithStruct(&types.PartitionIndexDescriptor{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_database_table_indexes", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_PartitionIndexDescriptor.html`, + Resolver: fetchGlueDatabaseTableIndexes, + Transform: transformers.TransformWithStruct(&types.PartitionIndexDescriptor{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/database_tables.go b/plugins/source/aws/resources/services/glue/database_tables.go index 88c043d9e4205a..e4e9bb11b7a740 100644 --- a/plugins/source/aws/resources/services/glue/database_tables.go +++ b/plugins/source/aws/resources/services/glue/database_tables.go @@ -9,10 +9,11 @@ import ( func DatabaseTables() *schema.Table { return &schema.Table{ - Name: "aws_glue_database_tables", - Resolver: fetchGlueDatabaseTables, - Transform: transformers.TransformWithStruct(&types.Table{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_database_tables", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Table.html`, + Resolver: fetchGlueDatabaseTables, + Transform: transformers.TransformWithStruct(&types.Table{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/databases.go b/plugins/source/aws/resources/services/glue/databases.go index 24401f0380b5e2..1e175eea520e5b 100644 --- a/plugins/source/aws/resources/services/glue/databases.go +++ b/plugins/source/aws/resources/services/glue/databases.go @@ -9,10 +9,11 @@ import ( func Databases() *schema.Table { return &schema.Table{ - Name: "aws_glue_databases", - Resolver: fetchGlueDatabases, - Transform: transformers.TransformWithStruct(&types.Database{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_databases", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Database.html`, + Resolver: fetchGlueDatabases, + Transform: transformers.TransformWithStruct(&types.Database{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/dev_endpoints.go b/plugins/source/aws/resources/services/glue/dev_endpoints.go index d8393a49d31e41..80958374d080c0 100644 --- a/plugins/source/aws/resources/services/glue/dev_endpoints.go +++ b/plugins/source/aws/resources/services/glue/dev_endpoints.go @@ -9,10 +9,11 @@ import ( func DevEndpoints() *schema.Table { return &schema.Table{ - Name: "aws_glue_dev_endpoints", - Resolver: fetchGlueDevEndpoints, - Transform: transformers.TransformWithStruct(&types.DevEndpoint{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_dev_endpoints", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_DevEndpoint.html`, + Resolver: fetchGlueDevEndpoints, + Transform: transformers.TransformWithStruct(&types.DevEndpoint{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/job_runs.go b/plugins/source/aws/resources/services/glue/job_runs.go index d0852a803fe24c..bb984ba78a61fe 100644 --- a/plugins/source/aws/resources/services/glue/job_runs.go +++ b/plugins/source/aws/resources/services/glue/job_runs.go @@ -9,10 +9,11 @@ import ( func JobRuns() *schema.Table { return &schema.Table{ - Name: "aws_glue_job_runs", - Resolver: fetchGlueJobRuns, - Transform: transformers.TransformWithStruct(&types.JobRun{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_job_runs", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_JobRun.html`, + Resolver: fetchGlueJobRuns, + Transform: transformers.TransformWithStruct(&types.JobRun{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/jobs.go b/plugins/source/aws/resources/services/glue/jobs.go index 2885628669710c..4672b3642367c4 100644 --- a/plugins/source/aws/resources/services/glue/jobs.go +++ b/plugins/source/aws/resources/services/glue/jobs.go @@ -9,10 +9,11 @@ import ( func Jobs() *schema.Table { return &schema.Table{ - Name: "aws_glue_jobs", - Resolver: fetchGlueJobs, - Transform: transformers.TransformWithStruct(&types.Job{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_jobs", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Job.html`, + Resolver: fetchGlueJobs, + Transform: transformers.TransformWithStruct(&types.Job{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/ml_transform_task_runs.go b/plugins/source/aws/resources/services/glue/ml_transform_task_runs.go index 63191697d79315..52efae7eaf675b 100644 --- a/plugins/source/aws/resources/services/glue/ml_transform_task_runs.go +++ b/plugins/source/aws/resources/services/glue/ml_transform_task_runs.go @@ -9,10 +9,11 @@ import ( func MlTransformTaskRuns() *schema.Table { return &schema.Table{ - Name: "aws_glue_ml_transform_task_runs", - Resolver: fetchGlueMlTransformTaskRuns, - Transform: transformers.TransformWithStruct(&types.TaskRun{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_ml_transform_task_runs", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_TaskRun.html`, + Resolver: fetchGlueMlTransformTaskRuns, + Transform: transformers.TransformWithStruct(&types.TaskRun{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/ml_transforms.go b/plugins/source/aws/resources/services/glue/ml_transforms.go index 7d04aad1b5ce6a..4547b872e9a331 100644 --- a/plugins/source/aws/resources/services/glue/ml_transforms.go +++ b/plugins/source/aws/resources/services/glue/ml_transforms.go @@ -9,10 +9,11 @@ import ( func MlTransforms() *schema.Table { return &schema.Table{ - Name: "aws_glue_ml_transforms", - Resolver: fetchGlueMlTransforms, - Transform: transformers.TransformWithStruct(&types.MLTransform{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_ml_transforms", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_MLTransform.html`, + Resolver: fetchGlueMlTransforms, + Transform: transformers.TransformWithStruct(&types.MLTransform{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/registries.go b/plugins/source/aws/resources/services/glue/registries.go index 0ef7e205209724..63553a9193f9c8 100644 --- a/plugins/source/aws/resources/services/glue/registries.go +++ b/plugins/source/aws/resources/services/glue/registries.go @@ -9,10 +9,11 @@ import ( func Registries() *schema.Table { return &schema.Table{ - Name: "aws_glue_registries", - Resolver: fetchGlueRegistries, - Transform: transformers.TransformWithStruct(&types.RegistryListItem{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_registries", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_RegistryListItem.html`, + Resolver: fetchGlueRegistries, + Transform: transformers.TransformWithStruct(&types.RegistryListItem{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/registry_schema_versions.go b/plugins/source/aws/resources/services/glue/registry_schema_versions.go index 99d1105029d247..818371c24e7b7d 100644 --- a/plugins/source/aws/resources/services/glue/registry_schema_versions.go +++ b/plugins/source/aws/resources/services/glue/registry_schema_versions.go @@ -10,6 +10,7 @@ import ( func RegistrySchemaVersions() *schema.Table { return &schema.Table{ Name: "aws_glue_registry_schema_versions", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_GetSchemaVersion.html`, Resolver: fetchGlueRegistrySchemaVersions, PreResourceResolver: getRegistrySchemaVersion, Transform: transformers.TransformWithStruct(&glue.GetSchemaVersionOutput{}), diff --git a/plugins/source/aws/resources/services/glue/registry_schemas.go b/plugins/source/aws/resources/services/glue/registry_schemas.go index 127aa1144a240e..2c0c4c464f517b 100644 --- a/plugins/source/aws/resources/services/glue/registry_schemas.go +++ b/plugins/source/aws/resources/services/glue/registry_schemas.go @@ -10,6 +10,7 @@ import ( func RegistrySchemas() *schema.Table { return &schema.Table{ Name: "aws_glue_registry_schemas", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_GetSchema.html`, Resolver: fetchGlueRegistrySchemas, PreResourceResolver: getRegistrySchema, Transform: transformers.TransformWithStruct(&glue.GetSchemaOutput{}), diff --git a/plugins/source/aws/resources/services/glue/security_configurations.go b/plugins/source/aws/resources/services/glue/security_configurations.go index b0d76d2a50530f..1060170ee4087e 100644 --- a/plugins/source/aws/resources/services/glue/security_configurations.go +++ b/plugins/source/aws/resources/services/glue/security_configurations.go @@ -9,10 +9,11 @@ import ( func SecurityConfigurations() *schema.Table { return &schema.Table{ - Name: "aws_glue_security_configurations", - Resolver: fetchGlueSecurityConfigurations, - Transform: transformers.TransformWithStruct(&types.SecurityConfiguration{}), - Multiplex: client.ServiceAccountRegionMultiplexer("glue"), + Name: "aws_glue_security_configurations", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_SecurityConfiguration.html`, + Resolver: fetchGlueSecurityConfigurations, + Transform: transformers.TransformWithStruct(&types.SecurityConfiguration{}), + Multiplex: client.ServiceAccountRegionMultiplexer("glue"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/glue/triggers.go b/plugins/source/aws/resources/services/glue/triggers.go index 166bbc63a4c5e1..61cb10a262130f 100644 --- a/plugins/source/aws/resources/services/glue/triggers.go +++ b/plugins/source/aws/resources/services/glue/triggers.go @@ -10,6 +10,7 @@ import ( func Triggers() *schema.Table { return &schema.Table{ Name: "aws_glue_triggers", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Trigger.html`, Resolver: fetchGlueTriggers, PreResourceResolver: getTrigger, Transform: transformers.TransformWithStruct(&types.Trigger{}), diff --git a/plugins/source/aws/resources/services/glue/workflows.go b/plugins/source/aws/resources/services/glue/workflows.go index b44518985c1dc2..16d788160fdf9a 100644 --- a/plugins/source/aws/resources/services/glue/workflows.go +++ b/plugins/source/aws/resources/services/glue/workflows.go @@ -10,6 +10,7 @@ import ( func Workflows() *schema.Table { return &schema.Table{ Name: "aws_glue_workflows", + Description: `https://docs.aws.amazon.com/glue/latest/webapi/API_Workflow.html`, Resolver: fetchGlueWorkflows, PreResourceResolver: getWorkflow, Transform: transformers.TransformWithStruct(&types.Workflow{}), diff --git a/plugins/source/aws/resources/services/iam/group_policies.go b/plugins/source/aws/resources/services/iam/group_policies.go index 29739d9f9b7b66..9e9b1cbc57a48a 100644 --- a/plugins/source/aws/resources/services/iam/group_policies.go +++ b/plugins/source/aws/resources/services/iam/group_policies.go @@ -10,6 +10,7 @@ import ( func GroupPolicies() *schema.Table { return &schema.Table{ Name: "aws_iam_group_policies", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroupPolicy.html`, Resolver: fetchIamGroupPolicies, PreResourceResolver: getGroupPolicy, Transform: transformers.TransformWithStruct(&iam.GetGroupPolicyOutput{}), diff --git a/plugins/source/aws/resources/services/iam/openid_connect_identity_providers.go b/plugins/source/aws/resources/services/iam/openid_connect_identity_providers.go index 258944bd79970f..99e2502e8585f8 100644 --- a/plugins/source/aws/resources/services/iam/openid_connect_identity_providers.go +++ b/plugins/source/aws/resources/services/iam/openid_connect_identity_providers.go @@ -10,6 +10,7 @@ import ( func OpenidConnectIdentityProviders() *schema.Table { return &schema.Table{ Name: "aws_iam_openid_connect_identity_providers", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetOpenIDConnectProvider.html`, Resolver: fetchIamOpenidConnectIdentityProviders, PreResourceResolver: getOpenIdConnectIdentityProvider, Transform: transformers.TransformWithStruct(&models.IamOpenIdIdentityProviderWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), diff --git a/plugins/source/aws/resources/services/iam/password_policies.go b/plugins/source/aws/resources/services/iam/password_policies.go index 53f18163772b57..8ac923d6a13df6 100644 --- a/plugins/source/aws/resources/services/iam/password_policies.go +++ b/plugins/source/aws/resources/services/iam/password_policies.go @@ -9,10 +9,11 @@ import ( func PasswordPolicies() *schema.Table { return &schema.Table{ - Name: "aws_iam_password_policies", - Resolver: fetchIamPasswordPolicies, - Transform: transformers.TransformWithStruct(&models.PasswordPolicyWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), - Multiplex: client.AccountMultiplex, + Name: "aws_iam_password_policies", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_PasswordPolicy.html`, + Resolver: fetchIamPasswordPolicies, + Transform: transformers.TransformWithStruct(&models.PasswordPolicyWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), + Multiplex: client.AccountMultiplex, Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/iam/role_policies.go b/plugins/source/aws/resources/services/iam/role_policies.go index ca922cfc668a87..3132ac763a5936 100644 --- a/plugins/source/aws/resources/services/iam/role_policies.go +++ b/plugins/source/aws/resources/services/iam/role_policies.go @@ -10,6 +10,7 @@ import ( func RolePolicies() *schema.Table { return &schema.Table{ Name: "aws_iam_role_policies", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRolePolicy.html`, Resolver: fetchIamRolePolicies, PreResourceResolver: getRolePolicy, Transform: transformers.TransformWithStruct(&iam.GetRolePolicyOutput{}), @@ -19,11 +20,25 @@ func RolePolicies() *schema.Table { Name: "account_id", Type: schema.TypeString, Resolver: client.ResolveAWSAccount, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "role_arn", Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "policy_name", + Type: schema.TypeString, + Resolver: schema.PathResolver("PolicyName"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "policy_document", diff --git a/plugins/source/aws/resources/services/iam/user_access_keys.go b/plugins/source/aws/resources/services/iam/user_access_keys.go index 6b9849450d8e08..aea353490be5c0 100644 --- a/plugins/source/aws/resources/services/iam/user_access_keys.go +++ b/plugins/source/aws/resources/services/iam/user_access_keys.go @@ -10,6 +10,7 @@ import ( func UserAccessKeys() *schema.Table { return &schema.Table{ Name: "aws_iam_user_access_keys", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_AccessKeyMetadata.html`, Resolver: fetchIamUserAccessKeys, PostResourceResolver: postIamUserAccessKeyResolver, Transform: transformers.TransformWithStruct(&models.AccessKeyWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), @@ -19,11 +20,25 @@ func UserAccessKeys() *schema.Table { Name: "account_id", Type: schema.TypeString, Resolver: client.ResolveAWSAccount, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "user_arn", Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "access_key_id", + Type: schema.TypeString, + Resolver: schema.PathResolver("AccessKeyId"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "user_id", diff --git a/plugins/source/aws/resources/services/iam/user_attached_policies.go b/plugins/source/aws/resources/services/iam/user_attached_policies.go index 34c98a18fd728c..87ab73bbdabb98 100644 --- a/plugins/source/aws/resources/services/iam/user_attached_policies.go +++ b/plugins/source/aws/resources/services/iam/user_attached_policies.go @@ -19,11 +19,25 @@ func UserAttachedPolicies() *schema.Table { Name: "account_id", Type: schema.TypeString, Resolver: client.ResolveAWSAccount, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "user_arn", Type: schema.TypeString, Resolver: schema.ParentColumnResolver("arn"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "policy_name", + Type: schema.TypeString, + Resolver: schema.PathResolver("PolicyName"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { Name: "user_id", diff --git a/plugins/source/aws/resources/services/iam/user_policies.go b/plugins/source/aws/resources/services/iam/user_policies.go index 5c7b44edc278e2..5dd755ef697319 100644 --- a/plugins/source/aws/resources/services/iam/user_policies.go +++ b/plugins/source/aws/resources/services/iam/user_policies.go @@ -10,6 +10,7 @@ import ( func UserPolicies() *schema.Table { return &schema.Table{ Name: "aws_iam_user_policies", + Description: `https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUserPolicy.html`, Resolver: fetchIamUserPolicies, PreResourceResolver: getUserPolicy, Transform: transformers.TransformWithStruct(&iam.GetUserPolicyOutput{}), diff --git a/plugins/source/aws/resources/services/identitystore/group_memberships.go b/plugins/source/aws/resources/services/identitystore/group_memberships.go index fef248ace25995..cc1068038e96c8 100644 --- a/plugins/source/aws/resources/services/identitystore/group_memberships.go +++ b/plugins/source/aws/resources/services/identitystore/group_memberships.go @@ -9,9 +9,10 @@ import ( func GroupMemberships() *schema.Table { return &schema.Table{ - Name: "aws_identitystore_group_memberships", - Resolver: fetchIdentitystoreGroupMemberships, - Transform: transformers.TransformWithStruct(&types.GroupMembership{}), - Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), + Name: "aws_identitystore_group_memberships", + Description: `https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_GroupMembership.html`, + Resolver: fetchIdentitystoreGroupMemberships, + Transform: transformers.TransformWithStruct(&types.GroupMembership{}), + Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), } } diff --git a/plugins/source/aws/resources/services/identitystore/groups.go b/plugins/source/aws/resources/services/identitystore/groups.go index 1adac8d8317a51..ef0710e180e818 100644 --- a/plugins/source/aws/resources/services/identitystore/groups.go +++ b/plugins/source/aws/resources/services/identitystore/groups.go @@ -9,10 +9,11 @@ import ( func Groups() *schema.Table { return &schema.Table{ - Name: "aws_identitystore_groups", - Resolver: fetchIdentitystoreGroups, - Transform: transformers.TransformWithStruct(&types.Group{}), - Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), + Name: "aws_identitystore_groups", + Description: `https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html`, + Resolver: fetchIdentitystoreGroups, + Transform: transformers.TransformWithStruct(&types.Group{}), + Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), Relations: []*schema.Table{ GroupMemberships(), diff --git a/plugins/source/aws/resources/services/identitystore/users.go b/plugins/source/aws/resources/services/identitystore/users.go index 48713880ec78fc..b8a4a585628f48 100644 --- a/plugins/source/aws/resources/services/identitystore/users.go +++ b/plugins/source/aws/resources/services/identitystore/users.go @@ -9,9 +9,10 @@ import ( func Users() *schema.Table { return &schema.Table{ - Name: "aws_identitystore_users", - Resolver: fetchIdentitystoreUsers, - Transform: transformers.TransformWithStruct(&types.User{}), - Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), + Name: "aws_identitystore_users", + Description: `https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html`, + Resolver: fetchIdentitystoreUsers, + Transform: transformers.TransformWithStruct(&types.User{}), + Multiplex: client.ServiceAccountRegionMultiplexer("identitystore"), } } diff --git a/plugins/source/aws/resources/services/iot/billing_groups.go b/plugins/source/aws/resources/services/iot/billing_groups.go index 86c946bd601f2e..b7944cef378433 100644 --- a/plugins/source/aws/resources/services/iot/billing_groups.go +++ b/plugins/source/aws/resources/services/iot/billing_groups.go @@ -9,10 +9,11 @@ import ( func BillingGroups() *schema.Table { return &schema.Table{ - Name: "aws_iot_billing_groups", - Resolver: fetchIotBillingGroups, - Transform: transformers.TransformWithStruct(&iot.DescribeBillingGroupOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("iot"), + Name: "aws_iot_billing_groups", + Description: `https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeBillingGroup.html`, + Resolver: fetchIotBillingGroups, + Transform: transformers.TransformWithStruct(&iot.DescribeBillingGroupOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("iot"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/iot/security_profiles.go b/plugins/source/aws/resources/services/iot/security_profiles.go index 176f494d676358..fd765d97fe888c 100644 --- a/plugins/source/aws/resources/services/iot/security_profiles.go +++ b/plugins/source/aws/resources/services/iot/security_profiles.go @@ -1,17 +1,19 @@ -// Code generated by codegen; DO NOT EDIT. - package iot import ( + "github.com/aws/aws-sdk-go-v2/service/iot" "github.com/cloudquery/cloudquery/plugins/source/aws/client" "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" ) func SecurityProfiles() *schema.Table { return &schema.Table{ - Name: "aws_iot_security_profiles", - Resolver: fetchIotSecurityProfiles, - Multiplex: client.ServiceAccountRegionMultiplexer("iot"), + Name: "aws_iot_security_profiles", + Description: `https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeSecurityProfile.html`, + Resolver: fetchIotSecurityProfiles, + Transform: transformers.TransformWithStruct(&iot.DescribeSecurityProfileOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("iot"), Columns: []schema.Column{ { Name: "account_id", @@ -41,56 +43,6 @@ func SecurityProfiles() *schema.Table { PrimaryKey: true, }, }, - { - Name: "additional_metrics_to_retain", - Type: schema.TypeStringArray, - Resolver: schema.PathResolver("AdditionalMetricsToRetain"), - }, - { - Name: "additional_metrics_to_retain_v2", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("AdditionalMetricsToRetainV2"), - }, - { - Name: "alert_targets", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("AlertTargets"), - }, - { - Name: "behaviors", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Behaviors"), - }, - { - Name: "creation_date", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("CreationDate"), - }, - { - Name: "last_modified_date", - Type: schema.TypeTimestamp, - Resolver: schema.PathResolver("LastModifiedDate"), - }, - { - Name: "security_profile_description", - Type: schema.TypeString, - Resolver: schema.PathResolver("SecurityProfileDescription"), - }, - { - Name: "security_profile_name", - Type: schema.TypeString, - Resolver: schema.PathResolver("SecurityProfileName"), - }, - { - Name: "version", - Type: schema.TypeInt, - Resolver: schema.PathResolver("Version"), - }, - { - Name: "result_metadata", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("ResultMetadata"), - }, }, } } diff --git a/plugins/source/aws/resources/services/iot/thing_groups.go b/plugins/source/aws/resources/services/iot/thing_groups.go index 7b2a1f4d519300..f77cc155f4e149 100644 --- a/plugins/source/aws/resources/services/iot/thing_groups.go +++ b/plugins/source/aws/resources/services/iot/thing_groups.go @@ -9,10 +9,11 @@ import ( func ThingGroups() *schema.Table { return &schema.Table{ - Name: "aws_iot_thing_groups", - Resolver: fetchIotThingGroups, - Transform: transformers.TransformWithStruct(&iot.DescribeThingGroupOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("iot"), + Name: "aws_iot_thing_groups", + Description: `https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeThingGroup.html`, + Resolver: fetchIotThingGroups, + Transform: transformers.TransformWithStruct(&iot.DescribeThingGroupOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("iot"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/iot/topic_rules.go b/plugins/source/aws/resources/services/iot/topic_rules.go index f9034ca7e4ba98..843e28ef8d415e 100644 --- a/plugins/source/aws/resources/services/iot/topic_rules.go +++ b/plugins/source/aws/resources/services/iot/topic_rules.go @@ -9,10 +9,11 @@ import ( func TopicRules() *schema.Table { return &schema.Table{ - Name: "aws_iot_topic_rules", - Resolver: fetchIotTopicRules, - Transform: transformers.TransformWithStruct(&iot.GetTopicRuleOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("iot"), + Name: "aws_iot_topic_rules", + Description: `https://docs.aws.amazon.com/iot/latest/apireference/API_GetTopicRule.html`, + Resolver: fetchIotTopicRules, + Transform: transformers.TransformWithStruct(&iot.GetTopicRuleOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("iot"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/kafka/clusters_fetch.go b/plugins/source/aws/resources/services/kafka/clusters_fetch.go index dbfa93b5dac2ac..1ece2b5979e8c6 100644 --- a/plugins/source/aws/resources/services/kafka/clusters_fetch.go +++ b/plugins/source/aws/resources/services/kafka/clusters_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package kafka import ( diff --git a/plugins/source/aws/resources/services/kafka/clusters_mock_test.go b/plugins/source/aws/resources/services/kafka/clusters_mock_test.go index 29c5c4cf7f2b6d..79807c8136a915 100644 --- a/plugins/source/aws/resources/services/kafka/clusters_mock_test.go +++ b/plugins/source/aws/resources/services/kafka/clusters_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package kafka import ( diff --git a/plugins/source/aws/resources/services/kafka/configurations_fetch.go b/plugins/source/aws/resources/services/kafka/configurations_fetch.go index eea91e7db12ee9..3e52e4dcc4817f 100644 --- a/plugins/source/aws/resources/services/kafka/configurations_fetch.go +++ b/plugins/source/aws/resources/services/kafka/configurations_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package kafka import ( diff --git a/plugins/source/aws/resources/services/kafka/configurations_mock_test.go b/plugins/source/aws/resources/services/kafka/configurations_mock_test.go index 4678d102703173..20e9faacb97be9 100644 --- a/plugins/source/aws/resources/services/kafka/configurations_mock_test.go +++ b/plugins/source/aws/resources/services/kafka/configurations_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package kafka import ( diff --git a/plugins/source/aws/resources/services/lambda/function_aliases.go b/plugins/source/aws/resources/services/lambda/function_aliases.go index 53e972386d3ee8..ce5c5c243493dc 100644 --- a/plugins/source/aws/resources/services/lambda/function_aliases.go +++ b/plugins/source/aws/resources/services/lambda/function_aliases.go @@ -10,6 +10,7 @@ import ( func FunctionAliases() *schema.Table { return &schema.Table{ Name: "aws_lambda_function_aliases", + Description: `https://docs.aws.amazon.com/lambda/latest/dg/API_AliasConfiguration.html`, Resolver: fetchLambdaFunctionAliases, PreResourceResolver: getFunctionAliasURLConfig, Transform: transformers.TransformWithStruct(&models.AliasWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), diff --git a/plugins/source/aws/resources/services/lambda/functions.go b/plugins/source/aws/resources/services/lambda/functions.go index 2e8458ce94b958..0221518219d361 100644 --- a/plugins/source/aws/resources/services/lambda/functions.go +++ b/plugins/source/aws/resources/services/lambda/functions.go @@ -10,6 +10,7 @@ import ( func Functions() *schema.Table { return &schema.Table{ Name: "aws_lambda_functions", + Description: `https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunction.html`, Resolver: fetchLambdaFunctions, PreResourceResolver: getFunction, PostResourceResolver: resolvePolicyCodeSigningConfig, diff --git a/plugins/source/aws/resources/services/lambda/layer_version_policies.go b/plugins/source/aws/resources/services/lambda/layer_version_policies.go index d123b299cc9a36..be71613efb6971 100644 --- a/plugins/source/aws/resources/services/lambda/layer_version_policies.go +++ b/plugins/source/aws/resources/services/lambda/layer_version_policies.go @@ -9,10 +9,11 @@ import ( func LayerVersionPolicies() *schema.Table { return &schema.Table{ - Name: "aws_lambda_layer_version_policies", - Resolver: fetchLambdaLayerVersionPolicies, - Transform: transformers.TransformWithStruct(&lambda.GetLayerVersionPolicyOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("lambda"), + Name: "aws_lambda_layer_version_policies", + Description: `https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersionPolicy.html`, + Resolver: fetchLambdaLayerVersionPolicies, + Transform: transformers.TransformWithStruct(&lambda.GetLayerVersionPolicyOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("lambda"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/lightsail/database_log_events.go b/plugins/source/aws/resources/services/lightsail/database_log_events.go index ca2ee9814fc96a..37e48301611b5c 100644 --- a/plugins/source/aws/resources/services/lightsail/database_log_events.go +++ b/plugins/source/aws/resources/services/lightsail/database_log_events.go @@ -9,10 +9,11 @@ import ( func DatabaseLogEvents() *schema.Table { return &schema.Table{ - Name: "aws_lightsail_database_log_events", - Resolver: fetchLightsailDatabaseLogEvents, - Transform: transformers.TransformWithStruct(&models.LogEventWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), - Multiplex: client.ServiceAccountRegionMultiplexer("lightsail"), + Name: "aws_lightsail_database_log_events", + Description: `https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRelationalDatabaseLogEvents.html`, + Resolver: fetchLightsailDatabaseLogEvents, + Transform: transformers.TransformWithStruct(&models.LogEventWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), + Multiplex: client.ServiceAccountRegionMultiplexer("lightsail"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/lightsail/distributions.go b/plugins/source/aws/resources/services/lightsail/distributions.go index 28807e30504445..1397d265ee68d4 100644 --- a/plugins/source/aws/resources/services/lightsail/distributions.go +++ b/plugins/source/aws/resources/services/lightsail/distributions.go @@ -9,10 +9,11 @@ import ( func Distributions() *schema.Table { return &schema.Table{ - Name: "aws_lightsail_distributions", - Resolver: fetchLightsailDistributions, - Transform: transformers.TransformWithStruct(&models.DistributionWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), - Multiplex: client.ServiceAccountRegionMultiplexer("lightsail"), + Name: "aws_lightsail_distributions", + Description: `https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetDistributions.html`, + Resolver: fetchLightsailDistributions, + Transform: transformers.TransformWithStruct(&models.DistributionWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), + Multiplex: client.ServiceAccountRegionMultiplexer("lightsail"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/mq/broker_users.go b/plugins/source/aws/resources/services/mq/broker_users.go index a3e76a3d05889b..042ffc60766711 100644 --- a/plugins/source/aws/resources/services/mq/broker_users.go +++ b/plugins/source/aws/resources/services/mq/broker_users.go @@ -9,10 +9,11 @@ import ( func BrokerUsers() *schema.Table { return &schema.Table{ - Name: "aws_mq_broker_users", - Resolver: fetchMqBrokerUsers, - Transform: transformers.TransformWithStruct(&mq.DescribeUserOutput{}), - Multiplex: client.ServiceAccountRegionMultiplexer("mq"), + Name: "aws_mq_broker_users", + Description: `https://docs.aws.amazon.com/amazon-mq/latest/api-reference/brokers-broker-id-users-username.html`, + Resolver: fetchMqBrokerUsers, + Transform: transformers.TransformWithStruct(&mq.DescribeUserOutput{}), + Multiplex: client.ServiceAccountRegionMultiplexer("mq"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/organizations/resource_policies.go b/plugins/source/aws/resources/services/organizations/resource_policies.go new file mode 100644 index 00000000000000..8770a4fa347aaf --- /dev/null +++ b/plugins/source/aws/resources/services/organizations/resource_policies.go @@ -0,0 +1,28 @@ +package organizations + +import ( + "github.com/aws/aws-sdk-go-v2/service/organizations/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func ResourcePolicies() *schema.Table { + return &schema.Table{ + Name: "aws_organization_resource_policies", + Description: `https://docs.aws.amazon.com/organizations/latest/APIReference/API_DescribeResourcePolicy.html`, + Resolver: fetchOrganizationsResourcePolicies, + Transform: transformers.TransformWithStruct(&types.ResourcePolicy{}), + Multiplex: client.AccountMultiplex, + Columns: []schema.Column{ + { + Name: "account_id", + Type: schema.TypeString, + Resolver: client.ResolveAWSAccount, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/aws/resources/services/organizations/resource_policies_fetch.go b/plugins/source/aws/resources/services/organizations/resource_policies_fetch.go new file mode 100644 index 00000000000000..c2671b722961b4 --- /dev/null +++ b/plugins/source/aws/resources/services/organizations/resource_policies_fetch.go @@ -0,0 +1,20 @@ +package organizations + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/organizations" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchOrganizationsResourcePolicies(ctx context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + o, err := c.Services().Organizations.DescribeResourcePolicy(ctx, &organizations.DescribeResourcePolicyInput{}) + if err != nil { + return err + } + + res <- o.ResourcePolicy + return nil +} diff --git a/plugins/source/aws/resources/services/organizations/resource_policies_mock_test.go b/plugins/source/aws/resources/services/organizations/resource_policies_mock_test.go new file mode 100644 index 00000000000000..0c223ea3719946 --- /dev/null +++ b/plugins/source/aws/resources/services/organizations/resource_policies_mock_test.go @@ -0,0 +1,31 @@ +package organizations + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/organizations" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/cloudquery/plugins/source/aws/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildResourcePolicy(t *testing.T, ctrl *gomock.Controller) client.Services { + m := mocks.NewMockOrganizationsClient(ctrl) + + o := organizations.DescribeResourcePolicyOutput{} + err := faker.FakeObject(&o) + if err != nil { + t.Fatal(err) + } + + m.EXPECT().DescribeResourcePolicy(gomock.Any(), gomock.Any()).Return(&o, nil) + + return client.Services{ + Organizations: m, + } +} + +func TestResourcePolicies(t *testing.T) { + client.AwsMockTestHelper(t, ResourcePolicies(), buildResourcePolicy, client.TestOptions{}) +} diff --git a/plugins/source/aws/resources/services/qldb/ledgers.go b/plugins/source/aws/resources/services/qldb/ledgers.go index 7e8212c69058e7..e01501f37c48ec 100644 --- a/plugins/source/aws/resources/services/qldb/ledgers.go +++ b/plugins/source/aws/resources/services/qldb/ledgers.go @@ -10,6 +10,7 @@ import ( func Ledgers() *schema.Table { return &schema.Table{ Name: "aws_qldb_ledgers", + Description: `https://docs.aws.amazon.com/qldb/latest/developerguide/API_DescribeLedger.html`, Resolver: fetchQldbLedgers, PreResourceResolver: getLedger, Transform: transformers.TransformWithStruct(&qldb.DescribeLedgerOutput{}), diff --git a/plugins/source/aws/resources/services/ram/resource_share_invitations_fetch.go b/plugins/source/aws/resources/services/ram/resource_share_invitations_fetch.go index 91975956664a1c..5461bbfe087239 100644 --- a/plugins/source/aws/resources/services/ram/resource_share_invitations_fetch.go +++ b/plugins/source/aws/resources/services/ram/resource_share_invitations_fetch.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package ram import ( diff --git a/plugins/source/aws/resources/services/ram/resource_share_invitations_mock_test.go b/plugins/source/aws/resources/services/ram/resource_share_invitations_mock_test.go index bbf12d2e8f5dcc..ed24eb7c22e33e 100644 --- a/plugins/source/aws/resources/services/ram/resource_share_invitations_mock_test.go +++ b/plugins/source/aws/resources/services/ram/resource_share_invitations_mock_test.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package ram import ( diff --git a/plugins/source/aws/resources/services/rds/db_proxies.go b/plugins/source/aws/resources/services/rds/db_proxies.go new file mode 100644 index 00000000000000..3e0ef4e4960d6a --- /dev/null +++ b/plugins/source/aws/resources/services/rds/db_proxies.go @@ -0,0 +1,43 @@ +package rds + +import ( + "github.com/aws/aws-sdk-go-v2/service/rds/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func DbProxies() *schema.Table { + return &schema.Table{ + Name: "aws_db_proxies", + Description: `https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DBProxy.html`, + Resolver: fetchDbProxies, + Transform: transformers.TransformWithStruct(&types.DBProxy{}), + Multiplex: client.ServiceAccountRegionMultiplexer("rds"), + Columns: []schema.Column{ + { + Name: "account_id", + Type: schema.TypeString, + Resolver: client.ResolveAWSAccount, + }, + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveAWSRegion, + }, + { + Name: "arn", + Type: schema.TypeString, + Resolver: schema.PathResolver("DBProxyArn"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "tags", + Type: schema.TypeJSON, + Resolver: resolveRdsDbProxyTags, + }, + }, + } +} diff --git a/plugins/source/aws/resources/services/rds/db_proxies_fetch.go b/plugins/source/aws/resources/services/rds/db_proxies_fetch.go new file mode 100644 index 00000000000000..276d76c0dca78d --- /dev/null +++ b/plugins/source/aws/resources/services/rds/db_proxies_fetch.go @@ -0,0 +1,40 @@ +package rds + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/rds" + "github.com/aws/aws-sdk-go-v2/service/rds/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchDbProxies(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + svc := c.Services().Rds + input := rds.DescribeDBProxiesInput{} + for { + output, err := svc.DescribeDBProxies(ctx, &input) + if err != nil { + return err + } + res <- output.DBProxies + if aws.ToString(output.Marker) == "" { + break + } + input.Marker = output.Marker + } + return nil +} + +func resolveRdsDbProxyTags(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource, c schema.Column) error { + g := resource.Item.(types.DBProxy) + cl := meta.(*client.Client) + svc := cl.Services().Rds + out, err := svc.ListTagsForResource(ctx, &rds.ListTagsForResourceInput{ResourceName: g.DBProxyArn}) + if err != nil { + return err + } + return resource.Set(c.Name, client.TagsToMap(out.TagList)) +} diff --git a/plugins/source/aws/resources/services/rds/db_proxies_mock_test.go b/plugins/source/aws/resources/services/rds/db_proxies_mock_test.go new file mode 100644 index 00000000000000..efa47c9b8fa14d --- /dev/null +++ b/plugins/source/aws/resources/services/rds/db_proxies_mock_test.go @@ -0,0 +1,42 @@ +package rds + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/rds" + "github.com/aws/aws-sdk-go-v2/service/rds/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/cloudquery/plugins/source/aws/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildRdsDbProxiesMock(t *testing.T, ctrl *gomock.Controller) client.Services { + m := mocks.NewMockRdsClient(ctrl) + proxy := types.DBProxy{} + err := faker.FakeObject(&proxy) + if err != nil { + t.Fatal(err) + } + + tags := rds.ListTagsForResourceOutput{} + err = faker.FakeObject(&tags) + if err != nil { + t.Fatal(err) + } + + m.EXPECT().DescribeDBProxies(gomock.Any(), gomock.Any(), gomock.Any()).Return( + &rds.DescribeDBProxiesOutput{ + DBProxies: []types.DBProxy{proxy}, + }, nil) + m.EXPECT().ListTagsForResource(gomock.Any(), gomock.Any(), gomock.Any()).Return( + &tags, nil) + + return client.Services{ + Rds: m, + } +} + +func TestRdsDbProxues(t *testing.T) { + client.AwsMockTestHelper(t, DbProxies(), buildRdsDbProxiesMock, client.TestOptions{}) +} diff --git a/plugins/source/aws/resources/services/resourcegroups/resource_groups.go b/plugins/source/aws/resources/services/resourcegroups/resource_groups.go index 5f680d591f4f8a..0209ddf33a3671 100644 --- a/plugins/source/aws/resources/services/resourcegroups/resource_groups.go +++ b/plugins/source/aws/resources/services/resourcegroups/resource_groups.go @@ -10,6 +10,7 @@ import ( func ResourceGroups() *schema.Table { return &schema.Table{ Name: "aws_resourcegroups_resource_groups", + Description: `https://docs.aws.amazon.com/ARG/latest/APIReference/API_GetGroupQuery.html`, Resolver: fetchResourcegroupsResourceGroups, PreResourceResolver: getResourceGroup, Transform: transformers.TransformWithStruct(&models.ResourceGroupWrapper{}, transformers.WithUnwrapAllEmbeddedStructs()), diff --git a/plugins/source/aws/resources/services/route53/domains.go b/plugins/source/aws/resources/services/route53/domains.go index 39823ea8ee334e..2014aaf5a8e153 100644 --- a/plugins/source/aws/resources/services/route53/domains.go +++ b/plugins/source/aws/resources/services/route53/domains.go @@ -10,6 +10,7 @@ import ( func Domains() *schema.Table { return &schema.Table{ Name: "aws_route53_domains", + Description: `https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetDomainDetail.html`, Resolver: fetchRoute53Domains, PreResourceResolver: getDomain, Transform: transformers.TransformWithStruct(&route53domains.GetDomainDetailOutput{}), diff --git a/plugins/source/aws/resources/services/route53/hosted_zones.go b/plugins/source/aws/resources/services/route53/hosted_zones.go index 6cf684b2bfa49f..5781ed56d2d8bb 100644 --- a/plugins/source/aws/resources/services/route53/hosted_zones.go +++ b/plugins/source/aws/resources/services/route53/hosted_zones.go @@ -9,8 +9,9 @@ import ( func HostedZones() *schema.Table { return &schema.Table{ - Name: "aws_route53_hosted_zones", - Resolver: fetchRoute53HostedZones, + Name: "aws_route53_hosted_zones", + Description: `https://docs.aws.amazon.com/Route53/latest/APIReference/API_HostedZone.html`, + Resolver: fetchRoute53HostedZones, Transform: transformers.TransformWithStruct( &models.Route53HostedZoneWrapper{}, transformers.WithUnwrapStructFields("HostedZone"), diff --git a/plugins/source/aws/resources/services/s3/bucket_cors_rules.go b/plugins/source/aws/resources/services/s3/bucket_cors_rules.go index 83151672910429..d4127bc04cd0d8 100644 --- a/plugins/source/aws/resources/services/s3/bucket_cors_rules.go +++ b/plugins/source/aws/resources/services/s3/bucket_cors_rules.go @@ -13,7 +13,6 @@ func BucketCorsRules() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonS3/latest/API/API_CORSRule.html`, Resolver: fetchS3BucketCorsRules, Transform: transformers.TransformWithStruct(&types.CORSRule{}), - Multiplex: client.AccountMultiplex, Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/s3/bucket_encryption_rules.go b/plugins/source/aws/resources/services/s3/bucket_encryption_rules.go index ac5856956fd573..82e89c0d0dbe4e 100644 --- a/plugins/source/aws/resources/services/s3/bucket_encryption_rules.go +++ b/plugins/source/aws/resources/services/s3/bucket_encryption_rules.go @@ -13,7 +13,6 @@ func BucketEncryptionRules() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonS3/latest/API/API_ServerSideEncryptionRule.html`, Resolver: fetchS3BucketEncryptionRules, Transform: transformers.TransformWithStruct(&types.ServerSideEncryptionRule{}), - Multiplex: client.AccountMultiplex, Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/s3/bucket_grants.go b/plugins/source/aws/resources/services/s3/bucket_grants.go index 24e3cb87dadf15..0146050e22f3b5 100644 --- a/plugins/source/aws/resources/services/s3/bucket_grants.go +++ b/plugins/source/aws/resources/services/s3/bucket_grants.go @@ -13,7 +13,6 @@ func BucketGrants() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonS3/latest/API/API_Grant.html`, Resolver: fetchS3BucketGrants, Transform: transformers.TransformWithStruct(&types.Grant{}), - Multiplex: client.AccountMultiplex, Columns: []schema.Column{ { Name: "account_id", @@ -21,9 +20,22 @@ func BucketGrants() *schema.Table { Resolver: client.ResolveAWSAccount, }, { - Name: "bucket_arn", - Type: schema.TypeString, - Resolver: schema.ParentColumnResolver("arn"), + Name: "bucket_arn", + Type: schema.TypeString, + Resolver: schema.ParentColumnResolver("arn"), + CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}, + }, + { + Name: "grantee_type", + Type: schema.TypeString, + Resolver: schema.PathResolver("Grantee.Type"), + CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}, + }, + { + Name: "grantee_id", + Type: schema.TypeString, + Resolver: resolveBucketGranteeID, + CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}, }, }, } diff --git a/plugins/source/aws/resources/services/s3/bucket_lifecycles.go b/plugins/source/aws/resources/services/s3/bucket_lifecycles.go index 813af4e5f63c9d..16e23387996118 100644 --- a/plugins/source/aws/resources/services/s3/bucket_lifecycles.go +++ b/plugins/source/aws/resources/services/s3/bucket_lifecycles.go @@ -13,7 +13,6 @@ func BucketLifecycles() *schema.Table { Description: `https://docs.aws.amazon.com/AmazonS3/latest/API/API_LifecycleRule.html`, Resolver: fetchS3BucketLifecycles, Transform: transformers.TransformWithStruct(&types.LifecycleRule{}), - Multiplex: client.AccountMultiplex, Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/s3/buckets_fetch.go b/plugins/source/aws/resources/services/s3/buckets_fetch.go index 31d0115228ca42..840785418593bb 100644 --- a/plugins/source/aws/resources/services/s3/buckets_fetch.go +++ b/plugins/source/aws/resources/services/s3/buckets_fetch.go @@ -152,6 +152,19 @@ func fetchS3BucketGrants(ctx context.Context, meta schema.ClientMeta, parent *sc res <- aclOutput.Grants return nil } +func resolveBucketGranteeID(_ context.Context, _ schema.ClientMeta, resource *schema.Resource, c schema.Column) error { + grantee := resource.Item.(types.Grant).Grantee + switch grantee.Type { + case types.TypeCanonicalUser: + return resource.Set(c.Name, *grantee.ID) + case types.TypeAmazonCustomerByEmail: + return resource.Set(c.Name, *grantee.EmailAddress) + case types.TypeGroup: + return resource.Set(c.Name, *grantee.URI) + default: + return fmt.Errorf("unsupported grantee type %q", grantee.Type) + } +} func fetchS3BucketCorsRules(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { r := parent.Item.(*models.WrappedBucket) c := meta.(*client.Client) diff --git a/plugins/source/aws/resources/services/s3/buckets_mock_test.go b/plugins/source/aws/resources/services/s3/buckets_mock_test.go index d0ef711ba3d3b6..d3bb6a5bacec31 100644 --- a/plugins/source/aws/resources/services/s3/buckets_mock_test.go +++ b/plugins/source/aws/resources/services/s3/buckets_mock_test.go @@ -46,6 +46,11 @@ func buildS3Buckets(t *testing.T, ctrl *gomock.Controller) client.Services { if err != nil { t.Fatal(err) } + // set up properly + bgrant.Grantee.EmailAddress = nil + bgrant.Grantee.ID = nil + bgrant.Grantee.Type = s3Types.TypeGroup + bcors := s3Types.CORSRule{} err = faker.FakeObject(&bcors) if err != nil { diff --git a/plugins/source/aws/resources/services/sagemaker/endpoint_configurations.go b/plugins/source/aws/resources/services/sagemaker/endpoint_configurations.go index e12c97afa2d21c..54e90f42266783 100644 --- a/plugins/source/aws/resources/services/sagemaker/endpoint_configurations.go +++ b/plugins/source/aws/resources/services/sagemaker/endpoint_configurations.go @@ -10,6 +10,7 @@ import ( func EndpointConfigurations() *schema.Table { return &schema.Table{ Name: "aws_sagemaker_endpoint_configurations", + Description: `https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html`, Resolver: fetchSagemakerEndpointConfigurations, PreResourceResolver: getEndpointConfiguration, Transform: transformers.TransformWithStruct(&sagemaker.DescribeEndpointConfigOutput{}), diff --git a/plugins/source/aws/resources/services/sagemaker/models.go b/plugins/source/aws/resources/services/sagemaker/models.go index 64ba1fa49dfddf..b5fd5c4d04136c 100644 --- a/plugins/source/aws/resources/services/sagemaker/models.go +++ b/plugins/source/aws/resources/services/sagemaker/models.go @@ -9,6 +9,7 @@ import ( func Models() *schema.Table { return &schema.Table{ Name: "aws_sagemaker_models", + Description: `https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModel.html`, Resolver: fetchSagemakerModels, PreResourceResolver: getModel, Transform: transformers.TransformWithStruct(&WrappedSageMakerModel{}, transformers.WithUnwrapStructFields("DescribeModelOutput")), diff --git a/plugins/source/aws/resources/services/sagemaker/notebook_instances.go b/plugins/source/aws/resources/services/sagemaker/notebook_instances.go index 4623257b61b763..b31f231b7739de 100644 --- a/plugins/source/aws/resources/services/sagemaker/notebook_instances.go +++ b/plugins/source/aws/resources/services/sagemaker/notebook_instances.go @@ -9,6 +9,7 @@ import ( func NotebookInstances() *schema.Table { return &schema.Table{ Name: "aws_sagemaker_notebook_instances", + Description: `https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeNotebookInstance.html`, Resolver: fetchSagemakerNotebookInstances, PreResourceResolver: getNotebookInstance, Transform: transformers.TransformWithStruct(&WrappedSageMakerNotebookInstance{}, transformers.WithUnwrapStructFields("DescribeNotebookInstanceOutput")), diff --git a/plugins/source/aws/resources/services/sagemaker/training_jobs.go b/plugins/source/aws/resources/services/sagemaker/training_jobs.go index 96560a6b83ca20..cb1b789ffe4a7f 100644 --- a/plugins/source/aws/resources/services/sagemaker/training_jobs.go +++ b/plugins/source/aws/resources/services/sagemaker/training_jobs.go @@ -10,6 +10,7 @@ import ( func TrainingJobs() *schema.Table { return &schema.Table{ Name: "aws_sagemaker_training_jobs", + Description: `https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeTrainingJob.html`, Resolver: fetchSagemakerTrainingJobs, PreResourceResolver: getTrainingJob, Transform: transformers.TransformWithStruct(&sagemaker.DescribeTrainingJobOutput{}), diff --git a/plugins/source/aws/resources/services/savingsplans/savingsplans.go b/plugins/source/aws/resources/services/savingsplans/savingsplans.go new file mode 100644 index 00000000000000..0917a5d081f1a0 --- /dev/null +++ b/plugins/source/aws/resources/services/savingsplans/savingsplans.go @@ -0,0 +1,34 @@ +package savingsplans + +import ( + "github.com/aws/aws-sdk-go-v2/service/savingsplans/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func Plans() *schema.Table { + return &schema.Table{ + Name: "aws_savingsplans_plans", + Description: `https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_SavingsPlan.html`, + Resolver: fetchSavingsPlans, + Transform: transformers.TransformWithStruct(&types.SavingsPlan{}), + Multiplex: client.AccountMultiplex, + Columns: []schema.Column{ + { + Name: "account_id", + Type: schema.TypeString, + Resolver: client.ResolveAWSAccount, + }, + { + Name: "arn", + Type: schema.TypeString, + Resolver: schema.PathResolver("SavingsPlanArn"), + Description: `The Amazon Resource Name (ARN) of the Savings Plan.`, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/aws/resources/services/savingsplans/savingsplans_fetch.go b/plugins/source/aws/resources/services/savingsplans/savingsplans_fetch.go new file mode 100644 index 00000000000000..94a07122c484fb --- /dev/null +++ b/plugins/source/aws/resources/services/savingsplans/savingsplans_fetch.go @@ -0,0 +1,29 @@ +package savingsplans + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/savingsplans" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchSavingsPlans(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + svc := meta.(*client.Client).Services().Savingsplans + config := savingsplans.DescribeSavingsPlansInput{ + MaxResults: aws.Int32(1000), + } + for { + response, err := svc.DescribeSavingsPlans(ctx, &config) + if err != nil { + return err + } + res <- response.SavingsPlans + if aws.ToString(response.NextToken) == "" { + break + } + config.NextToken = response.NextToken + } + return nil +} diff --git a/plugins/source/aws/resources/services/savingsplans/savingsplans_mock_test.go b/plugins/source/aws/resources/services/savingsplans/savingsplans_mock_test.go new file mode 100644 index 00000000000000..5af4019faeaecf --- /dev/null +++ b/plugins/source/aws/resources/services/savingsplans/savingsplans_mock_test.go @@ -0,0 +1,40 @@ +package savingsplans + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/savingsplans" + "github.com/aws/aws-sdk-go-v2/service/savingsplans/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/cloudquery/plugins/source/aws/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildSavingPlansPlans(t *testing.T, ctrl *gomock.Controller) client.Services { + m := mocks.NewMockSavingsplansClient(ctrl) + + var s types.SavingsPlan + if err := faker.FakeObject(&s); err != nil { + t.Fatal(err) + } + m.EXPECT().DescribeSavingsPlans( + gomock.Any(), + &savingsplans.DescribeSavingsPlansInput{MaxResults: aws.Int32(1000)}, + gomock.Any(), + ).Return( + &savingsplans.DescribeSavingsPlansOutput{ + SavingsPlans: []types.SavingsPlan{s}, + }, + nil, + ) + + return client.Services{ + Savingsplans: m, + } +} + +func TestSavingsplansPlans(t *testing.T) { + client.AwsMockTestHelper(t, Plans(), buildSavingPlansPlans, client.TestOptions{}) +} diff --git a/plugins/source/aws/resources/services/ses/active_receipt_rule_sets.go b/plugins/source/aws/resources/services/ses/active_receipt_rule_sets.go index c524d1419b96d2..27ca29a6ce1500 100644 --- a/plugins/source/aws/resources/services/ses/active_receipt_rule_sets.go +++ b/plugins/source/aws/resources/services/ses/active_receipt_rule_sets.go @@ -1,5 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. - package ses import ( @@ -46,11 +44,6 @@ func ActiveReceiptRuleSets() *schema.Table { Type: schema.TypeTimestamp, Resolver: schema.PathResolver("Metadata.CreatedTimestamp"), }, - { - Name: "rules", - Type: schema.TypeJSON, - Resolver: schema.PathResolver("Rules"), - }, }, } } diff --git a/plugins/source/aws/resources/services/ses/templates.go b/plugins/source/aws/resources/services/ses/templates.go index e771f6a708f462..82d4a4e7c3ab41 100644 --- a/plugins/source/aws/resources/services/ses/templates.go +++ b/plugins/source/aws/resources/services/ses/templates.go @@ -10,6 +10,7 @@ import ( func Templates() *schema.Table { return &schema.Table{ Name: "aws_ses_templates", + Description: `https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_GetEmailTemplate.html`, Resolver: fetchSesTemplates, PreResourceResolver: getTemplate, Transform: transformers.TransformWithStruct(&models.Template{}), diff --git a/plugins/source/aws/resources/services/sns/subscriptions.go b/plugins/source/aws/resources/services/sns/subscriptions.go index 49f966da62d8d7..fc1af47b2223f6 100644 --- a/plugins/source/aws/resources/services/sns/subscriptions.go +++ b/plugins/source/aws/resources/services/sns/subscriptions.go @@ -10,6 +10,7 @@ import ( func Subscriptions() *schema.Table { return &schema.Table{ Name: "aws_sns_subscriptions", + Description: `https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html`, Resolver: fetchSnsSubscriptions, PreResourceResolver: getSnsSubscription, Transform: transformers.TransformWithStruct(&models.Subscription{}), diff --git a/plugins/source/aws/resources/services/sns/topics.go b/plugins/source/aws/resources/services/sns/topics.go index 415f1988ad137b..93b076514d0598 100644 --- a/plugins/source/aws/resources/services/sns/topics.go +++ b/plugins/source/aws/resources/services/sns/topics.go @@ -10,6 +10,7 @@ import ( func Topics() *schema.Table { return &schema.Table{ Name: "aws_sns_topics", + Description: `https://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html`, Resolver: fetchSnsTopics, PreResourceResolver: getTopic, Transform: transformers.TransformWithStruct(&models.Topic{}), diff --git a/plugins/source/aws/resources/services/sqs/queues.go b/plugins/source/aws/resources/services/sqs/queues.go index f8a3021a02cc49..c0ed844b2f4b64 100644 --- a/plugins/source/aws/resources/services/sqs/queues.go +++ b/plugins/source/aws/resources/services/sqs/queues.go @@ -10,6 +10,7 @@ import ( func Queues() *schema.Table { return &schema.Table{ Name: "aws_sqs_queues", + Description: `https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html`, Resolver: fetchSqsQueues, PreResourceResolver: getQueue, Transform: transformers.TransformWithStruct(&models.Queue{}), diff --git a/plugins/source/aws/resources/services/timestream/databases.go b/plugins/source/aws/resources/services/timestream/databases.go index dfd9086315b77f..910fa16f781fbe 100644 --- a/plugins/source/aws/resources/services/timestream/databases.go +++ b/plugins/source/aws/resources/services/timestream/databases.go @@ -9,10 +9,11 @@ import ( func Databases() *schema.Table { return &schema.Table{ - Name: "aws_timestream_databases", - Resolver: fetchTimestreamDatabases, - Transform: transformers.TransformWithStruct(&types.Database{}), - Multiplex: client.ServiceAccountRegionMultiplexer("ingest.timestream"), + Name: "aws_timestream_databases", + Description: `https://docs.aws.amazon.com/timestream/latest/developerguide/API_Database.html`, + Resolver: fetchTimestreamDatabases, + Transform: transformers.TransformWithStruct(&types.Database{}), + Multiplex: client.ServiceAccountRegionMultiplexer("ingest.timestream"), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/timestream/tables.go b/plugins/source/aws/resources/services/timestream/tables.go index 5c9a7dcd71614c..97456804bfaa62 100644 --- a/plugins/source/aws/resources/services/timestream/tables.go +++ b/plugins/source/aws/resources/services/timestream/tables.go @@ -9,9 +9,10 @@ import ( func Tables() *schema.Table { return &schema.Table{ - Name: "aws_timestream_tables", - Resolver: fetchTimestreamTables, - Transform: transformers.TransformWithStruct(&types.Table{}), + Name: "aws_timestream_tables", + Description: `https://docs.aws.amazon.com/timestream/latest/developerguide/API_Table.html`, + Resolver: fetchTimestreamTables, + Transform: transformers.TransformWithStruct(&types.Table{}), Columns: []schema.Column{ { Name: "account_id", diff --git a/plugins/source/aws/resources/services/wafv2/web_acls.go b/plugins/source/aws/resources/services/wafv2/web_acls.go index b3fd9bc028dea4..9cbef911add6ad 100644 --- a/plugins/source/aws/resources/services/wafv2/web_acls.go +++ b/plugins/source/aws/resources/services/wafv2/web_acls.go @@ -10,6 +10,7 @@ import ( func WebAcls() *schema.Table { return &schema.Table{ Name: "aws_wafv2_web_acls", + Description: `https://docs.aws.amazon.com/waf/latest/APIReference/API_WebACL.html`, Resolver: fetchWafv2WebAcls, PreResourceResolver: getWebAcl, Transform: transformers.TransformWithStruct(&models.WebACLWrapper{}, transformers.WithUnwrapStructFields("WebACL")), diff --git a/plugins/source/aws/resources/services/xray/resource_policies.go b/plugins/source/aws/resources/services/xray/resource_policies.go new file mode 100644 index 00000000000000..29018abdab3bb9 --- /dev/null +++ b/plugins/source/aws/resources/services/xray/resource_policies.go @@ -0,0 +1,52 @@ +package xray + +import ( + "github.com/aws/aws-sdk-go-v2/service/xray/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func ResourcePolicies() *schema.Table { + return &schema.Table{ + Name: "aws_xray_resource_policies", + Description: `https://docs.aws.amazon.com/xray/latest/api/API_ResourcePolicy.html`, + Resolver: fetchXrayResourcePolicies, + Transform: transformers.TransformWithStruct(&types.ResourcePolicy{}), + Multiplex: client.ServiceAccountRegionMultiplexer("xray"), + Columns: []schema.Column{ + { + Name: "account_id", + Type: schema.TypeString, + Resolver: client.ResolveAWSAccount, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveAWSRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "policy_name", + Type: schema.TypeString, + Resolver: schema.PathResolver("PolicyName"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "policy_revision_id", + Type: schema.TypeString, + Resolver: schema.PathResolver("PolicyRevisionId"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/aws/resources/services/xray/resource_policies_fetch.go b/plugins/source/aws/resources/services/xray/resource_policies_fetch.go new file mode 100644 index 00000000000000..2827cfc1e70689 --- /dev/null +++ b/plugins/source/aws/resources/services/xray/resource_policies_fetch.go @@ -0,0 +1,21 @@ +package xray + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/xray" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchXrayResourcePolicies(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + paginator := xray.NewListResourcePoliciesPaginator(meta.(*client.Client).Services().Xray, nil) + for paginator.HasMorePages() { + v, err := paginator.NextPage(ctx) + if err != nil { + return err + } + res <- v.ResourcePolicies + } + return nil +} diff --git a/plugins/source/aws/resources/services/xray/resource_policies_mock_test.go b/plugins/source/aws/resources/services/xray/resource_policies_mock_test.go new file mode 100644 index 00000000000000..f4adcc0ed47d0e --- /dev/null +++ b/plugins/source/aws/resources/services/xray/resource_policies_mock_test.go @@ -0,0 +1,40 @@ +package xray + +import ( + "testing" + + "github.com/aws/aws-sdk-go-v2/service/xray" + "github.com/aws/aws-sdk-go-v2/service/xray/types" + "github.com/cloudquery/cloudquery/plugins/source/aws/client" + "github.com/cloudquery/cloudquery/plugins/source/aws/client/mocks" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/golang/mock/gomock" +) + +func buildResourcePolicies(t *testing.T, ctrl *gomock.Controller) client.Services { + mock := mocks.NewMockXrayClient(ctrl) + + var pols types.ResourcePolicy + if err := faker.FakeObject(&pols); err != nil { + t.Fatal(err) + } + + mock.EXPECT().ListResourcePolicies( + gomock.Any(), + &xray.ListResourcePoliciesInput{}, + gomock.Any(), + ).Return( + &xray.ListResourcePoliciesOutput{ + ResourcePolicies: []types.ResourcePolicy{ + pols, + }, + }, + nil, + ) + + return client.Services{Xray: mock} +} + +func TestResourcePolicies(t *testing.T) { + client.AwsMockTestHelper(t, ResourcePolicies(), buildResourcePolicies, client.TestOptions{}) +} diff --git a/plugins/source/aws/test/policy_cq_config.yml b/plugins/source/aws/test/policy_cq_config.yml index df64583a2dda3c..3a26bf56b31e64 100644 --- a/plugins/source/aws/test/policy_cq_config.yml +++ b/plugins/source/aws/test/policy_cq_config.yml @@ -10,6 +10,6 @@ kind: destination spec: name: postgresql path: cloudquery/postgresql - version: "v2.0.4" # latest version of postgresql plugin + version: "v2.0.5" # latest version of postgresql plugin spec: connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/plugins/source/aws/test/sanity.yml b/plugins/source/aws/test/sanity.yml index b768beacd14b52..7eddf9f002731f 100644 --- a/plugins/source/aws/test/sanity.yml +++ b/plugins/source/aws/test/sanity.yml @@ -10,4 +10,4 @@ kind: destination spec: name: sqlite path: cloudquery/sqlite - version: "v1.1.3" # latest version of sqlite plugin \ No newline at end of file + version: "v1.1.5" # latest version of sqlite plugin \ No newline at end of file diff --git a/plugins/source/azure/CHANGELOG.md b/plugins/source/azure/CHANGELOG.md index 83f70a83580ad6..95d173fa5d3bdf 100644 --- a/plugins/source/azure/CHANGELOG.md +++ b/plugins/source/azure/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this provider will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.3.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-azure-v3.2.0...plugins-source-azure-v3.3.0) (2023-01-11) + + +### Features + +* **azure-resources:** Add Virtual Machine Scale Set VMs ([#6718](https://github.com/cloudquery/cloudquery/issues/6718)) ([00a096f](https://github.com/cloudquery/cloudquery/commit/00a096f1fde3a91ff3030473b5c80047140cd232)) +* Log info message when namespace not registered for subscription ([#6705](https://github.com/cloudquery/cloudquery/issues/6705)) ([01a1e4c](https://github.com/cloudquery/cloudquery/commit/01a1e4c8d348c4411275b517790351aeaf8a645a)) + + +### Bug Fixes + +* **azure-resources:** Make `subscription_id, name` PKs of `azure_peering_service_providers` instead of `id` ([#6694](https://github.com/cloudquery/cloudquery/issues/6694)) ([d327465](https://github.com/cloudquery/cloudquery/commit/d327465a14defbde26356372b06348d2f5d38ddc)) +* **azure-resources:** Pass `subscriptions/<id>` when listing role definitions ([#6669](https://github.com/cloudquery/cloudquery/issues/6669)) ([2983a4d](https://github.com/cloudquery/cloudquery/commit/2983a4d74affe0409a5053f330bf8059da4c4ca8)) +* **azure-resources:** Remove non working `azure_windowsesu_multiple_activation_keys` ([#6680](https://github.com/cloudquery/cloudquery/issues/6680)) ([1fc3583](https://github.com/cloudquery/cloudquery/commit/1fc3583473d537f5bb31128f198b716186b889aa)) +* **azure-resources:** Set APIVersion to "2019-05-10-preview" when fetching SQL Server Registrations ([#6672](https://github.com/cloudquery/cloudquery/issues/6672)) ([42942e0](https://github.com/cloudquery/cloudquery/commit/42942e03bbb59c7ca28e88c6b8156531fe656aae)) +* **azure-resources:** Set APIVersion to "2022-08-08" when fetching Healthbots ([#6673](https://github.com/cloudquery/cloudquery/issues/6673)) ([ff79a3d](https://github.com/cloudquery/cloudquery/commit/ff79a3d2e28d574717780b85c584a28d9e6f7005)) +* **azure-resources:** Update `armnginx` to v2 ([#6682](https://github.com/cloudquery/cloudquery/issues/6682)) ([aef47b5](https://github.com/cloudquery/cloudquery/commit/aef47b5e74996ac5d8242139a4b985244a2a4476)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) + ## [3.2.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-azure-v3.1.0...plugins-source-azure-v3.2.0) (2023-01-10) diff --git a/plugins/source/azure/client/client.go b/plugins/source/azure/client/client.go index 8762dd68d52c94..6d43ebcff4f490 100644 --- a/plugins/source/azure/client/client.go +++ b/plugins/source/azure/client/client.go @@ -17,26 +17,6 @@ import ( "github.com/rs/zerolog" ) -const Namespacemicrosoft_dbformariadb = "microsoft.dbformariadb" -const Namespacemicrosoft_keyvault = "microsoft.keyvault" -const Namespacemicrosoft_cache = "microsoft.cache" -const Namespacemicrosoft_search = "microsoft.search" -const Namespacemicrosoft_logic = "microsoft.logic" -const Namespacemicrosoft_costmanagement = "microsoft.costmanagement" -const Namespacemicrosoft_storage = "microsoft.storage" - -var otherNamespaces = []string{ - Namespacemicrosoft_dbformariadb, - Namespacemicrosoft_keyvault, - Namespacemicrosoft_cache, - Namespacemicrosoft_search, - Namespacemicrosoft_logic, - Namespacemicrosoft_costmanagement, - Namespacemicrosoft_storage, -} - -var allNamespaces = append(autoGeneratedNamespaces, otherNamespaces...) - type Client struct { subscriptions []string // This is to cache full objects returned from ListSubscriptions on initialisation @@ -46,7 +26,6 @@ type Client struct { resourceGroups map[string][]*armresources.GenericResourceExpanded // this is set by table client multiplexer SubscriptionId string - ResourceGroup string Creds azcore.TokenCredential Options *arm.ClientOptions } @@ -122,7 +101,7 @@ func (c *Client) disocverResourceGroups(ctx context.Context) error { return nil } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var spec Spec var err error if err := s.UnmarshalSpec(&spec); err != nil { diff --git a/plugins/source/azure/client/multiplexer.go b/plugins/source/azure/client/multiplexer.go index e71c347b5c3581..adf434276331b4 100644 --- a/plugins/source/azure/client/multiplexer.go +++ b/plugins/source/azure/client/multiplexer.go @@ -16,13 +16,19 @@ func SingleSubscriptionMultiplex(meta schema.ClientMeta) []schema.ClientMeta { } } -func SubscriptionMultiplexRegisteredNamespace(namespace string) func(schema.ClientMeta) []schema.ClientMeta { +func SubscriptionMultiplexRegisteredNamespace(table, namespace string) func(schema.ClientMeta) []schema.ClientMeta { return func(meta schema.ClientMeta) []schema.ClientMeta { client := meta.(*Client) var c = make([]schema.ClientMeta, 0) for _, subId := range client.subscriptions { if _, ok := client.registeredNamespaces[subId][namespace]; ok { c = append(c, client.withSubscription(subId)) + } else { + client.Logger().Info(). + Str("subscription_id", subId). + Str("namespace", namespace). + Str("table", table). + Msg("Skipping namespace, not registered for subscription") } } return c diff --git a/plugins/source/azure/client/namespaces.go b/plugins/source/azure/client/namespaces.go index cf9ccc99f14b63..7b302b49d05444 100644 --- a/plugins/source/azure/client/namespaces.go +++ b/plugins/source/azure/client/namespaces.go @@ -1,4 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. package client const Namespacemicrosoft_advisor = "microsoft.advisor" @@ -9,7 +8,6 @@ const Namespacemicrosoft_appconfiguration = "microsoft.appconfiguration" const Namespacemicrosoft_authorization = "microsoft.authorization" const Namespacemicrosoft_automation = "microsoft.automation" const Namespacemicrosoft_azurearcdata = "microsoft.azurearcdata" -const Namespacemicrosoft_azuredata = "microsoft.azuredata" const Namespacemicrosoft_batch = "microsoft.batch" const Namespacemicrosoft_billing = "microsoft.billing" const Namespacemicrosoft_botservice = "microsoft.botservice" @@ -27,7 +25,6 @@ const Namespacemicrosoft_customerinsights = "microsoft.customerinsights" const Namespacemicrosoft_dashboard = "microsoft.dashboard" const Namespacemicrosoft_databox = "microsoft.databox" const Namespacemicrosoft_datadog = "microsoft.datadog" -const Namespacemicrosoft_datafactory = "microsoft.datafactory" const Namespacemicrosoft_datalakeanalytics = "microsoft.datalakeanalytics" const Namespacemicrosoft_datalakestore = "microsoft.datalakestore" const Namespacemicrosoft_datamigration = "microsoft.datamigration" @@ -44,7 +41,6 @@ const Namespacemicrosoft_eventgrid = "microsoft.eventgrid" const Namespacemicrosoft_eventhub = "microsoft.eventhub" const Namespacemicrosoft_hanaonazure = "microsoft.hanaonazure" const Namespacemicrosoft_hdinsight = "microsoft.hdinsight" -const Namespacemicrosoft_healthbot = "microsoft.healthbot" const Namespacemicrosoft_healthcareapis = "microsoft.healthcareapis" const Namespacemicrosoft_hybridcompute = "microsoft.hybridcompute" const Namespacemicrosoft_hybriddata = "microsoft.hybriddata" @@ -72,12 +68,21 @@ const Namespacemicrosoft_streamanalytics = "microsoft.streamanalytics" const Namespacemicrosoft_support = "microsoft.support" const Namespacemicrosoft_synapse = "microsoft.synapse" const Namespacemicrosoft_web = "microsoft.web" -const Namespacemicrosoft_windowsesu = "microsoft.windowsesu" const Namespacemicrosoft_windowsiot = "microsoft.windowsiot" const Namespacemicrosoft_workloads = "microsoft.workloads" +const Namespacemicrosoft_datafactory = "microsoft.datafactory" +const Namespacemicrosoft_dbformariadb = "microsoft.dbformariadb" +const Namespacemicrosoft_keyvault = "microsoft.keyvault" +const Namespacemicrosoft_cache = "microsoft.cache" +const Namespacemicrosoft_search = "microsoft.search" +const Namespacemicrosoft_logic = "microsoft.logic" +const Namespacemicrosoft_costmanagement = "microsoft.costmanagement" +const Namespacemicrosoft_storage = "microsoft.storage" const Namespacenginx_nginxplus = "nginx.nginxplus" +const Namespacemicrosoft_azuredata = "microsoft.azuredata" +const Namespacemicrosoft_healthbot = "microsoft.healthbot" -var autoGeneratedNamespaces = []string{ +var namespaces = []string{ Namespacemicrosoft_advisor, Namespacemicrosoft_analysisservices, Namespacemicrosoft_apimanagement, @@ -86,7 +91,6 @@ var autoGeneratedNamespaces = []string{ Namespacemicrosoft_authorization, Namespacemicrosoft_automation, Namespacemicrosoft_azurearcdata, - Namespacemicrosoft_azuredata, Namespacemicrosoft_batch, Namespacemicrosoft_billing, Namespacemicrosoft_botservice, @@ -104,7 +108,6 @@ var autoGeneratedNamespaces = []string{ Namespacemicrosoft_dashboard, Namespacemicrosoft_databox, Namespacemicrosoft_datadog, - Namespacemicrosoft_datafactory, Namespacemicrosoft_datalakeanalytics, Namespacemicrosoft_datalakestore, Namespacemicrosoft_datamigration, @@ -121,7 +124,6 @@ var autoGeneratedNamespaces = []string{ Namespacemicrosoft_eventhub, Namespacemicrosoft_hanaonazure, Namespacemicrosoft_hdinsight, - Namespacemicrosoft_healthbot, Namespacemicrosoft_healthcareapis, Namespacemicrosoft_hybridcompute, Namespacemicrosoft_hybriddata, @@ -149,8 +151,17 @@ var autoGeneratedNamespaces = []string{ Namespacemicrosoft_support, Namespacemicrosoft_synapse, Namespacemicrosoft_web, - Namespacemicrosoft_windowsesu, Namespacemicrosoft_windowsiot, Namespacemicrosoft_workloads, + Namespacemicrosoft_datafactory, + Namespacemicrosoft_dbformariadb, + Namespacemicrosoft_keyvault, + Namespacemicrosoft_cache, + Namespacemicrosoft_search, + Namespacemicrosoft_logic, + Namespacemicrosoft_costmanagement, + Namespacemicrosoft_storage, Namespacenginx_nginxplus, + Namespacemicrosoft_azuredata, + Namespacemicrosoft_healthbot, } diff --git a/plugins/source/azure/client/testing.go b/plugins/source/azure/client/testing.go index f931e237426c35..cb3350f18971a2 100644 --- a/plugins/source/azure/client/testing.go +++ b/plugins/source/azure/client/testing.go @@ -73,14 +73,14 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. mockClient := NewMockHttpClient(h.Client(), h.URL) l := zerolog.New(zerolog.NewTestWriter(t)).Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createServices(router) if err != nil { return nil, err } registeredNamespaces := make(map[string]map[string]bool) registeredNamespaces[TestSubscription] = make(map[string]bool) - for _, namespace := range allNamespaces { + for _, namespace := range namespaces { registeredNamespaces[TestSubscription][namespace] = true } c := &Client{ diff --git a/plugins/source/azure/codegen0/internal/azparser/discover.go b/plugins/source/azure/codegen0/internal/azparser/discover.go deleted file mode 100644 index c9dd2dd6f3cda5..00000000000000 --- a/plugins/source/azure/codegen0/internal/azparser/discover.go +++ /dev/null @@ -1,66 +0,0 @@ -package azparser - -import ( - "io/ioutil" - "log" - "net/http" - "regexp" -) - -var packagesToSkip = map[string]bool{ - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform": true, - // Manually generated recipes - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault": true, - // This is a special API and we create those recipes manually - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources": true, - // this can be written manually and potentially we can also get it from armresources - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription": true, - // this can be written manually and potentially we can also get it from armresources - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions": true, - // seems something is not right with that package - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups": true, - // skipping for now - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managedservices/armmanagedservices": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/virtualmachineimagebuilder/armvirtualmachineimagebuilder": true, - - // deprecated packages - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsight/armsecurityinsight": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/web/armweb": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/loadtestservice/armloadtestservice": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elasticsans/armelasticsans": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/videoanalyzer/armvideoanalyzer": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearningservices/armmachinelearningservices": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadmonitor/armworkloadmonitor": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsight": true, - - // not relevant packages - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/agrifood/armagrifood": true, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/chaos/armchaos": true, -} - -var subpackageRe = regexp.MustCompile(`github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/[a-z-]+/[a-z]+`) - -func DiscoverSubpackages() ([]string, error) { - var subpackages = make([]string, 0) - resp, err := http.Get("https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk") - if err != nil { - return nil, err - } - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - log.Fatalln(err) - } - - matches := subpackageRe.FindAllString(string(body), -1) - for _, match := range matches { - if _, ok := packagesToSkip[match]; !ok { - subpackages = append(subpackages, match) - } - } - - return subpackages, nil -} diff --git a/plugins/source/azure/codegen0/internal/azparser/gomod.go b/plugins/source/azure/codegen0/internal/azparser/gomod.go deleted file mode 100644 index 33f9bfd7754a67..00000000000000 --- a/plugins/source/azure/codegen0/internal/azparser/gomod.go +++ /dev/null @@ -1,32 +0,0 @@ -package azparser - -import ( - "os" - "strings" - - "golang.org/x/mod/modfile" -) - -const ( - azureResourceManagerRootPackage = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager" -) - -func GetArmModules(gomodPath string) ([]string, error) { - var modules []string - content, err := os.ReadFile(gomodPath) - if err != nil { - return nil, err - } - mod, err := modfile.Parse("go.mod", content, nil) - if err != nil { - return nil, err - } - - for _, req := range mod.Require { - if strings.HasPrefix(req.Mod.Path, azureResourceManagerRootPackage) && !packagesToSkip[req.Mod.Path] { - modules = append(modules, req.Mod.String()) - } - } - - return modules, nil -} diff --git a/plugins/source/azure/codegen0/internal/azparser/parser.go b/plugins/source/azure/codegen0/internal/azparser/parser.go deleted file mode 100644 index 535dd02522c0c6..00000000000000 --- a/plugins/source/azure/codegen0/internal/azparser/parser.go +++ /dev/null @@ -1,383 +0,0 @@ -package azparser - -import ( - "fmt" - "go/ast" - "go/parser" - "go/token" - "os" - "os/exec" - "path" - "regexp" - "sort" - "strings" -) - -// github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources - -var newGlobalFuncsToSkip = map[string]bool{ - // We are skipping operationsClient as this just list all operations available and it is quite static - // so don't think it's of any use and we can always enable it later - "NewOperationsClient": true, - // This is mostly not needed and if it is needed we add this resource manually - "NewSKUsClient": true, -} - -var newFuncToSkipPerPackage = map[string]map[string]bool{ - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse": { - "NewKustoOperationsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb": { - // we migrated this to manual written client as it has childs - "NewServersClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement": { - "NewSKUsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql": { - "NewServersClient": true, - }, - // seems this api is not working and always returning InvalidResourceType - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql": { - "NewDeletedServersClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute": { - // we migrated this to manual written client as it has childs - "NewVirtualMachinesClient": true, - "NewResourceSKUsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos": { - "NewDatabaseAccountsClient": true, - }, - // We are skipping this because we already get this info via - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault": { - "NewVaultsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn": { - // we skip this because we moved this to manually generated recipes as it has childs - "NewProfilesClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork": { - // Seems like a buggy resource that always returns a marshal error. maybe will be fixed in future Azure SDK - "NewVirtualApplianceSKUsClient": true, - // Seems like a resource that always return an error. Skipping for now - "NewExpressRouteCrossConnectionsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maintenance/armmaintenance": { - // We are getting this data already from NewConfigurationsClient across the whole subscription - "NewConfigurationsForResourceGroupClient": true, - // We are getting this data already from NewApplyUpdate across the whole subscription - "NewApplyUpdateForResourceGroupClient": true, - // Seems not implemented - "NewApplyUpdatesClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity": { - // ManualResource - "NewSettingsClient": true, - // Seems like a buggy resource that always returns a marshal error. maybe will be fixed in future Azure SDK - "NewIngestionSettingsClient": true, - // Seems like a buggy resource that always returns a marshal error. maybe will be fixed in future Azure SDK - "NewContactsClient": true, - // Seems like another buggy resource - "NewDeletedServersClient": true, - // Looks like this is a buggy resource. Im always getting marshal error from the Azure SDK. - // Just skipping this for now - "NewAccountConnectorsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservice": { - "NewDeletedAccountsClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction": { - // Too long table name we will handle this with manually written receipe - "NewMarketplaceRegistrationDefinitionsWithoutScopeClient": true, - // This is already fetched by subscription level - "NewAzureTrafficCollectorsByResourceGroupClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights": { - // Seems like a buggy resource that always returns error. maybe will be fixed in future Azure SDK - "NewDeletedWorkspacesClient": true, - }, - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage": { - // we migrated this to manual written client as it has childs - "NewAccountsClient": true, - "NewDeletedAccountsClient": true, - }, -} - -var reNewClient = regexp.MustCompile(`New[a-zA-Z]+Client`) -var reListRequest = regexp.MustCompile(`listCreateRequest|listAllCreateRequest|listBySubscriptionCreateRequest`) -var rePager = regexp.MustCompile(`NewListPager|NewListAllPager|NewListBySubscriptionPager`) -var reNamespaceFromURL = regexp.MustCompile(`/providers/([a-zA-Z\.]+)/`) - -var supportedPagerParams = [][]string{ - {"options"}, -} - -var supportedNewClientParams = [][]string{ - {"credential", "options"}, - {"subscriptionID", "credential", "options"}, -} - -type function struct { - receiver string - name string - ast *ast.FuncDecl - paramNames []string - returnTypes []string -} - -func parseURLFromFunc(fn *ast.FuncDecl) string { - for _, stmt := range fn.Body.List { - if expr, ok := stmt.(*ast.AssignStmt); ok { - if len(expr.Lhs) == 1 && len(expr.Rhs) == 1 { - if lhs, ok := expr.Lhs[0].(*ast.Ident); ok { - if lhs.Name == "urlPath" { - if rhs, ok := expr.Rhs[0].(*ast.BasicLit); ok { - return strings.Replace(rhs.Value, "\"", "", -1) - } - } - } - } - } - } - return "" -} - -func compareStrArrays(a, b []string) bool { - if len(a) != len(b) { - return false - } - for i := range a { - if a[i] != b[i] { - return false - } - } - return true -} - -func isArrayExist(arr [][]string, item []string) bool { - for _, a := range arr { - if compareStrArrays(a, item) { - return true - } - } - return false -} - -func getParamNames(fn *ast.FieldList) []string { - var params []string - for _, p := range fn.List { - for _, name := range p.Names { - params = append(params, name.Name) - } - } - return params -} - -func getReturnTypes(fn *ast.FieldList) []string { - var params []string - for _, p := range fn.List { - if ident, ok := p.Type.(*ast.Ident); ok { - params = append(params, ident.Name) - } else if star, ok := p.Type.(*ast.StarExpr); ok { - if index, ok := star.X.(*ast.IndexExpr); ok { - if ident, ok := index.Index.(*ast.Ident); ok { - params = append(params, ident.Name) - } - } - } - } - return params -} - -func getStructValueNameFromResponse(pkgs map[string]*ast.Package, name string) (string, bool, bool) { - st := getStruct(pkgs, name) - st1name := st.Fields.List[0].Type.(*ast.Ident).Name - st1 := getStruct(pkgs, st1name) - structName := "" - hasNextField := false - for _, f := range st1.Fields.List { - if f.Names[0].Name == "Value" { - arrType := f.Type.(*ast.ArrayType) - _, ok := arrType.Elt.(*ast.StarExpr) - if !ok { - structName = f.Type.(*ast.ArrayType).Elt.(*ast.Ident).Name - } else { - structName = f.Type.(*ast.ArrayType).Elt.(*ast.StarExpr).X.(*ast.Ident).Name - } - } - if f.Names[0].Name == "NextLink" { - hasNextField = true - } - } - hasId := false - st2 := getStruct(pkgs, structName) - for _, f := range st2.Fields.List { - if f.Names[0].Name == "ID" { - hasId = true - } - } - return structName, hasNextField, hasId -} - -func getStruct(pkgs map[string]*ast.Package, name string) *ast.StructType { - for _, pack := range pkgs { - for _, f := range pack.Files { - for _, d := range f.Decls { - if gen, isGen := d.(*ast.GenDecl); isGen { - for _, spec := range gen.Specs { - if typeSpec, isTypeSpec := spec.(*ast.TypeSpec); isTypeSpec { - if structType, isStruct := typeSpec.Type.(*ast.StructType); isStruct { - if typeSpec.Name.Name == name { - return structType - } - } - } - } - } - } - } - } - return nil -} - -// returns reciever and method name that matches re -func findFunctions(pkgs map[string]*ast.Package, re *regexp.Regexp) map[string]*function { - var funcs map[string]*function = make(map[string]*function) - for _, pack := range pkgs { - for _, f := range pack.Files { - for _, d := range f.Decls { - if fn, isFn := d.(*ast.FuncDecl); isFn { - if re.MatchString(fn.Name.Name) { - fun := function{ - name: fn.Name.Name, - ast: fn, - } - // if function is a method extract receiver name - if fn.Recv != nil && len(fn.Recv.List) == 1 { - receiver := fn.Recv.List[0].Type.(*ast.StarExpr).X.(*ast.Ident).Name - fun.receiver = receiver - } - fun.paramNames = getParamNames(fn.Type.Params) - if fn.Type != nil && fn.Type.Results != nil { - fun.returnTypes = getReturnTypes(fn.Type.Results) - } - if fun.receiver != "" { - funcs[fun.receiver+"."+fun.name] = &fun - } else { - funcs[fun.name] = &fun - } - } - } - } - } - } - return funcs -} - -// Get a package in format of github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/xxx/yy@v0.1.1 -func CreateTablesFromPackage(pkg string) ([]*Table, error) { - goPath := os.Getenv("GOPATH") - if goPath == "" { - output, err := exec.Command("go", "env", "GOPATH").Output() - if err != nil { - return nil, err - } - goPath = strings.TrimSpace(string(output)) - } - pkgWithoutVersion := strings.Split(pkg, "@")[0] - if packagesToSkip[pkgWithoutVersion] { - return nil, nil - } - cacheDir := goPath + "/pkg/mod" - // this maps client name to tables - tables := make(map[string]*Table) - set := token.NewFileSet() - pkgPath := path.Join(cacheDir, pkg) - // thats because azure had to be special with uppercase - pkgPath = strings.Replace(pkgPath, "A", "!A", 1) - pkgs, err := parser.ParseDir(set, pkgPath, nil, 0) - if err != nil { - return nil, err - } - newXClientFuncstions := findFunctions(pkgs, reNewClient) - for _, fn := range newXClientFuncstions { - if newGlobalFuncsToSkip[fn.name] || !isArrayExist(supportedNewClientParams, fn.paramNames) { - continue - } - if _, ok := newFuncToSkipPerPackage[pkgWithoutVersion]; ok { - if newFuncToSkipPerPackage[pkgWithoutVersion][fn.name] { - continue - } - } - tables[strings.TrimPrefix(fn.name, "New")] = &Table{ - NewFuncName: fn.name, - NewClientParams: fn.paramNames, - } - } - listMethods := findFunctions(pkgs, reListRequest) - pagerMethods := findFunctions(pkgs, rePager) - - var result []*Table - for client, t := range tables { - var pagerMethod *function - var listMethod *function - if pagerMethods[client+".NewListAllPager"] != nil { - if listMethods[client+".listAllCreateRequest"] != nil { - pagerMethod = pagerMethods[client+".NewListAllPager"] - t.Pager = "NewListAllPager" - listMethod = listMethods[client+".listAllCreateRequest"] - } else { - // this permutation is not supported by codegen - continue - } - } else if pagerMethods[client+".NewListPager"] != nil { - if listMethods[client+".listCreateRequest"] != nil { - pagerMethod = pagerMethods[client+".NewListPager"] - t.Pager = "NewListPager" - listMethod = listMethods[client+".listCreateRequest"] - } else { - // this permutation is not supported by codegen - continue - } - } else if pagerMethods[client+".listBySubscriptionCreateRequest"] != nil { - if listMethods[client+".listBySubscriptionCreateRequest"] != nil { - pagerMethod = pagerMethods[client+".listBySubscriptionCreateRequest"] - t.Pager = "listBySubscriptionCreateRequest" - listMethod = listMethods[client+".listBySubscriptionCreateRequest"] - } else { - // this permutation is not supported by codegen - continue - } - } else { - // this permutation is not supported by codegen - continue - } - - if !isArrayExist(supportedPagerParams, pagerMethod.paramNames) { - continue - } - azURL := parseURLFromFunc(listMethod.ast) - if azURL == "" { - continue - } - t.URL = azURL - t.ResponseStruct = pagerMethod.returnTypes[0] - namespaceMatches := reNamespaceFromURL.FindStringSubmatch(azURL) - if len(namespaceMatches) == 2 { - t.Namespace = strings.ToLower(namespaceMatches[1]) - t.Multiplex = fmt.Sprintf("client.SubscriptionMultiplexRegisteredNamespace(client.Namespace%s)", strings.ReplaceAll(t.Namespace, ".", "_")) - } else { - t.Multiplex = "client.SubscriptionMultiplex" - } - hasId := false - t.ResponseValueStruct, t.ResponspeStructNextLink, hasId = getStructValueNameFromResponse(pkgs, t.ResponseStruct) - if hasId { - result = append(result, t) - } - } - sort.SliceStable(result, func(i, j int) bool { - return result[i].NewFuncName < result[j].NewFuncName - }) - return result, nil -} diff --git a/plugins/source/azure/codegen0/internal/azparser/recipe.go b/plugins/source/azure/codegen0/internal/azparser/recipe.go deleted file mode 100644 index 6e3d2149fbbda6..00000000000000 --- a/plugins/source/azure/codegen0/internal/azparser/recipe.go +++ /dev/null @@ -1,30 +0,0 @@ -package azparser - -// Contains the information needed to generate CQ Table for specific Azure Client -type Table struct { - // FullImportPath - ImportPath string - // Package in the plugin - PackageName string - BaseImportPath string - // Name of the table - Name string - // name of the function that creates a new azure client - NewFuncName string - // Namespace Parsed from the URL - Namespace string - // NamespaceConst - NamespaceConst string - // Pager name to use - Pager string - // ResponseStruct - ResponseStruct string - ResponspeStructNextLink bool - ResponseValueStruct string - // URL is the one set by NewListAll or NewList, depending on which one is available - URL string - NewFuncHasSubscriptionId bool - // param names for NewXClient function - NewClientParams []string - Multiplex string -} diff --git a/plugins/source/azure/codegen0/main.go b/plugins/source/azure/codegen0/main.go deleted file mode 100644 index 3646b0bb8d6d58..00000000000000 --- a/plugins/source/azure/codegen0/main.go +++ /dev/null @@ -1,220 +0,0 @@ -package main - -import ( - "bytes" - "embed" - "fmt" - "go/format" - "log" - "os" - "os/exec" - "path" - "runtime" - "strings" - "text/template" - - "github.com/cloudquery/cloudquery/plugins/source/azure/codegen0/internal/azparser" - "github.com/iancoleman/strcase" -) - -var templateFuncs = template.FuncMap{ - "ToCamel": strcase.ToCamel, - "ToLower": strings.ToLower, -} - -//go:embed templates/*.go.tpl -var templateFS embed.FS - -var ( - currentFilename string - currentDir string -) - -func main() { - var ok bool - _, currentFilename, _, ok = runtime.Caller(0) - if !ok { - log.Fatal("Failed to get caller information") - } - currentDir = path.Dir(currentFilename) - var updateGoMod bool - if len(os.Args) > 1 && os.Args[1] == "--update-go-mod" { - updateGoMod = true - } - - if updateGoMod { - packagesToGoGet, err := azparser.DiscoverSubpackages() - if err != nil { - log.Fatal(err) - } - fmt.Printf("go getting %d packages\n", len(packagesToGoGet)) - args := []string{"get", "-u"} - args = append(args, packagesToGoGet...) - cmd := exec.Command("go", args...) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - log.Fatal(err) - } - } - - armModules, err := azparser.GetArmModules(path.Join(currentDir, "../go.mod")) - if err != nil { - log.Fatal(err) - } - namespaces := make(map[string]string, 0) - var allTables []*azparser.Table - for _, armModule := range armModules { - tables, err := azparser.CreateTablesFromPackage(armModule) - if err != nil { - log.Fatal(err) - } - if len(tables) == 0 { - continue - } - importPath := strings.Split(armModule, "@")[0] - for _, table := range tables { - if table.Namespace == "" { - panic(fmt.Sprintf("table %s has no namespace %s %s", table.NewFuncName, table.URL, importPath)) - } - namespaces[strings.ReplaceAll(table.Namespace, ".", "_")] = table.Namespace - } - for _, table := range tables { - table.Name = strings.TrimPrefix(table.NewFuncName, "New") - table.Name = strcase.ToSnake(strings.TrimSuffix(table.Name, "Client")) - table.BaseImportPath = path.Base(importPath) - table.PackageName = strings.TrimPrefix(path.Base(importPath), "arm") - table.ImportPath = importPath - table.NamespaceConst = strings.ReplaceAll(table.Namespace, ".", "_") - if len(table.NewClientParams) == 3 { - table.NewFuncHasSubscriptionId = true - } - if err := generateTable(table); err != nil { - log.Fatal(err) - } - } - allTables = append(allTables, tables...) - } - if err := generateTables(allTables); err != nil { - log.Fatal(err) - } - if err := generateNamespaces(namespaces); err != nil { - log.Fatal(err) - } -} - -func generateNamespaces(namespaces map[string]string) error { - tpl, err := template.New("namespaces.go.tpl").Funcs(template.FuncMap{ - "ToCamel": strcase.ToCamel, - }).ParseFS(templateFS, "templates/namespaces.go.tpl") - if err != nil { - return fmt.Errorf("failed to parse recipe.go.tpl: %w", err) - } - - var buff bytes.Buffer - if err := tpl.Execute(&buff, namespaces); err != nil { - return fmt.Errorf("failed to execute recipe template: %w", err) - } - filePath := path.Join(currentDir, "../client/namespaces.go") - content := buff.Bytes() - formattedContent, err := format.Source(content) - if err != nil { - fmt.Printf("failed to format code for %s: %v\n", filePath, err) - } else { - content = formattedContent - } - if err := os.WriteFile(filePath, content, 0644); err != nil { - return fmt.Errorf("failed to write file %s: %w", filePath, err) - } - return nil -} - -func generateTable(r *azparser.Table) error { - tpl, err := template.New("list.go.tpl").Funcs(templateFuncs).ParseFS(templateFS, "templates/*.go.tpl") - if err != nil { - return fmt.Errorf("failed to parse templates: %w", err) - } - var buff bytes.Buffer - if err := tpl.Execute(&buff, r); err != nil { - return fmt.Errorf("failed to execute template for %w", err) - } - - filePath := path.Join(currentDir, "../resources/services", r.PackageName) - if err := os.MkdirAll(filePath, os.ModePerm); err != nil { - return err - } - name := r.Name - if strings.HasSuffix(name, "_test") { - name = name + "_not" - } - filePath = path.Join(filePath, name+".go") - - content := buff.Bytes() - formattedContent, err := format.Source(buff.Bytes()) - if err != nil { - fmt.Printf("failed to format code for %s: %v\n", filePath, err) - } else { - content = formattedContent - } - if err := os.WriteFile(filePath, content, 0644); err != nil { - return fmt.Errorf("failed to write file %s: %w", filePath, err) - } - if err := generateTableMock(r); err != nil { - return err - } - return nil -} - -func generateTableMock(r *azparser.Table) error { - tpl, err := template.New("list_mock.go.tpl").Funcs(templateFuncs).ParseFS(templateFS, "templates/*.go.tpl") - if err != nil { - return fmt.Errorf("failed to parse templates: %w", err) - } - var buff bytes.Buffer - if err := tpl.Execute(&buff, r); err != nil { - return fmt.Errorf("failed to execute template: %w", err) - } - - filePath := path.Join(currentDir, "../resources/services", r.PackageName) - if err := os.MkdirAll(filePath, os.ModePerm); err != nil { - return err - } - filePath = path.Join(filePath, r.Name+"_mock_test.go") - - content := buff.Bytes() - formattedContent, err := format.Source(buff.Bytes()) - if err != nil { - fmt.Printf("failed to format code for %s: %v\n", filePath, err) - } else { - content = formattedContent - } - if err := os.WriteFile(filePath, content, 0644); err != nil { - return fmt.Errorf("failed to write file %s: %w", filePath, err) - } - return nil -} - -func generateTables(rr []*azparser.Table) error { - tpl, err := template.New("tables.go.tpl").Funcs(templateFuncs).ParseFS(templateFS, "templates/tables.go.tpl") - if err != nil { - return fmt.Errorf("failed to parse services.go.tpl: %w", err) - } - - var buff bytes.Buffer - if err := tpl.Execute(&buff, rr); err != nil { - return fmt.Errorf("failed to execute services template: %w", err) - } - - filePath := path.Join(currentDir, "../resources/plugin/tables.go") - content := buff.Bytes() - formattedContent, err := format.Source(buff.Bytes()) - if err != nil { - fmt.Printf("failed to format code for %s: %v\n", filePath, err) - } else { - content = formattedContent - } - if err := os.WriteFile(filePath, content, 0644); err != nil { - return fmt.Errorf("failed to write file %s: %w", filePath, err) - } - return nil -} diff --git a/plugins/source/azure/codegen0/templates/list.go.tpl b/plugins/source/azure/codegen0/templates/list.go.tpl deleted file mode 100644 index cb1a8b80dfa3ab..00000000000000 --- a/plugins/source/azure/codegen0/templates/list.go.tpl +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package {{.PackageName}} - -import ( - "github.com/cloudquery/plugin-sdk/schema" - "github.com/cloudquery/plugin-sdk/transformers" - "context" - "{{.ImportPath}}" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" -) - -func {{.Name | ToCamel}}() *schema.Table { - return &schema.Table{ - Name: "azure_{{.PackageName}}_{{.Name}}", - Resolver: fetch{{.Name | ToCamel}}, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespace{{.NamespaceConst}}), - Transform: transformers.TransformWithStruct(&{{.BaseImportPath}}.{{.ResponseValueStruct}}{}), - Columns: []schema.Column{ - { - Name: "subscription_id", - Type: schema.TypeString, - Resolver: client.ResolveAzureSubscription, - }, - { - Name: "id", - Type: schema.TypeString, - Resolver: schema.PathResolver("ID"), - CreationOptions: schema.ColumnCreationOptions{ - PrimaryKey: true, - }, - }, - }, - } -} - -func fetch{{.Name | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - {{- if .NewFuncHasSubscriptionId}} - svc, err := {{.BaseImportPath}}.{{.NewFuncName}}(cl.SubscriptionId, cl.Creds, cl.Options) - {{- else}} - svc, err := {{.BaseImportPath}}.{{.NewFuncName}}(cl.Creds, cl.Options) - {{- end}} - if err != nil { - return err - } - pager := svc.{{.Pager}}(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} \ No newline at end of file diff --git a/plugins/source/azure/codegen0/templates/list_mock.go.tpl b/plugins/source/azure/codegen0/templates/list_mock.go.tpl deleted file mode 100644 index 1121f44e8eeec8..00000000000000 --- a/plugins/source/azure/codegen0/templates/list_mock.go.tpl +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package {{.PackageName}} - -import ( - "encoding/json" - "net/http" - - "testing" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" - - "github.com/cloudquery/plugin-sdk/faker" - "github.com/gorilla/mux" - "{{.ImportPath}}" -) - -func create{{.Name | ToCamel}}(router *mux.Router) (error) { - var item {{.BaseImportPath}}.{{.ResponseStruct}} - if err := faker.FakeObject(&item); err != nil { - return err - } - {{if .ResponspeStructNextLink}} - emptyStr := "" - item.NextLink = &emptyStr - {{end}} - router.HandleFunc("{{.URL}}", func(w http.ResponseWriter, r *http.Request) { - b, err := json.Marshal(&item) - if err != nil { - http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) - return - } - if _, err := w.Write(b); err != nil { - http.Error(w, "failed to write", http.StatusBadRequest) - return - } - }) - - return nil -} - -func Test{{.Name | ToCamel}}(t *testing.T) { - client.MockTestHelper(t, {{.Name | ToCamel}}(), create{{.Name | ToCamel}}) -} diff --git a/plugins/source/azure/codegen0/templates/namespaces.go.tpl b/plugins/source/azure/codegen0/templates/namespaces.go.tpl deleted file mode 100644 index 3fbcad783ba449..00000000000000 --- a/plugins/source/azure/codegen0/templates/namespaces.go.tpl +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package client - -{{- range $key, $value := .}} -const Namespace{{$key}} = "{{$value}}" -{{- end}} - -var autoGeneratedNamespaces = []string{ -{{- range $key, $value := .}} - Namespace{{$key}}, -{{- end}} -} diff --git a/plugins/source/azure/codegen0/templates/recipe.go.tpl b/plugins/source/azure/codegen0/templates/recipe.go.tpl deleted file mode 100644 index 0f2dda15fc21bd..00000000000000 --- a/plugins/source/azure/codegen0/templates/recipe.go.tpl +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package recipes - -import "{{.Import}}" - -func {{.BaseName | ToCamel}}() []*Table { - tables := []*Table{ - {{- range .Tables}} - { - NewFunc: {{$.BaseName}}.{{.NewFuncName}}, - PkgPath: "{{$.Import}}", - URL: "{{.URL}}", - Namespace: "{{.Namespace}}", - Multiplex: `{{.Multiplex}}`, - Pager: `{{.Pager}}`, - ResponseStruct: "{{.ResponseStruct}}", - }, - {{- end}} - } - return tables -} - -func init() { - Tables = append(Tables, {{.BaseName | ToCamel}}()) -} \ No newline at end of file diff --git a/plugins/source/azure/codegen0/templates/tables.go.tpl b/plugins/source/azure/codegen0/templates/tables.go.tpl deleted file mode 100644 index 4595b75ce697be..00000000000000 --- a/plugins/source/azure/codegen0/templates/tables.go.tpl +++ /dev/null @@ -1,17 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package plugin - -import ( - "github.com/cloudquery/plugin-sdk/schema" - {{- range .}} - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/{{.PackageName}}" - {{- end}} -) - -func generatedTables() []*schema.Table { - return []*schema.Table{ - {{- range .}} - {{.PackageName}}.{{.Name | ToCamel}}(), - {{- end}} - } -} \ No newline at end of file diff --git a/plugins/source/azure/docs/tables/README.md b/plugins/source/azure/docs/tables/README.md index ca3c62e5ce9ad6..897413dee2ed4f 100644 --- a/plugins/source/azure/docs/tables/README.md +++ b/plugins/source/azure/docs/tables/README.md @@ -25,6 +25,7 @@ - [azure_authorization_classic_administrators](azure_authorization_classic_administrators.md) - [azure_authorization_provider_operations_metadata](azure_authorization_provider_operations_metadata.md) - [azure_authorization_role_assignments](azure_authorization_role_assignments.md) +- [azure_authorization_role_definitions](azure_authorization_role_definitions.md) - [azure_automation_account](azure_automation_account.md) - [azure_azurearcdata_postgres_instances](azure_azurearcdata_postgres_instances.md) - [azure_azurearcdata_sql_managed_instances](azure_azurearcdata_sql_managed_instances.md) @@ -37,6 +38,10 @@ - [azure_botservice_bots](azure_botservice_bots.md) - [azure_cdn_edge_nodes](azure_cdn_edge_nodes.md) - [azure_cdn_managed_rule_sets](azure_cdn_managed_rule_sets.md) +- [azure_cdn_profiles](azure_cdn_profiles.md) + - [azure_cdn_endpoints](azure_cdn_endpoints.md) + - [azure_cdn_rule_sets](azure_cdn_rule_sets.md) + - [azure_cdn_security_policies](azure_cdn_security_policies.md) - [azure_cognitiveservices_accounts](azure_cognitiveservices_accounts.md) - [azure_cognitiveservices_deleted_accounts](azure_cognitiveservices_deleted_accounts.md) - [azure_compute_cloud_services](azure_compute_cloud_services.md) @@ -46,8 +51,11 @@ - [azure_compute_galleries](azure_compute_galleries.md) - [azure_compute_images](azure_compute_images.md) - [azure_compute_restore_point_collections](azure_compute_restore_point_collections.md) +- [azure_compute_skus](azure_compute_skus.md) - [azure_compute_snapshots](azure_compute_snapshots.md) - [azure_compute_virtual_machine_scale_sets](azure_compute_virtual_machine_scale_sets.md) + - [azure_compute_virtual_machine_scale_set_vms](azure_compute_virtual_machine_scale_set_vms.md) +- [azure_compute_virtual_machines](azure_compute_virtual_machines.md) - [azure_confluent_marketplace_agreements](azure_confluent_marketplace_agreements.md) - [azure_connectedvmware_clusters](azure_connectedvmware_clusters.md) - [azure_connectedvmware_datastores](azure_connectedvmware_datastores.md) @@ -61,8 +69,13 @@ - [azure_containerregistry_registries](azure_containerregistry_registries.md) - [azure_containerservice_managed_clusters](azure_containerservice_managed_clusters.md) - [azure_containerservice_snapshots](azure_containerservice_snapshots.md) +- [azure_cosmos_database_accounts](azure_cosmos_database_accounts.md) + - [azure_cosmos_mongo_db_databases](azure_cosmos_mongo_db_databases.md) + - [azure_cosmos_sql_databases](azure_cosmos_sql_databases.md) - [azure_cosmos_locations](azure_cosmos_locations.md) - [azure_cosmos_restorable_database_accounts](azure_cosmos_restorable_database_accounts.md) +- [azure_costmanagement_views](azure_costmanagement_views.md) + - [azure_costmanagement_view_queries](azure_costmanagement_view_queries.md) - [azure_customerinsights_hubs](azure_customerinsights_hubs.md) - [azure_dashboard_grafana](azure_dashboard_grafana.md) - [azure_databox_jobs](azure_databox_jobs.md) @@ -91,13 +104,23 @@ - [azure_healthcareapis_services](azure_healthcareapis_services.md) - [azure_hybridcompute_private_link_scopes](azure_hybridcompute_private_link_scopes.md) - [azure_hybriddatamanager_data_managers](azure_hybriddatamanager_data_managers.md) +- [azure_keyvault_keyvault](azure_keyvault_keyvault.md) + - [azure_keyvault_keyvault_keys](azure_keyvault_keyvault_keys.md) + - [azure_keyvault_keyvault_secrets](azure_keyvault_keyvault_secrets.md) +- [azure_keyvault_keyvault_managed_hsms](azure_keyvault_keyvault_managed_hsms.md) - [azure_kusto_clusters](azure_kusto_clusters.md) +- [azure_logic_workflows](azure_logic_workflows.md) - [azure_maintenance_configurations](azure_maintenance_configurations.md) - [azure_maintenance_public_maintenance_configurations](azure_maintenance_public_maintenance_configurations.md) +- [azure_mariadb_servers](azure_mariadb_servers.md) + - [azure_mariadb_server_configurations](azure_mariadb_server_configurations.md) - [azure_marketplace_private_store](azure_marketplace_private_store.md) - [azure_monitor_log_profiles](azure_monitor_log_profiles.md) - [azure_monitor_private_link_scopes](azure_monitor_private_link_scopes.md) +- [azure_monitor_tenant_activity_log_alerts](azure_monitor_tenant_activity_log_alerts.md) - [azure_monitor_tenant_activity_logs](azure_monitor_tenant_activity_logs.md) +- [azure_mysql_servers](azure_mysql_servers.md) + - [azure_mysql_server_configurations](azure_mysql_server_configurations.md) - [azure_mysqlflexibleservers_servers](azure_mysqlflexibleservers_servers.md) - [azure_network_application_gateways](azure_network_application_gateways.md) - [azure_network_application_security_groups](azure_network_application_security_groups.md) @@ -109,13 +132,14 @@ - [azure_network_ddos_protection_plans](azure_network_ddos_protection_plans.md) - [azure_network_dscp_configuration](azure_network_dscp_configuration.md) - [azure_network_express_route_circuits](azure_network_express_route_circuits.md) +- [azure_network_express_route_gateways](azure_network_express_route_gateways.md) - [azure_network_express_route_ports](azure_network_express_route_ports.md) - [azure_network_express_route_ports_locations](azure_network_express_route_ports_locations.md) - [azure_network_express_route_service_providers](azure_network_express_route_service_providers.md) - [azure_network_firewall_policies](azure_network_firewall_policies.md) +- [azure_network_interfaces](azure_network_interfaces.md) - [azure_network_ip_allocations](azure_network_ip_allocations.md) - [azure_network_ip_groups](azure_network_ip_groups.md) -- [azure_network_interfaces](azure_network_interfaces.md) - [azure_network_load_balancers](azure_network_load_balancers.md) - [azure_network_nat_gateways](azure_network_nat_gateways.md) - [azure_network_profiles](azure_network_profiles.md) @@ -127,15 +151,15 @@ - [azure_network_security_partner_providers](azure_network_security_partner_providers.md) - [azure_network_service_endpoint_policies](azure_network_service_endpoint_policies.md) - [azure_network_subscription_network_manager_connections](azure_network_subscription_network_manager_connections.md) -- [azure_network_vpn_gateways](azure_network_vpn_gateways.md) -- [azure_network_vpn_server_configurations](azure_network_vpn_server_configurations.md) -- [azure_network_vpn_sites](azure_network_vpn_sites.md) - [azure_network_virtual_appliances](azure_network_virtual_appliances.md) - [azure_network_virtual_hubs](azure_network_virtual_hubs.md) - [azure_network_virtual_network_taps](azure_network_virtual_network_taps.md) - [azure_network_virtual_networks](azure_network_virtual_networks.md) - [azure_network_virtual_routers](azure_network_virtual_routers.md) - [azure_network_virtual_wans](azure_network_virtual_wans.md) +- [azure_network_vpn_gateways](azure_network_vpn_gateways.md) +- [azure_network_vpn_server_configurations](azure_network_vpn_server_configurations.md) +- [azure_network_vpn_sites](azure_network_vpn_sites.md) - [azure_network_watchers](azure_network_watchers.md) - [azure_network_web_application_firewall_policies](azure_network_web_application_firewall_policies.md) - [azure_networkfunction_azure_traffic_collectors_by_subscription](azure_networkfunction_azure_traffic_collectors_by_subscription.md) @@ -146,6 +170,11 @@ - [azure_peering_service_countries](azure_peering_service_countries.md) - [azure_peering_service_locations](azure_peering_service_locations.md) - [azure_peering_service_providers](azure_peering_service_providers.md) +- [azure_policy_assignments](azure_policy_assignments.md) +- [azure_policy_data_policy_manifests](azure_policy_data_policy_manifests.md) +- [azure_policy_definitions](azure_policy_definitions.md) +- [azure_policy_exemptions](azure_policy_exemptions.md) +- [azure_policy_set_definitions](azure_policy_set_definitions.md) - [azure_portal_list_tenant_configuration_violations](azure_portal_list_tenant_configuration_violations.md) - [azure_portal_tenant_configurations](azure_portal_tenant_configurations.md) - [azure_postgresql_servers](azure_postgresql_servers.md) @@ -155,15 +184,13 @@ - [azure_privatedns_private_zones](azure_privatedns_private_zones.md) - [azure_providerhub_provider_registrations](azure_providerhub_provider_registrations.md) - [azure_redhatopenshift_open_shift_clusters](azure_redhatopenshift_open_shift_clusters.md) +- [azure_redis_caches](azure_redis_caches.md) - [azure_relay_namespaces](azure_relay_namespaces.md) - [azure_reservations_reservation](azure_reservations_reservation.md) - [azure_reservations_reservation_order](azure_reservations_reservation_order.md) -- [azure_policy_assignments](azure_policy_assignments.md) -- [azure_policy_data_policy_manifests](azure_policy_data_policy_manifests.md) -- [azure_policy_definitions](azure_policy_definitions.md) -- [azure_policy_exemptions](azure_policy_exemptions.md) -- [azure_policy_set_definitions](azure_policy_set_definitions.md) +- [azure_resources_resources](azure_resources_resources.md) - [azure_saas_resources](azure_saas_resources.md) +- [azure_search_services](azure_search_services.md) - [azure_security_alerts](azure_security_alerts.md) - [azure_security_alerts_suppression_rules](azure_security_alerts_suppression_rules.md) - [azure_security_allowed_connections](azure_security_allowed_connections.md) @@ -177,6 +204,7 @@ - [azure_security_governance_rule](azure_security_governance_rule.md) - [azure_security_jit_network_access_policies](azure_security_jit_network_access_policies.md) - [azure_security_locations](azure_security_locations.md) +- [azure_security_pricings](azure_security_pricings.md) - [azure_security_regulatory_compliance_standards](azure_security_regulatory_compliance_standards.md) - [azure_security_secure_score_control_definitions](azure_security_secure_score_control_definitions.md) - [azure_security_secure_score_controls](azure_security_secure_score_controls.md) @@ -192,45 +220,17 @@ - [azure_sql_virtual_clusters](azure_sql_virtual_clusters.md) - [azure_sqlvirtualmachine_groups](azure_sqlvirtualmachine_groups.md) - [azure_sqlvirtualmachine_sql_virtual_machines](azure_sqlvirtualmachine_sql_virtual_machines.md) +- [azure_storage_accounts](azure_storage_accounts.md) + - [azure_storage_blob_services](azure_storage_blob_services.md) + - [azure_storage_containers](azure_storage_containers.md) + - [azure_storage_tables](azure_storage_tables.md) - [azure_storagecache_caches](azure_storagecache_caches.md) - [azure_streamanalytics_streaming_jobs](azure_streamanalytics_streaming_jobs.md) +- [azure_subscription_subscriptions](azure_subscription_subscriptions.md) +- [azure_subscription_tenants](azure_subscription_tenants.md) - [azure_support_services](azure_support_services.md) - [azure_support_tickets](azure_support_tickets.md) - [azure_synapse_private_link_hubs](azure_synapse_private_link_hubs.md) - [azure_synapse_workspaces](azure_synapse_workspaces.md) -- [azure_windowsesu_multiple_activation_keys](azure_windowsesu_multiple_activation_keys.md) - [azure_windowsiot_services](azure_windowsiot_services.md) -- [azure_workloads_monitors](azure_workloads_monitors.md) -- [azure_authorization_role_definitions](azure_authorization_role_definitions.md) -- [azure_cdn_profiles](azure_cdn_profiles.md) - - [azure_cdn_endpoints](azure_cdn_endpoints.md) - - [azure_cdn_rule_sets](azure_cdn_rule_sets.md) - - [azure_cdn_security_policies](azure_cdn_security_policies.md) -- [azure_compute_virtual_machines](azure_compute_virtual_machines.md) -- [azure_compute_skus](azure_compute_skus.md) -- [azure_cosmos_database_accounts](azure_cosmos_database_accounts.md) - - [azure_cosmos_mongo_db_databases](azure_cosmos_mongo_db_databases.md) - - [azure_cosmos_sql_databases](azure_cosmos_sql_databases.md) -- [azure_costmanagement_views](azure_costmanagement_views.md) - - [azure_costmanagement_view_queries](azure_costmanagement_view_queries.md) -- [azure_keyvault_keyvault](azure_keyvault_keyvault.md) - - [azure_keyvault_keyvault_keys](azure_keyvault_keyvault_keys.md) - - [azure_keyvault_keyvault_secrets](azure_keyvault_keyvault_secrets.md) -- [azure_keyvault_keyvault_managed_hsms](azure_keyvault_keyvault_managed_hsms.md) -- [azure_logic_workflows](azure_logic_workflows.md) -- [azure_mariadb_servers](azure_mariadb_servers.md) - - [azure_mariadb_server_configurations](azure_mariadb_server_configurations.md) -- [azure_monitor_tenant_activity_log_alerts](azure_monitor_tenant_activity_log_alerts.md) -- [azure_mysql_servers](azure_mysql_servers.md) - - [azure_mysql_server_configurations](azure_mysql_server_configurations.md) -- [azure_network_express_route_gateways](azure_network_express_route_gateways.md) -- [azure_security_pricings](azure_security_pricings.md) -- [azure_storage_accounts](azure_storage_accounts.md) - - [azure_storage_tables](azure_storage_tables.md) - - [azure_storage_containers](azure_storage_containers.md) - - [azure_storage_blob_services](azure_storage_blob_services.md) -- [azure_subscription_subscriptions](azure_subscription_subscriptions.md) -- [azure_redis_caches](azure_redis_caches.md) -- [azure_resources_resources](azure_resources_resources.md) -- [azure_subscription_tenants](azure_subscription_tenants.md) -- [azure_search_services](azure_search_services.md) \ No newline at end of file +- [azure_workloads_monitors](azure_workloads_monitors.md) \ No newline at end of file diff --git a/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_set_vms.md b/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_set_vms.md new file mode 100644 index 00000000000000..d3a9faca177dca --- /dev/null +++ b/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_set_vms.md @@ -0,0 +1,29 @@ +# Table: azure_compute_virtual_machine_scale_set_vms + +The primary key for this table is **id**. + +## Relations + +This table depends on [azure_compute_virtual_machine_scale_sets](azure_compute_virtual_machine_scale_sets.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|subscription_id|String| +|id (PK)|String| +|location|String| +|identity|JSON| +|plan|JSON| +|properties|JSON| +|tags|JSON| +|instance_id|String| +|name|String| +|resources|JSON| +|sku|JSON| +|type|String| +|zones|StringArray| \ No newline at end of file diff --git a/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md b/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md index 8f45f22de28f0f..08123d597b1a8c 100644 --- a/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md +++ b/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md @@ -2,6 +2,11 @@ The primary key for this table is **id**. +## Relations + +The following tables depend on azure_compute_virtual_machine_scale_sets: + - [azure_compute_virtual_machine_scale_set_vms](azure_compute_virtual_machine_scale_set_vms.md) + ## Columns | Name | Type | diff --git a/plugins/source/azure/docs/tables/azure_peering_service_providers.md b/plugins/source/azure/docs/tables/azure_peering_service_providers.md index 477f8d8ccb01a6..0f6e9dd08f1626 100644 --- a/plugins/source/azure/docs/tables/azure_peering_service_providers.md +++ b/plugins/source/azure/docs/tables/azure_peering_service_providers.md @@ -1,6 +1,6 @@ # Table: azure_peering_service_providers -The primary key for this table is **id**. +The composite primary key for this table is (**subscription_id**, **name**). ## Columns @@ -10,8 +10,8 @@ The primary key for this table is **id**. |_cq_sync_time|Timestamp| |_cq_id|UUID| |_cq_parent_id|UUID| -|subscription_id|String| -|id (PK)|String| +|subscription_id (PK)|String| +|name (PK)|String| |properties|JSON| -|name|String| +|id|String| |type|String| \ No newline at end of file diff --git a/plugins/source/azure/docs/tables/azure_storage_accounts.md b/plugins/source/azure/docs/tables/azure_storage_accounts.md index ed876ae099d41a..9d3eacb55bdfa7 100644 --- a/plugins/source/azure/docs/tables/azure_storage_accounts.md +++ b/plugins/source/azure/docs/tables/azure_storage_accounts.md @@ -5,9 +5,9 @@ The primary key for this table is **id**. ## Relations The following tables depend on azure_storage_accounts: - - [azure_storage_tables](azure_storage_tables.md) - - [azure_storage_containers](azure_storage_containers.md) - [azure_storage_blob_services](azure_storage_blob_services.md) + - [azure_storage_containers](azure_storage_containers.md) + - [azure_storage_tables](azure_storage_tables.md) ## Columns diff --git a/plugins/source/azure/go.mod b/plugins/source/azure/go.mod index de9ab65a67ed05..fb7a3da8c57186 100644 --- a/plugins/source/azure/go.mod +++ b/plugins/source/azure/go.mod @@ -64,7 +64,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx v1.0.1 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2 v2.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering v1.0.0 @@ -93,14 +93,11 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.5.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsesu/armwindowsesu v0.5.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v0.2.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gorilla/mux v1.8.0 - github.com/iancoleman/strcase v0.2.0 github.com/rs/zerolog v1.28.0 - golang.org/x/mod v0.6.0 ) require github.com/kylelemons/godebug v1.1.0 // indirect diff --git a/plugins/source/azure/go.sum b/plugins/source/azure/go.sum index 6c5dfdce62dfe9..0edb4be91c3f86 100644 --- a/plugins/source/azure/go.sum +++ b/plugins/source/azure/go.sum @@ -156,8 +156,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction v1.0.0 h1:UVtXsUrI42NcbF2Gix72ocqrSwGGXGpyEqCRD8/R/KY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction v1.0.0/go.mod h1:NopiK8zJllx4yy6CPbkpOIu5B+ZVYSEEbMoqoXU1Wl4= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx v1.0.1 h1:CHxPPRzAmUuS2IICn2+yaDK1UvOJQYnO+LNFxTxFRUU= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx v1.0.1/go.mod h1:48/T/8W/5Aovgn3AD+koLpqWo/1H86Z8DoGkhJIlThg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2 v2.0.0 h1:HwXVlgG4XaUBd0/lUGJ9lsG9pWzu7A1JpdNiy1R7UdA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2 v2.0.0/go.mod h1:VEHdexm48gSyyFNL3OlBTwhSWpL9xeeymKeSqieivbg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs v1.0.0 h1:HEDHc0NG7a3n4W7h2ZVhHHO3mwjgmhxk4iaJ95L3P2w= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs v1.0.0/go.mod h1:38scdclLd79YBNBeF+8vwMHYglYHP2g1yNzMjOzIIW8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.0.0 h1:hdC0QToUqJikvZXE/ZSHafNv10IcYYkCPY7B99QhNSc= @@ -214,8 +214,6 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport v1.0.0/go.mod h1:1cSbREmeSg3E0axaZjCa6PjG5LgxP+GNrsj+6x1CShk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.5.0 h1:CMHxfGGGbg9ua3uSBNRdhKa+fciYNavayBiG0I6LA34= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.5.0/go.mod h1:0LrLPHG/bVyQWENxWqSj2ycnnrpTjeSFrKuWymCBceM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsesu/armwindowsesu v0.5.0 h1:3KqtRRZBq1l4VzJXMDl63EXdfAp4bQoULM39fIZITDM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsesu/armwindowsesu v0.5.0/go.mod h1:yEqTWOTAVoFRXM0b6XSb1xpN4HgplSMQYjsZz1PFtg0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot v1.0.0 h1:gg1fn6y2Jd+fTUxMau0UINwLCjEzELbyzoy8+c26phU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot v1.0.0/go.mod h1:kdl0zSso4qqJdaxAr31cwQXwBZLd+zUT5O3EQbC3Jc8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads v0.2.0 h1:t6Ef1sDPDa/hPY6HWuATAYD7OEX4e3tz0sh32ecN+g8= @@ -231,8 +229,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -321,8 +319,6 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -427,8 +423,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/plugins/source/azure/resources/plugin/plugin.go b/plugins/source/azure/resources/plugin/plugin.go index e4ffc0bd91095d..13cf43c1d4b7a8 100644 --- a/plugins/source/azure/resources/plugin/plugin.go +++ b/plugins/source/azure/resources/plugin/plugin.go @@ -2,62 +2,18 @@ package plugin import ( "github.com/cloudquery/cloudquery/plugins/source/azure/client" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/authorization" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/cdn" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/compute" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/cosmos" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/costmanagement" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/keyvault" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/logic" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/mariadb" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/monitor" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/mysql" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/network" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/redis" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/resources" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/search" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/security" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/storage" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/subscription" "github.com/cloudquery/plugin-sdk/plugins/source" - "github.com/cloudquery/plugin-sdk/schema" ) var ( Version = "development" ) -// var Tables []*schema.Table - -var customTables = []*schema.Table{ - authorization.RoleDefinitions(), - cdn.Profiles(), - compute.VirtualMachines(), - compute.SKUs(), - cosmos.DatabaseAccounts(), - costmanagement.Views(), - keyvault.Keyvault(), - keyvault.KeyvaultManagedHsms(), - logic.Workflows(), - mariadb.Servers(), - monitor.TenantActivityLogAlerts(), - mysql.Servers(), - network.ExpressRouteGateways(), - security.Pricings(), - storage.Accounts(), - subscription.Subscriptions(), - redis.Caches(), - resources.Resources(), - subscription.Tenants(), - search.Services(), -} - func Plugin() *source.Plugin { - allTables := append(generatedTables(), customTables...) return source.NewPlugin( "azure", Version, - allTables, + tables(), client.New, ) } diff --git a/plugins/source/azure/resources/plugin/tables.go b/plugins/source/azure/resources/plugin/tables.go index 787435a0a33fdd..d1afcba5ce372b 100644 --- a/plugins/source/azure/resources/plugin/tables.go +++ b/plugins/source/azure/resources/plugin/tables.go @@ -1,4 +1,3 @@ -// Code generated by codegen; DO NOT EDIT. package plugin import ( @@ -25,6 +24,7 @@ import ( "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/containerregistry" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/containerservice" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/cosmos" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/costmanagement" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/customerinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/dashboard" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/databox" @@ -49,10 +49,14 @@ import ( "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/healthcareapis" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/hybridcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/hybriddatamanager" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/keyvault" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/kusto" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/logic" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/maintenance" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/mariadb" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/marketplace" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/monitor" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/mysql" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/mysqlflexibleservers" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/network" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/networkfunction" @@ -69,24 +73,28 @@ import ( "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/privatedns" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/providerhub" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/redhatopenshift" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/redis" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/relay" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/reservations" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/resources" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/saas" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/search" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/security" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/servicebus" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/sql" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/sqlvirtualmachine" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/storage" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/storagecache" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/streamanalytics" + "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/subscription" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/support" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/synapse" - "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/windowsesu" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/windowsiot" "github.com/cloudquery/cloudquery/plugins/source/azure/resources/services/workloads" "github.com/cloudquery/plugin-sdk/schema" ) -func generatedTables() []*schema.Table { +func tables() []*schema.Table { return []*schema.Table{ advisor.RecommendationMetadata(), advisor.Recommendations(), @@ -111,6 +119,7 @@ func generatedTables() []*schema.Table { authorization.ClassicAdministrators(), authorization.ProviderOperationsMetadata(), authorization.RoleAssignments(), + authorization.RoleDefinitions(), automation.Account(), azurearcdata.PostgresInstances(), azurearcdata.SqlManagedInstances(), @@ -123,6 +132,7 @@ func generatedTables() []*schema.Table { botservice.Bots(), cdn.EdgeNodes(), cdn.ManagedRuleSets(), + cdn.Profiles(), cognitiveservices.Accounts(), cognitiveservices.DeletedAccounts(), compute.CloudServices(), @@ -132,8 +142,12 @@ func generatedTables() []*schema.Table { compute.Galleries(), compute.Images(), compute.RestorePointCollections(), + compute.SKUs(), compute.Snapshots(), compute.VirtualMachineScaleSets(), + compute.VirtualMachines(), + cosmos.DatabaseAccounts(), + costmanagement.Views(), confluent.MarketplaceAgreements(), connectedvmware.Clusters(), connectedvmware.Datastores(), @@ -177,13 +191,19 @@ func generatedTables() []*schema.Table { healthcareapis.Services(), hybridcompute.PrivateLinkScopes(), hybriddatamanager.DataManagers(), + keyvault.Keyvault(), + keyvault.KeyvaultManagedHsms(), kusto.Clusters(), + logic.Workflows(), maintenance.Configurations(), maintenance.PublicMaintenanceConfigurations(), + mariadb.Servers(), marketplace.PrivateStore(), monitor.LogProfiles(), monitor.PrivateLinkScopes(), + monitor.TenantActivityLogAlerts(), monitor.TenantActivityLogs(), + mysql.Servers(), mysqlflexibleservers.Servers(), network.ApplicationGateways(), network.ApplicationSecurityGroups(), @@ -195,6 +215,7 @@ func generatedTables() []*schema.Table { network.DdosProtectionPlans(), network.DscpConfiguration(), network.ExpressRouteCircuits(), + network.ExpressRouteGateways(), network.ExpressRoutePorts(), network.ExpressRoutePortsLocations(), network.ExpressRouteServiceProviders(), @@ -241,15 +262,18 @@ func generatedTables() []*schema.Table { privatedns.PrivateZones(), providerhub.ProviderRegistrations(), redhatopenshift.OpenShiftClusters(), + redis.Caches(), relay.Namespaces(), reservations.Reservation(), reservations.ReservationOrder(), + resources.Resources(), policy.Assignments(), policy.DataPolicyManifests(), policy.Definitions(), policy.Exemptions(), policy.SetDefinitions(), saas.Resources(), + search.Services(), security.Alerts(), security.AlertsSuppressionRules(), security.AllowedConnections(), @@ -263,6 +287,7 @@ func generatedTables() []*schema.Table { security.GovernanceRule(), security.JitNetworkAccessPolicies(), security.Locations(), + security.Pricings(), security.RegulatoryComplianceStandards(), security.SecureScoreControlDefinitions(), security.SecureScoreControls(), @@ -278,13 +303,15 @@ func generatedTables() []*schema.Table { sql.VirtualClusters(), sqlvirtualmachine.Groups(), sqlvirtualmachine.SqlVirtualMachines(), + storage.Accounts(), storagecache.Caches(), streamanalytics.StreamingJobs(), + subscription.Subscriptions(), + subscription.Tenants(), support.Services(), support.Tickets(), synapse.PrivateLinkHubs(), synapse.Workspaces(), - windowsesu.MultipleActivationKeys(), windowsiot.Services(), workloads.Monitors(), } diff --git a/plugins/source/azure/resources/services/advisor/recommendation_metadata.go b/plugins/source/azure/resources/services/advisor/recommendation_metadata.go index 392deaee7a5964..32f64fa580fae0 100644 --- a/plugins/source/azure/resources/services/advisor/recommendation_metadata.go +++ b/plugins/source/azure/resources/services/advisor/recommendation_metadata.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RecommendationMetadata() *schema.Table { return &schema.Table{ Name: "azure_advisor_recommendation_metadata", Resolver: fetchRecommendationMetadata, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_advisor), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_advisor_recommendation_metadata", client.Namespacemicrosoft_advisor), Transform: transformers.TransformWithStruct(&armadvisor.MetadataEntity{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/advisor/recommendation_metadata_mock_test.go b/plugins/source/azure/resources/services/advisor/recommendation_metadata_mock_test.go index 5d6ffc262e48c2..ad28d9c47241c5 100644 --- a/plugins/source/azure/resources/services/advisor/recommendation_metadata_mock_test.go +++ b/plugins/source/azure/resources/services/advisor/recommendation_metadata_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/advisor/recommendations.go b/plugins/source/azure/resources/services/advisor/recommendations.go index 3feee63f9bd278..8250d6ff1917d0 100644 --- a/plugins/source/azure/resources/services/advisor/recommendations.go +++ b/plugins/source/azure/resources/services/advisor/recommendations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Recommendations() *schema.Table { return &schema.Table{ Name: "azure_advisor_recommendations", Resolver: fetchRecommendations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_advisor), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_advisor_recommendations", client.Namespacemicrosoft_advisor), Transform: transformers.TransformWithStruct(&armadvisor.ResourceRecommendationBase{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/advisor/recommendations_mock_test.go b/plugins/source/azure/resources/services/advisor/recommendations_mock_test.go index 217f8cc61a17be..e99cf2069a5fc6 100644 --- a/plugins/source/azure/resources/services/advisor/recommendations_mock_test.go +++ b/plugins/source/azure/resources/services/advisor/recommendations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/advisor/suppressions.go b/plugins/source/azure/resources/services/advisor/suppressions.go index 63926f4856d932..45e8a0eb637806 100644 --- a/plugins/source/azure/resources/services/advisor/suppressions.go +++ b/plugins/source/azure/resources/services/advisor/suppressions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Suppressions() *schema.Table { return &schema.Table{ Name: "azure_advisor_suppressions", Resolver: fetchSuppressions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_advisor), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_advisor_suppressions", client.Namespacemicrosoft_advisor), Transform: transformers.TransformWithStruct(&armadvisor.SuppressionContract{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/advisor/suppressions_mock_test.go b/plugins/source/azure/resources/services/advisor/suppressions_mock_test.go index b8aad20f26691c..8b034b99d6a5d4 100644 --- a/plugins/source/azure/resources/services/advisor/suppressions_mock_test.go +++ b/plugins/source/azure/resources/services/advisor/suppressions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package advisor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/analysisservices/servers.go b/plugins/source/azure/resources/services/analysisservices/servers.go index c3d26f7b377608..85be49b60b417f 100644 --- a/plugins/source/azure/resources/services/analysisservices/servers.go +++ b/plugins/source/azure/resources/services/analysisservices/servers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package analysisservices import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/analysisservices/armanalysisservices" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_analysisservices_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_analysisservices), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_analysisservices_servers", client.Namespacemicrosoft_analysisservices), Transform: transformers.TransformWithStruct(&armanalysisservices.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/analysisservices/servers_mock_test.go b/plugins/source/azure/resources/services/analysisservices/servers_mock_test.go index 8c8399f409d85e..6ab6a779956787 100644 --- a/plugins/source/azure/resources/services/analysisservices/servers_mock_test.go +++ b/plugins/source/azure/resources/services/analysisservices/servers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package analysisservices import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/analysisservices/armanalysisservices" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/apimanagement/service.go b/plugins/source/azure/resources/services/apimanagement/service.go index 6c7a0f593c4110..19500b7c8eb6ab 100644 --- a/plugins/source/azure/resources/services/apimanagement/service.go +++ b/plugins/source/azure/resources/services/apimanagement/service.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package apimanagement import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Service() *schema.Table { return &schema.Table{ Name: "azure_apimanagement_service", Resolver: fetchService, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_apimanagement), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_apimanagement_service", client.Namespacemicrosoft_apimanagement), Transform: transformers.TransformWithStruct(&armapimanagement.ServiceResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/apimanagement/service_mock_test.go b/plugins/source/azure/resources/services/apimanagement/service_mock_test.go index cc3b9e8097c430..f9cb89d7f564d7 100644 --- a/plugins/source/azure/resources/services/apimanagement/service_mock_test.go +++ b/plugins/source/azure/resources/services/apimanagement/service_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package apimanagement import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appcomplianceautomation/reports.go b/plugins/source/azure/resources/services/appcomplianceautomation/reports.go index 61240b003a0fdf..67fd32f488f3a3 100644 --- a/plugins/source/azure/resources/services/appcomplianceautomation/reports.go +++ b/plugins/source/azure/resources/services/appcomplianceautomation/reports.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appcomplianceautomation import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Reports() *schema.Table { return &schema.Table{ Name: "azure_appcomplianceautomation_reports", Resolver: fetchReports, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_appcomplianceautomation), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appcomplianceautomation_reports", client.Namespacemicrosoft_appcomplianceautomation), Transform: transformers.TransformWithStruct(&armappcomplianceautomation.ReportResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appcomplianceautomation/reports_mock_test.go b/plugins/source/azure/resources/services/appcomplianceautomation/reports_mock_test.go index 3223f924dfc808..191970d71a9a7f 100644 --- a/plugins/source/azure/resources/services/appcomplianceautomation/reports_mock_test.go +++ b/plugins/source/azure/resources/services/appcomplianceautomation/reports_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appcomplianceautomation import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcomplianceautomation/armappcomplianceautomation" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appconfiguration/configuration_stores.go b/plugins/source/azure/resources/services/appconfiguration/configuration_stores.go index 2fd15dfa270f26..86b568a1ca250e 100644 --- a/plugins/source/azure/resources/services/appconfiguration/configuration_stores.go +++ b/plugins/source/azure/resources/services/appconfiguration/configuration_stores.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appconfiguration import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appconfiguration/armappconfiguration" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ConfigurationStores() *schema.Table { return &schema.Table{ Name: "azure_appconfiguration_configuration_stores", Resolver: fetchConfigurationStores, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_appconfiguration), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appconfiguration_configuration_stores", client.Namespacemicrosoft_appconfiguration), Transform: transformers.TransformWithStruct(&armappconfiguration.ConfigurationStore{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appconfiguration/configuration_stores_mock_test.go b/plugins/source/azure/resources/services/appconfiguration/configuration_stores_mock_test.go index fc8b44bc446e50..4fae5707f84e3a 100644 --- a/plugins/source/azure/resources/services/appconfiguration/configuration_stores_mock_test.go +++ b/plugins/source/azure/resources/services/appconfiguration/configuration_stores_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appconfiguration import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appconfiguration/armappconfiguration" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/applicationinsights/components.go b/plugins/source/azure/resources/services/applicationinsights/components.go index 41d4bd2eb61620..0aa34df4a07f79 100644 --- a/plugins/source/azure/resources/services/applicationinsights/components.go +++ b/plugins/source/azure/resources/services/applicationinsights/components.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package applicationinsights import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Components() *schema.Table { return &schema.Table{ Name: "azure_applicationinsights_components", Resolver: fetchComponents, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_applicationinsights_components", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armapplicationinsights.Component{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/applicationinsights/components_mock_test.go b/plugins/source/azure/resources/services/applicationinsights/components_mock_test.go index 166a3c3baf9a33..1ecc5cfda12dca 100644 --- a/plugins/source/azure/resources/services/applicationinsights/components_mock_test.go +++ b/plugins/source/azure/resources/services/applicationinsights/components_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package applicationinsights import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/applicationinsights/web_tests.go b/plugins/source/azure/resources/services/applicationinsights/web_tests.go index e2e8709c68d533..56c0872b83ef4d 100644 --- a/plugins/source/azure/resources/services/applicationinsights/web_tests.go +++ b/plugins/source/azure/resources/services/applicationinsights/web_tests.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package applicationinsights import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func WebTests() *schema.Table { return &schema.Table{ Name: "azure_applicationinsights_web_tests", Resolver: fetchWebTests, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_applicationinsights_web_tests", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armapplicationinsights.WebTest{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/applicationinsights/web_tests_mock_test.go b/plugins/source/azure/resources/services/applicationinsights/web_tests_mock_test.go index 33739e18b5c4fe..20be1d8c3eae2a 100644 --- a/plugins/source/azure/resources/services/applicationinsights/web_tests_mock_test.go +++ b/plugins/source/azure/resources/services/applicationinsights/web_tests_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package applicationinsights import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/certificate_orders.go b/plugins/source/azure/resources/services/appservice/certificate_orders.go index 0087dc3e7a2e25..343cd07310bdcd 100644 --- a/plugins/source/azure/resources/services/appservice/certificate_orders.go +++ b/plugins/source/azure/resources/services/appservice/certificate_orders.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func CertificateOrders() *schema.Table { return &schema.Table{ Name: "azure_appservice_certificate_orders", Resolver: fetchCertificateOrders, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_certificateregistration), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_certificate_orders", client.Namespacemicrosoft_certificateregistration), Transform: transformers.TransformWithStruct(&armappservice.CertificateOrder{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/certificate_orders_mock_test.go b/plugins/source/azure/resources/services/appservice/certificate_orders_mock_test.go index 26232d764c3cd0..3f3d40fdaa54af 100644 --- a/plugins/source/azure/resources/services/appservice/certificate_orders_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/certificate_orders_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/certificates.go b/plugins/source/azure/resources/services/appservice/certificates.go index 313280f6d80a5c..8f449d1605f871 100644 --- a/plugins/source/azure/resources/services/appservice/certificates.go +++ b/plugins/source/azure/resources/services/appservice/certificates.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Certificates() *schema.Table { return &schema.Table{ Name: "azure_appservice_certificates", Resolver: fetchCertificates, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_certificates", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.AppCertificate{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/certificates_mock_test.go b/plugins/source/azure/resources/services/appservice/certificates_mock_test.go index 742aa63ef913f0..69b491432810ca 100644 --- a/plugins/source/azure/resources/services/appservice/certificates_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/certificates_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/deleted_web_apps.go b/plugins/source/azure/resources/services/appservice/deleted_web_apps.go index f616289dea30ff..374635c0004001 100644 --- a/plugins/source/azure/resources/services/appservice/deleted_web_apps.go +++ b/plugins/source/azure/resources/services/appservice/deleted_web_apps.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DeletedWebApps() *schema.Table { return &schema.Table{ Name: "azure_appservice_deleted_web_apps", Resolver: fetchDeletedWebApps, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_deleted_web_apps", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.DeletedSite{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/deleted_web_apps_mock_test.go b/plugins/source/azure/resources/services/appservice/deleted_web_apps_mock_test.go index 78bf9de608ba63..c9345a6cd2b194 100644 --- a/plugins/source/azure/resources/services/appservice/deleted_web_apps_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/deleted_web_apps_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/domains.go b/plugins/source/azure/resources/services/appservice/domains.go index d0204afca05e53..d50babbd4b9502 100644 --- a/plugins/source/azure/resources/services/appservice/domains.go +++ b/plugins/source/azure/resources/services/appservice/domains.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Domains() *schema.Table { return &schema.Table{ Name: "azure_appservice_domains", Resolver: fetchDomains, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_domainregistration), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_domains", client.Namespacemicrosoft_domainregistration), Transform: transformers.TransformWithStruct(&armappservice.Domain{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/domains_mock_test.go b/plugins/source/azure/resources/services/appservice/domains_mock_test.go index be7b8bc73f9196..69885bacb65df4 100644 --- a/plugins/source/azure/resources/services/appservice/domains_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/domains_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/environments.go b/plugins/source/azure/resources/services/appservice/environments.go index 999939dfc332c1..1dbe8ce802e1a3 100644 --- a/plugins/source/azure/resources/services/appservice/environments.go +++ b/plugins/source/azure/resources/services/appservice/environments.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Environments() *schema.Table { return &schema.Table{ Name: "azure_appservice_environments", Resolver: fetchEnvironments, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_environments", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.EnvironmentResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/environments_mock_test.go b/plugins/source/azure/resources/services/appservice/environments_mock_test.go index 8878cc86592dae..5a2e2a6459c2e5 100644 --- a/plugins/source/azure/resources/services/appservice/environments_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/environments_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/plans.go b/plugins/source/azure/resources/services/appservice/plans.go index 43a107a7f833f8..c35ef069dabbbf 100644 --- a/plugins/source/azure/resources/services/appservice/plans.go +++ b/plugins/source/azure/resources/services/appservice/plans.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Plans() *schema.Table { return &schema.Table{ Name: "azure_appservice_plans", Resolver: fetchPlans, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_plans", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.Plan{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/plans_mock_test.go b/plugins/source/azure/resources/services/appservice/plans_mock_test.go index cf4a1b56b2bf30..0f3c8224e9a79a 100644 --- a/plugins/source/azure/resources/services/appservice/plans_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/plans_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/recommendations.go b/plugins/source/azure/resources/services/appservice/recommendations.go index 4d7577e05bb7d9..7304941c6f6df8 100644 --- a/plugins/source/azure/resources/services/appservice/recommendations.go +++ b/plugins/source/azure/resources/services/appservice/recommendations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Recommendations() *schema.Table { return &schema.Table{ Name: "azure_appservice_recommendations", Resolver: fetchRecommendations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_recommendations", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.Recommendation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/recommendations_mock_test.go b/plugins/source/azure/resources/services/appservice/recommendations_mock_test.go index 3d59c61fcfd39f..efc300c6247033 100644 --- a/plugins/source/azure/resources/services/appservice/recommendations_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/recommendations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/resource_health_metadata.go b/plugins/source/azure/resources/services/appservice/resource_health_metadata.go index 9c0663580b09b5..a88ab98d4ed96a 100644 --- a/plugins/source/azure/resources/services/appservice/resource_health_metadata.go +++ b/plugins/source/azure/resources/services/appservice/resource_health_metadata.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ResourceHealthMetadata() *schema.Table { return &schema.Table{ Name: "azure_appservice_resource_health_metadata", Resolver: fetchResourceHealthMetadata, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_resource_health_metadata", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.ResourceHealthMetadata{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/resource_health_metadata_mock_test.go b/plugins/source/azure/resources/services/appservice/resource_health_metadata_mock_test.go index 8f80572b5c0ab1..bc458ac201764f 100644 --- a/plugins/source/azure/resources/services/appservice/resource_health_metadata_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/resource_health_metadata_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/static_sites.go b/plugins/source/azure/resources/services/appservice/static_sites.go index 21279ec210562f..f4d5573a211a4a 100644 --- a/plugins/source/azure/resources/services/appservice/static_sites.go +++ b/plugins/source/azure/resources/services/appservice/static_sites.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func StaticSites() *schema.Table { return &schema.Table{ Name: "azure_appservice_static_sites", Resolver: fetchStaticSites, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_static_sites", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.StaticSiteARMResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/static_sites_mock_test.go b/plugins/source/azure/resources/services/appservice/static_sites_mock_test.go index 88068f17aa5b05..01eccd8deea97e 100644 --- a/plugins/source/azure/resources/services/appservice/static_sites_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/static_sites_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/top_level_domains.go b/plugins/source/azure/resources/services/appservice/top_level_domains.go index 607249b9175648..60eb8027484920 100644 --- a/plugins/source/azure/resources/services/appservice/top_level_domains.go +++ b/plugins/source/azure/resources/services/appservice/top_level_domains.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func TopLevelDomains() *schema.Table { return &schema.Table{ Name: "azure_appservice_top_level_domains", Resolver: fetchTopLevelDomains, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_domainregistration), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_top_level_domains", client.Namespacemicrosoft_domainregistration), Transform: transformers.TransformWithStruct(&armappservice.TopLevelDomain{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/top_level_domains_mock_test.go b/plugins/source/azure/resources/services/appservice/top_level_domains_mock_test.go index 45338fed04cffb..326d727ff9bb56 100644 --- a/plugins/source/azure/resources/services/appservice/top_level_domains_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/top_level_domains_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/appservice/web_apps.go b/plugins/source/azure/resources/services/appservice/web_apps.go index b24fbce4eda119..dc56123e8c43b4 100644 --- a/plugins/source/azure/resources/services/appservice/web_apps.go +++ b/plugins/source/azure/resources/services/appservice/web_apps.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func WebApps() *schema.Table { return &schema.Table{ Name: "azure_appservice_web_apps", Resolver: fetchWebApps, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_web), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_appservice_web_apps", client.Namespacemicrosoft_web), Transform: transformers.TransformWithStruct(&armappservice.Site{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/appservice/web_apps_mock_test.go b/plugins/source/azure/resources/services/appservice/web_apps_mock_test.go index a192ddf9e70c4c..57b370b22ed74d 100644 --- a/plugins/source/azure/resources/services/appservice/web_apps_mock_test.go +++ b/plugins/source/azure/resources/services/appservice/web_apps_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package appservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/authorization/classic_administrators.go b/plugins/source/azure/resources/services/authorization/classic_administrators.go index 4c424d5324eec8..f45bf307391574 100644 --- a/plugins/source/azure/resources/services/authorization/classic_administrators.go +++ b/plugins/source/azure/resources/services/authorization/classic_administrators.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ClassicAdministrators() *schema.Table { return &schema.Table{ Name: "azure_authorization_classic_administrators", Resolver: fetchClassicAdministrators, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_authorization_classic_administrators", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armauthorization.ClassicAdministrator{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/authorization/classic_administrators_mock_test.go b/plugins/source/azure/resources/services/authorization/classic_administrators_mock_test.go index b21fd0ef79d055..5b6e59fe066588 100644 --- a/plugins/source/azure/resources/services/authorization/classic_administrators_mock_test.go +++ b/plugins/source/azure/resources/services/authorization/classic_administrators_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/authorization/provider_operations_metadata.go b/plugins/source/azure/resources/services/authorization/provider_operations_metadata.go index e8324e20178396..f991d0a1b0c7fb 100644 --- a/plugins/source/azure/resources/services/authorization/provider_operations_metadata.go +++ b/plugins/source/azure/resources/services/authorization/provider_operations_metadata.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ProviderOperationsMetadata() *schema.Table { return &schema.Table{ Name: "azure_authorization_provider_operations_metadata", Resolver: fetchProviderOperationsMetadata, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_authorization_provider_operations_metadata", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armauthorization.ProviderOperationsMetadata{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/authorization/provider_operations_metadata_mock_test.go b/plugins/source/azure/resources/services/authorization/provider_operations_metadata_mock_test.go index 04eb5dd4adec2c..2d780bc96130bf 100644 --- a/plugins/source/azure/resources/services/authorization/provider_operations_metadata_mock_test.go +++ b/plugins/source/azure/resources/services/authorization/provider_operations_metadata_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/authorization/role_assignments.go b/plugins/source/azure/resources/services/authorization/role_assignments.go index d6bc00b9c7758d..8d6fa79e4cdd90 100644 --- a/plugins/source/azure/resources/services/authorization/role_assignments.go +++ b/plugins/source/azure/resources/services/authorization/role_assignments.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RoleAssignments() *schema.Table { return &schema.Table{ Name: "azure_authorization_role_assignments", Resolver: fetchRoleAssignments, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_authorization_role_assignments", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armauthorization.RoleAssignment{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/authorization/role_assignments_mock_test.go b/plugins/source/azure/resources/services/authorization/role_assignments_mock_test.go index 9fd92cf0ee275c..b6bde80823a292 100644 --- a/plugins/source/azure/resources/services/authorization/role_assignments_mock_test.go +++ b/plugins/source/azure/resources/services/authorization/role_assignments_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package authorization import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/authorization/role_definitions.go b/plugins/source/azure/resources/services/authorization/role_definitions.go index 45d9569d4e28de..a1a41cdaff44ee 100644 --- a/plugins/source/azure/resources/services/authorization/role_definitions.go +++ b/plugins/source/azure/resources/services/authorization/role_definitions.go @@ -11,7 +11,7 @@ func RoleDefinitions() *schema.Table { return &schema.Table{ Name: "azure_authorization_role_definitions", Resolver: fetchRoleDefinitions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_authorization_role_definitions", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armauthorization.RoleDefinition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/authorization/role_definitions_fetch.go b/plugins/source/azure/resources/services/authorization/role_definitions_fetch.go index 266e39ad951811..de04591699e5ee 100644 --- a/plugins/source/azure/resources/services/authorization/role_definitions_fetch.go +++ b/plugins/source/azure/resources/services/authorization/role_definitions_fetch.go @@ -14,7 +14,7 @@ func fetchRoleDefinitions(ctx context.Context, meta schema.ClientMeta, parent *s if err != nil { return err } - pager := svc.NewListPager("global", nil) + pager := svc.NewListPager("subscriptions/"+cl.SubscriptionId, &armauthorization.RoleDefinitionsClientListOptions{Filter: nil}) for pager.More() { p, err := pager.NextPage(ctx) if err != nil { diff --git a/plugins/source/azure/resources/services/authorization/role_definitions_mock_test.go b/plugins/source/azure/resources/services/authorization/role_definitions_mock_test.go index a2861871ba2914..2b8a763b232dd1 100644 --- a/plugins/source/azure/resources/services/authorization/role_definitions_mock_test.go +++ b/plugins/source/azure/resources/services/authorization/role_definitions_mock_test.go @@ -20,8 +20,7 @@ func createRoleDefinitions(router *mux.Router) error { emptyStr := "" item.NextLink = &emptyStr - - router.HandleFunc("/{scope}/providers/Microsoft.Authorization/roleDefinitions", func(w http.ResponseWriter, r *http.Request) { + router.HandleFunc("/subscriptions/"+client.TestSubscription+"/providers/Microsoft.Authorization/roleDefinitions", func(w http.ResponseWriter, r *http.Request) { b, err := json.Marshal(&item) if err != nil { http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) diff --git a/plugins/source/azure/resources/services/automation/account.go b/plugins/source/azure/resources/services/automation/account.go index c1a85c0c04fd64..c55449c4e49dcd 100644 --- a/plugins/source/azure/resources/services/automation/account.go +++ b/plugins/source/azure/resources/services/automation/account.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package automation import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Account() *schema.Table { return &schema.Table{ Name: "azure_automation_account", Resolver: fetchAccount, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_automation), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_automation_account", client.Namespacemicrosoft_automation), Transform: transformers.TransformWithStruct(&armautomation.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/automation/account_mock_test.go b/plugins/source/azure/resources/services/automation/account_mock_test.go index dcc7890e5b0f5e..4a48c822f88124 100644 --- a/plugins/source/azure/resources/services/automation/account_mock_test.go +++ b/plugins/source/azure/resources/services/automation/account_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package automation import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/azurearcdata/postgres_instances.go b/plugins/source/azure/resources/services/azurearcdata/postgres_instances.go index d67788ea27669c..60808568a5a9de 100644 --- a/plugins/source/azure/resources/services/azurearcdata/postgres_instances.go +++ b/plugins/source/azure/resources/services/azurearcdata/postgres_instances.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PostgresInstances() *schema.Table { return &schema.Table{ Name: "azure_azurearcdata_postgres_instances", Resolver: fetchPostgresInstances, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_azurearcdata), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_azurearcdata_postgres_instances", client.Namespacemicrosoft_azurearcdata), Transform: transformers.TransformWithStruct(&armazurearcdata.PostgresInstance{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/azurearcdata/postgres_instances_mock_test.go b/plugins/source/azure/resources/services/azurearcdata/postgres_instances_mock_test.go index 73c79388e216a4..d175f73354d15b 100644 --- a/plugins/source/azure/resources/services/azurearcdata/postgres_instances_mock_test.go +++ b/plugins/source/azure/resources/services/azurearcdata/postgres_instances_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances.go b/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances.go index 87445b62ae4ce7..110d72cd9db2e2 100644 --- a/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances.go +++ b/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SqlManagedInstances() *schema.Table { return &schema.Table{ Name: "azure_azurearcdata_sql_managed_instances", Resolver: fetchSqlManagedInstances, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_azurearcdata), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_azurearcdata_sql_managed_instances", client.Namespacemicrosoft_azurearcdata), Transform: transformers.TransformWithStruct(&armazurearcdata.SQLManagedInstance{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances_mock_test.go b/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances_mock_test.go index 777d528f23c725..c4992cbe07b2d3 100644 --- a/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances_mock_test.go +++ b/plugins/source/azure/resources/services/azurearcdata/sql_managed_instances_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/azurearcdata/sql_server_instances.go b/plugins/source/azure/resources/services/azurearcdata/sql_server_instances.go index 3304271b93982d..15e93db172357c 100644 --- a/plugins/source/azure/resources/services/azurearcdata/sql_server_instances.go +++ b/plugins/source/azure/resources/services/azurearcdata/sql_server_instances.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SqlServerInstances() *schema.Table { return &schema.Table{ Name: "azure_azurearcdata_sql_server_instances", Resolver: fetchSqlServerInstances, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_azurearcdata), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_azurearcdata_sql_server_instances", client.Namespacemicrosoft_azurearcdata), Transform: transformers.TransformWithStruct(&armazurearcdata.SQLServerInstance{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/azurearcdata/sql_server_instances_mock_test.go b/plugins/source/azure/resources/services/azurearcdata/sql_server_instances_mock_test.go index 81dd521494ee66..f846f7a2b51dca 100644 --- a/plugins/source/azure/resources/services/azurearcdata/sql_server_instances_mock_test.go +++ b/plugins/source/azure/resources/services/azurearcdata/sql_server_instances_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package azurearcdata import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/azuredata/sql_server_registrations.go b/plugins/source/azure/resources/services/azuredata/sql_server_registrations.go index f16cb08be8ba31..a8422dc15a8894 100644 --- a/plugins/source/azure/resources/services/azuredata/sql_server_registrations.go +++ b/plugins/source/azure/resources/services/azuredata/sql_server_registrations.go @@ -1,8 +1,6 @@ -// Code generated by codegen; DO NOT EDIT. package azuredata import ( - "context" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azuredata/armazuredata" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +11,7 @@ func SqlServerRegistrations() *schema.Table { return &schema.Table{ Name: "azure_azuredata_sql_server_registrations", Resolver: fetchSqlServerRegistrations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_azuredata), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_azuredata_sql_server_registrations", client.Namespacemicrosoft_azuredata), Transform: transformers.TransformWithStruct(&armazuredata.SQLServerRegistration{}), Columns: []schema.Column{ { @@ -32,20 +30,3 @@ func SqlServerRegistrations() *schema.Table { }, } } - -func fetchSqlServerRegistrations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - svc, err := armazuredata.NewSQLServerRegistrationsClient(cl.SubscriptionId, cl.Creds, cl.Options) - if err != nil { - return err - } - pager := svc.NewListPager(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} diff --git a/plugins/source/azure/resources/services/azuredata/sql_server_registrations_fetch.go b/plugins/source/azure/resources/services/azuredata/sql_server_registrations_fetch.go new file mode 100644 index 00000000000000..2b84ad24d13263 --- /dev/null +++ b/plugins/source/azure/resources/services/azuredata/sql_server_registrations_fetch.go @@ -0,0 +1,32 @@ +package azuredata + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azuredata/armazuredata" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchSqlServerRegistrations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + // This is required so we don't override mock test options + if cl.Options == nil { + cl.Options = &arm.ClientOptions{} + } + cl.Options.APIVersion = "2019-05-10-preview" + svc, err := armazuredata.NewSQLServerRegistrationsClient(cl.SubscriptionId, cl.Creds, cl.Options) + if err != nil { + return err + } + pager := svc.NewListPager(nil) + for pager.More() { + p, err := pager.NextPage(ctx) + if err != nil { + return err + } + res <- p.Value + } + return nil +} diff --git a/plugins/source/azure/resources/services/azuredata/sql_server_registrations_mock_test.go b/plugins/source/azure/resources/services/azuredata/sql_server_registrations_mock_test.go index 66ea44aa5864ea..1188324367b80b 100644 --- a/plugins/source/azure/resources/services/azuredata/sql_server_registrations_mock_test.go +++ b/plugins/source/azure/resources/services/azuredata/sql_server_registrations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package azuredata import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azuredata/armazuredata" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/batch/account.go b/plugins/source/azure/resources/services/batch/account.go index 5af43ec193e02b..8c4ca7189450ed 100644 --- a/plugins/source/azure/resources/services/batch/account.go +++ b/plugins/source/azure/resources/services/batch/account.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package batch import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Account() *schema.Table { return &schema.Table{ Name: "azure_batch_account", Resolver: fetchAccount, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_batch), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_batch_account", client.Namespacemicrosoft_batch), Transform: transformers.TransformWithStruct(&armbatch.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/batch/account_mock_test.go b/plugins/source/azure/resources/services/batch/account_mock_test.go index f2970ebdcfce5f..824476bb37195b 100644 --- a/plugins/source/azure/resources/services/batch/account_mock_test.go +++ b/plugins/source/azure/resources/services/batch/account_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package batch import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/billing/accounts.go b/plugins/source/azure/resources/services/billing/accounts.go index f64086c25c3498..fe1cddedf5eb93 100644 --- a/plugins/source/azure/resources/services/billing/accounts.go +++ b/plugins/source/azure/resources/services/billing/accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_billing_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_billing), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_billing_accounts", client.Namespacemicrosoft_billing), Transform: transformers.TransformWithStruct(&armbilling.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/billing/accounts_mock_test.go b/plugins/source/azure/resources/services/billing/accounts_mock_test.go index 7b9dd85010a06e..285db8bba39c01 100644 --- a/plugins/source/azure/resources/services/billing/accounts_mock_test.go +++ b/plugins/source/azure/resources/services/billing/accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/billing/enrollment_accounts.go b/plugins/source/azure/resources/services/billing/enrollment_accounts.go index ba768f791ef668..a868b0362270bd 100644 --- a/plugins/source/azure/resources/services/billing/enrollment_accounts.go +++ b/plugins/source/azure/resources/services/billing/enrollment_accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func EnrollmentAccounts() *schema.Table { return &schema.Table{ Name: "azure_billing_enrollment_accounts", Resolver: fetchEnrollmentAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_billing), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_billing_enrollment_accounts", client.Namespacemicrosoft_billing), Transform: transformers.TransformWithStruct(&armbilling.EnrollmentAccountSummary{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/billing/enrollment_accounts_mock_test.go b/plugins/source/azure/resources/services/billing/enrollment_accounts_mock_test.go index 0b0b9c641c0977..d679feed007993 100644 --- a/plugins/source/azure/resources/services/billing/enrollment_accounts_mock_test.go +++ b/plugins/source/azure/resources/services/billing/enrollment_accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/billing/periods.go b/plugins/source/azure/resources/services/billing/periods.go index 9b5d627c86c2cd..182778e507bb91 100644 --- a/plugins/source/azure/resources/services/billing/periods.go +++ b/plugins/source/azure/resources/services/billing/periods.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Periods() *schema.Table { return &schema.Table{ Name: "azure_billing_periods", Resolver: fetchPeriods, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_billing), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_billing_periods", client.Namespacemicrosoft_billing), Transform: transformers.TransformWithStruct(&armbilling.Period{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/billing/periods_mock_test.go b/plugins/source/azure/resources/services/billing/periods_mock_test.go index 23ce15d7923607..e601b20c208994 100644 --- a/plugins/source/azure/resources/services/billing/periods_mock_test.go +++ b/plugins/source/azure/resources/services/billing/periods_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package billing import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/botservice/bots.go b/plugins/source/azure/resources/services/botservice/bots.go index 350d70c15ef45f..683ffeec12f572 100644 --- a/plugins/source/azure/resources/services/botservice/bots.go +++ b/plugins/source/azure/resources/services/botservice/bots.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package botservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Bots() *schema.Table { return &schema.Table{ Name: "azure_botservice_bots", Resolver: fetchBots, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_botservice), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_botservice_bots", client.Namespacemicrosoft_botservice), Transform: transformers.TransformWithStruct(&armbotservice.Bot{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/botservice/bots_mock_test.go b/plugins/source/azure/resources/services/botservice/bots_mock_test.go index 9df0816fcde0a1..49308bdd43d9dc 100644 --- a/plugins/source/azure/resources/services/botservice/bots_mock_test.go +++ b/plugins/source/azure/resources/services/botservice/bots_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package botservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cdn/edge_nodes.go b/plugins/source/azure/resources/services/cdn/edge_nodes.go index b2c2abb9da9a3e..de9386813c8d8b 100644 --- a/plugins/source/azure/resources/services/cdn/edge_nodes.go +++ b/plugins/source/azure/resources/services/cdn/edge_nodes.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cdn import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func EdgeNodes() *schema.Table { return &schema.Table{ Name: "azure_cdn_edge_nodes", Resolver: fetchEdgeNodes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cdn), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cdn_edge_nodes", client.Namespacemicrosoft_cdn), Transform: transformers.TransformWithStruct(&armcdn.EdgeNode{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cdn/edge_nodes_mock_test.go b/plugins/source/azure/resources/services/cdn/edge_nodes_mock_test.go index 8da69b9bb2f1bd..b6174009230a82 100644 --- a/plugins/source/azure/resources/services/cdn/edge_nodes_mock_test.go +++ b/plugins/source/azure/resources/services/cdn/edge_nodes_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cdn import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cdn/managed_rule_sets.go b/plugins/source/azure/resources/services/cdn/managed_rule_sets.go index 75df2c00e1ab7b..a3f80f6f0e40cb 100644 --- a/plugins/source/azure/resources/services/cdn/managed_rule_sets.go +++ b/plugins/source/azure/resources/services/cdn/managed_rule_sets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cdn import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ManagedRuleSets() *schema.Table { return &schema.Table{ Name: "azure_cdn_managed_rule_sets", Resolver: fetchManagedRuleSets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cdn), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cdn_managed_rule_sets", client.Namespacemicrosoft_cdn), Transform: transformers.TransformWithStruct(&armcdn.ManagedRuleSetDefinition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cdn/managed_rule_sets_mock_test.go b/plugins/source/azure/resources/services/cdn/managed_rule_sets_mock_test.go index d1c0f2818b97d4..2bce9479c8a427 100644 --- a/plugins/source/azure/resources/services/cdn/managed_rule_sets_mock_test.go +++ b/plugins/source/azure/resources/services/cdn/managed_rule_sets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cdn import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cdn/profiles.go b/plugins/source/azure/resources/services/cdn/profiles.go index 40801e867dc378..344e4e567381f6 100644 --- a/plugins/source/azure/resources/services/cdn/profiles.go +++ b/plugins/source/azure/resources/services/cdn/profiles.go @@ -13,7 +13,7 @@ func Profiles() *schema.Table { return &schema.Table{ Name: "azure_cdn_profiles", Resolver: fetchProfiles, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cdn), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cdn_profiles", client.Namespacemicrosoft_cdn), Transform: transformers.TransformWithStruct(&armcdn.Profile{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cognitiveservices/accounts.go b/plugins/source/azure/resources/services/cognitiveservices/accounts.go index 40d4e60ce5ab85..61253171bb450d 100644 --- a/plugins/source/azure/resources/services/cognitiveservices/accounts.go +++ b/plugins/source/azure/resources/services/cognitiveservices/accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cognitiveservices import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_cognitiveservices_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cognitiveservices), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cognitiveservices_accounts", client.Namespacemicrosoft_cognitiveservices), Transform: transformers.TransformWithStruct(&armcognitiveservices.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cognitiveservices/accounts_mock_test.go b/plugins/source/azure/resources/services/cognitiveservices/accounts_mock_test.go index fa28326e040339..77a0ec9f482a58 100644 --- a/plugins/source/azure/resources/services/cognitiveservices/accounts_mock_test.go +++ b/plugins/source/azure/resources/services/cognitiveservices/accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cognitiveservices import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts.go b/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts.go index e8135377ec90cb..7c1f234f0803d5 100644 --- a/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts.go +++ b/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cognitiveservices import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DeletedAccounts() *schema.Table { return &schema.Table{ Name: "azure_cognitiveservices_deleted_accounts", Resolver: fetchDeletedAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cognitiveservices), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cognitiveservices_deleted_accounts", client.Namespacemicrosoft_cognitiveservices), Transform: transformers.TransformWithStruct(&armcognitiveservices.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts_mock_test.go b/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts_mock_test.go index 5024d85f4ad1e0..e8abe62b85e56f 100644 --- a/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts_mock_test.go +++ b/plugins/source/azure/resources/services/cognitiveservices/deleted_accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cognitiveservices import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/cloud_services.go b/plugins/source/azure/resources/services/compute/cloud_services.go index bb7c636dcf9562..f2defe6e057026 100644 --- a/plugins/source/azure/resources/services/compute/cloud_services.go +++ b/plugins/source/azure/resources/services/compute/cloud_services.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func CloudServices() *schema.Table { return &schema.Table{ Name: "azure_compute_cloud_services", Resolver: fetchCloudServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_cloud_services", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.CloudService{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/cloud_services_mock_test.go b/plugins/source/azure/resources/services/compute/cloud_services_mock_test.go index c68d3b54917e81..bf025245593f39 100644 --- a/plugins/source/azure/resources/services/compute/cloud_services_mock_test.go +++ b/plugins/source/azure/resources/services/compute/cloud_services_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/disk_accesses.go b/plugins/source/azure/resources/services/compute/disk_accesses.go index a23c92da7dbf60..1a65ba644c1db2 100644 --- a/plugins/source/azure/resources/services/compute/disk_accesses.go +++ b/plugins/source/azure/resources/services/compute/disk_accesses.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DiskAccesses() *schema.Table { return &schema.Table{ Name: "azure_compute_disk_accesses", Resolver: fetchDiskAccesses, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_disk_accesses", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.DiskAccess{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/disk_accesses_mock_test.go b/plugins/source/azure/resources/services/compute/disk_accesses_mock_test.go index 3bc5f046547a34..e45f4534a73928 100644 --- a/plugins/source/azure/resources/services/compute/disk_accesses_mock_test.go +++ b/plugins/source/azure/resources/services/compute/disk_accesses_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/disk_encryption_sets.go b/plugins/source/azure/resources/services/compute/disk_encryption_sets.go index 7a8e1ad45e79fc..afd2a15133abc7 100644 --- a/plugins/source/azure/resources/services/compute/disk_encryption_sets.go +++ b/plugins/source/azure/resources/services/compute/disk_encryption_sets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DiskEncryptionSets() *schema.Table { return &schema.Table{ Name: "azure_compute_disk_encryption_sets", Resolver: fetchDiskEncryptionSets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_disk_encryption_sets", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.DiskEncryptionSet{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/disk_encryption_sets_mock_test.go b/plugins/source/azure/resources/services/compute/disk_encryption_sets_mock_test.go index a16addaf3d504c..e35ee89b8f6de9 100644 --- a/plugins/source/azure/resources/services/compute/disk_encryption_sets_mock_test.go +++ b/plugins/source/azure/resources/services/compute/disk_encryption_sets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/disks.go b/plugins/source/azure/resources/services/compute/disks.go index a419a237030ac2..064054cf2e33f7 100644 --- a/plugins/source/azure/resources/services/compute/disks.go +++ b/plugins/source/azure/resources/services/compute/disks.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Disks() *schema.Table { return &schema.Table{ Name: "azure_compute_disks", Resolver: fetchDisks, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_disks", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.Disk{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/disks_mock_test.go b/plugins/source/azure/resources/services/compute/disks_mock_test.go index 80025b75d160b9..1f119dc391d614 100644 --- a/plugins/source/azure/resources/services/compute/disks_mock_test.go +++ b/plugins/source/azure/resources/services/compute/disks_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/galleries.go b/plugins/source/azure/resources/services/compute/galleries.go index 94a7c44a0c406b..06a6e697ea2914 100644 --- a/plugins/source/azure/resources/services/compute/galleries.go +++ b/plugins/source/azure/resources/services/compute/galleries.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Galleries() *schema.Table { return &schema.Table{ Name: "azure_compute_galleries", Resolver: fetchGalleries, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_galleries", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.Gallery{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/galleries_mock_test.go b/plugins/source/azure/resources/services/compute/galleries_mock_test.go index 7413296ef6b32d..12577f205ad126 100644 --- a/plugins/source/azure/resources/services/compute/galleries_mock_test.go +++ b/plugins/source/azure/resources/services/compute/galleries_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/images.go b/plugins/source/azure/resources/services/compute/images.go index 4da27ff0c9d60f..4a60ab9fa07c76 100644 --- a/plugins/source/azure/resources/services/compute/images.go +++ b/plugins/source/azure/resources/services/compute/images.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Images() *schema.Table { return &schema.Table{ Name: "azure_compute_images", Resolver: fetchImages, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_images", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.Image{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/images_mock_test.go b/plugins/source/azure/resources/services/compute/images_mock_test.go index 6fc800d5beaefb..0f52ce60901094 100644 --- a/plugins/source/azure/resources/services/compute/images_mock_test.go +++ b/plugins/source/azure/resources/services/compute/images_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/restore_point_collections.go b/plugins/source/azure/resources/services/compute/restore_point_collections.go index 618a8aa818c872..584a75469568ad 100644 --- a/plugins/source/azure/resources/services/compute/restore_point_collections.go +++ b/plugins/source/azure/resources/services/compute/restore_point_collections.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RestorePointCollections() *schema.Table { return &schema.Table{ Name: "azure_compute_restore_point_collections", Resolver: fetchRestorePointCollections, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_restore_point_collections", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.RestorePointCollection{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/restore_point_collections_mock_test.go b/plugins/source/azure/resources/services/compute/restore_point_collections_mock_test.go index 12ce959d504fef..2392b7cbb9bb71 100644 --- a/plugins/source/azure/resources/services/compute/restore_point_collections_mock_test.go +++ b/plugins/source/azure/resources/services/compute/restore_point_collections_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/skus.go b/plugins/source/azure/resources/services/compute/skus.go index c4baae9d131e5a..7cb57e036b416a 100644 --- a/plugins/source/azure/resources/services/compute/skus.go +++ b/plugins/source/azure/resources/services/compute/skus.go @@ -13,7 +13,7 @@ func SKUs() *schema.Table { return &schema.Table{ Name: "azure_compute_skus", Resolver: fetchResourceSKUs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_skus", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.ResourceSKU{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/snapshots.go b/plugins/source/azure/resources/services/compute/snapshots.go index ce2097c95d82f5..017977131bfc09 100644 --- a/plugins/source/azure/resources/services/compute/snapshots.go +++ b/plugins/source/azure/resources/services/compute/snapshots.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Snapshots() *schema.Table { return &schema.Table{ Name: "azure_compute_snapshots", Resolver: fetchSnapshots, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_snapshots", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.Snapshot{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/snapshots_mock_test.go b/plugins/source/azure/resources/services/compute/snapshots_mock_test.go index 2a9ee2551e1baf..1a603db2c8db86 100644 --- a/plugins/source/azure/resources/services/compute/snapshots_mock_test.go +++ b/plugins/source/azure/resources/services/compute/snapshots_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/compute/virtual_machine_scale_set_vms.go b/plugins/source/azure/resources/services/compute/virtual_machine_scale_set_vms.go new file mode 100644 index 00000000000000..ddd76592883190 --- /dev/null +++ b/plugins/source/azure/resources/services/compute/virtual_machine_scale_set_vms.go @@ -0,0 +1,56 @@ +package compute + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func VirtualMachineScaleSetsVMs() *schema.Table { + return &schema.Table{ + Name: "azure_compute_virtual_machine_scale_set_vms", + Resolver: fetchVirtualMachineScaleSetsVMs, + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_virtual_machine_scale_sets_vms", client.Namespacemicrosoft_compute), + Transform: transformers.TransformWithStruct(&armcompute.VirtualMachineScaleSetVM{}), + Columns: []schema.Column{ + { + Name: "subscription_id", + Type: schema.TypeString, + Resolver: client.ResolveAzureSubscription, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchVirtualMachineScaleSetsVMs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + scaleSet := parent.Item.(*armcompute.VirtualMachineScaleSet) + svc, err := armcompute.NewVirtualMachineScaleSetVMsClient(cl.SubscriptionId, cl.Creds, cl.Options) + if err != nil { + return err + } + group, err := client.ParseResourceGroup(*scaleSet.ID) + if err != nil { + return err + } + pager := svc.NewListPager(group, *scaleSet.Name, nil) + for pager.More() { + p, err := pager.NextPage(ctx) + if err != nil { + return err + } + res <- p.Value + } + return nil +} diff --git a/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets.go b/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets.go index 83cb0c167538b9..3b92ebe1e6c0fa 100644 --- a/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets.go +++ b/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualMachineScaleSets() *schema.Table { return &schema.Table{ Name: "azure_compute_virtual_machine_scale_sets", Resolver: fetchVirtualMachineScaleSets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_virtual_machine_scale_sets", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.VirtualMachineScaleSet{}), Columns: []schema.Column{ { @@ -30,6 +30,9 @@ func VirtualMachineScaleSets() *schema.Table { }, }, }, + Relations: []*schema.Table{ + VirtualMachineScaleSetsVMs(), + }, } } diff --git a/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets_mock_test.go b/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets_mock_test.go index b91672d8fe43be..eb8381e234f5f9 100644 --- a/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets_mock_test.go +++ b/plugins/source/azure/resources/services/compute/virtual_machine_scale_sets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package compute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" @@ -34,6 +34,23 @@ func createVirtualMachineScaleSets(router *mux.Router) error { } }) + var vm armcompute.VirtualMachineScaleSetVMsClientListResponse + if err := faker.FakeObject(&vm); err != nil { + return err + } + vm.NextLink = &emptyStr + router.HandleFunc("/subscriptions/{subscriptionId}/resourceGroups/{group}/providers/Microsoft.Compute/virtualMachineScaleSets/{scaleSet}/virtualMachines", func(w http.ResponseWriter, r *http.Request) { + b, err := json.Marshal(&vm) + if err != nil { + http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) + return + } + if _, err := w.Write(b); err != nil { + http.Error(w, "failed to write", http.StatusBadRequest) + return + } + }) + return nil } diff --git a/plugins/source/azure/resources/services/compute/virtual_machines.go b/plugins/source/azure/resources/services/compute/virtual_machines.go index 39ad25376b7ceb..2bfc56904c6d87 100644 --- a/plugins/source/azure/resources/services/compute/virtual_machines.go +++ b/plugins/source/azure/resources/services/compute/virtual_machines.go @@ -13,7 +13,7 @@ func VirtualMachines() *schema.Table { return &schema.Table{ Name: "azure_compute_virtual_machines", Resolver: fetchVirtualMachines, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_compute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_compute_virtual_machines", client.Namespacemicrosoft_compute), Transform: transformers.TransformWithStruct(&armcompute.VirtualMachine{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/compute/virtual_machines_mock_test.go.backup b/plugins/source/azure/resources/services/compute/virtual_machines_mock_test.go.backup deleted file mode 100644 index d8c865a3d645bf..00000000000000 --- a/plugins/source/azure/resources/services/compute/virtual_machines_mock_test.go.backup +++ /dev/null @@ -1,57 +0,0 @@ -package compute - -import ( - "encoding/json" - "net/http" - "testing" - - "github.com/cloudquery/cloudquery/plugins/source/azure/client" - - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" - "github.com/cloudquery/plugin-sdk/faker" - "github.com/gorilla/mux" -) - -func createVirtualMachines(router *mux.Router) error { - var item armcompute.VirtualMachinesClientListAllResponse - if err := faker.FakeObject(&item); err != nil { - return err - } - - emptyStr := "" - item.NextLink = &emptyStr - - router.HandleFunc("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", func(w http.ResponseWriter, r *http.Request) { - b, err := json.Marshal(&item) - if err != nil { - http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) - return - } - if _, err := w.Write(b); err != nil { - http.Error(w, "failed to write", http.StatusBadRequest) - return - } - }) - - var instanceViewItem armcompute.VirtualMachinesClientInstanceViewResponse - if err := faker.FakeObject(&instanceViewItem); err != nil { - return err - } - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView - router.HandleFunc("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", func(w http.ResponseWriter, r *http.Request) { - b, err := json.Marshal(&instanceViewItem) - if err != nil { - http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) - return - } - if _, err := w.Write(b); err != nil { - http.Error(w, "failed to write", http.StatusBadRequest) - return - } - }) - return nil -} - -func TestVirtualMachines(t *testing.T) { - client.MockTestHelper(t, VirtualMachines(), createVirtualMachines) -} diff --git a/plugins/source/azure/resources/services/confluent/marketplace_agreements.go b/plugins/source/azure/resources/services/confluent/marketplace_agreements.go index 9620cf2901e983..3ac7839ba9951e 100644 --- a/plugins/source/azure/resources/services/confluent/marketplace_agreements.go +++ b/plugins/source/azure/resources/services/confluent/marketplace_agreements.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package confluent import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func MarketplaceAgreements() *schema.Table { return &schema.Table{ Name: "azure_confluent_marketplace_agreements", Resolver: fetchMarketplaceAgreements, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_confluent), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_confluent_marketplace_agreements", client.Namespacemicrosoft_confluent), Transform: transformers.TransformWithStruct(&armconfluent.AgreementResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/confluent/marketplace_agreements_mock_test.go b/plugins/source/azure/resources/services/confluent/marketplace_agreements_mock_test.go index 01edeb0e94b0d7..a0b65cf96564aa 100644 --- a/plugins/source/azure/resources/services/confluent/marketplace_agreements_mock_test.go +++ b/plugins/source/azure/resources/services/confluent/marketplace_agreements_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package confluent import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/clusters.go b/plugins/source/azure/resources/services/connectedvmware/clusters.go index 1927f2bb15944c..3eda364dd3a518 100644 --- a/plugins/source/azure/resources/services/connectedvmware/clusters.go +++ b/plugins/source/azure/resources/services/connectedvmware/clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Clusters() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_clusters", Resolver: fetchClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_clusters", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.Cluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/clusters_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/clusters_mock_test.go index e4be1f38abf0bd..4ee318a6e973fa 100644 --- a/plugins/source/azure/resources/services/connectedvmware/clusters_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/datastores.go b/plugins/source/azure/resources/services/connectedvmware/datastores.go index 7f2b7d1d21a3b5..fb234e0c54ab73 100644 --- a/plugins/source/azure/resources/services/connectedvmware/datastores.go +++ b/plugins/source/azure/resources/services/connectedvmware/datastores.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Datastores() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_datastores", Resolver: fetchDatastores, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_datastores", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.Datastore{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/datastores_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/datastores_mock_test.go index 3fcee7ee693d98..bc3d12e337aca5 100644 --- a/plugins/source/azure/resources/services/connectedvmware/datastores_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/datastores_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/hosts.go b/plugins/source/azure/resources/services/connectedvmware/hosts.go index 128bfa50ad1cb2..67fd52ca280783 100644 --- a/plugins/source/azure/resources/services/connectedvmware/hosts.go +++ b/plugins/source/azure/resources/services/connectedvmware/hosts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Hosts() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_hosts", Resolver: fetchHosts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_hosts", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.Host{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/hosts_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/hosts_mock_test.go index db214ea2ea666e..931a9b5bf59535 100644 --- a/plugins/source/azure/resources/services/connectedvmware/hosts_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/hosts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/resource_pools.go b/plugins/source/azure/resources/services/connectedvmware/resource_pools.go index 52deec6f5dd610..f9ff8afd80e133 100644 --- a/plugins/source/azure/resources/services/connectedvmware/resource_pools.go +++ b/plugins/source/azure/resources/services/connectedvmware/resource_pools.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ResourcePools() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_resource_pools", Resolver: fetchResourcePools, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_resource_pools", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.ResourcePool{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/resource_pools_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/resource_pools_mock_test.go index 1fb36d651ed5c0..7b0a9704f23ea8 100644 --- a/plugins/source/azure/resources/services/connectedvmware/resource_pools_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/resource_pools_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/v_centers.go b/plugins/source/azure/resources/services/connectedvmware/v_centers.go index 19df52150ed8d8..d03d953e8fb6f0 100644 --- a/plugins/source/azure/resources/services/connectedvmware/v_centers.go +++ b/plugins/source/azure/resources/services/connectedvmware/v_centers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VCenters() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_v_centers", Resolver: fetchVCenters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_v_centers", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.VCenter{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/v_centers_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/v_centers_mock_test.go index daeeb02ecda2f0..6bdf96a6164737 100644 --- a/plugins/source/azure/resources/services/connectedvmware/v_centers_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/v_centers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates.go b/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates.go index e4ab9cd1f87c30..d5231e4f306fc7 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualMachineTemplates() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_virtual_machine_templates", Resolver: fetchVirtualMachineTemplates, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_virtual_machine_templates", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.VirtualMachineTemplate{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates_mock_test.go index 421fb9926b40e8..aff918b779f87c 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_machine_templates_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_machines.go b/plugins/source/azure/resources/services/connectedvmware/virtual_machines.go index a0ee6d7dca2001..008eff3f1d1585 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_machines.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_machines.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualMachines() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_virtual_machines", Resolver: fetchVirtualMachines, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_virtual_machines", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.VirtualMachine{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_machines_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/virtual_machines_mock_test.go index edfdb2f5080f26..5a6083648df9f6 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_machines_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_machines_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_networks.go b/plugins/source/azure/resources/services/connectedvmware/virtual_networks.go index ba3d5e2e63640d..0a766a572e171f 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_networks.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_networks.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualNetworks() *schema.Table { return &schema.Table{ Name: "azure_connectedvmware_virtual_networks", Resolver: fetchVirtualNetworks, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_connectedvmwarevsphere), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_connectedvmware_virtual_networks", client.Namespacemicrosoft_connectedvmwarevsphere), Transform: transformers.TransformWithStruct(&armconnectedvmware.VirtualNetwork{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/connectedvmware/virtual_networks_mock_test.go b/plugins/source/azure/resources/services/connectedvmware/virtual_networks_mock_test.go index c41a65a7e37d74..38dd76831abd27 100644 --- a/plugins/source/azure/resources/services/connectedvmware/virtual_networks_mock_test.go +++ b/plugins/source/azure/resources/services/connectedvmware/virtual_networks_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package connectedvmware import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/connectedvmware/armconnectedvmware" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/containerinstance/container_groups.go b/plugins/source/azure/resources/services/containerinstance/container_groups.go index 9cf419d6a4373e..124d06d11e2c21 100644 --- a/plugins/source/azure/resources/services/containerinstance/container_groups.go +++ b/plugins/source/azure/resources/services/containerinstance/container_groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package containerinstance import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ContainerGroups() *schema.Table { return &schema.Table{ Name: "azure_containerinstance_container_groups", Resolver: fetchContainerGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_containerinstance), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_containerinstance_container_groups", client.Namespacemicrosoft_containerinstance), Transform: transformers.TransformWithStruct(&armcontainerinstance.ContainerGroup{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/containerinstance/container_groups_mock_test.go b/plugins/source/azure/resources/services/containerinstance/container_groups_mock_test.go index 3080c0bda16e2b..1622f615e35a5e 100644 --- a/plugins/source/azure/resources/services/containerinstance/container_groups_mock_test.go +++ b/plugins/source/azure/resources/services/containerinstance/container_groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package containerinstance import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/containerregistry/registries.go b/plugins/source/azure/resources/services/containerregistry/registries.go index 50383e0532d001..05a2b1ff5c4f08 100644 --- a/plugins/source/azure/resources/services/containerregistry/registries.go +++ b/plugins/source/azure/resources/services/containerregistry/registries.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package containerregistry import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Registries() *schema.Table { return &schema.Table{ Name: "azure_containerregistry_registries", Resolver: fetchRegistries, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_containerregistry), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_containerregistry_registries", client.Namespacemicrosoft_containerregistry), Transform: transformers.TransformWithStruct(&armcontainerregistry.Registry{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/containerregistry/registries_mock_test.go b/plugins/source/azure/resources/services/containerregistry/registries_mock_test.go index 3fa068c2406ebf..4a480718f15fa2 100644 --- a/plugins/source/azure/resources/services/containerregistry/registries_mock_test.go +++ b/plugins/source/azure/resources/services/containerregistry/registries_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package containerregistry import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/containerservice/managed_clusters.go b/plugins/source/azure/resources/services/containerservice/managed_clusters.go index ba90e68056fe4e..ad1c994881e592 100644 --- a/plugins/source/azure/resources/services/containerservice/managed_clusters.go +++ b/plugins/source/azure/resources/services/containerservice/managed_clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package containerservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ManagedClusters() *schema.Table { return &schema.Table{ Name: "azure_containerservice_managed_clusters", Resolver: fetchManagedClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_containerservice), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_containerservice_managed_clusters", client.Namespacemicrosoft_containerservice), Transform: transformers.TransformWithStruct(&armcontainerservice.ManagedCluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/containerservice/managed_clusters_mock_test.go b/plugins/source/azure/resources/services/containerservice/managed_clusters_mock_test.go index abf0db2e88d94b..3706a020226dac 100644 --- a/plugins/source/azure/resources/services/containerservice/managed_clusters_mock_test.go +++ b/plugins/source/azure/resources/services/containerservice/managed_clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package containerservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/containerservice/snapshots.go b/plugins/source/azure/resources/services/containerservice/snapshots.go index 55fd924c45e939..cdf2877bf8aaeb 100644 --- a/plugins/source/azure/resources/services/containerservice/snapshots.go +++ b/plugins/source/azure/resources/services/containerservice/snapshots.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package containerservice import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Snapshots() *schema.Table { return &schema.Table{ Name: "azure_containerservice_snapshots", Resolver: fetchSnapshots, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_containerservice), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_containerservice_snapshots", client.Namespacemicrosoft_containerservice), Transform: transformers.TransformWithStruct(&armcontainerservice.Snapshot{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/containerservice/snapshots_mock_test.go b/plugins/source/azure/resources/services/containerservice/snapshots_mock_test.go index 4a04d7654946db..f00ca1ca5a7bd3 100644 --- a/plugins/source/azure/resources/services/containerservice/snapshots_mock_test.go +++ b/plugins/source/azure/resources/services/containerservice/snapshots_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package containerservice import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cosmos/database_accounts.go b/plugins/source/azure/resources/services/cosmos/database_accounts.go index 4b4751cb07ef4e..3dc92931507082 100644 --- a/plugins/source/azure/resources/services/cosmos/database_accounts.go +++ b/plugins/source/azure/resources/services/cosmos/database_accounts.go @@ -13,7 +13,7 @@ func DatabaseAccounts() *schema.Table { return &schema.Table{ Name: "azure_cosmos_database_accounts", Resolver: fetchDatabaseAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_documentdb), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cosmos_database_accounts", client.Namespacemicrosoft_documentdb), Transform: transformers.TransformWithStruct(&armcosmos.DatabaseAccountGetResults{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cosmos/locations.go b/plugins/source/azure/resources/services/cosmos/locations.go index 042753fe2aa661..b35f9b8b90a24a 100644 --- a/plugins/source/azure/resources/services/cosmos/locations.go +++ b/plugins/source/azure/resources/services/cosmos/locations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cosmos import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Locations() *schema.Table { return &schema.Table{ Name: "azure_cosmos_locations", Resolver: fetchLocations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_documentdb), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cosmos_locations", client.Namespacemicrosoft_documentdb), Transform: transformers.TransformWithStruct(&armcosmos.LocationGetResult{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cosmos/locations_mock_test.go b/plugins/source/azure/resources/services/cosmos/locations_mock_test.go index 3e253bed8979ba..009deaaa67d6a5 100644 --- a/plugins/source/azure/resources/services/cosmos/locations_mock_test.go +++ b/plugins/source/azure/resources/services/cosmos/locations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cosmos import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/cosmos/restorable_database_accounts.go b/plugins/source/azure/resources/services/cosmos/restorable_database_accounts.go index 59afe533901ed0..5baa30cfed5a31 100644 --- a/plugins/source/azure/resources/services/cosmos/restorable_database_accounts.go +++ b/plugins/source/azure/resources/services/cosmos/restorable_database_accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package cosmos import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RestorableDatabaseAccounts() *schema.Table { return &schema.Table{ Name: "azure_cosmos_restorable_database_accounts", Resolver: fetchRestorableDatabaseAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_documentdb), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_cosmos_restorable_database_accounts", client.Namespacemicrosoft_documentdb), Transform: transformers.TransformWithStruct(&armcosmos.RestorableDatabaseAccountGetResult{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/cosmos/restorable_database_accounts_mock_test.go b/plugins/source/azure/resources/services/cosmos/restorable_database_accounts_mock_test.go index a7c86abdb45ca6..3987d9b4d729db 100644 --- a/plugins/source/azure/resources/services/cosmos/restorable_database_accounts_mock_test.go +++ b/plugins/source/azure/resources/services/cosmos/restorable_database_accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package cosmos import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/costmanagement/views.go b/plugins/source/azure/resources/services/costmanagement/views.go index f31c7c236cfb6a..468e40bbb4fdb1 100644 --- a/plugins/source/azure/resources/services/costmanagement/views.go +++ b/plugins/source/azure/resources/services/costmanagement/views.go @@ -13,7 +13,7 @@ func Views() *schema.Table { return &schema.Table{ Name: "azure_costmanagement_views", Resolver: fetchViews, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_costmanagement), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_costmanagement_views", client.Namespacemicrosoft_costmanagement), Transform: transformers.TransformWithStruct(&armcostmanagement.View{}, transformers.WithSkipFields("ETag")), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/customerinsights/hubs.go b/plugins/source/azure/resources/services/customerinsights/hubs.go index 3af051e364b3a4..df9ac368d24dc7 100644 --- a/plugins/source/azure/resources/services/customerinsights/hubs.go +++ b/plugins/source/azure/resources/services/customerinsights/hubs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package customerinsights import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerinsights/armcustomerinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Hubs() *schema.Table { return &schema.Table{ Name: "azure_customerinsights_hubs", Resolver: fetchHubs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_customerinsights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_customerinsights_hubs", client.Namespacemicrosoft_customerinsights), Transform: transformers.TransformWithStruct(&armcustomerinsights.Hub{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/customerinsights/hubs_mock_test.go b/plugins/source/azure/resources/services/customerinsights/hubs_mock_test.go index 7a1e3be27fe73e..d8d6d7a339b67d 100644 --- a/plugins/source/azure/resources/services/customerinsights/hubs_mock_test.go +++ b/plugins/source/azure/resources/services/customerinsights/hubs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package customerinsights import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerinsights/armcustomerinsights" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/dashboard/grafana.go b/plugins/source/azure/resources/services/dashboard/grafana.go index 3e3cd951ac07fb..82a0ad4e873a32 100644 --- a/plugins/source/azure/resources/services/dashboard/grafana.go +++ b/plugins/source/azure/resources/services/dashboard/grafana.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package dashboard import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Grafana() *schema.Table { return &schema.Table{ Name: "azure_dashboard_grafana", Resolver: fetchGrafana, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dashboard), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_dashboard_grafana", client.Namespacemicrosoft_dashboard), Transform: transformers.TransformWithStruct(&armdashboard.ManagedGrafana{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/dashboard/grafana_mock_test.go b/plugins/source/azure/resources/services/dashboard/grafana_mock_test.go index b02b566db6a3cf..efbe45bab719a7 100644 --- a/plugins/source/azure/resources/services/dashboard/grafana_mock_test.go +++ b/plugins/source/azure/resources/services/dashboard/grafana_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package dashboard import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/databox/jobs.go b/plugins/source/azure/resources/services/databox/jobs.go index 00f90a125e8fcd..7ac6d2ba465e14 100644 --- a/plugins/source/azure/resources/services/databox/jobs.go +++ b/plugins/source/azure/resources/services/databox/jobs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package databox import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Jobs() *schema.Table { return &schema.Table{ Name: "azure_databox_jobs", Resolver: fetchJobs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_databox), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_databox_jobs", client.Namespacemicrosoft_databox), Transform: transformers.TransformWithStruct(&armdatabox.JobResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/databox/jobs_mock_test.go b/plugins/source/azure/resources/services/databox/jobs_mock_test.go index 2a3f1a47062907..8ee1f29cca217c 100644 --- a/plugins/source/azure/resources/services/databox/jobs_mock_test.go +++ b/plugins/source/azure/resources/services/databox/jobs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package databox import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databox/armdatabox" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datadog/marketplace_agreements.go b/plugins/source/azure/resources/services/datadog/marketplace_agreements.go index d41c88219c74f9..9e5af3ff9c15d9 100644 --- a/plugins/source/azure/resources/services/datadog/marketplace_agreements.go +++ b/plugins/source/azure/resources/services/datadog/marketplace_agreements.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datadog import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func MarketplaceAgreements() *schema.Table { return &schema.Table{ Name: "azure_datadog_marketplace_agreements", Resolver: fetchMarketplaceAgreements, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datadog), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datadog_marketplace_agreements", client.Namespacemicrosoft_datadog), Transform: transformers.TransformWithStruct(&armdatadog.AgreementResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datadog/marketplace_agreements_mock_test.go b/plugins/source/azure/resources/services/datadog/marketplace_agreements_mock_test.go index 17db8174cf28d0..b9ddbd3fade4f2 100644 --- a/plugins/source/azure/resources/services/datadog/marketplace_agreements_mock_test.go +++ b/plugins/source/azure/resources/services/datadog/marketplace_agreements_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datadog import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datadog/monitors.go b/plugins/source/azure/resources/services/datadog/monitors.go index ddb5c9a97ad7b1..92665e80b71f26 100644 --- a/plugins/source/azure/resources/services/datadog/monitors.go +++ b/plugins/source/azure/resources/services/datadog/monitors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datadog import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Monitors() *schema.Table { return &schema.Table{ Name: "azure_datadog_monitors", Resolver: fetchMonitors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datadog), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datadog_monitors", client.Namespacemicrosoft_datadog), Transform: transformers.TransformWithStruct(&armdatadog.MonitorResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datadog/monitors_mock_test.go b/plugins/source/azure/resources/services/datadog/monitors_mock_test.go index c56272d1b06a75..20e94ac0c66ca8 100644 --- a/plugins/source/azure/resources/services/datadog/monitors_mock_test.go +++ b/plugins/source/azure/resources/services/datadog/monitors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datadog import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datafactory/factories.go b/plugins/source/azure/resources/services/datafactory/factories.go index fa9c2cc45c03bd..0306de3006d4af 100644 --- a/plugins/source/azure/resources/services/datafactory/factories.go +++ b/plugins/source/azure/resources/services/datafactory/factories.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datafactory import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Factories() *schema.Table { return &schema.Table{ Name: "azure_datafactory_factories", Resolver: fetchFactories, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datafactory), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datafactory_factories", client.Namespacemicrosoft_datafactory), Transform: transformers.TransformWithStruct(&armdatafactory.Factory{}, transformers.WithSkipFields("ETag")), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datafactory/factories_mock_test.go b/plugins/source/azure/resources/services/datafactory/factories_mock_test.go index cd18189715e4dc..18d6f4479c0ffe 100644 --- a/plugins/source/azure/resources/services/datafactory/factories_mock_test.go +++ b/plugins/source/azure/resources/services/datafactory/factories_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datafactory import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datalakeanalytics/accounts.go b/plugins/source/azure/resources/services/datalakeanalytics/accounts.go index 4db40c89c38e2c..13e92cf5285268 100644 --- a/plugins/source/azure/resources/services/datalakeanalytics/accounts.go +++ b/plugins/source/azure/resources/services/datalakeanalytics/accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datalakeanalytics import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-analytics/armdatalakeanalytics" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_datalakeanalytics_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datalakeanalytics), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datalakeanalytics_accounts", client.Namespacemicrosoft_datalakeanalytics), Transform: transformers.TransformWithStruct(&armdatalakeanalytics.AccountBasic{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datalakeanalytics/accounts_mock_test.go b/plugins/source/azure/resources/services/datalakeanalytics/accounts_mock_test.go index 6ce5f598a30b76..476297130fed74 100644 --- a/plugins/source/azure/resources/services/datalakeanalytics/accounts_mock_test.go +++ b/plugins/source/azure/resources/services/datalakeanalytics/accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datalakeanalytics import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-analytics/armdatalakeanalytics" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datalakestore/accounts.go b/plugins/source/azure/resources/services/datalakestore/accounts.go index 09374d48f66a97..88290cf28be552 100644 --- a/plugins/source/azure/resources/services/datalakestore/accounts.go +++ b/plugins/source/azure/resources/services/datalakestore/accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datalakestore import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_datalakestore_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datalakestore), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datalakestore_accounts", client.Namespacemicrosoft_datalakestore), Transform: transformers.TransformWithStruct(&armdatalakestore.AccountBasic{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datalakestore/accounts_mock_test.go b/plugins/source/azure/resources/services/datalakestore/accounts_mock_test.go index 8fabbbd789a84a..4c1975109f68d3 100644 --- a/plugins/source/azure/resources/services/datalakestore/accounts_mock_test.go +++ b/plugins/source/azure/resources/services/datalakestore/accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datalakestore import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/datamigration/services.go b/plugins/source/azure/resources/services/datamigration/services.go index a52ca6854e744f..093b12b932bb16 100644 --- a/plugins/source/azure/resources/services/datamigration/services.go +++ b/plugins/source/azure/resources/services/datamigration/services.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package datamigration import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Services() *schema.Table { return &schema.Table{ Name: "azure_datamigration_services", Resolver: fetchServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_datamigration), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_datamigration_services", client.Namespacemicrosoft_datamigration), Transform: transformers.TransformWithStruct(&armdatamigration.Service{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/datamigration/services_mock_test.go b/plugins/source/azure/resources/services/datamigration/services_mock_test.go index 424b772fcc754e..4aef85e4fb28df 100644 --- a/plugins/source/azure/resources/services/datamigration/services_mock_test.go +++ b/plugins/source/azure/resources/services/datamigration/services_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package datamigration import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datamigration/armdatamigration" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/desktopvirtualization/host_pools.go b/plugins/source/azure/resources/services/desktopvirtualization/host_pools.go index f3ac507943d3ba..9c68faef7ebd4d 100644 --- a/plugins/source/azure/resources/services/desktopvirtualization/host_pools.go +++ b/plugins/source/azure/resources/services/desktopvirtualization/host_pools.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package desktopvirtualization import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func HostPools() *schema.Table { return &schema.Table{ Name: "azure_desktopvirtualization_host_pools", Resolver: fetchHostPools, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_desktopvirtualization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_desktopvirtualization_host_pools", client.Namespacemicrosoft_desktopvirtualization), Transform: transformers.TransformWithStruct(&armdesktopvirtualization.HostPool{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/desktopvirtualization/host_pools_mock_test.go b/plugins/source/azure/resources/services/desktopvirtualization/host_pools_mock_test.go index 8c91ac1601e10e..2cdd10aa15b1f8 100644 --- a/plugins/source/azure/resources/services/desktopvirtualization/host_pools_mock_test.go +++ b/plugins/source/azure/resources/services/desktopvirtualization/host_pools_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package desktopvirtualization import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/devhub/workflow.go b/plugins/source/azure/resources/services/devhub/workflow.go index 7718a548f83c7a..003bea0e55c2e7 100644 --- a/plugins/source/azure/resources/services/devhub/workflow.go +++ b/plugins/source/azure/resources/services/devhub/workflow.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package devhub import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Workflow() *schema.Table { return &schema.Table{ Name: "azure_devhub_workflow", Resolver: fetchWorkflow, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_devhub), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_devhub_workflow", client.Namespacemicrosoft_devhub), Transform: transformers.TransformWithStruct(&armdevhub.Workflow{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/devhub/workflow_mock_test.go b/plugins/source/azure/resources/services/devhub/workflow_mock_test.go index be66376d14760d..2ccd685e928c8c 100644 --- a/plugins/source/azure/resources/services/devhub/workflow_mock_test.go +++ b/plugins/source/azure/resources/services/devhub/workflow_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package devhub import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/devops/pipeline_template_definitions.go b/plugins/source/azure/resources/services/devops/pipeline_template_definitions.go index 613f2f6a28484e..d64570f5462a0a 100644 --- a/plugins/source/azure/resources/services/devops/pipeline_template_definitions.go +++ b/plugins/source/azure/resources/services/devops/pipeline_template_definitions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package devops import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PipelineTemplateDefinitions() *schema.Table { return &schema.Table{ Name: "azure_devops_pipeline_template_definitions", Resolver: fetchPipelineTemplateDefinitions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_devops), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_devops_pipeline_template_definitions", client.Namespacemicrosoft_devops), Transform: transformers.TransformWithStruct(&armdevops.PipelineTemplateDefinition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/devops/pipeline_template_definitions_mock_test.go b/plugins/source/azure/resources/services/devops/pipeline_template_definitions_mock_test.go index a28afc43125a50..3cb9530660ed69 100644 --- a/plugins/source/azure/resources/services/devops/pipeline_template_definitions_mock_test.go +++ b/plugins/source/azure/resources/services/devops/pipeline_template_definitions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package devops import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/dns/zones.go b/plugins/source/azure/resources/services/dns/zones.go index 53428b6644eebf..2a91e95f0e7f2f 100644 --- a/plugins/source/azure/resources/services/dns/zones.go +++ b/plugins/source/azure/resources/services/dns/zones.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package dns import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Zones() *schema.Table { return &schema.Table{ Name: "azure_dns_zones", Resolver: fetchZones, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_dns_zones", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armdns.Zone{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/dns/zones_mock_test.go b/plugins/source/azure/resources/services/dns/zones_mock_test.go index 20240c2ab852a7..e68714505273dc 100644 --- a/plugins/source/azure/resources/services/dns/zones_mock_test.go +++ b/plugins/source/azure/resources/services/dns/zones_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package dns import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets.go b/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets.go index b427aad2400e79..8c564b3dda3929 100644 --- a/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets.go +++ b/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package dnsresolver import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DnsForwardingRulesets() *schema.Table { return &schema.Table{ Name: "azure_dnsresolver_dns_forwarding_rulesets", Resolver: fetchDnsForwardingRulesets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_dnsresolver_dns_forwarding_rulesets", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armdnsresolver.DNSForwardingRuleset{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets_mock_test.go b/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets_mock_test.go index 5a6658b45258cf..14f255a91525d8 100644 --- a/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets_mock_test.go +++ b/plugins/source/azure/resources/services/dnsresolver/dns_forwarding_rulesets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package dnsresolver import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/dnsresolver/dns_resolvers.go b/plugins/source/azure/resources/services/dnsresolver/dns_resolvers.go index 71e2dede694047..b52ca02406c461 100644 --- a/plugins/source/azure/resources/services/dnsresolver/dns_resolvers.go +++ b/plugins/source/azure/resources/services/dnsresolver/dns_resolvers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package dnsresolver import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DnsResolvers() *schema.Table { return &schema.Table{ Name: "azure_dnsresolver_dns_resolvers", Resolver: fetchDnsResolvers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_dnsresolver_dns_resolvers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armdnsresolver.DNSResolver{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/dnsresolver/dns_resolvers_mock_test.go b/plugins/source/azure/resources/services/dnsresolver/dns_resolvers_mock_test.go index 4641a1eccf4c15..afc07377255061 100644 --- a/plugins/source/azure/resources/services/dnsresolver/dns_resolvers_mock_test.go +++ b/plugins/source/azure/resources/services/dnsresolver/dns_resolvers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package dnsresolver import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/elastic/monitors.go b/plugins/source/azure/resources/services/elastic/monitors.go index a951930c50a9fd..2795089fb908a2 100644 --- a/plugins/source/azure/resources/services/elastic/monitors.go +++ b/plugins/source/azure/resources/services/elastic/monitors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package elastic import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Monitors() *schema.Table { return &schema.Table{ Name: "azure_elastic_monitors", Resolver: fetchMonitors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_elastic), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_elastic_monitors", client.Namespacemicrosoft_elastic), Transform: transformers.TransformWithStruct(&armelastic.MonitorResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/elastic/monitors_mock_test.go b/plugins/source/azure/resources/services/elastic/monitors_mock_test.go index 1adbb660a7b9b0..f38bfa95601491 100644 --- a/plugins/source/azure/resources/services/elastic/monitors_mock_test.go +++ b/plugins/source/azure/resources/services/elastic/monitors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package elastic import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/engagementfabric/accounts.go b/plugins/source/azure/resources/services/engagementfabric/accounts.go index 9d9c22c4b1ca80..92ab96e33c8f6e 100644 --- a/plugins/source/azure/resources/services/engagementfabric/accounts.go +++ b/plugins/source/azure/resources/services/engagementfabric/accounts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package engagementfabric import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/engagementfabric/armengagementfabric" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_engagementfabric_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_engagementfabric), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_engagementfabric_accounts", client.Namespacemicrosoft_engagementfabric), Transform: transformers.TransformWithStruct(&armengagementfabric.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/engagementfabric/accounts_mock_test.go b/plugins/source/azure/resources/services/engagementfabric/accounts_mock_test.go index 96fb697d4aaf22..bf68670feba1b3 100644 --- a/plugins/source/azure/resources/services/engagementfabric/accounts_mock_test.go +++ b/plugins/source/azure/resources/services/engagementfabric/accounts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package engagementfabric import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/engagementfabric/armengagementfabric" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/eventgrid/topic_types.go b/plugins/source/azure/resources/services/eventgrid/topic_types.go index 193c8cf9efdc1c..31dc5949d0c2e0 100644 --- a/plugins/source/azure/resources/services/eventgrid/topic_types.go +++ b/plugins/source/azure/resources/services/eventgrid/topic_types.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package eventgrid import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func TopicTypes() *schema.Table { return &schema.Table{ Name: "azure_eventgrid_topic_types", Resolver: fetchTopicTypes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_eventgrid), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_eventgrid_topic_types", client.Namespacemicrosoft_eventgrid), Transform: transformers.TransformWithStruct(&armeventgrid.TopicTypeInfo{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/eventgrid/topic_types_mock_test.go b/plugins/source/azure/resources/services/eventgrid/topic_types_mock_test.go index f649bcb32420e3..2b01779ab57914 100644 --- a/plugins/source/azure/resources/services/eventgrid/topic_types_mock_test.go +++ b/plugins/source/azure/resources/services/eventgrid/topic_types_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package eventgrid import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/eventhub/namespaces.go b/plugins/source/azure/resources/services/eventhub/namespaces.go index 57804931bc5acd..6c1fdfe4b9fe17 100644 --- a/plugins/source/azure/resources/services/eventhub/namespaces.go +++ b/plugins/source/azure/resources/services/eventhub/namespaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package eventhub import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Namespaces() *schema.Table { return &schema.Table{ Name: "azure_eventhub_namespaces", Resolver: fetchNamespaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_eventhub), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_eventhub_namespaces", client.Namespacemicrosoft_eventhub), Transform: transformers.TransformWithStruct(&armeventhub.EHNamespace{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/eventhub/namespaces_mock_test.go b/plugins/source/azure/resources/services/eventhub/namespaces_mock_test.go index 840e1fa68a81bb..f30e8d3e63e5ac 100644 --- a/plugins/source/azure/resources/services/eventhub/namespaces_mock_test.go +++ b/plugins/source/azure/resources/services/eventhub/namespaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package eventhub import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/frontdoor/front_doors.go b/plugins/source/azure/resources/services/frontdoor/front_doors.go index 30acc17e178c92..e0600ab71993cd 100644 --- a/plugins/source/azure/resources/services/frontdoor/front_doors.go +++ b/plugins/source/azure/resources/services/frontdoor/front_doors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func FrontDoors() *schema.Table { return &schema.Table{ Name: "azure_frontdoor_front_doors", Resolver: fetchFrontDoors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_frontdoor_front_doors", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armfrontdoor.FrontDoor{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/frontdoor/front_doors_mock_test.go b/plugins/source/azure/resources/services/frontdoor/front_doors_mock_test.go index 19322a07866299..d5ed83053fd898 100644 --- a/plugins/source/azure/resources/services/frontdoor/front_doors_mock_test.go +++ b/plugins/source/azure/resources/services/frontdoor/front_doors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/frontdoor/managed_rule_sets.go b/plugins/source/azure/resources/services/frontdoor/managed_rule_sets.go index c6205d6fde8b6e..aae8840cb30478 100644 --- a/plugins/source/azure/resources/services/frontdoor/managed_rule_sets.go +++ b/plugins/source/azure/resources/services/frontdoor/managed_rule_sets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ManagedRuleSets() *schema.Table { return &schema.Table{ Name: "azure_frontdoor_managed_rule_sets", Resolver: fetchManagedRuleSets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_frontdoor_managed_rule_sets", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armfrontdoor.ManagedRuleSetDefinition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/frontdoor/managed_rule_sets_mock_test.go b/plugins/source/azure/resources/services/frontdoor/managed_rule_sets_mock_test.go index 6cfc961c4b4d22..dd43f581702520 100644 --- a/plugins/source/azure/resources/services/frontdoor/managed_rule_sets_mock_test.go +++ b/plugins/source/azure/resources/services/frontdoor/managed_rule_sets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles.go b/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles.go index d12990d69f7c02..a3c27f551e33ca 100644 --- a/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles.go +++ b/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func NetworkExperimentProfiles() *schema.Table { return &schema.Table{ Name: "azure_frontdoor_network_experiment_profiles", Resolver: fetchNetworkExperimentProfiles, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_frontdoor_network_experiment_profiles", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armfrontdoor.Profile{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles_mock_test.go b/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles_mock_test.go index 3ab778a67508fa..90e59f5056ac2f 100644 --- a/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles_mock_test.go +++ b/plugins/source/azure/resources/services/frontdoor/network_experiment_profiles_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package frontdoor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/frontdoor/armfrontdoor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/hanaonazure/sap_monitors.go b/plugins/source/azure/resources/services/hanaonazure/sap_monitors.go index f285e2c674529a..b3dfe0142360c9 100644 --- a/plugins/source/azure/resources/services/hanaonazure/sap_monitors.go +++ b/plugins/source/azure/resources/services/hanaonazure/sap_monitors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package hanaonazure import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SapMonitors() *schema.Table { return &schema.Table{ Name: "azure_hanaonazure_sap_monitors", Resolver: fetchSapMonitors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_hanaonazure), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_hanaonazure_sap_monitors", client.Namespacemicrosoft_hanaonazure), Transform: transformers.TransformWithStruct(&armhanaonazure.SapMonitor{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/hanaonazure/sap_monitors_mock_test.go b/plugins/source/azure/resources/services/hanaonazure/sap_monitors_mock_test.go index 8c3641a6d04fb4..7033ac772f7f6c 100644 --- a/plugins/source/azure/resources/services/hanaonazure/sap_monitors_mock_test.go +++ b/plugins/source/azure/resources/services/hanaonazure/sap_monitors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package hanaonazure import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/hdinsight/clusters.go b/plugins/source/azure/resources/services/hdinsight/clusters.go index f73e1386bb13c4..0f0e0dc5b1dd3f 100644 --- a/plugins/source/azure/resources/services/hdinsight/clusters.go +++ b/plugins/source/azure/resources/services/hdinsight/clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package hdinsight import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Clusters() *schema.Table { return &schema.Table{ Name: "azure_hdinsight_clusters", Resolver: fetchClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_hdinsight), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_hdinsight_clusters", client.Namespacemicrosoft_hdinsight), Transform: transformers.TransformWithStruct(&armhdinsight.Cluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/hdinsight/clusters_mock_test.go b/plugins/source/azure/resources/services/hdinsight/clusters_mock_test.go index 7de8e63b37a3a6..855077a9971c96 100644 --- a/plugins/source/azure/resources/services/hdinsight/clusters_mock_test.go +++ b/plugins/source/azure/resources/services/hdinsight/clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package hdinsight import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/healthbot/bots.go b/plugins/source/azure/resources/services/healthbot/bots.go index 6b959f423e7186..3332ac92908a03 100644 --- a/plugins/source/azure/resources/services/healthbot/bots.go +++ b/plugins/source/azure/resources/services/healthbot/bots.go @@ -1,8 +1,6 @@ -// Code generated by codegen; DO NOT EDIT. package healthbot import ( - "context" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthbot/armhealthbot" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +11,7 @@ func Bots() *schema.Table { return &schema.Table{ Name: "azure_healthbot_bots", Resolver: fetchBots, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_healthbot), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_healthbot_bots", client.Namespacemicrosoft_healthbot), Transform: transformers.TransformWithStruct(&armhealthbot.HealthBot{}), Columns: []schema.Column{ { @@ -32,20 +30,3 @@ func Bots() *schema.Table { }, } } - -func fetchBots(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - svc, err := armhealthbot.NewBotsClient(cl.SubscriptionId, cl.Creds, cl.Options) - if err != nil { - return err - } - pager := svc.NewListPager(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} diff --git a/plugins/source/azure/resources/services/healthbot/bots_fetch.go b/plugins/source/azure/resources/services/healthbot/bots_fetch.go new file mode 100644 index 00000000000000..5f7071d9b98fb1 --- /dev/null +++ b/plugins/source/azure/resources/services/healthbot/bots_fetch.go @@ -0,0 +1,32 @@ +package healthbot + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthbot/armhealthbot" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchBots(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + // This is required so we don't override mock test options + if cl.Options == nil { + cl.Options = &arm.ClientOptions{} + } + cl.Options.APIVersion = "2022-08-08" + svc, err := armhealthbot.NewBotsClient(cl.SubscriptionId, cl.Creds, cl.Options) + if err != nil { + return err + } + pager := svc.NewListPager(nil) + for pager.More() { + p, err := pager.NextPage(ctx) + if err != nil { + return err + } + res <- p.Value + } + return nil +} diff --git a/plugins/source/azure/resources/services/healthbot/bots_mock_test.go b/plugins/source/azure/resources/services/healthbot/bots_mock_test.go index 0810ed03cbc912..e7866a1306e7b6 100644 --- a/plugins/source/azure/resources/services/healthbot/bots_mock_test.go +++ b/plugins/source/azure/resources/services/healthbot/bots_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package healthbot import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthbot/armhealthbot" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/healthcareapis/services.go b/plugins/source/azure/resources/services/healthcareapis/services.go index 6c87a9ab475e68..db46710a851e6d 100644 --- a/plugins/source/azure/resources/services/healthcareapis/services.go +++ b/plugins/source/azure/resources/services/healthcareapis/services.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package healthcareapis import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Services() *schema.Table { return &schema.Table{ Name: "azure_healthcareapis_services", Resolver: fetchServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_healthcareapis), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_healthcareapis_services", client.Namespacemicrosoft_healthcareapis), Transform: transformers.TransformWithStruct(&armhealthcareapis.ServicesDescription{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/healthcareapis/services_mock_test.go b/plugins/source/azure/resources/services/healthcareapis/services_mock_test.go index 962b1d6be7401a..dcf50b8d4577db 100644 --- a/plugins/source/azure/resources/services/healthcareapis/services_mock_test.go +++ b/plugins/source/azure/resources/services/healthcareapis/services_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package healthcareapis import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthcareapis/armhealthcareapis" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/hybridcompute/private_link_scopes.go b/plugins/source/azure/resources/services/hybridcompute/private_link_scopes.go index 251b582d06ac91..16d74d724fe03f 100644 --- a/plugins/source/azure/resources/services/hybridcompute/private_link_scopes.go +++ b/plugins/source/azure/resources/services/hybridcompute/private_link_scopes.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package hybridcompute import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PrivateLinkScopes() *schema.Table { return &schema.Table{ Name: "azure_hybridcompute_private_link_scopes", Resolver: fetchPrivateLinkScopes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_hybridcompute), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_hybridcompute_private_link_scopes", client.Namespacemicrosoft_hybridcompute), Transform: transformers.TransformWithStruct(&armhybridcompute.PrivateLinkScope{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/hybridcompute/private_link_scopes_mock_test.go b/plugins/source/azure/resources/services/hybridcompute/private_link_scopes_mock_test.go index 69b72b46befe95..03e028f3a297cf 100644 --- a/plugins/source/azure/resources/services/hybridcompute/private_link_scopes_mock_test.go +++ b/plugins/source/azure/resources/services/hybridcompute/private_link_scopes_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package hybridcompute import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/hybriddatamanager/data_managers.go b/plugins/source/azure/resources/services/hybriddatamanager/data_managers.go index 075803f2536607..7681d5dd254467 100644 --- a/plugins/source/azure/resources/services/hybriddatamanager/data_managers.go +++ b/plugins/source/azure/resources/services/hybriddatamanager/data_managers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package hybriddatamanager import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybriddatamanager/armhybriddatamanager" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DataManagers() *schema.Table { return &schema.Table{ Name: "azure_hybriddatamanager_data_managers", Resolver: fetchDataManagers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_hybriddata), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_hybriddatamanager_data_managers", client.Namespacemicrosoft_hybriddata), Transform: transformers.TransformWithStruct(&armhybriddatamanager.DataManager{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/hybriddatamanager/data_managers_mock_test.go b/plugins/source/azure/resources/services/hybriddatamanager/data_managers_mock_test.go index 612cc06001e3d9..9ffef422ed68ad 100644 --- a/plugins/source/azure/resources/services/hybriddatamanager/data_managers_mock_test.go +++ b/plugins/source/azure/resources/services/hybriddatamanager/data_managers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package hybriddatamanager import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybriddatamanager/armhybriddatamanager" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/keyvault/keyvault_managed_hsms.go b/plugins/source/azure/resources/services/keyvault/keyvault_managed_hsms.go index ac7241a4f28f65..e531a0b5462580 100644 --- a/plugins/source/azure/resources/services/keyvault/keyvault_managed_hsms.go +++ b/plugins/source/azure/resources/services/keyvault/keyvault_managed_hsms.go @@ -13,7 +13,7 @@ func KeyvaultManagedHsms() *schema.Table { return &schema.Table{ Name: "azure_keyvault_keyvault_managed_hsms", Resolver: fetchKeyvaultManagedHsms, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_keyvault), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_keyvault_keyvault_managed_hsms", client.Namespacemicrosoft_keyvault), Transform: transformers.TransformWithStruct(&armkeyvault.ManagedHsm{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/kusto/clusters.go b/plugins/source/azure/resources/services/kusto/clusters.go index 9de55e124b154d..7f316f61ece64b 100644 --- a/plugins/source/azure/resources/services/kusto/clusters.go +++ b/plugins/source/azure/resources/services/kusto/clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package kusto import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Clusters() *schema.Table { return &schema.Table{ Name: "azure_kusto_clusters", Resolver: fetchClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_kusto), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_kusto_clusters", client.Namespacemicrosoft_kusto), Transform: transformers.TransformWithStruct(&armkusto.Cluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/kusto/clusters_mock_test.go b/plugins/source/azure/resources/services/kusto/clusters_mock_test.go index cb45e502808eb4..7342728180ce6e 100644 --- a/plugins/source/azure/resources/services/kusto/clusters_mock_test.go +++ b/plugins/source/azure/resources/services/kusto/clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package kusto import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/logic/workflows.go b/plugins/source/azure/resources/services/logic/workflows.go index 915214f0210ab4..119d866a776659 100644 --- a/plugins/source/azure/resources/services/logic/workflows.go +++ b/plugins/source/azure/resources/services/logic/workflows.go @@ -13,7 +13,7 @@ func Workflows() *schema.Table { return &schema.Table{ Name: "azure_logic_workflows", Resolver: fetchWorkflows, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_logic), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_logic_workflows", client.Namespacemicrosoft_logic), Transform: transformers.TransformWithStruct(&armlogic.Workflow{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/maintenance/configurations.go b/plugins/source/azure/resources/services/maintenance/configurations.go index 46cc3c3daa5c78..b26f05b93b2de9 100644 --- a/plugins/source/azure/resources/services/maintenance/configurations.go +++ b/plugins/source/azure/resources/services/maintenance/configurations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package maintenance import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maintenance/armmaintenance" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Configurations() *schema.Table { return &schema.Table{ Name: "azure_maintenance_configurations", Resolver: fetchConfigurations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_maintenance), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_maintenance_configurations", client.Namespacemicrosoft_maintenance), Transform: transformers.TransformWithStruct(&armmaintenance.Configuration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/maintenance/configurations_mock_test.go b/plugins/source/azure/resources/services/maintenance/configurations_mock_test.go index f69ccb6eb4dbb5..6964c6ac54a41c 100644 --- a/plugins/source/azure/resources/services/maintenance/configurations_mock_test.go +++ b/plugins/source/azure/resources/services/maintenance/configurations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package maintenance import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maintenance/armmaintenance" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations.go b/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations.go index 2bb627f8c9a9db..3e97aec73552a9 100644 --- a/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations.go +++ b/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package maintenance import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maintenance/armmaintenance" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PublicMaintenanceConfigurations() *schema.Table { return &schema.Table{ Name: "azure_maintenance_public_maintenance_configurations", Resolver: fetchPublicMaintenanceConfigurations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_maintenance), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_maintenance_public_maintenance_configurations", client.Namespacemicrosoft_maintenance), Transform: transformers.TransformWithStruct(&armmaintenance.Configuration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations_mock_test.go b/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations_mock_test.go index 19304ef06e81af..1e54c13735d8b2 100644 --- a/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations_mock_test.go +++ b/plugins/source/azure/resources/services/maintenance/public_maintenance_configurations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package maintenance import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maintenance/armmaintenance" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/mariadb/servers.go b/plugins/source/azure/resources/services/mariadb/servers.go index 38a919a974eef6..9f188c3619c638 100644 --- a/plugins/source/azure/resources/services/mariadb/servers.go +++ b/plugins/source/azure/resources/services/mariadb/servers.go @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_mariadb_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbformariadb), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_mariadb_servers", client.Namespacemicrosoft_dbformariadb), Transform: transformers.TransformWithStruct(&armmariadb.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/marketplace/private_store.go b/plugins/source/azure/resources/services/marketplace/private_store.go index b2b68474fb3764..1b8b51314315de 100644 --- a/plugins/source/azure/resources/services/marketplace/private_store.go +++ b/plugins/source/azure/resources/services/marketplace/private_store.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package marketplace import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplace/armmarketplace" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PrivateStore() *schema.Table { return &schema.Table{ Name: "azure_marketplace_private_store", Resolver: fetchPrivateStore, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_marketplace), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_marketplace_private_store", client.Namespacemicrosoft_marketplace), Transform: transformers.TransformWithStruct(&armmarketplace.PrivateStore{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/marketplace/private_store_mock_test.go b/plugins/source/azure/resources/services/marketplace/private_store_mock_test.go index 16d612787fd305..b37e50279b31f7 100644 --- a/plugins/source/azure/resources/services/marketplace/private_store_mock_test.go +++ b/plugins/source/azure/resources/services/marketplace/private_store_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package marketplace import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplace/armmarketplace" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/monitor/log_profiles.go b/plugins/source/azure/resources/services/monitor/log_profiles.go index d404496b8d4863..c34421e72b9c12 100644 --- a/plugins/source/azure/resources/services/monitor/log_profiles.go +++ b/plugins/source/azure/resources/services/monitor/log_profiles.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func LogProfiles() *schema.Table { return &schema.Table{ Name: "azure_monitor_log_profiles", Resolver: fetchLogProfiles, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_monitor_log_profiles", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armmonitor.LogProfileResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/monitor/log_profiles_mock_test.go b/plugins/source/azure/resources/services/monitor/log_profiles_mock_test.go index 0a597d9adebb2d..483a78e481d8b7 100644 --- a/plugins/source/azure/resources/services/monitor/log_profiles_mock_test.go +++ b/plugins/source/azure/resources/services/monitor/log_profiles_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/monitor/private_link_scopes.go b/plugins/source/azure/resources/services/monitor/private_link_scopes.go index b0ef482f41db9b..941bcc473c1b9f 100644 --- a/plugins/source/azure/resources/services/monitor/private_link_scopes.go +++ b/plugins/source/azure/resources/services/monitor/private_link_scopes.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PrivateLinkScopes() *schema.Table { return &schema.Table{ Name: "azure_monitor_private_link_scopes", Resolver: fetchPrivateLinkScopes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_monitor_private_link_scopes", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armmonitor.AzureMonitorPrivateLinkScope{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/monitor/private_link_scopes_mock_test.go b/plugins/source/azure/resources/services/monitor/private_link_scopes_mock_test.go index 0088dfb5d5649e..2f08f1075d3156 100644 --- a/plugins/source/azure/resources/services/monitor/private_link_scopes_mock_test.go +++ b/plugins/source/azure/resources/services/monitor/private_link_scopes_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/monitor/tenant_activity_log_alerts.go b/plugins/source/azure/resources/services/monitor/tenant_activity_log_alerts.go index 00782e2df92997..d02bcdd9070328 100644 --- a/plugins/source/azure/resources/services/monitor/tenant_activity_log_alerts.go +++ b/plugins/source/azure/resources/services/monitor/tenant_activity_log_alerts.go @@ -13,7 +13,7 @@ func TenantActivityLogAlerts() *schema.Table { return &schema.Table{ Name: "azure_monitor_tenant_activity_log_alerts", Resolver: fetchTenantActivityLogAlerts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_monitor_tenant_activity_log_alerts", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armmonitor.ActivityLogAlertResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/monitor/tenant_activity_logs.go b/plugins/source/azure/resources/services/monitor/tenant_activity_logs.go index 7026f425eafd44..1d5fbd89043009 100644 --- a/plugins/source/azure/resources/services/monitor/tenant_activity_logs.go +++ b/plugins/source/azure/resources/services/monitor/tenant_activity_logs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func TenantActivityLogs() *schema.Table { return &schema.Table{ Name: "azure_monitor_tenant_activity_logs", Resolver: fetchTenantActivityLogs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_insights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_monitor_tenant_activity_logs", client.Namespacemicrosoft_insights), Transform: transformers.TransformWithStruct(&armmonitor.EventData{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/monitor/tenant_activity_logs_mock_test.go b/plugins/source/azure/resources/services/monitor/tenant_activity_logs_mock_test.go index b65e9be7795653..35a0ef8b23d646 100644 --- a/plugins/source/azure/resources/services/monitor/tenant_activity_logs_mock_test.go +++ b/plugins/source/azure/resources/services/monitor/tenant_activity_logs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package monitor import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/mysql/servers.go b/plugins/source/azure/resources/services/mysql/servers.go index 7bd1afeaa67bb8..8ab6eb5227f347 100644 --- a/plugins/source/azure/resources/services/mysql/servers.go +++ b/plugins/source/azure/resources/services/mysql/servers.go @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_mysql_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbformysql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_mysql_servers", client.Namespacemicrosoft_dbformysql), Transform: transformers.TransformWithStruct(&armmysql.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/mysqlflexibleservers/servers.go b/plugins/source/azure/resources/services/mysqlflexibleservers/servers.go index f80161c88748f0..67a9751261e3b1 100644 --- a/plugins/source/azure/resources/services/mysqlflexibleservers/servers.go +++ b/plugins/source/azure/resources/services/mysqlflexibleservers/servers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package mysqlflexibleservers import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_mysqlflexibleservers_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbformysql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_mysqlflexibleservers_servers", client.Namespacemicrosoft_dbformysql), Transform: transformers.TransformWithStruct(&armmysqlflexibleservers.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/mysqlflexibleservers/servers_mock_test.go b/plugins/source/azure/resources/services/mysqlflexibleservers/servers_mock_test.go index 32c93fe452830e..d0e63a850f1d25 100644 --- a/plugins/source/azure/resources/services/mysqlflexibleservers/servers_mock_test.go +++ b/plugins/source/azure/resources/services/mysqlflexibleservers/servers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package mysqlflexibleservers import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/application_gateways.go b/plugins/source/azure/resources/services/network/application_gateways.go index 368bbc3a20d675..b373d6c920884e 100644 --- a/plugins/source/azure/resources/services/network/application_gateways.go +++ b/plugins/source/azure/resources/services/network/application_gateways.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ApplicationGateways() *schema.Table { return &schema.Table{ Name: "azure_network_application_gateways", Resolver: fetchApplicationGateways, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_application_gateways", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ApplicationGateway{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/application_gateways_mock_test.go b/plugins/source/azure/resources/services/network/application_gateways_mock_test.go index 8d8fecf88f85c9..70630c7c0849e9 100644 --- a/plugins/source/azure/resources/services/network/application_gateways_mock_test.go +++ b/plugins/source/azure/resources/services/network/application_gateways_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/application_security_groups.go b/plugins/source/azure/resources/services/network/application_security_groups.go index c5dca4d085d675..723b1c8a255749 100644 --- a/plugins/source/azure/resources/services/network/application_security_groups.go +++ b/plugins/source/azure/resources/services/network/application_security_groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ApplicationSecurityGroups() *schema.Table { return &schema.Table{ Name: "azure_network_application_security_groups", Resolver: fetchApplicationSecurityGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_application_security_groups", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ApplicationSecurityGroup{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/application_security_groups_mock_test.go b/plugins/source/azure/resources/services/network/application_security_groups_mock_test.go index 9c25f844101fd1..5593544084b6e6 100644 --- a/plugins/source/azure/resources/services/network/application_security_groups_mock_test.go +++ b/plugins/source/azure/resources/services/network/application_security_groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags.go b/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags.go index 468a637cbf1d38..f7a9be014ff34e 100644 --- a/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags.go +++ b/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AzureFirewallFqdnTags() *schema.Table { return &schema.Table{ Name: "azure_network_azure_firewall_fqdn_tags", Resolver: fetchAzureFirewallFqdnTags, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_azure_firewall_fqdn_tags", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.AzureFirewallFqdnTag{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags_mock_test.go b/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags_mock_test.go index c46576f7b53d57..478720b5d561a0 100644 --- a/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags_mock_test.go +++ b/plugins/source/azure/resources/services/network/azure_firewall_fqdn_tags_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/azure_firewalls.go b/plugins/source/azure/resources/services/network/azure_firewalls.go index c454f80fb5bd87..f78ed440958145 100644 --- a/plugins/source/azure/resources/services/network/azure_firewalls.go +++ b/plugins/source/azure/resources/services/network/azure_firewalls.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AzureFirewalls() *schema.Table { return &schema.Table{ Name: "azure_network_azure_firewalls", Resolver: fetchAzureFirewalls, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_azure_firewalls", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.AzureFirewall{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/azure_firewalls_mock_test.go b/plugins/source/azure/resources/services/network/azure_firewalls_mock_test.go index 6e4088da0b4406..1f9d36d2279279 100644 --- a/plugins/source/azure/resources/services/network/azure_firewalls_mock_test.go +++ b/plugins/source/azure/resources/services/network/azure_firewalls_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/bastion_hosts.go b/plugins/source/azure/resources/services/network/bastion_hosts.go index 91c2f4c646c0ae..292e08e3a54bf8 100644 --- a/plugins/source/azure/resources/services/network/bastion_hosts.go +++ b/plugins/source/azure/resources/services/network/bastion_hosts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func BastionHosts() *schema.Table { return &schema.Table{ Name: "azure_network_bastion_hosts", Resolver: fetchBastionHosts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_bastion_hosts", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.BastionHost{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/bastion_hosts_mock_test.go b/plugins/source/azure/resources/services/network/bastion_hosts_mock_test.go index ea1b5c1cbdfd96..594c1570a7b08c 100644 --- a/plugins/source/azure/resources/services/network/bastion_hosts_mock_test.go +++ b/plugins/source/azure/resources/services/network/bastion_hosts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/bgp_service_communities.go b/plugins/source/azure/resources/services/network/bgp_service_communities.go index afd6ac91896370..be0cc889cc5a6a 100644 --- a/plugins/source/azure/resources/services/network/bgp_service_communities.go +++ b/plugins/source/azure/resources/services/network/bgp_service_communities.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func BgpServiceCommunities() *schema.Table { return &schema.Table{ Name: "azure_network_bgp_service_communities", Resolver: fetchBgpServiceCommunities, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_bgp_service_communities", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.BgpServiceCommunity{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/bgp_service_communities_mock_test.go b/plugins/source/azure/resources/services/network/bgp_service_communities_mock_test.go index d3182db744ef1b..6da59f2bceb875 100644 --- a/plugins/source/azure/resources/services/network/bgp_service_communities_mock_test.go +++ b/plugins/source/azure/resources/services/network/bgp_service_communities_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/custom_ip_prefixes.go b/plugins/source/azure/resources/services/network/custom_ip_prefixes.go index cba063e00e7d34..124b778fbfe2c8 100644 --- a/plugins/source/azure/resources/services/network/custom_ip_prefixes.go +++ b/plugins/source/azure/resources/services/network/custom_ip_prefixes.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func CustomIpPrefixes() *schema.Table { return &schema.Table{ Name: "azure_network_custom_ip_prefixes", Resolver: fetchCustomIpPrefixes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_custom_ip_prefixes", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.CustomIPPrefix{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/custom_ip_prefixes_mock_test.go b/plugins/source/azure/resources/services/network/custom_ip_prefixes_mock_test.go index 3d070644cb5099..c5573a15ffdcb9 100644 --- a/plugins/source/azure/resources/services/network/custom_ip_prefixes_mock_test.go +++ b/plugins/source/azure/resources/services/network/custom_ip_prefixes_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/ddos_protection_plans.go b/plugins/source/azure/resources/services/network/ddos_protection_plans.go index 64e02669c09934..2e792b6d2c376e 100644 --- a/plugins/source/azure/resources/services/network/ddos_protection_plans.go +++ b/plugins/source/azure/resources/services/network/ddos_protection_plans.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DdosProtectionPlans() *schema.Table { return &schema.Table{ Name: "azure_network_ddos_protection_plans", Resolver: fetchDdosProtectionPlans, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_ddos_protection_plans", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.DdosProtectionPlan{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/ddos_protection_plans_mock_test.go b/plugins/source/azure/resources/services/network/ddos_protection_plans_mock_test.go index ea6ee5407132e6..2e353e92123e91 100644 --- a/plugins/source/azure/resources/services/network/ddos_protection_plans_mock_test.go +++ b/plugins/source/azure/resources/services/network/ddos_protection_plans_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/dscp_configuration.go b/plugins/source/azure/resources/services/network/dscp_configuration.go index f47e9e532dddad..f145fde5eb3b43 100644 --- a/plugins/source/azure/resources/services/network/dscp_configuration.go +++ b/plugins/source/azure/resources/services/network/dscp_configuration.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DscpConfiguration() *schema.Table { return &schema.Table{ Name: "azure_network_dscp_configuration", Resolver: fetchDscpConfiguration, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_dscp_configuration", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.DscpConfiguration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/dscp_configuration_mock_test.go b/plugins/source/azure/resources/services/network/dscp_configuration_mock_test.go index 010cfcc7082c57..d4dc6d421543b8 100644 --- a/plugins/source/azure/resources/services/network/dscp_configuration_mock_test.go +++ b/plugins/source/azure/resources/services/network/dscp_configuration_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/express_route_circuits.go b/plugins/source/azure/resources/services/network/express_route_circuits.go index c7ba94e8f1ec5c..87f62f202616a6 100644 --- a/plugins/source/azure/resources/services/network/express_route_circuits.go +++ b/plugins/source/azure/resources/services/network/express_route_circuits.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ExpressRouteCircuits() *schema.Table { return &schema.Table{ Name: "azure_network_express_route_circuits", Resolver: fetchExpressRouteCircuits, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_express_route_circuits", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ExpressRouteCircuit{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/express_route_circuits_mock_test.go b/plugins/source/azure/resources/services/network/express_route_circuits_mock_test.go index 189a59b11528da..b19f054fec4b76 100644 --- a/plugins/source/azure/resources/services/network/express_route_circuits_mock_test.go +++ b/plugins/source/azure/resources/services/network/express_route_circuits_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/express_route_gateways.go b/plugins/source/azure/resources/services/network/express_route_gateways.go index 9bf522fbf4c3f6..ab2f159ae7d9d3 100644 --- a/plugins/source/azure/resources/services/network/express_route_gateways.go +++ b/plugins/source/azure/resources/services/network/express_route_gateways.go @@ -11,7 +11,7 @@ func ExpressRouteGateways() *schema.Table { return &schema.Table{ Name: "azure_network_express_route_gateways", Resolver: fetchExpressRouteGateways, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_express_route_gateways", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ExpressRouteGateway{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/express_route_ports.go b/plugins/source/azure/resources/services/network/express_route_ports.go index f6aa06d5894ee4..b64628b474f412 100644 --- a/plugins/source/azure/resources/services/network/express_route_ports.go +++ b/plugins/source/azure/resources/services/network/express_route_ports.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ExpressRoutePorts() *schema.Table { return &schema.Table{ Name: "azure_network_express_route_ports", Resolver: fetchExpressRoutePorts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_express_route_ports", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ExpressRoutePort{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/express_route_ports_locations.go b/plugins/source/azure/resources/services/network/express_route_ports_locations.go index 5b5c4c51c01843..a4b62e232fba89 100644 --- a/plugins/source/azure/resources/services/network/express_route_ports_locations.go +++ b/plugins/source/azure/resources/services/network/express_route_ports_locations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ExpressRoutePortsLocations() *schema.Table { return &schema.Table{ Name: "azure_network_express_route_ports_locations", Resolver: fetchExpressRoutePortsLocations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_express_route_ports_locations", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ExpressRoutePortsLocation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/express_route_ports_locations_mock_test.go b/plugins/source/azure/resources/services/network/express_route_ports_locations_mock_test.go index bf382243ff9d5f..5565dc0665ac17 100644 --- a/plugins/source/azure/resources/services/network/express_route_ports_locations_mock_test.go +++ b/plugins/source/azure/resources/services/network/express_route_ports_locations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/express_route_ports_mock_test.go b/plugins/source/azure/resources/services/network/express_route_ports_mock_test.go index 954c0cecee480c..8b4f010b5feee5 100644 --- a/plugins/source/azure/resources/services/network/express_route_ports_mock_test.go +++ b/plugins/source/azure/resources/services/network/express_route_ports_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/express_route_service_providers.go b/plugins/source/azure/resources/services/network/express_route_service_providers.go index b93056b561ca9a..04839597548e35 100644 --- a/plugins/source/azure/resources/services/network/express_route_service_providers.go +++ b/plugins/source/azure/resources/services/network/express_route_service_providers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ExpressRouteServiceProviders() *schema.Table { return &schema.Table{ Name: "azure_network_express_route_service_providers", Resolver: fetchExpressRouteServiceProviders, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_express_route_service_providers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ExpressRouteServiceProvider{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/express_route_service_providers_mock_test.go b/plugins/source/azure/resources/services/network/express_route_service_providers_mock_test.go index 78982ee3c10b6b..6472daa0868f72 100644 --- a/plugins/source/azure/resources/services/network/express_route_service_providers_mock_test.go +++ b/plugins/source/azure/resources/services/network/express_route_service_providers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/firewall_policies.go b/plugins/source/azure/resources/services/network/firewall_policies.go index 3fe656632c67d6..1c1210e9920e2b 100644 --- a/plugins/source/azure/resources/services/network/firewall_policies.go +++ b/plugins/source/azure/resources/services/network/firewall_policies.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func FirewallPolicies() *schema.Table { return &schema.Table{ Name: "azure_network_firewall_policies", Resolver: fetchFirewallPolicies, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_firewall_policies", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.FirewallPolicy{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/firewall_policies_mock_test.go b/plugins/source/azure/resources/services/network/firewall_policies_mock_test.go index 5a9dbeed350995..c2c72e3a911791 100644 --- a/plugins/source/azure/resources/services/network/firewall_policies_mock_test.go +++ b/plugins/source/azure/resources/services/network/firewall_policies_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/interfaces.go b/plugins/source/azure/resources/services/network/interfaces.go index ab7e72446a173d..44b7defa475664 100644 --- a/plugins/source/azure/resources/services/network/interfaces.go +++ b/plugins/source/azure/resources/services/network/interfaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Interfaces() *schema.Table { return &schema.Table{ Name: "azure_network_interfaces", Resolver: fetchInterfaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_interfaces", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.Interface{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/interfaces_mock_test.go b/plugins/source/azure/resources/services/network/interfaces_mock_test.go index 2a8f7c453bc5b2..d9fd59199da34b 100644 --- a/plugins/source/azure/resources/services/network/interfaces_mock_test.go +++ b/plugins/source/azure/resources/services/network/interfaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/ip_allocations.go b/plugins/source/azure/resources/services/network/ip_allocations.go index bafe1593264594..2a285a93eaa46c 100644 --- a/plugins/source/azure/resources/services/network/ip_allocations.go +++ b/plugins/source/azure/resources/services/network/ip_allocations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func IpAllocations() *schema.Table { return &schema.Table{ Name: "azure_network_ip_allocations", Resolver: fetchIpAllocations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_ip_allocations", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.IPAllocation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/ip_allocations_mock_test.go b/plugins/source/azure/resources/services/network/ip_allocations_mock_test.go index daf8a6df299e31..1c7333f7b72711 100644 --- a/plugins/source/azure/resources/services/network/ip_allocations_mock_test.go +++ b/plugins/source/azure/resources/services/network/ip_allocations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/ip_groups.go b/plugins/source/azure/resources/services/network/ip_groups.go index 2f17e9695645c0..d2b9aefdfc62b3 100644 --- a/plugins/source/azure/resources/services/network/ip_groups.go +++ b/plugins/source/azure/resources/services/network/ip_groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func IpGroups() *schema.Table { return &schema.Table{ Name: "azure_network_ip_groups", Resolver: fetchIpGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_ip_groups", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.IPGroup{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/ip_groups_mock_test.go b/plugins/source/azure/resources/services/network/ip_groups_mock_test.go index 81baca21e09783..15770c3bcd4a67 100644 --- a/plugins/source/azure/resources/services/network/ip_groups_mock_test.go +++ b/plugins/source/azure/resources/services/network/ip_groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/load_balancers.go b/plugins/source/azure/resources/services/network/load_balancers.go index da0153cac743f7..5051d2b1271465 100644 --- a/plugins/source/azure/resources/services/network/load_balancers.go +++ b/plugins/source/azure/resources/services/network/load_balancers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func LoadBalancers() *schema.Table { return &schema.Table{ Name: "azure_network_load_balancers", Resolver: fetchLoadBalancers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_load_balancers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.LoadBalancer{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/load_balancers_mock_test.go b/plugins/source/azure/resources/services/network/load_balancers_mock_test.go index 62cd31e526970c..1647136a0ac718 100644 --- a/plugins/source/azure/resources/services/network/load_balancers_mock_test.go +++ b/plugins/source/azure/resources/services/network/load_balancers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/nat_gateways.go b/plugins/source/azure/resources/services/network/nat_gateways.go index 8c16e4359ad75c..fbc2aef08bd994 100644 --- a/plugins/source/azure/resources/services/network/nat_gateways.go +++ b/plugins/source/azure/resources/services/network/nat_gateways.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func NatGateways() *schema.Table { return &schema.Table{ Name: "azure_network_nat_gateways", Resolver: fetchNatGateways, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_nat_gateways", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.NatGateway{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/nat_gateways_mock_test.go b/plugins/source/azure/resources/services/network/nat_gateways_mock_test.go index ee1e0cc7ccedf4..577e3d049450bc 100644 --- a/plugins/source/azure/resources/services/network/nat_gateways_mock_test.go +++ b/plugins/source/azure/resources/services/network/nat_gateways_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/profiles.go b/plugins/source/azure/resources/services/network/profiles.go index f9690197e5d863..49e6ae9a4b0938 100644 --- a/plugins/source/azure/resources/services/network/profiles.go +++ b/plugins/source/azure/resources/services/network/profiles.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Profiles() *schema.Table { return &schema.Table{ Name: "azure_network_profiles", Resolver: fetchProfiles, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_profiles", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.Profile{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/profiles_mock_test.go b/plugins/source/azure/resources/services/network/profiles_mock_test.go index 710be4a96b2800..200eca32f9c344 100644 --- a/plugins/source/azure/resources/services/network/profiles_mock_test.go +++ b/plugins/source/azure/resources/services/network/profiles_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/public_ip_addresses.go b/plugins/source/azure/resources/services/network/public_ip_addresses.go index c9b908e7a5dd48..f5511f47ae697b 100644 --- a/plugins/source/azure/resources/services/network/public_ip_addresses.go +++ b/plugins/source/azure/resources/services/network/public_ip_addresses.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PublicIpAddresses() *schema.Table { return &schema.Table{ Name: "azure_network_public_ip_addresses", Resolver: fetchPublicIpAddresses, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_public_ip_addresses", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.PublicIPAddress{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/public_ip_addresses_mock_test.go b/plugins/source/azure/resources/services/network/public_ip_addresses_mock_test.go index 7a351910ec7c02..30f105a30508e4 100644 --- a/plugins/source/azure/resources/services/network/public_ip_addresses_mock_test.go +++ b/plugins/source/azure/resources/services/network/public_ip_addresses_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/public_ip_prefixes.go b/plugins/source/azure/resources/services/network/public_ip_prefixes.go index 649c5b1f6f2a28..fac80bb85f9f50 100644 --- a/plugins/source/azure/resources/services/network/public_ip_prefixes.go +++ b/plugins/source/azure/resources/services/network/public_ip_prefixes.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PublicIpPrefixes() *schema.Table { return &schema.Table{ Name: "azure_network_public_ip_prefixes", Resolver: fetchPublicIpPrefixes, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_public_ip_prefixes", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.PublicIPPrefix{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/public_ip_prefixes_mock_test.go b/plugins/source/azure/resources/services/network/public_ip_prefixes_mock_test.go index 4628cc035ad726..101ae997c3a196 100644 --- a/plugins/source/azure/resources/services/network/public_ip_prefixes_mock_test.go +++ b/plugins/source/azure/resources/services/network/public_ip_prefixes_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/route_filters.go b/plugins/source/azure/resources/services/network/route_filters.go index 69475ad39faba0..7ddf6333a69255 100644 --- a/plugins/source/azure/resources/services/network/route_filters.go +++ b/plugins/source/azure/resources/services/network/route_filters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RouteFilters() *schema.Table { return &schema.Table{ Name: "azure_network_route_filters", Resolver: fetchRouteFilters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_route_filters", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.RouteFilter{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/route_filters_mock_test.go b/plugins/source/azure/resources/services/network/route_filters_mock_test.go index 70d46a513339f4..ac5676ccfdf5dd 100644 --- a/plugins/source/azure/resources/services/network/route_filters_mock_test.go +++ b/plugins/source/azure/resources/services/network/route_filters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/route_tables.go b/plugins/source/azure/resources/services/network/route_tables.go index 24b6460c37a2b1..27c8dee335d90c 100644 --- a/plugins/source/azure/resources/services/network/route_tables.go +++ b/plugins/source/azure/resources/services/network/route_tables.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RouteTables() *schema.Table { return &schema.Table{ Name: "azure_network_route_tables", Resolver: fetchRouteTables, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_route_tables", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.RouteTable{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/route_tables_mock_test.go b/plugins/source/azure/resources/services/network/route_tables_mock_test.go index 78fbaf5d17bd93..0a5359581dc8f5 100644 --- a/plugins/source/azure/resources/services/network/route_tables_mock_test.go +++ b/plugins/source/azure/resources/services/network/route_tables_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/security_groups.go b/plugins/source/azure/resources/services/network/security_groups.go index 01d4f650b1d49a..d23db5209f997a 100644 --- a/plugins/source/azure/resources/services/network/security_groups.go +++ b/plugins/source/azure/resources/services/network/security_groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SecurityGroups() *schema.Table { return &schema.Table{ Name: "azure_network_security_groups", Resolver: fetchSecurityGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_security_groups", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.SecurityGroup{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/security_groups_mock_test.go b/plugins/source/azure/resources/services/network/security_groups_mock_test.go index 6be7fedb6d2014..9811e6a2541262 100644 --- a/plugins/source/azure/resources/services/network/security_groups_mock_test.go +++ b/plugins/source/azure/resources/services/network/security_groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/security_partner_providers.go b/plugins/source/azure/resources/services/network/security_partner_providers.go index bd3fa1ea9633d8..afd365f9517f78 100644 --- a/plugins/source/azure/resources/services/network/security_partner_providers.go +++ b/plugins/source/azure/resources/services/network/security_partner_providers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SecurityPartnerProviders() *schema.Table { return &schema.Table{ Name: "azure_network_security_partner_providers", Resolver: fetchSecurityPartnerProviders, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_security_partner_providers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.SecurityPartnerProvider{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/security_partner_providers_mock_test.go b/plugins/source/azure/resources/services/network/security_partner_providers_mock_test.go index 18d87f4c27870c..93f1765354deab 100644 --- a/plugins/source/azure/resources/services/network/security_partner_providers_mock_test.go +++ b/plugins/source/azure/resources/services/network/security_partner_providers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/service_endpoint_policies.go b/plugins/source/azure/resources/services/network/service_endpoint_policies.go index b0a9e1b5f9b0e5..137bac9c81083b 100644 --- a/plugins/source/azure/resources/services/network/service_endpoint_policies.go +++ b/plugins/source/azure/resources/services/network/service_endpoint_policies.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ServiceEndpointPolicies() *schema.Table { return &schema.Table{ Name: "azure_network_service_endpoint_policies", Resolver: fetchServiceEndpointPolicies, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_service_endpoint_policies", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ServiceEndpointPolicy{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/service_endpoint_policies_mock_test.go b/plugins/source/azure/resources/services/network/service_endpoint_policies_mock_test.go index 2c3169aa11768c..e52ec0cc41a63f 100644 --- a/plugins/source/azure/resources/services/network/service_endpoint_policies_mock_test.go +++ b/plugins/source/azure/resources/services/network/service_endpoint_policies_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/subscription_network_manager_connections.go b/plugins/source/azure/resources/services/network/subscription_network_manager_connections.go index 4052f81d58f46c..333bef4cbe4c19 100644 --- a/plugins/source/azure/resources/services/network/subscription_network_manager_connections.go +++ b/plugins/source/azure/resources/services/network/subscription_network_manager_connections.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SubscriptionNetworkManagerConnections() *schema.Table { return &schema.Table{ Name: "azure_network_subscription_network_manager_connections", Resolver: fetchSubscriptionNetworkManagerConnections, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_subscription_network_manager_connections", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.ManagerConnection{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/subscription_network_manager_connections_mock_test.go b/plugins/source/azure/resources/services/network/subscription_network_manager_connections_mock_test.go index 39dbcbc8da2aaa..53f5c5beec1f3c 100644 --- a/plugins/source/azure/resources/services/network/subscription_network_manager_connections_mock_test.go +++ b/plugins/source/azure/resources/services/network/subscription_network_manager_connections_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_appliances.go b/plugins/source/azure/resources/services/network/virtual_appliances.go index 7d93c75947c5d9..440e8dbe2dc4d0 100644 --- a/plugins/source/azure/resources/services/network/virtual_appliances.go +++ b/plugins/source/azure/resources/services/network/virtual_appliances.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualAppliances() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_appliances", Resolver: fetchVirtualAppliances, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_appliances", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualAppliance{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_appliances_mock_test.go b/plugins/source/azure/resources/services/network/virtual_appliances_mock_test.go index ae0541edd99b9a..61c6f073c0ace2 100644 --- a/plugins/source/azure/resources/services/network/virtual_appliances_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_appliances_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_hubs.go b/plugins/source/azure/resources/services/network/virtual_hubs.go index e91f0ab5f70e11..8ba036655bb04e 100644 --- a/plugins/source/azure/resources/services/network/virtual_hubs.go +++ b/plugins/source/azure/resources/services/network/virtual_hubs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualHubs() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_hubs", Resolver: fetchVirtualHubs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_hubs", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualHub{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_hubs_mock_test.go b/plugins/source/azure/resources/services/network/virtual_hubs_mock_test.go index 23c889e1f808ee..2ef6f1fbe1c274 100644 --- a/plugins/source/azure/resources/services/network/virtual_hubs_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_hubs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_network_taps.go b/plugins/source/azure/resources/services/network/virtual_network_taps.go index 98c7ae2f1b5eac..e38523fb65488e 100644 --- a/plugins/source/azure/resources/services/network/virtual_network_taps.go +++ b/plugins/source/azure/resources/services/network/virtual_network_taps.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualNetworkTaps() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_network_taps", Resolver: fetchVirtualNetworkTaps, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_network_taps", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualNetworkTap{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_network_taps_mock_test.go b/plugins/source/azure/resources/services/network/virtual_network_taps_mock_test.go index d6f6f48d72bdd5..c3f24815adbc4c 100644 --- a/plugins/source/azure/resources/services/network/virtual_network_taps_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_network_taps_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_networks.go b/plugins/source/azure/resources/services/network/virtual_networks.go index a86e442ec8a9ea..744107d15a060c 100644 --- a/plugins/source/azure/resources/services/network/virtual_networks.go +++ b/plugins/source/azure/resources/services/network/virtual_networks.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualNetworks() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_networks", Resolver: fetchVirtualNetworks, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_networks", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualNetwork{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_networks_mock_test.go b/plugins/source/azure/resources/services/network/virtual_networks_mock_test.go index 140ec6d4a3f0ab..ba7c84dd0ca688 100644 --- a/plugins/source/azure/resources/services/network/virtual_networks_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_networks_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_routers.go b/plugins/source/azure/resources/services/network/virtual_routers.go index ab8e6c01fbc034..d75641eb52a0f1 100644 --- a/plugins/source/azure/resources/services/network/virtual_routers.go +++ b/plugins/source/azure/resources/services/network/virtual_routers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualRouters() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_routers", Resolver: fetchVirtualRouters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_routers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualRouter{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_routers_mock_test.go b/plugins/source/azure/resources/services/network/virtual_routers_mock_test.go index c297968aaef1cd..47117b59615d2c 100644 --- a/plugins/source/azure/resources/services/network/virtual_routers_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_routers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/virtual_wans.go b/plugins/source/azure/resources/services/network/virtual_wans.go index 3c23d6a614faba..675cba03fa6263 100644 --- a/plugins/source/azure/resources/services/network/virtual_wans.go +++ b/plugins/source/azure/resources/services/network/virtual_wans.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualWans() *schema.Table { return &schema.Table{ Name: "azure_network_virtual_wans", Resolver: fetchVirtualWans, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_virtual_wans", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VirtualWAN{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/virtual_wans_mock_test.go b/plugins/source/azure/resources/services/network/virtual_wans_mock_test.go index b2db00264cc3a4..a68aee0cdc86a5 100644 --- a/plugins/source/azure/resources/services/network/virtual_wans_mock_test.go +++ b/plugins/source/azure/resources/services/network/virtual_wans_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/vpn_gateways.go b/plugins/source/azure/resources/services/network/vpn_gateways.go index 2188c69a667662..9f174e60c14cdb 100644 --- a/plugins/source/azure/resources/services/network/vpn_gateways.go +++ b/plugins/source/azure/resources/services/network/vpn_gateways.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VpnGateways() *schema.Table { return &schema.Table{ Name: "azure_network_vpn_gateways", Resolver: fetchVpnGateways, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_vpn_gateways", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VPNGateway{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/vpn_gateways_mock_test.go b/plugins/source/azure/resources/services/network/vpn_gateways_mock_test.go index 00184f50b99676..da044d8e32b8ef 100644 --- a/plugins/source/azure/resources/services/network/vpn_gateways_mock_test.go +++ b/plugins/source/azure/resources/services/network/vpn_gateways_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/vpn_server_configurations.go b/plugins/source/azure/resources/services/network/vpn_server_configurations.go index 0ebd00310970e0..4d7002302be3c4 100644 --- a/plugins/source/azure/resources/services/network/vpn_server_configurations.go +++ b/plugins/source/azure/resources/services/network/vpn_server_configurations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VpnServerConfigurations() *schema.Table { return &schema.Table{ Name: "azure_network_vpn_server_configurations", Resolver: fetchVpnServerConfigurations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_vpn_server_configurations", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VPNServerConfiguration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/vpn_server_configurations_mock_test.go b/plugins/source/azure/resources/services/network/vpn_server_configurations_mock_test.go index e6c3ea1895aced..6ffd3cb574b36a 100644 --- a/plugins/source/azure/resources/services/network/vpn_server_configurations_mock_test.go +++ b/plugins/source/azure/resources/services/network/vpn_server_configurations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/vpn_sites.go b/plugins/source/azure/resources/services/network/vpn_sites.go index d650045c715434..0c0526c0e6a9af 100644 --- a/plugins/source/azure/resources/services/network/vpn_sites.go +++ b/plugins/source/azure/resources/services/network/vpn_sites.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VpnSites() *schema.Table { return &schema.Table{ Name: "azure_network_vpn_sites", Resolver: fetchVpnSites, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_vpn_sites", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.VPNSite{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/vpn_sites_mock_test.go b/plugins/source/azure/resources/services/network/vpn_sites_mock_test.go index 443b233a27e20e..0318ba565abb89 100644 --- a/plugins/source/azure/resources/services/network/vpn_sites_mock_test.go +++ b/plugins/source/azure/resources/services/network/vpn_sites_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/watchers.go b/plugins/source/azure/resources/services/network/watchers.go index 3bce82e5ce2441..20d5a8504a4d9d 100644 --- a/plugins/source/azure/resources/services/network/watchers.go +++ b/plugins/source/azure/resources/services/network/watchers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Watchers() *schema.Table { return &schema.Table{ Name: "azure_network_watchers", Resolver: fetchWatchers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_watchers", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.Watcher{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/watchers_mock_test.go b/plugins/source/azure/resources/services/network/watchers_mock_test.go index ee82bc1ab48a65..45ab68a430afc4 100644 --- a/plugins/source/azure/resources/services/network/watchers_mock_test.go +++ b/plugins/source/azure/resources/services/network/watchers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/network/web_application_firewall_policies.go b/plugins/source/azure/resources/services/network/web_application_firewall_policies.go index 6a545b8fcab439..be8b7a4b071cd5 100644 --- a/plugins/source/azure/resources/services/network/web_application_firewall_policies.go +++ b/plugins/source/azure/resources/services/network/web_application_firewall_policies.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func WebApplicationFirewallPolicies() *schema.Table { return &schema.Table{ Name: "azure_network_web_application_firewall_policies", Resolver: fetchWebApplicationFirewallPolicies, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_network_web_application_firewall_policies", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armnetwork.WebApplicationFirewallPolicy{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/network/web_application_firewall_policies_mock_test.go b/plugins/source/azure/resources/services/network/web_application_firewall_policies_mock_test.go index 65c82b6ce5b583..3bc8bf23f91578 100644 --- a/plugins/source/azure/resources/services/network/web_application_firewall_policies_mock_test.go +++ b/plugins/source/azure/resources/services/network/web_application_firewall_policies_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package network import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription.go b/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription.go index 5f9297fdd509ce..acf9039a1e00a5 100644 --- a/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription.go +++ b/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package networkfunction import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AzureTrafficCollectorsBySubscription() *schema.Table { return &schema.Table{ Name: "azure_networkfunction_azure_traffic_collectors_by_subscription", Resolver: fetchAzureTrafficCollectorsBySubscription, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_networkfunction), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_networkfunction_azure_traffic_collectors_by_subscription", client.Namespacemicrosoft_networkfunction), Transform: transformers.TransformWithStruct(&armnetworkfunction.AzureTrafficCollector{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription_mock_test.go b/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription_mock_test.go index 43c5a2c46ea8d7..64b4bba397ee40 100644 --- a/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription_mock_test.go +++ b/plugins/source/azure/resources/services/networkfunction/azure_traffic_collectors_by_subscription_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package networkfunction import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/nginx/deployments.go b/plugins/source/azure/resources/services/nginx/deployments.go index f5150e793909e7..cab84603db5549 100644 --- a/plugins/source/azure/resources/services/nginx/deployments.go +++ b/plugins/source/azure/resources/services/nginx/deployments.go @@ -1,9 +1,7 @@ -// Code generated by codegen; DO NOT EDIT. package nginx import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" "github.com/cloudquery/plugin-sdk/transformers" @@ -13,7 +11,7 @@ func Deployments() *schema.Table { return &schema.Table{ Name: "azure_nginx_deployments", Resolver: fetchDeployments, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacenginx_nginxplus), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_nginx_deployments", client.Namespacenginx_nginxplus), Transform: transformers.TransformWithStruct(&armnginx.Deployment{}), Columns: []schema.Column{ { @@ -32,20 +30,3 @@ func Deployments() *schema.Table { }, } } - -func fetchDeployments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - svc, err := armnginx.NewDeploymentsClient(cl.SubscriptionId, cl.Creds, cl.Options) - if err != nil { - return err - } - pager := svc.NewListPager(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} diff --git a/plugins/source/azure/resources/services/nginx/deployments_fetch.go b/plugins/source/azure/resources/services/nginx/deployments_fetch.go new file mode 100644 index 00000000000000..063ea4a792b911 --- /dev/null +++ b/plugins/source/azure/resources/services/nginx/deployments_fetch.go @@ -0,0 +1,26 @@ +package nginx + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchDeployments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + svc, err := armnginx.NewDeploymentsClient(cl.SubscriptionId, cl.Creds, cl.Options) + if err != nil { + return err + } + pager := svc.NewListPager(nil) + for pager.More() { + p, err := pager.NextPage(ctx) + if err != nil { + return err + } + res <- p.Value + } + return nil +} diff --git a/plugins/source/azure/resources/services/nginx/deployments_mock_test.go b/plugins/source/azure/resources/services/nginx/deployments_mock_test.go index 33cda432d9c286..9e517391f0e397 100644 --- a/plugins/source/azure/resources/services/nginx/deployments_mock_test.go +++ b/plugins/source/azure/resources/services/nginx/deployments_mock_test.go @@ -1,14 +1,14 @@ -// Code generated by codegen; DO NOT EDIT. package nginx import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/nginx/armnginx/v2" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" ) diff --git a/plugins/source/azure/resources/services/notificationhubs/namespaces.go b/plugins/source/azure/resources/services/notificationhubs/namespaces.go index 58eec9ad893bb3..eb4d124802f9ef 100644 --- a/plugins/source/azure/resources/services/notificationhubs/namespaces.go +++ b/plugins/source/azure/resources/services/notificationhubs/namespaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package notificationhubs import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Namespaces() *schema.Table { return &schema.Table{ Name: "azure_notificationhubs_namespaces", Resolver: fetchNamespaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_notificationhubs), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_notificationhubs_namespaces", client.Namespacemicrosoft_notificationhubs), Transform: transformers.TransformWithStruct(&armnotificationhubs.NamespaceResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/notificationhubs/namespaces_mock_test.go b/plugins/source/azure/resources/services/notificationhubs/namespaces_mock_test.go index a451c00ee24eb1..01e3df293305d5 100644 --- a/plugins/source/azure/resources/services/notificationhubs/namespaces_mock_test.go +++ b/plugins/source/azure/resources/services/notificationhubs/namespaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package notificationhubs import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/operationalinsights/clusters.go b/plugins/source/azure/resources/services/operationalinsights/clusters.go index c32081448250a2..f756dec3efd64a 100644 --- a/plugins/source/azure/resources/services/operationalinsights/clusters.go +++ b/plugins/source/azure/resources/services/operationalinsights/clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package operationalinsights import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Clusters() *schema.Table { return &schema.Table{ Name: "azure_operationalinsights_clusters", Resolver: fetchClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_operationalinsights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_operationalinsights_clusters", client.Namespacemicrosoft_operationalinsights), Transform: transformers.TransformWithStruct(&armoperationalinsights.Cluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/operationalinsights/clusters_mock_test.go b/plugins/source/azure/resources/services/operationalinsights/clusters_mock_test.go index 7d323fac2fab78..a5490114091c61 100644 --- a/plugins/source/azure/resources/services/operationalinsights/clusters_mock_test.go +++ b/plugins/source/azure/resources/services/operationalinsights/clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package operationalinsights import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/operationalinsights/workspaces.go b/plugins/source/azure/resources/services/operationalinsights/workspaces.go index e44888a4aad3ab..f5cdbcef02dc36 100644 --- a/plugins/source/azure/resources/services/operationalinsights/workspaces.go +++ b/plugins/source/azure/resources/services/operationalinsights/workspaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package operationalinsights import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Workspaces() *schema.Table { return &schema.Table{ Name: "azure_operationalinsights_workspaces", Resolver: fetchWorkspaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_operationalinsights), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_operationalinsights_workspaces", client.Namespacemicrosoft_operationalinsights), Transform: transformers.TransformWithStruct(&armoperationalinsights.Workspace{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/operationalinsights/workspaces_mock_test.go b/plugins/source/azure/resources/services/operationalinsights/workspaces_mock_test.go index 90298fec116c13..053046b28dde97 100644 --- a/plugins/source/azure/resources/services/operationalinsights/workspaces_mock_test.go +++ b/plugins/source/azure/resources/services/operationalinsights/workspaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package operationalinsights import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/peering/service_countries.go b/plugins/source/azure/resources/services/peering/service_countries.go index 9a0a2ab507ffe5..a6083530c9a579 100644 --- a/plugins/source/azure/resources/services/peering/service_countries.go +++ b/plugins/source/azure/resources/services/peering/service_countries.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ServiceCountries() *schema.Table { return &schema.Table{ Name: "azure_peering_service_countries", Resolver: fetchServiceCountries, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_peering), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_peering_service_countries", client.Namespacemicrosoft_peering), Transform: transformers.TransformWithStruct(&armpeering.ServiceCountry{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/peering/service_countries_mock_test.go b/plugins/source/azure/resources/services/peering/service_countries_mock_test.go index 88a485779f32e3..d40194e105aa8f 100644 --- a/plugins/source/azure/resources/services/peering/service_countries_mock_test.go +++ b/plugins/source/azure/resources/services/peering/service_countries_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/peering/service_locations.go b/plugins/source/azure/resources/services/peering/service_locations.go index 69b4dad772f4e0..6e8044151dfff2 100644 --- a/plugins/source/azure/resources/services/peering/service_locations.go +++ b/plugins/source/azure/resources/services/peering/service_locations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ServiceLocations() *schema.Table { return &schema.Table{ Name: "azure_peering_service_locations", Resolver: fetchServiceLocations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_peering), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_peering_service_locations", client.Namespacemicrosoft_peering), Transform: transformers.TransformWithStruct(&armpeering.ServiceLocation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/peering/service_locations_mock_test.go b/plugins/source/azure/resources/services/peering/service_locations_mock_test.go index ae3eadb8d40b1c..c2297fbeb2f331 100644 --- a/plugins/source/azure/resources/services/peering/service_locations_mock_test.go +++ b/plugins/source/azure/resources/services/peering/service_locations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/peering/service_providers.go b/plugins/source/azure/resources/services/peering/service_providers.go index c4346677f2389c..62861161f2f0c4 100644 --- a/plugins/source/azure/resources/services/peering/service_providers.go +++ b/plugins/source/azure/resources/services/peering/service_providers.go @@ -1,8 +1,6 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( - "context" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,18 +11,21 @@ func ServiceProviders() *schema.Table { return &schema.Table{ Name: "azure_peering_service_providers", Resolver: fetchServiceProviders, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_peering), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_peering_service_providers", client.Namespacemicrosoft_peering), Transform: transformers.TransformWithStruct(&armpeering.ServiceProvider{}), Columns: []schema.Column{ { Name: "subscription_id", Type: schema.TypeString, Resolver: client.ResolveAzureSubscription, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, { - Name: "id", + Name: "name", Type: schema.TypeString, - Resolver: schema.PathResolver("ID"), + Resolver: schema.PathResolver("Name"), CreationOptions: schema.ColumnCreationOptions{ PrimaryKey: true, }, @@ -32,20 +33,3 @@ func ServiceProviders() *schema.Table { }, } } - -func fetchServiceProviders(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - svc, err := armpeering.NewServiceProvidersClient(cl.SubscriptionId, cl.Creds, cl.Options) - if err != nil { - return err - } - pager := svc.NewListPager(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} diff --git a/plugins/source/azure/resources/services/peering/service_providers_fetch.go b/plugins/source/azure/resources/services/peering/service_providers_fetch.go new file mode 100644 index 00000000000000..187cb909a907bb --- /dev/null +++ b/plugins/source/azure/resources/services/peering/service_providers_fetch.go @@ -0,0 +1,26 @@ +package peering + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/cloudquery/plugin-sdk/schema" +) + +func fetchServiceProviders(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + svc, err := armpeering.NewServiceProvidersClient(cl.SubscriptionId, cl.Creds, cl.Options) + if err != nil { + return err + } + pager := svc.NewListPager(nil) + for pager.More() { + p, err := pager.NextPage(ctx) + if err != nil { + return err + } + res <- p.Value + } + return nil +} diff --git a/plugins/source/azure/resources/services/peering/service_providers_mock_test.go b/plugins/source/azure/resources/services/peering/service_providers_mock_test.go index ccd154dbabf648..0df4a507372028 100644 --- a/plugins/source/azure/resources/services/peering/service_providers_mock_test.go +++ b/plugins/source/azure/resources/services/peering/service_providers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package peering import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/policy/assignments.go b/plugins/source/azure/resources/services/policy/assignments.go index 40cbac9b63270f..d0fb26c3bec566 100644 --- a/plugins/source/azure/resources/services/policy/assignments.go +++ b/plugins/source/azure/resources/services/policy/assignments.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Assignments() *schema.Table { return &schema.Table{ Name: "azure_policy_assignments", Resolver: fetchAssignments, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_policy_assignments", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armpolicy.Assignment{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/policy/assignments_mock_test.go b/plugins/source/azure/resources/services/policy/assignments_mock_test.go index c8e97c37c078e7..cfd7d8fce0ccf3 100644 --- a/plugins/source/azure/resources/services/policy/assignments_mock_test.go +++ b/plugins/source/azure/resources/services/policy/assignments_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/policy/data_policy_manifests.go b/plugins/source/azure/resources/services/policy/data_policy_manifests.go index f5355a4c040398..ccaccffe2d4ecd 100644 --- a/plugins/source/azure/resources/services/policy/data_policy_manifests.go +++ b/plugins/source/azure/resources/services/policy/data_policy_manifests.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DataPolicyManifests() *schema.Table { return &schema.Table{ Name: "azure_policy_data_policy_manifests", Resolver: fetchDataPolicyManifests, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_policy_data_policy_manifests", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armpolicy.DataPolicyManifest{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/policy/data_policy_manifests_mock_test.go b/plugins/source/azure/resources/services/policy/data_policy_manifests_mock_test.go index 4b15489a955962..e6ab022832583b 100644 --- a/plugins/source/azure/resources/services/policy/data_policy_manifests_mock_test.go +++ b/plugins/source/azure/resources/services/policy/data_policy_manifests_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/policy/definitions.go b/plugins/source/azure/resources/services/policy/definitions.go index ab0f3617b42020..9ed5392128227d 100644 --- a/plugins/source/azure/resources/services/policy/definitions.go +++ b/plugins/source/azure/resources/services/policy/definitions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Definitions() *schema.Table { return &schema.Table{ Name: "azure_policy_definitions", Resolver: fetchDefinitions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_policy_definitions", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armpolicy.Definition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/policy/definitions_mock_test.go b/plugins/source/azure/resources/services/policy/definitions_mock_test.go index 2511c2e6adec77..d5de98d966c6fb 100644 --- a/plugins/source/azure/resources/services/policy/definitions_mock_test.go +++ b/plugins/source/azure/resources/services/policy/definitions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/policy/exemptions.go b/plugins/source/azure/resources/services/policy/exemptions.go index 53be8afe1a185e..3f434a96c80dbe 100644 --- a/plugins/source/azure/resources/services/policy/exemptions.go +++ b/plugins/source/azure/resources/services/policy/exemptions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Exemptions() *schema.Table { return &schema.Table{ Name: "azure_policy_exemptions", Resolver: fetchExemptions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_policy_exemptions", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armpolicy.Exemption{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/policy/exemptions_mock_test.go b/plugins/source/azure/resources/services/policy/exemptions_mock_test.go index 5c45c678538c89..f86510aebcf45d 100644 --- a/plugins/source/azure/resources/services/policy/exemptions_mock_test.go +++ b/plugins/source/azure/resources/services/policy/exemptions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/policy/set_definitions.go b/plugins/source/azure/resources/services/policy/set_definitions.go index b7b95514a21311..cba6bad33a8a51 100644 --- a/plugins/source/azure/resources/services/policy/set_definitions.go +++ b/plugins/source/azure/resources/services/policy/set_definitions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SetDefinitions() *schema.Table { return &schema.Table{ Name: "azure_policy_set_definitions", Resolver: fetchSetDefinitions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_authorization), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_policy_set_definitions", client.Namespacemicrosoft_authorization), Transform: transformers.TransformWithStruct(&armpolicy.SetDefinition{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/policy/set_definitions_mock_test.go b/plugins/source/azure/resources/services/policy/set_definitions_mock_test.go index 1783285c57342f..de1353e646c52e 100644 --- a/plugins/source/azure/resources/services/policy/set_definitions_mock_test.go +++ b/plugins/source/azure/resources/services/policy/set_definitions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package policy import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations.go b/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations.go index 48685a76d66fdd..cfdea16c3086e2 100644 --- a/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations.go +++ b/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package portal import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/portal/armportal" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ListTenantConfigurationViolations() *schema.Table { return &schema.Table{ Name: "azure_portal_list_tenant_configuration_violations", Resolver: fetchListTenantConfigurationViolations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_portal), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_portal_list_tenant_configuration_violations", client.Namespacemicrosoft_portal), Transform: transformers.TransformWithStruct(&armportal.Violation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations_mock_test.go b/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations_mock_test.go index 993eb0a1164054..e6ccbbc30fe5e8 100644 --- a/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations_mock_test.go +++ b/plugins/source/azure/resources/services/portal/list_tenant_configuration_violations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package portal import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/portal/armportal" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/portal/tenant_configurations.go b/plugins/source/azure/resources/services/portal/tenant_configurations.go index b8cee705bc76d9..96d7f757719afc 100644 --- a/plugins/source/azure/resources/services/portal/tenant_configurations.go +++ b/plugins/source/azure/resources/services/portal/tenant_configurations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package portal import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/portal/armportal" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func TenantConfigurations() *schema.Table { return &schema.Table{ Name: "azure_portal_tenant_configurations", Resolver: fetchTenantConfigurations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_portal), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_portal_tenant_configurations", client.Namespacemicrosoft_portal), Transform: transformers.TransformWithStruct(&armportal.Configuration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/portal/tenant_configurations_mock_test.go b/plugins/source/azure/resources/services/portal/tenant_configurations_mock_test.go index 05855fb91dd324..095347212d392b 100644 --- a/plugins/source/azure/resources/services/portal/tenant_configurations_mock_test.go +++ b/plugins/source/azure/resources/services/portal/tenant_configurations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package portal import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/portal/armportal" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/postgresql/servers.go b/plugins/source/azure/resources/services/postgresql/servers.go index c1ff82f113ebba..4d96b5ba44f6bf 100644 --- a/plugins/source/azure/resources/services/postgresql/servers.go +++ b/plugins/source/azure/resources/services/postgresql/servers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package postgresql import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_postgresql_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbforpostgresql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_postgresql_servers", client.Namespacemicrosoft_dbforpostgresql), Transform: transformers.TransformWithStruct(&armpostgresql.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/postgresql/servers_mock_test.go b/plugins/source/azure/resources/services/postgresql/servers_mock_test.go index d96ba3f6869c21..660305e722e80d 100644 --- a/plugins/source/azure/resources/services/postgresql/servers_mock_test.go +++ b/plugins/source/azure/resources/services/postgresql/servers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package postgresql import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/postgresqlflexibleservers/servers.go b/plugins/source/azure/resources/services/postgresqlflexibleservers/servers.go index 91905ab749a05e..ebe3ed8f9879e5 100644 --- a/plugins/source/azure/resources/services/postgresqlflexibleservers/servers.go +++ b/plugins/source/azure/resources/services/postgresqlflexibleservers/servers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package postgresqlflexibleservers import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_postgresqlflexibleservers_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbforpostgresql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_postgresqlflexibleservers_servers", client.Namespacemicrosoft_dbforpostgresql), Transform: transformers.TransformWithStruct(&armpostgresqlflexibleservers.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/postgresqlflexibleservers/servers_mock_test.go b/plugins/source/azure/resources/services/postgresqlflexibleservers/servers_mock_test.go index 61325bcdc55c99..644a4287954953 100644 --- a/plugins/source/azure/resources/services/postgresqlflexibleservers/servers_mock_test.go +++ b/plugins/source/azure/resources/services/postgresqlflexibleservers/servers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package postgresqlflexibleservers import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/postgresqlhsc/server_groups.go b/plugins/source/azure/resources/services/postgresqlhsc/server_groups.go index 1a953c4b73c8a8..479b5a15a0553d 100644 --- a/plugins/source/azure/resources/services/postgresqlhsc/server_groups.go +++ b/plugins/source/azure/resources/services/postgresqlhsc/server_groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package postgresqlhsc import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ServerGroups() *schema.Table { return &schema.Table{ Name: "azure_postgresqlhsc_server_groups", Resolver: fetchServerGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_dbforpostgresql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_postgresqlhsc_server_groups", client.Namespacemicrosoft_dbforpostgresql), Transform: transformers.TransformWithStruct(&armpostgresqlhsc.ServerGroup{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/postgresqlhsc/server_groups_mock_test.go b/plugins/source/azure/resources/services/postgresqlhsc/server_groups_mock_test.go index 41c9a9a6264020..fd80a5c6ab8e31 100644 --- a/plugins/source/azure/resources/services/postgresqlhsc/server_groups_mock_test.go +++ b/plugins/source/azure/resources/services/postgresqlhsc/server_groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package postgresqlhsc import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/powerbidedicated/capacities.go b/plugins/source/azure/resources/services/powerbidedicated/capacities.go index 5b052bf81c8cb3..e601c686430e84 100644 --- a/plugins/source/azure/resources/services/powerbidedicated/capacities.go +++ b/plugins/source/azure/resources/services/powerbidedicated/capacities.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package powerbidedicated import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Capacities() *schema.Table { return &schema.Table{ Name: "azure_powerbidedicated_capacities", Resolver: fetchCapacities, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_powerbidedicated), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_powerbidedicated_capacities", client.Namespacemicrosoft_powerbidedicated), Transform: transformers.TransformWithStruct(&armpowerbidedicated.DedicatedCapacity{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/powerbidedicated/capacities_mock_test.go b/plugins/source/azure/resources/services/powerbidedicated/capacities_mock_test.go index 4ee8500e7395e8..8354f774aa522f 100644 --- a/plugins/source/azure/resources/services/powerbidedicated/capacities_mock_test.go +++ b/plugins/source/azure/resources/services/powerbidedicated/capacities_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package powerbidedicated import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/powerbidedicated/armpowerbidedicated" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/privatedns/private_zones.go b/plugins/source/azure/resources/services/privatedns/private_zones.go index f6bd3b0042cd24..9e2a7c1d7c96a4 100644 --- a/plugins/source/azure/resources/services/privatedns/private_zones.go +++ b/plugins/source/azure/resources/services/privatedns/private_zones.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package privatedns import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PrivateZones() *schema.Table { return &schema.Table{ Name: "azure_privatedns_private_zones", Resolver: fetchPrivateZones, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_network), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_privatedns_private_zones", client.Namespacemicrosoft_network), Transform: transformers.TransformWithStruct(&armprivatedns.PrivateZone{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/privatedns/private_zones_mock_test.go b/plugins/source/azure/resources/services/privatedns/private_zones_mock_test.go index 2a21433f826778..f7f3281fde2e1f 100644 --- a/plugins/source/azure/resources/services/privatedns/private_zones_mock_test.go +++ b/plugins/source/azure/resources/services/privatedns/private_zones_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package privatedns import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/providerhub/provider_registrations.go b/plugins/source/azure/resources/services/providerhub/provider_registrations.go index 870915d61ce7b8..2a0dfe6e364f70 100644 --- a/plugins/source/azure/resources/services/providerhub/provider_registrations.go +++ b/plugins/source/azure/resources/services/providerhub/provider_registrations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package providerhub import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/providerhub/armproviderhub" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ProviderRegistrations() *schema.Table { return &schema.Table{ Name: "azure_providerhub_provider_registrations", Resolver: fetchProviderRegistrations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_providerhub), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_providerhub_provider_registrations", client.Namespacemicrosoft_providerhub), Transform: transformers.TransformWithStruct(&armproviderhub.ProviderRegistration{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/providerhub/provider_registrations_mock_test.go b/plugins/source/azure/resources/services/providerhub/provider_registrations_mock_test.go index e6dcb8e2f53883..c5c556ec5bc637 100644 --- a/plugins/source/azure/resources/services/providerhub/provider_registrations_mock_test.go +++ b/plugins/source/azure/resources/services/providerhub/provider_registrations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package providerhub import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/providerhub/armproviderhub" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters.go b/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters.go index 9cd73da92dd2f4..6e2169554361be 100644 --- a/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters.go +++ b/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package redhatopenshift import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func OpenShiftClusters() *schema.Table { return &schema.Table{ Name: "azure_redhatopenshift_open_shift_clusters", Resolver: fetchOpenShiftClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_redhatopenshift), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_redhatopenshift_open_shift_clusters", client.Namespacemicrosoft_redhatopenshift), Transform: transformers.TransformWithStruct(&armredhatopenshift.OpenShiftCluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters_mock_test.go b/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters_mock_test.go index 90e1c1c474743f..0174fd27a695c9 100644 --- a/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters_mock_test.go +++ b/plugins/source/azure/resources/services/redhatopenshift/open_shift_clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package redhatopenshift import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redhatopenshift/armredhatopenshift" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/redis/caches.go b/plugins/source/azure/resources/services/redis/caches.go index 239bada9b790c1..ec56c4cb01ec3e 100644 --- a/plugins/source/azure/resources/services/redis/caches.go +++ b/plugins/source/azure/resources/services/redis/caches.go @@ -13,7 +13,7 @@ func Caches() *schema.Table { return &schema.Table{ Name: "azure_redis_caches", Resolver: fetchCaches, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_cache), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_redis_caches", client.Namespacemicrosoft_cache), Transform: transformers.TransformWithStruct(&armredis.ResourceInfo{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/relay/namespaces.go b/plugins/source/azure/resources/services/relay/namespaces.go index 98adbe7f6c1734..2c74660473f933 100644 --- a/plugins/source/azure/resources/services/relay/namespaces.go +++ b/plugins/source/azure/resources/services/relay/namespaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package relay import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Namespaces() *schema.Table { return &schema.Table{ Name: "azure_relay_namespaces", Resolver: fetchNamespaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_relay), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_relay_namespaces", client.Namespacemicrosoft_relay), Transform: transformers.TransformWithStruct(&armrelay.Namespace{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/relay/namespaces_mock_test.go b/plugins/source/azure/resources/services/relay/namespaces_mock_test.go index 1306943851f635..f16514de36115f 100644 --- a/plugins/source/azure/resources/services/relay/namespaces_mock_test.go +++ b/plugins/source/azure/resources/services/relay/namespaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package relay import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/relay/armrelay" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/reservations/reservation.go b/plugins/source/azure/resources/services/reservations/reservation.go index a3a3e9b2dfa2cf..ed3dd03781e8f9 100644 --- a/plugins/source/azure/resources/services/reservations/reservation.go +++ b/plugins/source/azure/resources/services/reservations/reservation.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package reservations import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Reservation() *schema.Table { return &schema.Table{ Name: "azure_reservations_reservation", Resolver: fetchReservation, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_capacity), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_reservations_reservation", client.Namespacemicrosoft_capacity), Transform: transformers.TransformWithStruct(&armreservations.ReservationResponse{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/reservations/reservation_mock_test.go b/plugins/source/azure/resources/services/reservations/reservation_mock_test.go index 83554192b190fc..e4f093859c29c2 100644 --- a/plugins/source/azure/resources/services/reservations/reservation_mock_test.go +++ b/plugins/source/azure/resources/services/reservations/reservation_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package reservations import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/reservations/reservation_order.go b/plugins/source/azure/resources/services/reservations/reservation_order.go index 216bcbcf94562e..a4cd971f6cd834 100644 --- a/plugins/source/azure/resources/services/reservations/reservation_order.go +++ b/plugins/source/azure/resources/services/reservations/reservation_order.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package reservations import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ReservationOrder() *schema.Table { return &schema.Table{ Name: "azure_reservations_reservation_order", Resolver: fetchReservationOrder, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_capacity), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_reservations_reservation_order", client.Namespacemicrosoft_capacity), Transform: transformers.TransformWithStruct(&armreservations.ReservationOrderResponse{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/reservations/reservation_order_mock_test.go b/plugins/source/azure/resources/services/reservations/reservation_order_mock_test.go index ae9f411fa72e2e..fab7c962218e0d 100644 --- a/plugins/source/azure/resources/services/reservations/reservation_order_mock_test.go +++ b/plugins/source/azure/resources/services/reservations/reservation_order_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package reservations import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/saas/resources.go b/plugins/source/azure/resources/services/saas/resources.go index 1fd3209d125901..6fe765ea3734a9 100644 --- a/plugins/source/azure/resources/services/saas/resources.go +++ b/plugins/source/azure/resources/services/saas/resources.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package saas import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Resources() *schema.Table { return &schema.Table{ Name: "azure_saas_resources", Resolver: fetchResources, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_saas), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_saas_resources", client.Namespacemicrosoft_saas), Transform: transformers.TransformWithStruct(&armsaas.Resource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/saas/resources_mock_test.go b/plugins/source/azure/resources/services/saas/resources_mock_test.go index 2f03229d316081..61e183bb7e4042 100644 --- a/plugins/source/azure/resources/services/saas/resources_mock_test.go +++ b/plugins/source/azure/resources/services/saas/resources_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package saas import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/search/services.go b/plugins/source/azure/resources/services/search/services.go index 5b2d60c8a2c65c..86881fb3e8bd96 100644 --- a/plugins/source/azure/resources/services/search/services.go +++ b/plugins/source/azure/resources/services/search/services.go @@ -11,7 +11,7 @@ func Services() *schema.Table { return &schema.Table{ Name: "azure_search_services", Resolver: fetchServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_search), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_search_services", client.Namespacemicrosoft_search), Transform: transformers.TransformWithStruct(&armsearch.Service{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/alerts.go b/plugins/source/azure/resources/services/security/alerts.go index 20d0deb2d3456b..8d1f9f5362a78f 100644 --- a/plugins/source/azure/resources/services/security/alerts.go +++ b/plugins/source/azure/resources/services/security/alerts.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Alerts() *schema.Table { return &schema.Table{ Name: "azure_security_alerts", Resolver: fetchAlerts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_alerts", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Alert{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/alerts_mock_test.go b/plugins/source/azure/resources/services/security/alerts_mock_test.go index 427ad19d66eb2c..6551d63694bffa 100644 --- a/plugins/source/azure/resources/services/security/alerts_mock_test.go +++ b/plugins/source/azure/resources/services/security/alerts_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/alerts_suppression_rules.go b/plugins/source/azure/resources/services/security/alerts_suppression_rules.go index 4397daa468f8b8..90abb528650107 100644 --- a/plugins/source/azure/resources/services/security/alerts_suppression_rules.go +++ b/plugins/source/azure/resources/services/security/alerts_suppression_rules.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AlertsSuppressionRules() *schema.Table { return &schema.Table{ Name: "azure_security_alerts_suppression_rules", Resolver: fetchAlertsSuppressionRules, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_alerts_suppression_rules", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.AlertsSuppressionRule{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/alerts_suppression_rules_mock_test.go b/plugins/source/azure/resources/services/security/alerts_suppression_rules_mock_test.go index d06685bd52e93f..2515bed9792639 100644 --- a/plugins/source/azure/resources/services/security/alerts_suppression_rules_mock_test.go +++ b/plugins/source/azure/resources/services/security/alerts_suppression_rules_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/allowed_connections.go b/plugins/source/azure/resources/services/security/allowed_connections.go index 4afac2cf6acd96..27e3ee5e30fcbe 100644 --- a/plugins/source/azure/resources/services/security/allowed_connections.go +++ b/plugins/source/azure/resources/services/security/allowed_connections.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AllowedConnections() *schema.Table { return &schema.Table{ Name: "azure_security_allowed_connections", Resolver: fetchAllowedConnections, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_allowed_connections", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.AllowedConnectionsResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/allowed_connections_mock_test.go b/plugins/source/azure/resources/services/security/allowed_connections_mock_test.go index bdd5f9c627d50e..fd1ce17453072f 100644 --- a/plugins/source/azure/resources/services/security/allowed_connections_mock_test.go +++ b/plugins/source/azure/resources/services/security/allowed_connections_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/applications.go b/plugins/source/azure/resources/services/security/applications.go index 9fc0b0cd68ef63..41bfe6f88ae893 100644 --- a/plugins/source/azure/resources/services/security/applications.go +++ b/plugins/source/azure/resources/services/security/applications.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Applications() *schema.Table { return &schema.Table{ Name: "azure_security_applications", Resolver: fetchApplications, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_applications", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Application{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/applications_mock_test.go b/plugins/source/azure/resources/services/security/applications_mock_test.go index 263200006e6ca7..cf8e9cd4d533c8 100644 --- a/plugins/source/azure/resources/services/security/applications_mock_test.go +++ b/plugins/source/azure/resources/services/security/applications_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/assessments_metadata.go b/plugins/source/azure/resources/services/security/assessments_metadata.go index 1ff2d89ea7054c..e77861339334bf 100644 --- a/plugins/source/azure/resources/services/security/assessments_metadata.go +++ b/plugins/source/azure/resources/services/security/assessments_metadata.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AssessmentsMetadata() *schema.Table { return &schema.Table{ Name: "azure_security_assessments_metadata", Resolver: fetchAssessmentsMetadata, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_assessments_metadata", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.AssessmentMetadataResponse{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/assessments_metadata_mock_test.go b/plugins/source/azure/resources/services/security/assessments_metadata_mock_test.go index 7f6a9a156ade27..76fe2ff3edd03f 100644 --- a/plugins/source/azure/resources/services/security/assessments_metadata_mock_test.go +++ b/plugins/source/azure/resources/services/security/assessments_metadata_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/auto_provisioning_settings.go b/plugins/source/azure/resources/services/security/auto_provisioning_settings.go index dd3ffc46fb27fe..bc1b8b3c237061 100644 --- a/plugins/source/azure/resources/services/security/auto_provisioning_settings.go +++ b/plugins/source/azure/resources/services/security/auto_provisioning_settings.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func AutoProvisioningSettings() *schema.Table { return &schema.Table{ Name: "azure_security_auto_provisioning_settings", Resolver: fetchAutoProvisioningSettings, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_auto_provisioning_settings", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.AutoProvisioningSetting{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/auto_provisioning_settings_mock_test.go b/plugins/source/azure/resources/services/security/auto_provisioning_settings_mock_test.go index 4243e7232c56de..4a72698aad5c68 100644 --- a/plugins/source/azure/resources/services/security/auto_provisioning_settings_mock_test.go +++ b/plugins/source/azure/resources/services/security/auto_provisioning_settings_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/automations.go b/plugins/source/azure/resources/services/security/automations.go index 3b5d622dcbe635..c1c30ef08752bc 100644 --- a/plugins/source/azure/resources/services/security/automations.go +++ b/plugins/source/azure/resources/services/security/automations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Automations() *schema.Table { return &schema.Table{ Name: "azure_security_automations", Resolver: fetchAutomations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_automations", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Automation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/automations_mock_test.go b/plugins/source/azure/resources/services/security/automations_mock_test.go index 9c3c7a7dda30d9..9cb253b4fbf857 100644 --- a/plugins/source/azure/resources/services/security/automations_mock_test.go +++ b/plugins/source/azure/resources/services/security/automations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/connectors.go b/plugins/source/azure/resources/services/security/connectors.go index 53bf415043076b..8306cbfd1cc46b 100644 --- a/plugins/source/azure/resources/services/security/connectors.go +++ b/plugins/source/azure/resources/services/security/connectors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Connectors() *schema.Table { return &schema.Table{ Name: "azure_security_connectors", Resolver: fetchConnectors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_connectors", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Connector{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/connectors_mock_test.go b/plugins/source/azure/resources/services/security/connectors_mock_test.go index 963b83d065f6f1..f5bc68a4f8d5b7 100644 --- a/plugins/source/azure/resources/services/security/connectors_mock_test.go +++ b/plugins/source/azure/resources/services/security/connectors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/discovered_security_solutions.go b/plugins/source/azure/resources/services/security/discovered_security_solutions.go index 531507e11a4e34..c6a3f37530cdc8 100644 --- a/plugins/source/azure/resources/services/security/discovered_security_solutions.go +++ b/plugins/source/azure/resources/services/security/discovered_security_solutions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func DiscoveredSecuritySolutions() *schema.Table { return &schema.Table{ Name: "azure_security_discovered_security_solutions", Resolver: fetchDiscoveredSecuritySolutions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_discovered_security_solutions", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.DiscoveredSecuritySolution{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/discovered_security_solutions_mock_test.go b/plugins/source/azure/resources/services/security/discovered_security_solutions_mock_test.go index 7a24a4916ce61b..574f84c636b8f8 100644 --- a/plugins/source/azure/resources/services/security/discovered_security_solutions_mock_test.go +++ b/plugins/source/azure/resources/services/security/discovered_security_solutions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/external_security_solutions.go b/plugins/source/azure/resources/services/security/external_security_solutions.go index 6e4fc42a7e72f0..2fd8991db252b1 100644 --- a/plugins/source/azure/resources/services/security/external_security_solutions.go +++ b/plugins/source/azure/resources/services/security/external_security_solutions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ExternalSecuritySolutions() *schema.Table { return &schema.Table{ Name: "azure_security_external_security_solutions", Resolver: fetchExternalSecuritySolutions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_external_security_solutions", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.ExternalSecuritySolution{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/external_security_solutions_mock_test.go b/plugins/source/azure/resources/services/security/external_security_solutions_mock_test.go index 438c3f46f92c52..16525dcb0a427d 100644 --- a/plugins/source/azure/resources/services/security/external_security_solutions_mock_test.go +++ b/plugins/source/azure/resources/services/security/external_security_solutions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/governance_rule.go b/plugins/source/azure/resources/services/security/governance_rule.go index 51afe9d7f54347..f2644b763e4e8a 100644 --- a/plugins/source/azure/resources/services/security/governance_rule.go +++ b/plugins/source/azure/resources/services/security/governance_rule.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func GovernanceRule() *schema.Table { return &schema.Table{ Name: "azure_security_governance_rule", Resolver: fetchGovernanceRule, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_governance_rule", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.GovernanceRule{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/governance_rule_mock_test.go b/plugins/source/azure/resources/services/security/governance_rule_mock_test.go index 3cb631338ddf28..4758005841ffaa 100644 --- a/plugins/source/azure/resources/services/security/governance_rule_mock_test.go +++ b/plugins/source/azure/resources/services/security/governance_rule_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/jit_network_access_policies.go b/plugins/source/azure/resources/services/security/jit_network_access_policies.go index 937168f4e50436..ca6168497185a0 100644 --- a/plugins/source/azure/resources/services/security/jit_network_access_policies.go +++ b/plugins/source/azure/resources/services/security/jit_network_access_policies.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func JitNetworkAccessPolicies() *schema.Table { return &schema.Table{ Name: "azure_security_jit_network_access_policies", Resolver: fetchJitNetworkAccessPolicies, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_jit_network_access_policies", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.JitNetworkAccessPolicy{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/jit_network_access_policies_mock_test.go b/plugins/source/azure/resources/services/security/jit_network_access_policies_mock_test.go index 31c0243828ad0e..fe2c5a83817423 100644 --- a/plugins/source/azure/resources/services/security/jit_network_access_policies_mock_test.go +++ b/plugins/source/azure/resources/services/security/jit_network_access_policies_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/locations.go b/plugins/source/azure/resources/services/security/locations.go index 51c88bb43c8c08..4418a4a3fa13b1 100644 --- a/plugins/source/azure/resources/services/security/locations.go +++ b/plugins/source/azure/resources/services/security/locations.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Locations() *schema.Table { return &schema.Table{ Name: "azure_security_locations", Resolver: fetchLocations, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_locations", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.AscLocation{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/locations_mock_test.go b/plugins/source/azure/resources/services/security/locations_mock_test.go index c1f9e6299ef321..6f6382f1b5ac6f 100644 --- a/plugins/source/azure/resources/services/security/locations_mock_test.go +++ b/plugins/source/azure/resources/services/security/locations_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/pricings.go b/plugins/source/azure/resources/services/security/pricings.go index 24be0258f0faa7..b3da61c3e840b6 100644 --- a/plugins/source/azure/resources/services/security/pricings.go +++ b/plugins/source/azure/resources/services/security/pricings.go @@ -11,7 +11,7 @@ func Pricings() *schema.Table { return &schema.Table{ Name: "azure_security_pricings", Resolver: fetchPricings, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_pricings", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Pricing{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/regulatory_compliance_standards.go b/plugins/source/azure/resources/services/security/regulatory_compliance_standards.go index 767b2ba2b7335e..bcf11a811f7212 100644 --- a/plugins/source/azure/resources/services/security/regulatory_compliance_standards.go +++ b/plugins/source/azure/resources/services/security/regulatory_compliance_standards.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func RegulatoryComplianceStandards() *schema.Table { return &schema.Table{ Name: "azure_security_regulatory_compliance_standards", Resolver: fetchRegulatoryComplianceStandards, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_regulatory_compliance_standards", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.RegulatoryComplianceStandard{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/regulatory_compliance_standards_mock_test.go b/plugins/source/azure/resources/services/security/regulatory_compliance_standards_mock_test.go index e3f8d30c47c43f..fd308ac6ebc62a 100644 --- a/plugins/source/azure/resources/services/security/regulatory_compliance_standards_mock_test.go +++ b/plugins/source/azure/resources/services/security/regulatory_compliance_standards_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/secure_score_control_definitions.go b/plugins/source/azure/resources/services/security/secure_score_control_definitions.go index 4bcdce955ab28f..fe02de407408f5 100644 --- a/plugins/source/azure/resources/services/security/secure_score_control_definitions.go +++ b/plugins/source/azure/resources/services/security/secure_score_control_definitions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SecureScoreControlDefinitions() *schema.Table { return &schema.Table{ Name: "azure_security_secure_score_control_definitions", Resolver: fetchSecureScoreControlDefinitions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_secure_score_control_definitions", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.SecureScoreControlDefinitionItem{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/secure_score_control_definitions_mock_test.go b/plugins/source/azure/resources/services/security/secure_score_control_definitions_mock_test.go index 6c48632a79ab89..367bcd9618d1f9 100644 --- a/plugins/source/azure/resources/services/security/secure_score_control_definitions_mock_test.go +++ b/plugins/source/azure/resources/services/security/secure_score_control_definitions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/secure_score_controls.go b/plugins/source/azure/resources/services/security/secure_score_controls.go index 78938c6fdc6c62..e5d190245eb937 100644 --- a/plugins/source/azure/resources/services/security/secure_score_controls.go +++ b/plugins/source/azure/resources/services/security/secure_score_controls.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SecureScoreControls() *schema.Table { return &schema.Table{ Name: "azure_security_secure_score_controls", Resolver: fetchSecureScoreControls, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_secure_score_controls", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.SecureScoreControlDetails{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/secure_score_controls_mock_test.go b/plugins/source/azure/resources/services/security/secure_score_controls_mock_test.go index b57d8fa28afe34..0a9310a0890976 100644 --- a/plugins/source/azure/resources/services/security/secure_score_controls_mock_test.go +++ b/plugins/source/azure/resources/services/security/secure_score_controls_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/secure_scores.go b/plugins/source/azure/resources/services/security/secure_scores.go index 4a219ae624eeb5..dc65e2a12e091a 100644 --- a/plugins/source/azure/resources/services/security/secure_scores.go +++ b/plugins/source/azure/resources/services/security/secure_scores.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SecureScores() *schema.Table { return &schema.Table{ Name: "azure_security_secure_scores", Resolver: fetchSecureScores, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_secure_scores", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.SecureScoreItem{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/secure_scores_mock_test.go b/plugins/source/azure/resources/services/security/secure_scores_mock_test.go index 2b81eaaf1d0a50..ffc633d4877810 100644 --- a/plugins/source/azure/resources/services/security/secure_scores_mock_test.go +++ b/plugins/source/azure/resources/services/security/secure_scores_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/solutions.go b/plugins/source/azure/resources/services/security/solutions.go index 0035f7c65b095b..c3457f7c894c86 100644 --- a/plugins/source/azure/resources/services/security/solutions.go +++ b/plugins/source/azure/resources/services/security/solutions.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Solutions() *schema.Table { return &schema.Table{ Name: "azure_security_solutions", Resolver: fetchSolutions, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_solutions", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Solution{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/solutions_mock_test.go b/plugins/source/azure/resources/services/security/solutions_mock_test.go index bad51f9152fbf0..3298e70767982f 100644 --- a/plugins/source/azure/resources/services/security/solutions_mock_test.go +++ b/plugins/source/azure/resources/services/security/solutions_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/tasks.go b/plugins/source/azure/resources/services/security/tasks.go index e6a72b1e17ef46..df7d9bebf9d6a4 100644 --- a/plugins/source/azure/resources/services/security/tasks.go +++ b/plugins/source/azure/resources/services/security/tasks.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Tasks() *schema.Table { return &schema.Table{ Name: "azure_security_tasks", Resolver: fetchTasks, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_tasks", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.Task{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/tasks_mock_test.go b/plugins/source/azure/resources/services/security/tasks_mock_test.go index ba22bf330ff660..8dc608d412f1fe 100644 --- a/plugins/source/azure/resources/services/security/tasks_mock_test.go +++ b/plugins/source/azure/resources/services/security/tasks_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/topology.go b/plugins/source/azure/resources/services/security/topology.go index d39af4e6d7e8ca..260a8e37b2f88c 100644 --- a/plugins/source/azure/resources/services/security/topology.go +++ b/plugins/source/azure/resources/services/security/topology.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Topology() *schema.Table { return &schema.Table{ Name: "azure_security_topology", Resolver: fetchTopology, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_topology", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.TopologyResource{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/topology_mock_test.go b/plugins/source/azure/resources/services/security/topology_mock_test.go index a50f91b8ce594e..a294e2617921ad 100644 --- a/plugins/source/azure/resources/services/security/topology_mock_test.go +++ b/plugins/source/azure/resources/services/security/topology_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/security/workspace_settings.go b/plugins/source/azure/resources/services/security/workspace_settings.go index 4ff9749540ea3e..798beb9c6694a2 100644 --- a/plugins/source/azure/resources/services/security/workspace_settings.go +++ b/plugins/source/azure/resources/services/security/workspace_settings.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func WorkspaceSettings() *schema.Table { return &schema.Table{ Name: "azure_security_workspace_settings", Resolver: fetchWorkspaceSettings, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_security), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_security_workspace_settings", client.Namespacemicrosoft_security), Transform: transformers.TransformWithStruct(&armsecurity.WorkspaceSetting{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/security/workspace_settings_mock_test.go b/plugins/source/azure/resources/services/security/workspace_settings_mock_test.go index 8e1070aa9c5738..f4a80449d48050 100644 --- a/plugins/source/azure/resources/services/security/workspace_settings_mock_test.go +++ b/plugins/source/azure/resources/services/security/workspace_settings_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package security import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/servicebus/namespaces.go b/plugins/source/azure/resources/services/servicebus/namespaces.go index 3a3756bcf7564d..9602f55494ddcc 100644 --- a/plugins/source/azure/resources/services/servicebus/namespaces.go +++ b/plugins/source/azure/resources/services/servicebus/namespaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package servicebus import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Namespaces() *schema.Table { return &schema.Table{ Name: "azure_servicebus_namespaces", Resolver: fetchNamespaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_servicebus), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_servicebus_namespaces", client.Namespacemicrosoft_servicebus), Transform: transformers.TransformWithStruct(&armservicebus.SBNamespace{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/servicebus/namespaces_mock_test.go b/plugins/source/azure/resources/services/servicebus/namespaces_mock_test.go index b2b7e4c8495183..78083b49b9629e 100644 --- a/plugins/source/azure/resources/services/servicebus/namespaces_mock_test.go +++ b/plugins/source/azure/resources/services/servicebus/namespaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package servicebus import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sql/instance_pools.go b/plugins/source/azure/resources/services/sql/instance_pools.go index 6bc7f19343fa91..8f8d4027960921 100644 --- a/plugins/source/azure/resources/services/sql/instance_pools.go +++ b/plugins/source/azure/resources/services/sql/instance_pools.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func InstancePools() *schema.Table { return &schema.Table{ Name: "azure_sql_instance_pools", Resolver: fetchInstancePools, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sql_instance_pools", client.Namespacemicrosoft_sql), Transform: transformers.TransformWithStruct(&armsql.InstancePool{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sql/instance_pools_mock_test.go b/plugins/source/azure/resources/services/sql/instance_pools_mock_test.go index 9fa4c34c281786..501898eb7ea3b7 100644 --- a/plugins/source/azure/resources/services/sql/instance_pools_mock_test.go +++ b/plugins/source/azure/resources/services/sql/instance_pools_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sql/managed_instances.go b/plugins/source/azure/resources/services/sql/managed_instances.go index aa9946bff5bf9d..7c93d38a2aef6e 100644 --- a/plugins/source/azure/resources/services/sql/managed_instances.go +++ b/plugins/source/azure/resources/services/sql/managed_instances.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func ManagedInstances() *schema.Table { return &schema.Table{ Name: "azure_sql_managed_instances", Resolver: fetchManagedInstances, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sql_managed_instances", client.Namespacemicrosoft_sql), Transform: transformers.TransformWithStruct(&armsql.ManagedInstance{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sql/managed_instances_mock_test.go b/plugins/source/azure/resources/services/sql/managed_instances_mock_test.go index adaaf2443c5912..22f8586263f67e 100644 --- a/plugins/source/azure/resources/services/sql/managed_instances_mock_test.go +++ b/plugins/source/azure/resources/services/sql/managed_instances_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sql/servers.go b/plugins/source/azure/resources/services/sql/servers.go index 5eb5f3b9e538a0..39f89972ac3e23 100644 --- a/plugins/source/azure/resources/services/sql/servers.go +++ b/plugins/source/azure/resources/services/sql/servers.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Servers() *schema.Table { return &schema.Table{ Name: "azure_sql_servers", Resolver: fetchServers, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sql_servers", client.Namespacemicrosoft_sql), Transform: transformers.TransformWithStruct(&armsql.Server{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sql/servers_mock_test.go b/plugins/source/azure/resources/services/sql/servers_mock_test.go index cdfe6417d3b3f0..246b5d2d9f44d6 100644 --- a/plugins/source/azure/resources/services/sql/servers_mock_test.go +++ b/plugins/source/azure/resources/services/sql/servers_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sql/virtual_clusters.go b/plugins/source/azure/resources/services/sql/virtual_clusters.go index 076a43897132c5..91ca8299188ed9 100644 --- a/plugins/source/azure/resources/services/sql/virtual_clusters.go +++ b/plugins/source/azure/resources/services/sql/virtual_clusters.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func VirtualClusters() *schema.Table { return &schema.Table{ Name: "azure_sql_virtual_clusters", Resolver: fetchVirtualClusters, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sql), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sql_virtual_clusters", client.Namespacemicrosoft_sql), Transform: transformers.TransformWithStruct(&armsql.VirtualCluster{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sql/virtual_clusters_mock_test.go b/plugins/source/azure/resources/services/sql/virtual_clusters_mock_test.go index 7ba9d5a21fa6fa..7ff48f5827c6a8 100644 --- a/plugins/source/azure/resources/services/sql/virtual_clusters_mock_test.go +++ b/plugins/source/azure/resources/services/sql/virtual_clusters_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sql import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sqlvirtualmachine/groups.go b/plugins/source/azure/resources/services/sqlvirtualmachine/groups.go index 7d3c7be7e11f38..d2aee9a5a2e6ae 100644 --- a/plugins/source/azure/resources/services/sqlvirtualmachine/groups.go +++ b/plugins/source/azure/resources/services/sqlvirtualmachine/groups.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sqlvirtualmachine import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sqlvirtualmachine/armsqlvirtualmachine" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Groups() *schema.Table { return &schema.Table{ Name: "azure_sqlvirtualmachine_groups", Resolver: fetchGroups, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sqlvirtualmachine), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sqlvirtualmachine_groups", client.Namespacemicrosoft_sqlvirtualmachine), Transform: transformers.TransformWithStruct(&armsqlvirtualmachine.Group{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sqlvirtualmachine/groups_mock_test.go b/plugins/source/azure/resources/services/sqlvirtualmachine/groups_mock_test.go index 74d1fa7c45f5dd..aa8c3a390260fb 100644 --- a/plugins/source/azure/resources/services/sqlvirtualmachine/groups_mock_test.go +++ b/plugins/source/azure/resources/services/sqlvirtualmachine/groups_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sqlvirtualmachine import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sqlvirtualmachine/armsqlvirtualmachine" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines.go b/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines.go index 4cc39e7903e0b9..38fdd97e5da446 100644 --- a/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines.go +++ b/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package sqlvirtualmachine import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sqlvirtualmachine/armsqlvirtualmachine" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func SqlVirtualMachines() *schema.Table { return &schema.Table{ Name: "azure_sqlvirtualmachine_sql_virtual_machines", Resolver: fetchSqlVirtualMachines, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_sqlvirtualmachine), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_sqlvirtualmachine_sql_virtual_machines", client.Namespacemicrosoft_sqlvirtualmachine), Transform: transformers.TransformWithStruct(&armsqlvirtualmachine.SQLVirtualMachine{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines_mock_test.go b/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines_mock_test.go index bb965bd12c4ef7..7a81b56c3ad39b 100644 --- a/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines_mock_test.go +++ b/plugins/source/azure/resources/services/sqlvirtualmachine/sql_virtual_machines_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package sqlvirtualmachine import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sqlvirtualmachine/armsqlvirtualmachine" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/storage/accounts.go b/plugins/source/azure/resources/services/storage/accounts.go index 63f3307d5948e5..50438bd51c3492 100644 --- a/plugins/source/azure/resources/services/storage/accounts.go +++ b/plugins/source/azure/resources/services/storage/accounts.go @@ -13,7 +13,7 @@ func Accounts() *schema.Table { return &schema.Table{ Name: "azure_storage_accounts", Resolver: fetchAccounts, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_storage), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_storage_accounts", client.Namespacemicrosoft_storage), Transform: transformers.TransformWithStruct(&armstorage.Account{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/storagecache/caches.go b/plugins/source/azure/resources/services/storagecache/caches.go index 7603f1b94219c8..c409b66ba88138 100644 --- a/plugins/source/azure/resources/services/storagecache/caches.go +++ b/plugins/source/azure/resources/services/storagecache/caches.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package storagecache import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Caches() *schema.Table { return &schema.Table{ Name: "azure_storagecache_caches", Resolver: fetchCaches, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_storagecache), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_storagecache_caches", client.Namespacemicrosoft_storagecache), Transform: transformers.TransformWithStruct(&armstoragecache.Cache{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/storagecache/caches_mock_test.go b/plugins/source/azure/resources/services/storagecache/caches_mock_test.go index 390fa1e72b34b2..e4df72d327649d 100644 --- a/plugins/source/azure/resources/services/storagecache/caches_mock_test.go +++ b/plugins/source/azure/resources/services/storagecache/caches_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package storagecache import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/streamanalytics/streaming_jobs.go b/plugins/source/azure/resources/services/streamanalytics/streaming_jobs.go index e64eebd567a676..3e2b7c43f03e3d 100644 --- a/plugins/source/azure/resources/services/streamanalytics/streaming_jobs.go +++ b/plugins/source/azure/resources/services/streamanalytics/streaming_jobs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package streamanalytics import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func StreamingJobs() *schema.Table { return &schema.Table{ Name: "azure_streamanalytics_streaming_jobs", Resolver: fetchStreamingJobs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_streamanalytics), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_streamanalytics_streaming_jobs", client.Namespacemicrosoft_streamanalytics), Transform: transformers.TransformWithStruct(&armstreamanalytics.StreamingJob{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/streamanalytics/streaming_jobs_mock_test.go b/plugins/source/azure/resources/services/streamanalytics/streaming_jobs_mock_test.go index f4d744725f468b..d332d322cae635 100644 --- a/plugins/source/azure/resources/services/streamanalytics/streaming_jobs_mock_test.go +++ b/plugins/source/azure/resources/services/streamanalytics/streaming_jobs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package streamanalytics import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/support/services.go b/plugins/source/azure/resources/services/support/services.go index aa234f0b0c6173..ed530c6c5c8877 100644 --- a/plugins/source/azure/resources/services/support/services.go +++ b/plugins/source/azure/resources/services/support/services.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package support import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Services() *schema.Table { return &schema.Table{ Name: "azure_support_services", Resolver: fetchServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_support), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_support_services", client.Namespacemicrosoft_support), Transform: transformers.TransformWithStruct(&armsupport.Service{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/support/services_mock_test.go b/plugins/source/azure/resources/services/support/services_mock_test.go index fd8a3d0fa640f1..bf2be2e5673873 100644 --- a/plugins/source/azure/resources/services/support/services_mock_test.go +++ b/plugins/source/azure/resources/services/support/services_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package support import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/support/tickets.go b/plugins/source/azure/resources/services/support/tickets.go index 5308e218c5b14e..fa9fdd60f75570 100644 --- a/plugins/source/azure/resources/services/support/tickets.go +++ b/plugins/source/azure/resources/services/support/tickets.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package support import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Tickets() *schema.Table { return &schema.Table{ Name: "azure_support_tickets", Resolver: fetchTickets, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_support), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_support_tickets", client.Namespacemicrosoft_support), Transform: transformers.TransformWithStruct(&armsupport.TicketDetails{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/support/tickets_mock_test.go b/plugins/source/azure/resources/services/support/tickets_mock_test.go index 7e65f58472063c..5bff48a1dd4c61 100644 --- a/plugins/source/azure/resources/services/support/tickets_mock_test.go +++ b/plugins/source/azure/resources/services/support/tickets_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package support import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/synapse/private_link_hubs.go b/plugins/source/azure/resources/services/synapse/private_link_hubs.go index 670fadf9426fd1..bfdefc518e2bdb 100644 --- a/plugins/source/azure/resources/services/synapse/private_link_hubs.go +++ b/plugins/source/azure/resources/services/synapse/private_link_hubs.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package synapse import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func PrivateLinkHubs() *schema.Table { return &schema.Table{ Name: "azure_synapse_private_link_hubs", Resolver: fetchPrivateLinkHubs, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_synapse), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_synapse_private_link_hubs", client.Namespacemicrosoft_synapse), Transform: transformers.TransformWithStruct(&armsynapse.PrivateLinkHub{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/synapse/private_link_hubs_mock_test.go b/plugins/source/azure/resources/services/synapse/private_link_hubs_mock_test.go index 618667efa0714f..dc500996d49dcf 100644 --- a/plugins/source/azure/resources/services/synapse/private_link_hubs_mock_test.go +++ b/plugins/source/azure/resources/services/synapse/private_link_hubs_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package synapse import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/synapse/workspaces.go b/plugins/source/azure/resources/services/synapse/workspaces.go index 2149b9a8de62d0..1fa97ff4baf518 100644 --- a/plugins/source/azure/resources/services/synapse/workspaces.go +++ b/plugins/source/azure/resources/services/synapse/workspaces.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package synapse import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Workspaces() *schema.Table { return &schema.Table{ Name: "azure_synapse_workspaces", Resolver: fetchWorkspaces, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_synapse), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_synapse_workspaces", client.Namespacemicrosoft_synapse), Transform: transformers.TransformWithStruct(&armsynapse.Workspace{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/synapse/workspaces_mock_test.go b/plugins/source/azure/resources/services/synapse/workspaces_mock_test.go index b083cb4fc45e1d..3a178279142ad6 100644 --- a/plugins/source/azure/resources/services/synapse/workspaces_mock_test.go +++ b/plugins/source/azure/resources/services/synapse/workspaces_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package synapse import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys.go b/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys.go deleted file mode 100644 index 40a8e15473fa64..00000000000000 --- a/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package windowsesu - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsesu/armwindowsesu" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" - "github.com/cloudquery/plugin-sdk/schema" - "github.com/cloudquery/plugin-sdk/transformers" -) - -func MultipleActivationKeys() *schema.Table { - return &schema.Table{ - Name: "azure_windowsesu_multiple_activation_keys", - Resolver: fetchMultipleActivationKeys, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_windowsesu), - Transform: transformers.TransformWithStruct(&armwindowsesu.MultipleActivationKey{}), - Columns: []schema.Column{ - { - Name: "subscription_id", - Type: schema.TypeString, - Resolver: client.ResolveAzureSubscription, - }, - { - Name: "id", - Type: schema.TypeString, - Resolver: schema.PathResolver("ID"), - CreationOptions: schema.ColumnCreationOptions{ - PrimaryKey: true, - }, - }, - }, - } -} - -func fetchMultipleActivationKeys(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { - cl := meta.(*client.Client) - svc, err := armwindowsesu.NewMultipleActivationKeysClient(cl.SubscriptionId, cl.Creds, cl.Options) - if err != nil { - return err - } - pager := svc.NewListPager(nil) - for pager.More() { - p, err := pager.NextPage(ctx) - if err != nil { - return err - } - res <- p.Value - } - return nil -} diff --git a/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys_mock_test.go b/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys_mock_test.go deleted file mode 100644 index d0a0629e1316f2..00000000000000 --- a/plugins/source/azure/resources/services/windowsesu/multiple_activation_keys_mock_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by codegen; DO NOT EDIT. -package windowsesu - -import ( - "encoding/json" - "net/http" - - "github.com/cloudquery/cloudquery/plugins/source/azure/client" - "testing" - - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsesu/armwindowsesu" - "github.com/cloudquery/plugin-sdk/faker" - "github.com/gorilla/mux" -) - -func createMultipleActivationKeys(router *mux.Router) error { - var item armwindowsesu.MultipleActivationKeysClientListResponse - if err := faker.FakeObject(&item); err != nil { - return err - } - - emptyStr := "" - item.NextLink = &emptyStr - - router.HandleFunc("/subscriptions/{subscriptionId}/providers/Microsoft.WindowsESU/multipleActivationKeys", func(w http.ResponseWriter, r *http.Request) { - b, err := json.Marshal(&item) - if err != nil { - http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) - return - } - if _, err := w.Write(b); err != nil { - http.Error(w, "failed to write", http.StatusBadRequest) - return - } - }) - - return nil -} - -func TestMultipleActivationKeys(t *testing.T) { - client.MockTestHelper(t, MultipleActivationKeys(), createMultipleActivationKeys) -} diff --git a/plugins/source/azure/resources/services/windowsiot/services.go b/plugins/source/azure/resources/services/windowsiot/services.go index 88c587f7f718d5..599e5b2165b3d3 100644 --- a/plugins/source/azure/resources/services/windowsiot/services.go +++ b/plugins/source/azure/resources/services/windowsiot/services.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package windowsiot import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Services() *schema.Table { return &schema.Table{ Name: "azure_windowsiot_services", Resolver: fetchServices, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_windowsiot), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_windowsiot_services", client.Namespacemicrosoft_windowsiot), Transform: transformers.TransformWithStruct(&armwindowsiot.DeviceService{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/windowsiot/services_mock_test.go b/plugins/source/azure/resources/services/windowsiot/services_mock_test.go index 0e02967fdbaa92..2d94cb69836872 100644 --- a/plugins/source/azure/resources/services/windowsiot/services_mock_test.go +++ b/plugins/source/azure/resources/services/windowsiot/services_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package windowsiot import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/resources/services/workloads/monitors.go b/plugins/source/azure/resources/services/workloads/monitors.go index c778a657b09388..4b1dd7ab74aba7 100644 --- a/plugins/source/azure/resources/services/workloads/monitors.go +++ b/plugins/source/azure/resources/services/workloads/monitors.go @@ -1,8 +1,8 @@ -// Code generated by codegen; DO NOT EDIT. package workloads import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" "github.com/cloudquery/cloudquery/plugins/source/azure/client" "github.com/cloudquery/plugin-sdk/schema" @@ -13,7 +13,7 @@ func Monitors() *schema.Table { return &schema.Table{ Name: "azure_workloads_monitors", Resolver: fetchMonitors, - Multiplex: client.SubscriptionMultiplexRegisteredNamespace(client.Namespacemicrosoft_workloads), + Multiplex: client.SubscriptionMultiplexRegisteredNamespace("azure_workloads_monitors", client.Namespacemicrosoft_workloads), Transform: transformers.TransformWithStruct(&armworkloads.Monitor{}), Columns: []schema.Column{ { diff --git a/plugins/source/azure/resources/services/workloads/monitors_mock_test.go b/plugins/source/azure/resources/services/workloads/monitors_mock_test.go index c6efa174a94d7f..2b7f6f183344f2 100644 --- a/plugins/source/azure/resources/services/workloads/monitors_mock_test.go +++ b/plugins/source/azure/resources/services/workloads/monitors_mock_test.go @@ -1,13 +1,13 @@ -// Code generated by codegen; DO NOT EDIT. package workloads import ( "encoding/json" "net/http" - "github.com/cloudquery/cloudquery/plugins/source/azure/client" "testing" + "github.com/cloudquery/cloudquery/plugins/source/azure/client" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" "github.com/cloudquery/plugin-sdk/faker" "github.com/gorilla/mux" diff --git a/plugins/source/azure/test/policy_cq_config.yml b/plugins/source/azure/test/policy_cq_config.yml index 8ed7dba49b46f5..dcf926b20bbbd3 100644 --- a/plugins/source/azure/test/policy_cq_config.yml +++ b/plugins/source/azure/test/policy_cq_config.yml @@ -10,6 +10,6 @@ kind: destination spec: name: postgresql path: cloudquery/postgresql - version: "v2.0.4" # latest version of postgresql plugin + version: "v2.0.5" # latest version of postgresql plugin spec: connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/plugins/source/azuredevops/Makefile b/plugins/source/azuredevops/Makefile index 036a6c95d97fb3..19780241ae2236 100644 --- a/plugins/source/azuredevops/Makefile +++ b/plugins/source/azuredevops/Makefile @@ -11,6 +11,7 @@ lint: gen-docs: rm -rf ./docs/tables/* go run main.go doc ./docs/tables + sed 's_(\(.*\))_(https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azuredevops/docs/tables/\1)_' docs/tables/README.md > ../../../website/pages/docs/plugins/sources/azuredevops/tables.md .PHONY: gen gen: gen-docs \ No newline at end of file diff --git a/plugins/source/azuredevops/client/client.go b/plugins/source/azuredevops/client/client.go index ba251b52a8982d..1fbd855879a0dc 100644 --- a/plugins/source/azuredevops/client/client.go +++ b/plugins/source/azuredevops/client/client.go @@ -25,7 +25,7 @@ func (*Client) ID() string { return "AzureDevOpsClient" } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var spec Spec err := s.UnmarshalSpec(&spec) if err != nil { diff --git a/plugins/source/azuredevops/go.mod b/plugins/source/azuredevops/go.mod index defcdf63f2b8f3..c8658e81589857 100644 --- a/plugins/source/azuredevops/go.mod +++ b/plugins/source/azuredevops/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/azuredevops go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/azuredevops/go.sum b/plugins/source/azuredevops/go.sum index 943d76120fda32..da8beabb648414 100644 --- a/plugins/source/azuredevops/go.sum +++ b/plugins/source/azuredevops/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/cloudflare/CHANGELOG.md b/plugins/source/cloudflare/CHANGELOG.md index 704e3bc404c731..926a248930d946 100644 --- a/plugins/source/cloudflare/CHANGELOG.md +++ b/plugins/source/cloudflare/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this provider will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-cloudflare-v3.0.0...plugins-source-cloudflare-v3.1.0) (2023-01-10) + + +### Features + +* **cloudflare:** Remove codegen, move to transformation ([#6420](https://github.com/cloudquery/cloudquery/issues/6420)) ([881f5f3](https://github.com/cloudquery/cloudquery/commit/881f5f358d9ffe7cb4529d06b7782c101a259881)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [3.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-cloudflare-v2.3.3...plugins-source-cloudflare-v3.0.0) (2023-01-03) diff --git a/plugins/source/cloudflare/client/client.go b/plugins/source/cloudflare/client/client.go index defe39ffd7a26d..04977bf7c13cc8 100644 --- a/plugins/source/cloudflare/client/client.go +++ b/plugins/source/cloudflare/client/client.go @@ -72,7 +72,7 @@ func (c *Client) withZoneID(accountId, zoneId string) *Client { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { cfSpec := &Spec{} if err := s.UnmarshalSpec(cfSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal cloudflare spec: %w", err) diff --git a/plugins/source/cloudflare/client/testing.go b/plugins/source/cloudflare/client/testing.go index 078b2a9c0ee46d..4c3370cd714567 100644 --- a/plugins/source/cloudflare/client/testing.go +++ b/plugins/source/cloudflare/client/testing.go @@ -31,7 +31,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var cfSpec Spec if err := spec.UnmarshalSpec(&cfSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal cloudflare spec: %w", err) diff --git a/plugins/source/cloudflare/docs/tables/README.md b/plugins/source/cloudflare/docs/tables/README.md index 94a2327317e042..6113fcf469fb58 100644 --- a/plugins/source/cloudflare/docs/tables/README.md +++ b/plugins/source/cloudflare/docs/tables/README.md @@ -9,10 +9,10 @@ - [cloudflare_dns_records](cloudflare_dns_records.md) - [cloudflare_images](cloudflare_images.md) - [cloudflare_ips](cloudflare_ips.md) +- [cloudflare_waf_overrides](cloudflare_waf_overrides.md) - [cloudflare_waf_packages](cloudflare_waf_packages.md) - [cloudflare_waf_groups](cloudflare_waf_groups.md) - [cloudflare_waf_rules](cloudflare_waf_rules.md) -- [cloudflare_waf_overrides](cloudflare_waf_overrides.md) - [cloudflare_worker_meta_data](cloudflare_worker_meta_data.md) - [cloudflare_worker_cron_triggers](cloudflare_worker_cron_triggers.md) - [cloudflare_workers_secrets](cloudflare_workers_secrets.md) diff --git a/plugins/source/cloudflare/go.mod b/plugins/source/cloudflare/go.mod index af61ddecb47c8d..16f3c28999e282 100644 --- a/plugins/source/cloudflare/go.mod +++ b/plugins/source/cloudflare/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/cloudflare/cloudflare-go v0.57.1 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/rs/zerolog v1.28.0 github.com/thoas/go-funk v0.9.3 diff --git a/plugins/source/cloudflare/go.sum b/plugins/source/cloudflare/go.sum index 19e3e0ffa696a2..94e107e6f2c12c 100644 --- a/plugins/source/cloudflare/go.sum +++ b/plugins/source/cloudflare/go.sum @@ -42,8 +42,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.57.1 h1:c9OhL/WusagBirP+CIJeCqS7OjT9kiWjtJv4lwxp3ZM= github.com/cloudflare/cloudflare-go v0.57.1/go.mod h1:cD8AqNMMaL1A0Sj9XKo3Xu9ZVHwHqgXJofb1ya210GQ= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/crowdstrike/CHANGELOG.md b/plugins/source/crowdstrike/CHANGELOG.md index 2603acf5b853b7..fc49ae7c4009db 100644 --- a/plugins/source/crowdstrike/CHANGELOG.md +++ b/plugins/source/crowdstrike/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-crowdstrike-v1.0.2...plugins-source-crowdstrike-v1.1.0) (2023-01-10) + + +### Features + +* **crowdstrike:** Migrate codegen to transformations ([#6423](https://github.com/cloudquery/cloudquery/issues/6423)) ([750cc6f](https://github.com/cloudquery/cloudquery/commit/750cc6f87e9627c2a4a654a6e33da33350743a30)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [1.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-source-crowdstrike-v1.0.1...plugins-source-crowdstrike-v1.0.2) (2023-01-03) diff --git a/plugins/source/crowdstrike/client/client.go b/plugins/source/crowdstrike/client/client.go index af7b0cb4f5d26a..29bc864cef5b24 100644 --- a/plugins/source/crowdstrike/client/client.go +++ b/plugins/source/crowdstrike/client/client.go @@ -33,7 +33,7 @@ func (c *Client) ID() string { return c.spec.Name } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { crowdStrikeSpec := &Spec{} if err := s.UnmarshalSpec(&crowdStrikeSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal CrowdStrike spec: %w", err) diff --git a/plugins/source/crowdstrike/client/testing.go b/plugins/source/crowdstrike/client/testing.go index 0533c8613269fb..2b5c8adbbdd4ee 100644 --- a/plugins/source/crowdstrike/client/testing.go +++ b/plugins/source/crowdstrike/client/testing.go @@ -26,7 +26,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var gaSpec Spec if err := spec.UnmarshalSpec(&gaSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal Crowdstrike spec: %w", err) diff --git a/plugins/source/crowdstrike/docs/tables/README.md b/plugins/source/crowdstrike/docs/tables/README.md index 91935f2fe7feb3..2e136076531fd4 100644 --- a/plugins/source/crowdstrike/docs/tables/README.md +++ b/plugins/source/crowdstrike/docs/tables/README.md @@ -2,5 +2,5 @@ ## Tables -- [crowdstrike_incidents_crowdscore](crowdstrike_incidents_crowdscore.md) -- [crowdstrike_alerts_query](crowdstrike_alerts_query.md) \ No newline at end of file +- [crowdstrike_alerts_query](crowdstrike_alerts_query.md) +- [crowdstrike_incidents_crowdscore](crowdstrike_incidents_crowdscore.md) \ No newline at end of file diff --git a/plugins/source/crowdstrike/go.mod b/plugins/source/crowdstrike/go.mod index 74b7a04e9c5da1..cc34a83bd3a1ba 100644 --- a/plugins/source/crowdstrike/go.mod +++ b/plugins/source/crowdstrike/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/crowdstrike go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/crowdstrike/gofalcon v0.2.32 github.com/go-openapi/runtime v0.25.0 github.com/golang/mock v1.6.0 diff --git a/plugins/source/crowdstrike/go.sum b/plugins/source/crowdstrike/go.sum index e5bebcf96dddcb..2b880ebd98d3d9 100644 --- a/plugins/source/crowdstrike/go.sum +++ b/plugins/source/crowdstrike/go.sum @@ -74,8 +74,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= diff --git a/plugins/source/datadog/client/client.go b/plugins/source/datadog/client/client.go index 8d451478d96dbf..1d763e71907dcd 100644 --- a/plugins/source/datadog/client/client.go +++ b/plugins/source/datadog/client/client.go @@ -70,7 +70,7 @@ func (c *Client) withAccount(account Account) schema.ClientMeta { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { cfSpec := &Spec{} if err := s.UnmarshalSpec(cfSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal datadog spec: %w", err) diff --git a/plugins/source/datadog/client/testing.go b/plugins/source/datadog/client/testing.go index 54192b0fc45d31..c57d8a136aced9 100644 --- a/plugins/source/datadog/client/testing.go +++ b/plugins/source/datadog/client/testing.go @@ -23,7 +23,7 @@ func DatadogMockTestHelper(t *testing.T, table *schema.Table, builder func(*test l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { return &Client{ logger: l, DDServices: builder(t, ctrl), diff --git a/plugins/source/datadog/docs/tables/README.md b/plugins/source/datadog/docs/tables/README.md index eb50a17830e654..4201ea23948549 100644 --- a/plugins/source/datadog/docs/tables/README.md +++ b/plugins/source/datadog/docs/tables/README.md @@ -5,17 +5,17 @@ - [datadog_dashboard_lists](datadog_dashboard_lists.md) - [datadog_dashboards](datadog_dashboards.md) - [datadog_downtimes](datadog_downtimes.md) +- [datadog_global_variables](datadog_global_variables.md) - [datadog_hosts](datadog_hosts.md) - [datadog_incidents](datadog_incidents.md) - [datadog_incident_attachments](datadog_incident_attachments.md) - [datadog_monitors](datadog_monitors.md) - [datadog_monitor_downtimes](datadog_monitor_downtimes.md) - [datadog_notebooks](datadog_notebooks.md) +- [datadog_permissions](datadog_permissions.md) - [datadog_roles](datadog_roles.md) - [datadog_role_permissions](datadog_role_permissions.md) - [datadog_role_users](datadog_role_users.md) -- [datadog_permissions](datadog_permissions.md) -- [datadog_global_variables](datadog_global_variables.md) - [datadog_synthetics](datadog_synthetics.md) - [datadog_users](datadog_users.md) - [datadog_user_permissions](datadog_user_permissions.md) \ No newline at end of file diff --git a/plugins/source/datadog/go.mod b/plugins/source/datadog/go.mod index 78c4cae905ac6b..53cd5dae8a56c5 100644 --- a/plugins/source/datadog/go.mod +++ b/plugins/source/datadog/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/DataDog/datadog-api-client-go/v2 v2.6.1 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/datadog/go.sum b/plugins/source/datadog/go.sum index f7c960a3b35c78..2f647324517bb5 100644 --- a/plugins/source/datadog/go.sum +++ b/plugins/source/datadog/go.sum @@ -44,8 +44,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/digitalocean/CHANGELOG.md b/plugins/source/digitalocean/CHANGELOG.md index fd38edff3134ed..d9e6cbddff9272 100644 --- a/plugins/source/digitalocean/CHANGELOG.md +++ b/plugins/source/digitalocean/CHANGELOG.md @@ -5,6 +5,27 @@ All notable changes to this provider will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-digitalocean-v4.0.2...plugins-source-digitalocean-v4.1.0) (2023-01-10) + + +### Features + +* **digitalocean:** Migrate codegen to transformations ([#6425](https://github.com/cloudquery/cloudquery/issues/6425)) ([35f1f06](https://github.com/cloudquery/cloudquery/commit/35f1f06c0b794d1c5c0a6264ee81663e89cb6f15)) + + +### Bug Fixes + +* **deps:** Update module github.com/aws/aws-sdk-go-v2/config to v1.18.8 ([#6393](https://github.com/cloudquery/cloudquery/issues/6393)) ([ffba44f](https://github.com/cloudquery/cloudquery/commit/ffba44f1318eb401d2b7ce2fa91c155d8925d90d)) +* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/s3 to v1.30.0 ([#6504](https://github.com/cloudquery/cloudquery/issues/6504)) ([0091d82](https://github.com/cloudquery/cloudquery/commit/0091d82fb507266d324cdeaf4a66347ee1531313)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **digitalocean:** Remove codegen, upgrade SDK ([#6569](https://github.com/cloudquery/cloudquery/issues/6569)) ([ec29565](https://github.com/cloudquery/cloudquery/commit/ec29565b50a72d38162949d6e01ddb8e7ab54d3b)) + ## [4.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-source-digitalocean-v4.0.1...plugins-source-digitalocean-v4.0.2) (2023-01-03) diff --git a/plugins/source/digitalocean/client/client.go b/plugins/source/digitalocean/client/client.go index 934828cbe0a6ea..2fedcb654ab1a5 100644 --- a/plugins/source/digitalocean/client/client.go +++ b/plugins/source/digitalocean/client/client.go @@ -131,7 +131,7 @@ func (s *ServicesManager) ServicesByRegion(region string) *Services { return s.services[region] } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { // providerConfig := config.(*Config) var doSpec Spec if err := s.UnmarshalSpec(&doSpec); err != nil { diff --git a/plugins/source/digitalocean/client/testing.go b/plugins/source/digitalocean/client/testing.go index 89ff36cea1a97c..512801f4a79f70 100644 --- a/plugins/source/digitalocean/client/testing.go +++ b/plugins/source/digitalocean/client/testing.go @@ -27,7 +27,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createService func(t *tes zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var doSpec Spec if err := spec.UnmarshalSpec(&doSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal do spec: %w", err) diff --git a/plugins/source/digitalocean/docs/tables/README.md b/plugins/source/digitalocean/docs/tables/README.md index fc941e25910bd9..7da5de83b58ba3 100644 --- a/plugins/source/digitalocean/docs/tables/README.md +++ b/plugins/source/digitalocean/docs/tables/README.md @@ -3,25 +3,25 @@ ## Tables - [digitalocean_accounts](digitalocean_accounts.md) -- [digitalocean_cdns](digitalocean_cdns.md) -- [digitalocean_billing_history](digitalocean_billing_history.md) -- [digitalocean_monitoring_alert_policies](digitalocean_monitoring_alert_policies.md) - [digitalocean_balances](digitalocean_balances.md) +- [digitalocean_billing_history](digitalocean_billing_history.md) +- [digitalocean_cdns](digitalocean_cdns.md) - [digitalocean_certificates](digitalocean_certificates.md) - [digitalocean_databases](digitalocean_databases.md) + - [digitalocean_database_backups](digitalocean_database_backups.md) - [digitalocean_database_firewall_rules](digitalocean_database_firewall_rules.md) - [digitalocean_database_replicas](digitalocean_database_replicas.md) - - [digitalocean_database_backups](digitalocean_database_backups.md) +- [digitalocean_domain_records](digitalocean_domain_records.md) - [digitalocean_domains](digitalocean_domains.md) - [digitalocean_domain_records](digitalocean_domain_records.md) -- [digitalocean_domain_records](digitalocean_domain_records.md) +- [digitalocean_droplet_neighbors](digitalocean_droplet_neighbors.md) - [digitalocean_droplets](digitalocean_droplets.md) - [digitalocean_droplet_neighbors](digitalocean_droplet_neighbors.md) -- [digitalocean_droplet_neighbors](digitalocean_droplet_neighbors.md) - [digitalocean_firewalls](digitalocean_firewalls.md) - [digitalocean_floating_ips](digitalocean_floating_ips.md) - [digitalocean_images](digitalocean_images.md) - [digitalocean_keys](digitalocean_keys.md) +- [digitalocean_monitoring_alert_policies](digitalocean_monitoring_alert_policies.md) - [digitalocean_projects](digitalocean_projects.md) - [digitalocean_project_resources](digitalocean_project_resources.md) - [digitalocean_registries](digitalocean_registries.md) diff --git a/plugins/source/digitalocean/docs/tables/digitalocean_databases.md b/plugins/source/digitalocean/docs/tables/digitalocean_databases.md index 089c18e35a55eb..39f9763a9d9030 100644 --- a/plugins/source/digitalocean/docs/tables/digitalocean_databases.md +++ b/plugins/source/digitalocean/docs/tables/digitalocean_databases.md @@ -5,9 +5,9 @@ The primary key for this table is **id**. ## Relations The following tables depend on digitalocean_databases: + - [digitalocean_database_backups](digitalocean_database_backups.md) - [digitalocean_database_firewall_rules](digitalocean_database_firewall_rules.md) - [digitalocean_database_replicas](digitalocean_database_replicas.md) - - [digitalocean_database_backups](digitalocean_database_backups.md) ## Columns diff --git a/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md b/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md index 92728bcc556787..3b9c3c625624a0 100644 --- a/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md +++ b/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md @@ -2,6 +2,10 @@ The primary key for this table is **id**. +## Relations + +This table depends on [digitalocean_domains](digitalocean_domains.md). + ## Columns | Name | Type | diff --git a/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md b/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md index 980701d3078762..64c83c938e8c4d 100644 --- a/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md +++ b/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md @@ -2,6 +2,10 @@ The primary key for this table is **neighbor_id**. +## Relations + +This table depends on [digitalocean_droplets](digitalocean_droplets.md). + ## Columns | Name | Type | diff --git a/plugins/source/digitalocean/go.mod b/plugins/source/digitalocean/go.mod index b65fb16ec92e90..56e8182df99931 100644 --- a/plugins/source/digitalocean/go.mod +++ b/plugins/source/digitalocean/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.18.8 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 github.com/aws/smithy-go v1.13.5 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/digitalocean/godo v1.93.0 github.com/golang/mock v1.6.0 github.com/pkg/errors v0.9.1 diff --git a/plugins/source/digitalocean/go.sum b/plugins/source/digitalocean/go.sum index d66332c5714615..c9bfa80d48092b 100644 --- a/plugins/source/digitalocean/go.sum +++ b/plugins/source/digitalocean/go.sum @@ -77,8 +77,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/fastly/client/client.go b/plugins/source/fastly/client/client.go index 3f8b7910bc09a6..8a9dbaf957b86e 100644 --- a/plugins/source/fastly/client/client.go +++ b/plugins/source/fastly/client/client.go @@ -57,7 +57,7 @@ func (c *Client) withServiceAndRegion(service *fastly.Service, region string) sc } } -func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Source, _ source.Options) (schema.ClientMeta, error) { var config Spec err := sourceSpec.UnmarshalSpec(&config) if err != nil { diff --git a/plugins/source/fastly/client/testing.go b/plugins/source/fastly/client/testing.go index e1d827f2bb2845..8d559546feec82 100644 --- a/plugins/source/fastly/client/testing.go +++ b/plugins/source/fastly/client/testing.go @@ -28,7 +28,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var s []*fastly.Service if opts.Service != nil { s = []*fastly.Service{opts.Service} diff --git a/plugins/source/fastly/codegen/main.go b/plugins/source/fastly/codegen/main.go index 2c47b70d8188ab..7343999fd02a9d 100644 --- a/plugins/source/fastly/codegen/main.go +++ b/plugins/source/fastly/codegen/main.go @@ -19,6 +19,7 @@ func main() { []any{&fastly.Client{}}, path.Join(path.Dir(filename), "../client/services"), interfaces.WithIncludeFunc(include), + interfaces.WithExtraImports(extraImports), ) if err != nil { panic(err) @@ -28,3 +29,7 @@ func main() { func include(m reflect.Method) bool { return interfaces.MethodHasAnyPrefix(m, []string{"Get", "List", "NewGet", "NewList"}) } + +func extraImports(m reflect.Method) []string { + return []string{"net/http"} +} diff --git a/plugins/source/fastly/docs/tables/README.md b/plugins/source/fastly/docs/tables/README.md index 55ecea167dc763..63aa3216c23400 100644 --- a/plugins/source/fastly/docs/tables/README.md +++ b/plugins/source/fastly/docs/tables/README.md @@ -2,13 +2,13 @@ ## Tables -- [fastly_account_users](fastly_account_users.md) - [fastly_account_events](fastly_account_events.md) +- [fastly_account_users](fastly_account_users.md) - [fastly_auth_tokens](fastly_auth_tokens.md) - [fastly_services](fastly_services.md) - [fastly_service_versions](fastly_service_versions.md) - - [fastly_service_health_checks](fastly_service_health_checks.md) - - [fastly_service_domains](fastly_service_domains.md) - [fastly_service_backends](fastly_service_backends.md) + - [fastly_service_domains](fastly_service_domains.md) + - [fastly_service_health_checks](fastly_service_health_checks.md) - [fastly_stats_regions](fastly_stats_regions.md) - [fastly_stats_services](fastly_stats_services.md) \ No newline at end of file diff --git a/plugins/source/fastly/docs/tables/fastly_service_versions.md b/plugins/source/fastly/docs/tables/fastly_service_versions.md index 12e2dbc76af7b6..d24ea82f3d19e2 100644 --- a/plugins/source/fastly/docs/tables/fastly_service_versions.md +++ b/plugins/source/fastly/docs/tables/fastly_service_versions.md @@ -9,9 +9,9 @@ The composite primary key for this table is (**number**, **service_id**). This table depends on [fastly_services](fastly_services.md). The following tables depend on fastly_service_versions: - - [fastly_service_health_checks](fastly_service_health_checks.md) - - [fastly_service_domains](fastly_service_domains.md) - [fastly_service_backends](fastly_service_backends.md) + - [fastly_service_domains](fastly_service_domains.md) + - [fastly_service_health_checks](fastly_service_health_checks.md) ## Columns diff --git a/plugins/source/fastly/go.mod b/plugins/source/fastly/go.mod index ff363675b2c376..4a14adc5cbd590 100644 --- a/plugins/source/fastly/go.mod +++ b/plugins/source/fastly/go.mod @@ -3,8 +3,8 @@ module github.com/cloudquery/cloudquery/plugins/source/fastly go 1.19 require ( - github.com/cloudquery/codegen v0.1.1 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/codegen v0.2.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/fastly/go-fastly/v7 v7.0.0 github.com/golang/mock v1.6.0 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/fastly/go.sum b/plugins/source/fastly/go.sum index 0190ce04d40bd5..49ccf9fc716445 100644 --- a/plugins/source/fastly/go.sum +++ b/plugins/source/fastly/go.sum @@ -40,10 +40,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/codegen v0.1.1 h1:zIPNMeNAlUdLwP4gpb8BsfOfAxyLYOBxBNSG+nZpSx4= -github.com/cloudquery/codegen v0.1.1/go.mod h1:oJxzUuOC79fP36vBPU1BJ7n+jgQemS33y/mbgNq6vfM= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/codegen v0.2.1 h1:AWpGNKIFUyzI7vulYADXi/3SoksUaNXgTgIMuSrTHZk= +github.com/cloudquery/codegen v0.2.1/go.mod h1:oJxzUuOC79fP36vBPU1BJ7n+jgQemS33y/mbgNq6vfM= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/gandi/client/client.go b/plugins/source/gandi/client/client.go index 2549ba787e9b90..c35ed0675c2361 100644 --- a/plugins/source/gandi/client/client.go +++ b/plugins/source/gandi/client/client.go @@ -47,7 +47,7 @@ func (c *Client) ID() string { return c.sharingID } -func Configure(_ context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(_ context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { gaSpec := &Spec{} if err := s.UnmarshalSpec(gaSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal gandi spec: %w", err) diff --git a/plugins/source/gandi/client/testing.go b/plugins/source/gandi/client/testing.go index aee0754adf40d1..7171ef70712d7e 100644 --- a/plugins/source/gandi/client/testing.go +++ b/plugins/source/gandi/client/testing.go @@ -30,7 +30,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var gaSpec Spec if err := spec.UnmarshalSpec(&gaSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal gandi spec: %w", err) diff --git a/plugins/source/gandi/docs/tables/README.md b/plugins/source/gandi/docs/tables/README.md index 41a825267ea188..b14a8d2ad3fe59 100644 --- a/plugins/source/gandi/docs/tables/README.md +++ b/plugins/source/gandi/docs/tables/README.md @@ -2,13 +2,13 @@ ## Tables -- [gandi_certificates](gandi_certificates.md) - [gandi_certificate_packages](gandi_certificate_packages.md) +- [gandi_certificates](gandi_certificates.md) - [gandi_domains](gandi_domains.md) + - [gandi_domain_dnssec_keys](gandi_domain_dnssec_keys.md) + - [gandi_domain_glue_records](gandi_domain_glue_records.md) - [gandi_domain_livedns](gandi_domain_livedns.md) - [gandi_domain_web_redirections](gandi_domain_web_redirections.md) - - [gandi_domain_glue_records](gandi_domain_glue_records.md) - - [gandi_domain_dnssec_keys](gandi_domain_dnssec_keys.md) - [gandi_livedns_domains](gandi_livedns_domains.md) - [gandi_livedns_domain_snapshots](gandi_livedns_domain_snapshots.md) - [gandi_simplehosting_instances](gandi_simplehosting_instances.md) diff --git a/plugins/source/gandi/docs/tables/gandi_domains.md b/plugins/source/gandi/docs/tables/gandi_domains.md index c1047a6d6b646b..4c47398c186687 100644 --- a/plugins/source/gandi/docs/tables/gandi_domains.md +++ b/plugins/source/gandi/docs/tables/gandi_domains.md @@ -5,10 +5,10 @@ The primary key for this table is **id**. ## Relations The following tables depend on gandi_domains: + - [gandi_domain_dnssec_keys](gandi_domain_dnssec_keys.md) + - [gandi_domain_glue_records](gandi_domain_glue_records.md) - [gandi_domain_livedns](gandi_domain_livedns.md) - [gandi_domain_web_redirections](gandi_domain_web_redirections.md) - - [gandi_domain_glue_records](gandi_domain_glue_records.md) - - [gandi_domain_dnssec_keys](gandi_domain_dnssec_keys.md) ## Columns diff --git a/plugins/source/gandi/go.mod b/plugins/source/gandi/go.mod index dc2da48d6eb83f..bf5fc6dc812720 100644 --- a/plugins/source/gandi/go.mod +++ b/plugins/source/gandi/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/gandi go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/go-gandi/go-gandi v0.5.1-0.20221118201059-f69b292fa399 github.com/golang/mock v1.6.0 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/gandi/go.sum b/plugins/source/gandi/go.sum index 38406711ddbf35..62aa5295f19010 100644 --- a/plugins/source/gandi/go.sum +++ b/plugins/source/gandi/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/gcp/CHANGELOG.md b/plugins/source/gcp/CHANGELOG.md index 70f6865dbde2c8..23823bdf76cde3 100644 --- a/plugins/source/gcp/CHANGELOG.md +++ b/plugins/source/gcp/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this provider will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [7.1.1](https://github.com/cloudquery/cloudquery/compare/plugins-source-gcp-v7.1.0...plugins-source-gcp-v7.1.1) (2023-01-11) + + +### Bug Fixes + +* **gcp-resources:** Add `update_time` to PKs of `gcp_cloudiot_device_states` ([#6552](https://github.com/cloudquery/cloudquery/issues/6552)) ([b78eca5](https://github.com/cloudquery/cloudquery/commit/b78eca595d386fbd5691d5c6c7ef5c4adeb2166a)) + +## [7.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-gcp-v7.0.0...plugins-source-gcp-v7.1.0) (2023-01-10) + + +### Features + +* **gcp-resources:** Add Workflows ([#6594](https://github.com/cloudquery/cloudquery/issues/6594)) ([bc16ee5](https://github.com/cloudquery/cloudquery/commit/bc16ee5dbef3e48f37028e881c003123442049f2)) + ## [7.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-gcp-v6.1.2...plugins-source-gcp-v7.0.0) (2023-01-10) @@ -73,6 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### ⚠ BREAKING CHANGES +* **gcp-resources:** `gcp_iam_deny_policies` columns `create_time, delete_time, update_time` type changed from `String` to `Timestamp` * **gcp-resources:** `gcp_iam_roles` column `etag` type changed from `String` to `IntArray` * **gcp-resources:** `gcp_iam_service_account_keys` column `public_key_data` type changed from `String` to `IntArray` and columns `valid_after_time, valid_before_time` type changed from `String` to `Timestamp` * **gcp-resources:** `gcp_iam_service_accounts` column `etag` type changed from `String` to `IntArray` diff --git a/plugins/source/gcp/CONTRIBUTING.md b/plugins/source/gcp/CONTRIBUTING.md index cdc739a560a53a..4121f02310cbe0 100644 --- a/plugins/source/gcp/CONTRIBUTING.md +++ b/plugins/source/gcp/CONTRIBUTING.md @@ -34,6 +34,21 @@ The process to follow for adding a new recipe is: 2. `SubService`: This will be the final part of the table name, e.g. `gcp_myservice_subservice` 3. `Struct`: This should be a pointer to the struct that will be synced to the destination. CloudQuery's plugin-sdk code generation will read the fields of this struct and convert it to a `Table` instance with appropriate column types. + +### Choosing a Multiplexer + +In the GCP plugin there are three types of multiplexers. Every top level resource needs to use multiplexer: + +1. `ProjectMultiplex` (_default_): This is the most basic of multiplexers in that it will resolve the resource in each project that is being synced. +2. `ProjectMultiplexEnabledServices(serviceDNS string)`: This multiplexer will only attempt to sync a resource if that project has the service enabled otherwise the resource will be skipped for that specific projectID. On top of this the user must also enable the feature via `enabled_services_only: true` in the spec. In order to use this multiplexer you must specify a valid `resource.ServiceDNS` +3. `client.OrgMultiplex`: For resources that are unique across an entire Organization. In order to use this multiplexer you have to explicitly set the multiplexer `client.OrgMultiplex +``` go +var OrgMultiplex = "client.OrgMultiplex" +Resource{ + Multiplex: &OrgMultiplex +} +``` + #### All Available Resource Fields All available Resource fields can be seen in [base.go](codegen/recipes/base.go). See the documentation for each field for an explanation of what it does. diff --git a/plugins/source/gcp/client/client.go b/plugins/source/gcp/client/client.go index 9d8917e74e7aea..0d9c5e9a8a1c59 100644 --- a/plugins/source/gcp/client/client.go +++ b/plugins/source/gcp/client/client.go @@ -44,6 +44,8 @@ type Client struct { ProjectId string // this is set by table client Org multiplexer OrgId string + // this is set by table client Location multiplexer + Location string // Logger logger zerolog.Logger } @@ -58,6 +60,13 @@ func (c *Client) withProject(project string) *Client { return &newClient } +func (c *Client) withLocation(location string) *Client { + newClient := *c + newClient.logger = c.logger.With().Str("location", location).Logger() + newClient.Location = location + return &newClient +} + // withOrg allows multiplexer to create a new client with given organizationId func (c *Client) withOrg(org string) *Client { newClient := *c @@ -79,14 +88,17 @@ func (c *Client) ID() string { if c.OrgId != "" { return "org:" + c.OrgId } - return c.ProjectId + if c.Location != "" { + return "project:" + c.ProjectId + ":location:" + c.Location + } + return "project:" + c.ProjectId } func (c *Client) Logger() *zerolog.Logger { return &c.logger } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var err error c := Client{ logger: logger, diff --git a/plugins/source/gcp/client/multiplex.go b/plugins/source/gcp/client/multiplex.go index 0b0e8c57455e2d..3ccf458afd6e7c 100644 --- a/plugins/source/gcp/client/multiplex.go +++ b/plugins/source/gcp/client/multiplex.go @@ -44,3 +44,29 @@ func OrgMultiplex(meta schema.ClientMeta) []schema.ClientMeta { } return l } + +func ProjectLocationMultiplexEnabledServices(service string, locations []string) func(schema.ClientMeta) []schema.ClientMeta { + if _, ok := GcpServices[service]; !ok { + panic("unknown service: " + service) + } + + return func(meta schema.ClientMeta) []schema.ClientMeta { + cl := meta.(*Client) + + l := make([]schema.ClientMeta, 0, len(cl.projects)) + for _, projectId := range cl.projects { + // This map can only be empty if user has not opted into `EnabledServicesOnly` via the spec + if len(cl.EnabledServices) == 0 { + for _, location := range locations { + l = append(l, cl.withProject(projectId).withLocation(location)) + } + } else if cl.EnabledServices[projectId] != nil && cl.EnabledServices[projectId][service] != nil { + for _, location := range locations { + l = append(l, cl.withProject(projectId).withLocation(location)) + } + } + } + + return l + } +} diff --git a/plugins/source/gcp/client/resolvers.go b/plugins/source/gcp/client/resolvers.go index 009b7409985c37..80255073cad87d 100644 --- a/plugins/source/gcp/client/resolvers.go +++ b/plugins/source/gcp/client/resolvers.go @@ -19,6 +19,11 @@ func ResolveProject(_ context.Context, meta schema.ClientMeta, r *schema.Resourc return r.Set("project_id", client.ProjectId) } +func ResolveOrganization(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { + client := meta.(*Client) + return r.Set(c.Name, client.OrgId) +} + func AddGcpMetadata(ctx context.Context, c schema.ClientMeta, r *schema.Resource) error { return resolveLocation(ctx, c, r) } diff --git a/plugins/source/gcp/client/services.go b/plugins/source/gcp/client/services.go index 1ef213d305797f..a7388f1e89b4e5 100644 --- a/plugins/source/gcp/client/services.go +++ b/plugins/source/gcp/client/services.go @@ -5,6 +5,8 @@ package client var GcpServices = map[string]bool{ // Non discoverable services "aiplatform.googleapis.com": true, + "vpcaccess.googleapis.com": true, + "livestream.googleapis.com": true, // Discoverable services "abusiveexperiencereport.googleapis.com": true, "acceleratedmobilepageurl.googleapis.com": true, @@ -155,6 +157,7 @@ var GcpServices = map[string]bool{ "jobs.googleapis.com": true, "keep.googleapis.com": true, "kgsearch.googleapis.com": true, + "kmsinventory.googleapis.com": true, "language.googleapis.com": true, "libraryagent.googleapis.com": true, "licensing.googleapis.com": true, diff --git a/plugins/source/gcp/client/testing.go b/plugins/source/gcp/client/testing.go index 8653979b5b6867..81ff4883ab75a9 100644 --- a/plugins/source/gcp/client/testing.go +++ b/plugins/source/gcp/client/testing.go @@ -36,7 +36,7 @@ func MockTestGrpcHelper(t *testing.T, table *schema.Table, createService func(*g } defer gsrv.Stop() eg := &errgroup.Group{} - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createService(gsrv) if err != nil { return nil, fmt.Errorf("failed to createService: %w", err) @@ -95,7 +95,7 @@ func MockTestRestHelper(t *testing.T, table *schema.Table, createService func(*h mux := httprouter.New() ts := httptest.NewUnstartedServer(mux) defer ts.Close() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createService(mux) if err != nil { return nil, fmt.Errorf("failed to createService: %w", err) diff --git a/plugins/source/gcp/codegen/templates/services.go.tpl b/plugins/source/gcp/codegen/templates/services.go.tpl index b427aee79af084..fa57a2e1a2a55e 100644 --- a/plugins/source/gcp/codegen/templates/services.go.tpl +++ b/plugins/source/gcp/codegen/templates/services.go.tpl @@ -5,6 +5,8 @@ package client var GcpServices = map[string]bool{ // Non discoverable services "aiplatform.googleapis.com": true, + "vpcaccess.googleapis.com": true, + "livestream.googleapis.com": true, // Discoverable services {{- range .}} "{{.}}": true, diff --git a/plugins/source/gcp/docs/tables/README.md b/plugins/source/gcp/docs/tables/README.md index c298f41e3316d5..9c3d7bfbd0989e 100644 --- a/plugins/source/gcp/docs/tables/README.md +++ b/plugins/source/gcp/docs/tables/README.md @@ -2,47 +2,47 @@ ## Tables -- [gcp_aiplatform_job_locations](gcp_aiplatform_job_locations.md) - - [gcp_aiplatform_batch_prediction_jobs](gcp_aiplatform_batch_prediction_jobs.md) - - [gcp_aiplatform_custom_jobs](gcp_aiplatform_custom_jobs.md) - - [gcp_aiplatform_data_labeling_jobs](gcp_aiplatform_data_labeling_jobs.md) - - [gcp_aiplatform_hyperparameter_tuning_jobs](gcp_aiplatform_hyperparameter_tuning_jobs.md) - - [gcp_aiplatform_model_deployment_monitoring_jobs](gcp_aiplatform_model_deployment_monitoring_jobs.md) - [gcp_aiplatform_dataset_locations](gcp_aiplatform_dataset_locations.md) - [gcp_aiplatform_datasets](gcp_aiplatform_datasets.md) - [gcp_aiplatform_endpoint_locations](gcp_aiplatform_endpoint_locations.md) - [gcp_aiplatform_endpoints](gcp_aiplatform_endpoints.md) - [gcp_aiplatform_featurestore_locations](gcp_aiplatform_featurestore_locations.md) - [gcp_aiplatform_featurestores](gcp_aiplatform_featurestores.md) -- [gcp_aiplatform_indexendpoint_locations](gcp_aiplatform_indexendpoint_locations.md) - - [gcp_aiplatform_index_endpoints](gcp_aiplatform_index_endpoints.md) - [gcp_aiplatform_index_locations](gcp_aiplatform_index_locations.md) - [gcp_aiplatform_indexes](gcp_aiplatform_indexes.md) +- [gcp_aiplatform_indexendpoint_locations](gcp_aiplatform_indexendpoint_locations.md) + - [gcp_aiplatform_index_endpoints](gcp_aiplatform_index_endpoints.md) +- [gcp_aiplatform_job_locations](gcp_aiplatform_job_locations.md) + - [gcp_aiplatform_batch_prediction_jobs](gcp_aiplatform_batch_prediction_jobs.md) + - [gcp_aiplatform_custom_jobs](gcp_aiplatform_custom_jobs.md) + - [gcp_aiplatform_data_labeling_jobs](gcp_aiplatform_data_labeling_jobs.md) + - [gcp_aiplatform_hyperparameter_tuning_jobs](gcp_aiplatform_hyperparameter_tuning_jobs.md) + - [gcp_aiplatform_model_deployment_monitoring_jobs](gcp_aiplatform_model_deployment_monitoring_jobs.md) - [gcp_aiplatform_metadata_locations](gcp_aiplatform_metadata_locations.md) - [gcp_aiplatform_metadata_stores](gcp_aiplatform_metadata_stores.md) - [gcp_aiplatform_model_locations](gcp_aiplatform_model_locations.md) - [gcp_aiplatform_models](gcp_aiplatform_models.md) +- [gcp_aiplatform_operations](gcp_aiplatform_operations.md) - [gcp_aiplatform_pipeline_locations](gcp_aiplatform_pipeline_locations.md) - [gcp_aiplatform_pipeline_jobs](gcp_aiplatform_pipeline_jobs.md) - [gcp_aiplatform_training_pipelines](gcp_aiplatform_training_pipelines.md) - [gcp_aiplatform_specialistpool_locations](gcp_aiplatform_specialistpool_locations.md) - [gcp_aiplatform_specialist_pools](gcp_aiplatform_specialist_pools.md) -- [gcp_aiplatform_vizier_locations](gcp_aiplatform_vizier_locations.md) - - [gcp_aiplatform_studies](gcp_aiplatform_studies.md) - [gcp_aiplatform_tensorboard_locations](gcp_aiplatform_tensorboard_locations.md) - [gcp_aiplatform_tensorboards](gcp_aiplatform_tensorboards.md) -- [gcp_aiplatform_operations](gcp_aiplatform_operations.md) +- [gcp_aiplatform_vizier_locations](gcp_aiplatform_vizier_locations.md) + - [gcp_aiplatform_studies](gcp_aiplatform_studies.md) - [gcp_apigateway_apis](gcp_apigateway_apis.md) - [gcp_apigateway_gateways](gcp_apigateway_gateways.md) - [gcp_apikeys_keys](gcp_apikeys_keys.md) - [gcp_appengine_apps](gcp_appengine_apps.md) -- [gcp_appengine_services](gcp_appengine_services.md) - - [gcp_appengine_versions](gcp_appengine_versions.md) - - [gcp_appengine_instances](gcp_appengine_instances.md) - [gcp_appengine_authorized_certificates](gcp_appengine_authorized_certificates.md) - [gcp_appengine_authorized_domains](gcp_appengine_authorized_domains.md) - [gcp_appengine_domain_mappings](gcp_appengine_domain_mappings.md) - [gcp_appengine_firewall_ingress_rules](gcp_appengine_firewall_ingress_rules.md) +- [gcp_appengine_services](gcp_appengine_services.md) + - [gcp_appengine_versions](gcp_appengine_versions.md) + - [gcp_appengine_instances](gcp_appengine_instances.md) - [gcp_artifactregistry_locations](gcp_artifactregistry_locations.md) - [gcp_artifactregistry_repositories](gcp_artifactregistry_repositories.md) - [gcp_artifactregistry_docker_images](gcp_artifactregistry_docker_images.md) @@ -79,56 +79,65 @@ - [gcp_certificatemanager_certificate_map_entries](gcp_certificatemanager_certificate_map_entries.md) - [gcp_certificatemanager_certificates](gcp_certificatemanager_certificates.md) - [gcp_certificatemanager_dns_authorizations](gcp_certificatemanager_dns_authorizations.md) -- [gcp_clouddeploy_targets](gcp_clouddeploy_targets.md) - [gcp_clouddeploy_delivery_pipelines](gcp_clouddeploy_delivery_pipelines.md) - [gcp_clouddeploy_releases](gcp_clouddeploy_releases.md) - [gcp_clouddeploy_rollouts](gcp_clouddeploy_rollouts.md) - [gcp_clouddeploy_job_runs](gcp_clouddeploy_job_runs.md) +- [gcp_clouddeploy_targets](gcp_clouddeploy_targets.md) - [gcp_clouderrorreporting_error_group_stats](gcp_clouderrorreporting_error_group_stats.md) - [gcp_clouderrorreporting_error_events](gcp_clouderrorreporting_error_events.md) - [gcp_cloudiot_device_registries](gcp_cloudiot_device_registries.md) - [gcp_cloudiot_devices](gcp_cloudiot_devices.md) - [gcp_cloudiot_device_configs](gcp_cloudiot_device_configs.md) - [gcp_cloudiot_device_states](gcp_cloudiot_device_states.md) +- [gcp_cloudscheduler_locations](gcp_cloudscheduler_locations.md) + - [gcp_cloudscheduler_jobs](gcp_cloudscheduler_jobs.md) +- [gcp_cloudsupport_cases](gcp_cloudsupport_cases.md) - [gcp_compute_addresses](gcp_compute_addresses.md) - [gcp_compute_autoscalers](gcp_compute_autoscalers.md) - [gcp_compute_backend_services](gcp_compute_backend_services.md) - [gcp_compute_disk_types](gcp_compute_disk_types.md) - [gcp_compute_disks](gcp_compute_disks.md) +- [gcp_compute_firewalls](gcp_compute_firewalls.md) - [gcp_compute_forwarding_rules](gcp_compute_forwarding_rules.md) +- [gcp_compute_images](gcp_compute_images.md) +- [gcp_compute_instance_groups](gcp_compute_instance_groups.md) - [gcp_compute_instances](gcp_compute_instances.md) +- [gcp_compute_interconnects](gcp_compute_interconnects.md) +- [gcp_compute_networks](gcp_compute_networks.md) +- [gcp_compute_projects](gcp_compute_projects.md) - [gcp_compute_ssl_certificates](gcp_compute_ssl_certificates.md) +- [gcp_compute_ssl_policies](gcp_compute_ssl_policies.md) - [gcp_compute_subnetworks](gcp_compute_subnetworks.md) - [gcp_compute_target_http_proxies](gcp_compute_target_http_proxies.md) +- [gcp_compute_target_ssl_proxies](gcp_compute_target_ssl_proxies.md) - [gcp_compute_url_maps](gcp_compute_url_maps.md) - [gcp_compute_vpn_gateways](gcp_compute_vpn_gateways.md) -- [gcp_compute_instance_groups](gcp_compute_instance_groups.md) -- [gcp_compute_images](gcp_compute_images.md) -- [gcp_compute_firewalls](gcp_compute_firewalls.md) -- [gcp_compute_networks](gcp_compute_networks.md) -- [gcp_compute_ssl_policies](gcp_compute_ssl_policies.md) -- [gcp_compute_interconnects](gcp_compute_interconnects.md) -- [gcp_compute_target_ssl_proxies](gcp_compute_target_ssl_proxies.md) -- [gcp_compute_projects](gcp_compute_projects.md) - [gcp_container_clusters](gcp_container_clusters.md) - [gcp_containeranalysis_occurrences](gcp_containeranalysis_occurrences.md) -- [gcp_dns_policies](gcp_dns_policies.md) - [gcp_dns_managed_zones](gcp_dns_managed_zones.md) +- [gcp_dns_policies](gcp_dns_policies.md) - [gcp_domains_registrations](gcp_domains_registrations.md) - [gcp_functions_functions](gcp_functions_functions.md) +- [gcp_iam_deny_policies](gcp_iam_deny_policies.md) - [gcp_iam_roles](gcp_iam_roles.md) - [gcp_iam_service_accounts](gcp_iam_service_accounts.md) - [gcp_iam_service_account_keys](gcp_iam_service_account_keys.md) -- [gcp_iam_deny_policies](gcp_iam_deny_policies.md) -- [gcp_kms_keyrings](gcp_kms_keyrings.md) - - [gcp_kms_crypto_keys](gcp_kms_crypto_keys.md) +- [gcp_kms_locations](gcp_kms_locations.md) + - [gcp_kms_ekm_connections](gcp_kms_ekm_connections.md) + - [gcp_kms_keyrings](gcp_kms_keyrings.md) + - [gcp_kms_crypto_keys](gcp_kms_crypto_keys.md) + - [gcp_kms_crypto_key_versions](gcp_kms_crypto_key_versions.md) + - [gcp_kms_import_jobs](gcp_kms_import_jobs.md) +- [gcp_livestream_channels](gcp_livestream_channels.md) +- [gcp_livestream_inputs](gcp_livestream_inputs.md) - [gcp_logging_metrics](gcp_logging_metrics.md) - [gcp_logging_sinks](gcp_logging_sinks.md) - [gcp_monitoring_alert_policies](gcp_monitoring_alert_policies.md) - [gcp_redis_instances](gcp_redis_instances.md) - [gcp_resourcemanager_folders](gcp_resourcemanager_folders.md) -- [gcp_resourcemanager_projects](gcp_resourcemanager_projects.md) - [gcp_resourcemanager_project_policies](gcp_resourcemanager_project_policies.md) +- [gcp_resourcemanager_projects](gcp_resourcemanager_projects.md) - [gcp_run_locations](gcp_run_locations.md) - [gcp_run_services](gcp_run_services.md) - [gcp_secretmanager_secrets](gcp_secretmanager_secrets.md) @@ -137,4 +146,23 @@ - [gcp_sql_users](gcp_sql_users.md) - [gcp_storage_buckets](gcp_storage_buckets.md) - [gcp_storage_bucket_policies](gcp_storage_bucket_policies.md) +- [gcp_translate_glossaries](gcp_translate_glossaries.md) +- [gcp_videotranscoder_job_templates](gcp_videotranscoder_job_templates.md) +- [gcp_videotranscoder_jobs](gcp_videotranscoder_jobs.md) +- [gcp_vision_products](gcp_vision_products.md) + - [gcp_vision_product_reference_images](gcp_vision_product_reference_images.md) +- [gcp_vmmigration_groups](gcp_vmmigration_groups.md) +- [gcp_vmmigration_sources](gcp_vmmigration_sources.md) + - [gcp_vmmigration_source_datacenter_connectors](gcp_vmmigration_source_datacenter_connectors.md) + - [gcp_vmmigration_source_migrating_vms](gcp_vmmigration_source_migrating_vms.md) + - [gcp_vmmigration_source_migrating_vm_clone_jobs](gcp_vmmigration_source_migrating_vm_clone_jobs.md) + - [gcp_vmmigration_source_migrating_vm_cutover_jobs](gcp_vmmigration_source_migrating_vm_cutover_jobs.md) + - [gcp_vmmigration_source_utilization_reports](gcp_vmmigration_source_utilization_reports.md) +- [gcp_vmmigration_target_projects](gcp_vmmigration_target_projects.md) +- [gcp_vpcaccess_locations](gcp_vpcaccess_locations.md) + - [gcp_vpcaccess_connectors](gcp_vpcaccess_connectors.md) +- [gcp_websecurityscanner_scan_configs](gcp_websecurityscanner_scan_configs.md) + - [gcp_websecurityscanner_scan_config_scan_runs](gcp_websecurityscanner_scan_config_scan_runs.md) + - [gcp_websecurityscanner_scan_config_scan_run_crawled_urls](gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md) + - [gcp_websecurityscanner_scan_config_scan_run_findings](gcp_websecurityscanner_scan_config_scan_run_findings.md) - [gcp_workflows_workflows](gcp_workflows_workflows.md) \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_cloudiot_device_states.md b/plugins/source/gcp/docs/tables/gcp_cloudiot_device_states.md index 3d460abeb870b5..9a3d9fda097950 100644 --- a/plugins/source/gcp/docs/tables/gcp_cloudiot_device_states.md +++ b/plugins/source/gcp/docs/tables/gcp_cloudiot_device_states.md @@ -2,7 +2,7 @@ https://cloud.google.com/iot/docs/reference/cloudiot/rest/v1/projects.locations.registries.devices.states#DeviceState -The composite primary key for this table is (**project_id**, **device_name**). +The composite primary key for this table is (**project_id**, **device_name**, **update_time**). ## Relations @@ -18,5 +18,5 @@ This table depends on [gcp_cloudiot_devices](gcp_cloudiot_devices.md). |_cq_parent_id|UUID| |project_id (PK)|String| |device_name (PK)|String| -|update_time|Timestamp| +|update_time (PK)|Timestamp| |binary_data|ByteArray| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_cloudscheduler_jobs.md b/plugins/source/gcp/docs/tables/gcp_cloudscheduler_jobs.md new file mode 100644 index 00000000000000..2e5ab852569bbf --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_cloudscheduler_jobs.md @@ -0,0 +1,30 @@ +# Table: gcp_cloudscheduler_jobs + +https://cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#Job + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_cloudscheduler_locations](gcp_cloudscheduler_locations.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|description|String| +|schedule|String| +|time_zone|String| +|user_update_time|Timestamp| +|state|String| +|status|JSON| +|schedule_time|Timestamp| +|last_attempt_time|Timestamp| +|retry_config|JSON| +|attempt_deadline|Int| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_cloudscheduler_locations.md b/plugins/source/gcp/docs/tables/gcp_cloudscheduler_locations.md new file mode 100644 index 00000000000000..7d39dad03e6888 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_cloudscheduler_locations.md @@ -0,0 +1,25 @@ +# Table: gcp_cloudscheduler_locations + +https://cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations#Location + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_cloudscheduler_locations: + - [gcp_cloudscheduler_jobs](gcp_cloudscheduler_jobs.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|display_name|String| +|labels|JSON| +|location_id|String| +|metadata|ByteArray| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_cloudsupport_cases.md b/plugins/source/gcp/docs/tables/gcp_cloudsupport_cases.md new file mode 100644 index 00000000000000..80b079c8257fa6 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_cloudsupport_cases.md @@ -0,0 +1,30 @@ +# Table: gcp_cloudsupport_cases + +https://cloud.google.com/support/docs/reference/rest/v2beta/cases#Case + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|classification|JSON| +|create_time|String| +|creator|JSON| +|description|String| +|display_name|String| +|escalated|Bool| +|language_code|String| +|priority|String| +|severity|String| +|state|String| +|subscriber_email_addresses|StringArray| +|test_case|Bool| +|time_zone|String| +|update_time|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_kms_crypto_key_versions.md b/plugins/source/gcp/docs/tables/gcp_kms_crypto_key_versions.md new file mode 100644 index 00000000000000..30479b99d3f795 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_kms_crypto_key_versions.md @@ -0,0 +1,33 @@ +# Table: gcp_kms_crypto_key_versions + +https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions#CryptoKeyVersion + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_kms_crypto_keys](gcp_kms_crypto_keys.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|state|String| +|protection_level|String| +|algorithm|String| +|attestation|JSON| +|create_time|Timestamp| +|generate_time|Timestamp| +|destroy_time|Timestamp| +|destroy_event_time|Timestamp| +|import_job|String| +|import_time|Timestamp| +|import_failure_reason|String| +|external_protection_level_options|JSON| +|reimport_eligible|Bool| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md b/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md index 84c240fd71d9d4..2b92c6bf8a1ef6 100644 --- a/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md +++ b/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md @@ -8,6 +8,9 @@ The composite primary key for this table is (**project_id**, **name**). This table depends on [gcp_kms_keyrings](gcp_kms_keyrings.md). +The following tables depend on gcp_kms_crypto_keys: + - [gcp_kms_crypto_key_versions](gcp_kms_crypto_key_versions.md) + ## Columns | Name | Type | diff --git a/plugins/source/gcp/docs/tables/gcp_kms_ekm_connections.md b/plugins/source/gcp/docs/tables/gcp_kms_ekm_connections.md new file mode 100644 index 00000000000000..48a7fb21f02992 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_kms_ekm_connections.md @@ -0,0 +1,23 @@ +# Table: gcp_kms_ekm_connections + +https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.ekmConnections#EkmConnection + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_kms_locations](gcp_kms_locations.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|service_resolvers|JSON| +|etag|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_kms_import_jobs.md b/plugins/source/gcp/docs/tables/gcp_kms_import_jobs.md new file mode 100644 index 00000000000000..7bd038f0c98b4d --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_kms_import_jobs.md @@ -0,0 +1,29 @@ +# Table: gcp_kms_import_jobs + +https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.importJobs#ImportJob + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_kms_keyrings](gcp_kms_keyrings.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|import_method|String| +|protection_level|String| +|create_time|Timestamp| +|generate_time|Timestamp| +|expire_time|Timestamp| +|expire_event_time|Timestamp| +|state|String| +|public_key|JSON| +|attestation|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md b/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md index 16f6f2a5cabfe4..ea9e6fda2040fd 100644 --- a/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md +++ b/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md @@ -6,8 +6,11 @@ The composite primary key for this table is (**project_id**, **name**). ## Relations +This table depends on [gcp_kms_locations](gcp_kms_locations.md). + The following tables depend on gcp_kms_keyrings: - [gcp_kms_crypto_keys](gcp_kms_crypto_keys.md) + - [gcp_kms_import_jobs](gcp_kms_import_jobs.md) ## Columns diff --git a/plugins/source/gcp/docs/tables/gcp_kms_locations.md b/plugins/source/gcp/docs/tables/gcp_kms_locations.md new file mode 100644 index 00000000000000..3f921830928596 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_kms_locations.md @@ -0,0 +1,26 @@ +# Table: gcp_kms_locations + +https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings#KeyRing + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_kms_locations: + - [gcp_kms_ekm_connections](gcp_kms_ekm_connections.md) + - [gcp_kms_keyrings](gcp_kms_keyrings.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|location_id|String| +|display_name|String| +|labels|JSON| +|metadata|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_livestream_channels.md b/plugins/source/gcp/docs/tables/gcp_livestream_channels.md new file mode 100644 index 00000000000000..c0279712635aee --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_livestream_channels.md @@ -0,0 +1,29 @@ +# Table: gcp_livestream_channels + +https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|update_time|Timestamp| +|labels|JSON| +|input_attachments|JSON| +|active_input|String| +|output|JSON| +|elementary_streams|JSON| +|mux_streams|JSON| +|manifests|JSON| +|sprite_sheets|JSON| +|streaming_state|String| +|streaming_error|JSON| +|log_config|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_livestream_inputs.md b/plugins/source/gcp/docs/tables/gcp_livestream_inputs.md new file mode 100644 index 00000000000000..d7e31d8fcd79bb --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_livestream_inputs.md @@ -0,0 +1,25 @@ +# Table: gcp_livestream_inputs + +https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|update_time|Timestamp| +|labels|JSON| +|type|String| +|tier|String| +|uri|String| +|preprocessing_config|JSON| +|security_rules|JSON| +|input_stream_property|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md b/plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md index f4c8041063d0f9..556d2e8b224fb7 100644 --- a/plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md +++ b/plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md @@ -2,7 +2,7 @@ https://cloud.google.com/resource-manager/reference/rest/v3/folders#Folder -The primary key for this table is **_cq_id**. +The composite primary key for this table is (**organization_id**, **name**). ## Columns @@ -10,10 +10,10 @@ The primary key for this table is **_cq_id**. | ------------- | ------------- | |_cq_source_name|String| |_cq_sync_time|Timestamp| -|_cq_id (PK)|UUID| +|_cq_id|UUID| |_cq_parent_id|UUID| -|organization_id|String| -|name|String| +|organization_id (PK)|String| +|name (PK)|String| |parent|String| |display_name|String| |state|String| diff --git a/plugins/source/gcp/docs/tables/gcp_translate_glossaries.md b/plugins/source/gcp/docs/tables/gcp_translate_glossaries.md new file mode 100644 index 00000000000000..9abe072b455df6 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_translate_glossaries.md @@ -0,0 +1,20 @@ +# Table: gcp_translate_glossaries + +https://cloud.google.com/translate/docs/reference/rest/v3/projects.locations.glossaries#resource:-glossary + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|input_config|JSON| +|entry_count|Int| +|submit_time|Timestamp| +|end_time|Timestamp| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_videotranscoder_job_templates.md b/plugins/source/gcp/docs/tables/gcp_videotranscoder_job_templates.md new file mode 100644 index 00000000000000..bc788007fb31bc --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_videotranscoder_job_templates.md @@ -0,0 +1,18 @@ +# Table: gcp_videotranscoder_job_templates + +https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobTemplates + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|config|JSON| +|labels|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_videotranscoder_jobs.md b/plugins/source/gcp/docs/tables/gcp_videotranscoder_jobs.md new file mode 100644 index 00000000000000..8514e2c81a075b --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_videotranscoder_jobs.md @@ -0,0 +1,25 @@ +# Table: gcp_videotranscoder_jobs + +https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobs + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|input_uri|String| +|output_uri|String| +|state|String| +|create_time|Timestamp| +|start_time|Timestamp| +|end_time|Timestamp| +|ttl_after_completion_days|Int| +|labels|JSON| +|error|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vision_product_reference_images.md b/plugins/source/gcp/docs/tables/gcp_vision_product_reference_images.md new file mode 100644 index 00000000000000..77d3882e3549c8 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vision_product_reference_images.md @@ -0,0 +1,22 @@ +# Table: gcp_vision_product_reference_images + +https://cloud.google.com/vision/docs/reference/rest/v1/projects.locations.products.referenceImages + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vision_products](gcp_vision_products.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|uri|String| +|bounding_polys|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vision_products.md b/plugins/source/gcp/docs/tables/gcp_vision_products.md new file mode 100644 index 00000000000000..509621fbb11be5 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vision_products.md @@ -0,0 +1,25 @@ +# Table: gcp_vision_products + +https://cloud.google.com/vision/docs/reference/rest/v1/projects.locations.products + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_vision_products: + - [gcp_vision_product_reference_images](gcp_vision_product_reference_images.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|display_name|String| +|description|String| +|product_category|String| +|product_labels|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_groups.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_groups.md new file mode 100644 index 00000000000000..68546c54698635 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_groups.md @@ -0,0 +1,20 @@ +# Table: gcp_vmmigration_groups + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.groups + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|update_time|Timestamp| +|description|String| +|display_name|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_source_datacenter_connectors.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_datacenter_connectors.md new file mode 100644 index 00000000000000..fa70d22651e524 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_datacenter_connectors.md @@ -0,0 +1,33 @@ +# Table: gcp_vmmigration_source_datacenter_connectors + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.datacenterConnectors + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vmmigration_sources](gcp_vmmigration_sources.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|update_time|Timestamp| +|registration_id|String| +|service_account|String| +|version|String| +|bucket|String| +|state|String| +|state_time|Timestamp| +|error|JSON| +|appliance_infrastructure_version|String| +|appliance_software_version|String| +|available_versions|JSON| +|upgrade_status|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_clone_jobs.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_clone_jobs.md new file mode 100644 index 00000000000000..205128e1ea1475 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_clone_jobs.md @@ -0,0 +1,25 @@ +# Table: gcp_vmmigration_source_migrating_vm_clone_jobs + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms.cloneJobs + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vmmigration_source_migrating_vms](gcp_vmmigration_source_migrating_vms.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|end_time|Timestamp| +|state|String| +|state_time|Timestamp| +|error|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_cutover_jobs.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_cutover_jobs.md new file mode 100644 index 00000000000000..c6a8f5a62514e1 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_cutover_jobs.md @@ -0,0 +1,27 @@ +# Table: gcp_vmmigration_source_migrating_vm_cutover_jobs + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms.cutoverJobs + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vmmigration_source_migrating_vms](gcp_vmmigration_source_migrating_vms.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|end_time|Timestamp| +|state|String| +|state_time|Timestamp| +|progress_percent|Int| +|error|JSON| +|state_message|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vms.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vms.md new file mode 100644 index 00000000000000..5ab0359ee06488 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vms.md @@ -0,0 +1,39 @@ +# Table: gcp_vmmigration_source_migrating_vms + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vmmigration_sources](gcp_vmmigration_sources.md). + +The following tables depend on gcp_vmmigration_source_migrating_vms: + - [gcp_vmmigration_source_migrating_vm_clone_jobs](gcp_vmmigration_source_migrating_vm_clone_jobs.md) + - [gcp_vmmigration_source_migrating_vm_cutover_jobs](gcp_vmmigration_source_migrating_vm_cutover_jobs.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|source_vm_id|String| +|display_name|String| +|description|String| +|policy|JSON| +|create_time|Timestamp| +|update_time|Timestamp| +|last_sync|JSON| +|state|String| +|state_time|Timestamp| +|current_sync_info|JSON| +|group|String| +|labels|JSON| +|recent_clone_jobs|JSON| +|error|JSON| +|recent_cutover_jobs|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_source_utilization_reports.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_utilization_reports.md new file mode 100644 index 00000000000000..f737a3c8992c7c --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_source_utilization_reports.md @@ -0,0 +1,29 @@ +# Table: gcp_vmmigration_source_utilization_reports + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.utilizationReports + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vmmigration_sources](gcp_vmmigration_sources.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|display_name|String| +|state|String| +|state_time|Timestamp| +|error|JSON| +|create_time|Timestamp| +|time_frame|String| +|frame_end_time|Timestamp| +|vm_count|Int| +|vms|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_sources.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_sources.md new file mode 100644 index 00000000000000..eb514f9304a6d2 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_sources.md @@ -0,0 +1,27 @@ +# Table: gcp_vmmigration_sources + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_vmmigration_sources: + - [gcp_vmmigration_source_datacenter_connectors](gcp_vmmigration_source_datacenter_connectors.md) + - [gcp_vmmigration_source_migrating_vms](gcp_vmmigration_source_migrating_vms.md) + - [gcp_vmmigration_source_utilization_reports](gcp_vmmigration_source_utilization_reports.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|create_time|Timestamp| +|update_time|Timestamp| +|labels|JSON| +|description|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vmmigration_target_projects.md b/plugins/source/gcp/docs/tables/gcp_vmmigration_target_projects.md new file mode 100644 index 00000000000000..87013cfa0bb6b2 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vmmigration_target_projects.md @@ -0,0 +1,20 @@ +# Table: gcp_vmmigration_target_projects + +https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.targetProjects + +The composite primary key for this table is (**project_id**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|project|String| +|description|String| +|create_time|Timestamp| +|update_time|Timestamp| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vpcaccess_connectors.md b/plugins/source/gcp/docs/tables/gcp_vpcaccess_connectors.md new file mode 100644 index 00000000000000..33a4e1b86839bb --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vpcaccess_connectors.md @@ -0,0 +1,30 @@ +# Table: gcp_vpcaccess_connectors + +https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_vpcaccess_locations](gcp_vpcaccess_locations.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|network|String| +|ip_cidr_range|String| +|state|String| +|min_throughput|Int| +|max_throughput|Int| +|connected_projects|StringArray| +|subnet|JSON| +|machine_type|String| +|min_instances|Int| +|max_instances|Int| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_vpcaccess_locations.md b/plugins/source/gcp/docs/tables/gcp_vpcaccess_locations.md new file mode 100644 index 00000000000000..71a04dd5f49ad3 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_vpcaccess_locations.md @@ -0,0 +1,25 @@ +# Table: gcp_vpcaccess_locations + +https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/Shared.Types/ListLocationsResponse#Location + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_vpcaccess_locations: + - [gcp_vpcaccess_connectors](gcp_vpcaccess_connectors.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|location_id|String| +|display_name|String| +|labels|JSON| +|metadata|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md new file mode 100644 index 00000000000000..58ce622239d2e9 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md @@ -0,0 +1,23 @@ +# Table: gcp_websecurityscanner_scan_config_scan_run_crawled_urls + +https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns.crawledUrls/list#CrawledUrl + +The composite primary key for this table is (**project_id**, **scan_run_name**, **http_method**, **url**). + +## Relations + +This table depends on [gcp_websecurityscanner_scan_config_scan_runs](gcp_websecurityscanner_scan_config_scan_runs.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|scan_run_name (PK)|String| +|http_method (PK)|String| +|url (PK)|String| +|body|String| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_findings.md b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_findings.md new file mode 100644 index 00000000000000..a18c8b79231d56 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_findings.md @@ -0,0 +1,37 @@ +# Table: gcp_websecurityscanner_scan_config_scan_run_findings + +https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns.findings + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_websecurityscanner_scan_config_scan_runs](gcp_websecurityscanner_scan_config_scan_runs.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|finding_type|String| +|severity|String| +|http_method|String| +|fuzzed_url|String| +|body|String| +|description|String| +|reproduction_url|String| +|frame_url|String| +|final_url|String| +|tracking_id|String| +|form|JSON| +|outdated_library|JSON| +|violating_resource|JSON| +|vulnerable_headers|JSON| +|vulnerable_parameters|JSON| +|xss|JSON| +|xxe|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_runs.md b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_runs.md new file mode 100644 index 00000000000000..f8997c6abf6791 --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_runs.md @@ -0,0 +1,34 @@ +# Table: gcp_websecurityscanner_scan_config_scan_runs + +https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +This table depends on [gcp_websecurityscanner_scan_configs](gcp_websecurityscanner_scan_configs.md). + +The following tables depend on gcp_websecurityscanner_scan_config_scan_runs: + - [gcp_websecurityscanner_scan_config_scan_run_crawled_urls](gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md) + - [gcp_websecurityscanner_scan_config_scan_run_findings](gcp_websecurityscanner_scan_config_scan_run_findings.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|execution_state|String| +|result_state|String| +|start_time|Timestamp| +|end_time|Timestamp| +|urls_crawled_count|Int| +|urls_tested_count|Int| +|has_vulnerabilities|Bool| +|progress_percent|Int| +|error_trace|JSON| +|warning_traces|JSON| \ No newline at end of file diff --git a/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_configs.md b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_configs.md new file mode 100644 index 00000000000000..48298f36227fcb --- /dev/null +++ b/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_configs.md @@ -0,0 +1,33 @@ +# Table: gcp_websecurityscanner_scan_configs + +https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs#resource:-scanconfig + +The composite primary key for this table is (**project_id**, **name**). + +## Relations + +The following tables depend on gcp_websecurityscanner_scan_configs: + - [gcp_websecurityscanner_scan_config_scan_runs](gcp_websecurityscanner_scan_config_scan_runs.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|project_id (PK)|String| +|name (PK)|String| +|display_name|String| +|max_qps|Int| +|starting_urls|StringArray| +|authentication|JSON| +|user_agent|String| +|blacklist_patterns|StringArray| +|schedule|JSON| +|export_to_security_command_center|String| +|risk_level|String| +|managed_scan|Bool| +|static_ip_scan|Bool| +|ignore_http_status_errors|Bool| \ No newline at end of file diff --git a/plugins/source/gcp/go.mod b/plugins/source/gcp/go.mod index d43d1b6f7ae2f6..3e52c55c68f105 100644 --- a/plugins/source/gcp/go.mod +++ b/plugins/source/gcp/go.mod @@ -31,11 +31,18 @@ require ( cloud.google.com/go/redis v1.10.0 cloud.google.com/go/resourcemanager v1.4.0 cloud.google.com/go/run v0.4.0 + cloud.google.com/go/scheduler v1.7.0 cloud.google.com/go/secretmanager v1.9.0 cloud.google.com/go/serviceusage v1.4.0 cloud.google.com/go/storage v1.28.0 + cloud.google.com/go/translate v1.4.0 + cloud.google.com/go/video v1.9.0 + cloud.google.com/go/vision/v2 v2.5.0 + cloud.google.com/go/vmmigration v1.3.0 + cloud.google.com/go/vpcaccess v1.5.0 + cloud.google.com/go/websecurityscanner v1.4.0 cloud.google.com/go/workflows v1.9.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/googleapis/gax-go/v2 v2.7.0 github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 @@ -57,6 +64,7 @@ require ( require ( cloud.google.com/go v0.107.0 // indirect cloud.google.com/go/compute/metadata v0.2.2 // indirect + cloud.google.com/go/vision v1.2.0 // indirect github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect diff --git a/plugins/source/gcp/go.sum b/plugins/source/gcp/go.sum index dd12cad326df31..9b12f5ae464c6c 100644 --- a/plugins/source/gcp/go.sum +++ b/plugins/source/gcp/go.sum @@ -13,6 +13,20 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go/aiplatform v1.27.0 h1:DBi3Jk9XjCJ4pkkLM4NqKgj3ozUL1wq4l+d3/jTGXAI= @@ -45,6 +59,8 @@ cloud.google.com/go/binaryauthorization v1.4.0 h1:pL70vXWn9TitQYXBWTK2abHl2JHLwk cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= cloud.google.com/go/certificatemanager v1.4.0 h1:tzbR4UHBbgsewMWUD93JHi8EBi/gHBoSAcY1/sThFGk= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.14.0 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= cloud.google.com/go/compute/metadata v0.2.2 h1:aWKAjYaBaOSrpKl57+jnS/3fJRQnxL7TvR/u1VVbt6k= @@ -85,6 +101,8 @@ cloud.google.com/go/resourcemanager v1.4.0 h1:NDao6CHMwEZIaNsdWy+tuvHaavNeGP06o1 cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/run v0.4.0 h1:EALS8nDZI6ju0Z/S3z45NaiiP+y02+aN74sGzclyagc= cloud.google.com/go/run v0.4.0/go.mod h1:h2rXOvAjVIqD9Z+m7pUC2rghxTDcUtj1pyBwBi9EDwY= +cloud.google.com/go/scheduler v1.7.0 h1:K/mxOewgHGeKuATUJNGylT75Mhtjmx1TOkKukATqMT8= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= cloud.google.com/go/secretmanager v1.9.0 h1:xE6uXljAC1kCR8iadt9+/blg1fvSbmenlsDN4fT9gqw= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/serviceusage v1.4.0 h1:b0EwJxPJLpavSljMQh0RcdHsUrr5DQ+Nelt/3BAs5ro= @@ -96,28 +114,47 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.28.0 h1:DLrIZ6xkeZX6K70fU/boWx5INJumt6f+nwwWSHXzzGY= cloud.google.com/go/storage v1.28.0/go.mod h1:qlgZML35PXA3zoEnIkiPLY4/TOkUleufRlu6qmcf7sI= +cloud.google.com/go/translate v1.4.0 h1:AOYOH3MspzJ/bH1YXzB+xTE8fMpn3mwhLjugwGXvMPI= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.9.0 h1:ttlvO4J5c1VGq6FkHqWPD/aH6PfdxujHt+muTJlW1Zk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.5.0 h1:TQHxRqvLMi19azwm3qYuDbEzZWmiKJNTpGbkNsfRCik= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.3.0 h1:A2Tl2ZmwMRpvEmhV2ibISY85fmQR+Y5w9a0PlRz5P3s= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vpcaccess v1.5.0 h1:woHXXtnW8b9gLFdWO9HLPalAddBQ9V4LT+1vjKwR3W8= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/websecurityscanner v1.4.0 h1:y7yIFg/h/mO+5Y5aCOtVAnpGUOgqCH5rXQ2Oc8Oq2+g= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/workflows v1.9.0 h1:7Chpin9p50NTU8Tb7qk+I11U/IwVXmDhEoSsdccvInE= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE= github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= @@ -131,8 +168,11 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= @@ -161,6 +201,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -178,8 +219,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -190,15 +233,20 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -206,6 +254,13 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -214,6 +269,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbez github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 h1:hRcWZ7716+E1tkMSZJ/QeeC2dPGGB1R/4z4m9RsL8Qg= @@ -227,6 +284,7 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -269,6 +327,7 @@ github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/schollz/progressbar/v3 v3.12.2 h1:yLqqqpQNMxGxHY8uEshRihaHWwa0rf0yb7/Zrpgq2C0= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -280,6 +339,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -290,12 +350,15 @@ github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xz github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -328,6 +391,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -336,6 +401,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= @@ -366,9 +433,16 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -376,7 +450,18 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU= golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -387,6 +472,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -415,25 +502,48 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -481,7 +591,17 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -506,6 +626,23 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.105.0 h1:t6P9Jj+6XTn4U9I2wycQai6Q/Kz7iOT+QzjJ3G2V4x8= google.golang.org/api v0.105.0/go.mod h1:qh7eD5FJks5+BcE+cjBIm6Gz8vioK7EHvnlniqXBnqI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -547,6 +684,40 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -561,12 +732,24 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/plugins/source/gcp/resources/plugin/tables.go b/plugins/source/gcp/resources/plugin/tables.go index 3dff93533becff..927c09daa085e3 100644 --- a/plugins/source/gcp/resources/plugin/tables.go +++ b/plugins/source/gcp/resources/plugin/tables.go @@ -18,6 +18,8 @@ import ( "github.com/cloudquery/plugins/source/gcp/resources/services/clouddeploy" "github.com/cloudquery/plugins/source/gcp/resources/services/clouderrorreporting" "github.com/cloudquery/plugins/source/gcp/resources/services/cloudiot" + "github.com/cloudquery/plugins/source/gcp/resources/services/cloudscheduler" + "github.com/cloudquery/plugins/source/gcp/resources/services/cloudsupport" "github.com/cloudquery/plugins/source/gcp/resources/services/compute" "github.com/cloudquery/plugins/source/gcp/resources/services/container" "github.com/cloudquery/plugins/source/gcp/resources/services/containeranalysis" @@ -26,6 +28,7 @@ import ( "github.com/cloudquery/plugins/source/gcp/resources/services/functions" "github.com/cloudquery/plugins/source/gcp/resources/services/iam" "github.com/cloudquery/plugins/source/gcp/resources/services/kms" + "github.com/cloudquery/plugins/source/gcp/resources/services/livestream" "github.com/cloudquery/plugins/source/gcp/resources/services/logging" "github.com/cloudquery/plugins/source/gcp/resources/services/monitoring" "github.com/cloudquery/plugins/source/gcp/resources/services/redis" @@ -35,6 +38,12 @@ import ( "github.com/cloudquery/plugins/source/gcp/resources/services/serviceusage" "github.com/cloudquery/plugins/source/gcp/resources/services/sql" "github.com/cloudquery/plugins/source/gcp/resources/services/storage" + "github.com/cloudquery/plugins/source/gcp/resources/services/translate" + "github.com/cloudquery/plugins/source/gcp/resources/services/videotranscoder" + "github.com/cloudquery/plugins/source/gcp/resources/services/vision" + "github.com/cloudquery/plugins/source/gcp/resources/services/vmmigration" + "github.com/cloudquery/plugins/source/gcp/resources/services/vpcaccess" + "github.com/cloudquery/plugins/source/gcp/resources/services/websecurityscanner" "github.com/cloudquery/plugins/source/gcp/resources/services/workflows" ) @@ -87,6 +96,8 @@ func PluginAutoGeneratedTables() []*schema.Table { clouddeploy.DeliveryPipelines(), clouderrorreporting.ErrorGroupStats(), cloudiot.DeviceRegistries(), + cloudscheduler.Locations(), + cloudsupport.Cases(), compute.Addresses(), compute.Autoscalers(), compute.BackendServices(), @@ -116,7 +127,9 @@ func PluginAutoGeneratedTables() []*schema.Table { iam.Roles(), iam.ServiceAccounts(), iam.DenyPolicies(), - kms.Keyrings(), + kms.Locations(), + livestream.Channels(), + livestream.Inputs(), logging.Metrics(), logging.Sinks(), monitoring.AlertPolicies(), @@ -129,6 +142,15 @@ func PluginAutoGeneratedTables() []*schema.Table { serviceusage.Services(), sql.Instances(), storage.Buckets(), + translate.Glossaries(), + videotranscoder.Jobs(), + videotranscoder.JobTemplates(), + vision.Products(), + vmmigration.Groups(), + vmmigration.Sources(), + vmmigration.TargetProjects(), + vpcaccess.Locations(), + websecurityscanner.ScanConfigs(), workflows.Workflows(), } } diff --git a/plugins/source/gcp/resources/services/cloudiot/device_states.go b/plugins/source/gcp/resources/services/cloudiot/device_states.go index 8a1d80257356b0..96c923bbe6cafb 100644 --- a/plugins/source/gcp/resources/services/cloudiot/device_states.go +++ b/plugins/source/gcp/resources/services/cloudiot/device_states.go @@ -31,6 +31,14 @@ func DeviceStates() *schema.Table { PrimaryKey: true, }, }, + { + Name: "update_time", + Type: schema.TypeTimestamp, + Resolver: client.ResolveProtoTimestamp("UpdateTime"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, }, } } diff --git a/plugins/source/gcp/resources/services/cloudscheduler/jobs.go b/plugins/source/gcp/resources/services/cloudscheduler/jobs.go new file mode 100644 index 00000000000000..0871474f983186 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudscheduler/jobs.go @@ -0,0 +1,36 @@ +package cloudscheduler + +import ( + pb "cloud.google.com/go/scheduler/apiv1/schedulerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Jobs() *schema.Table { + return &schema.Table{ + Name: "gcp_cloudscheduler_jobs", + Description: `https://cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#Job`, + Resolver: fetchJobs, + Multiplex: client.ProjectMultiplexEnabledServices("cloudscheduler.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Job{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/cloudscheduler/jobs_fetch.go b/plugins/source/gcp/resources/services/cloudscheduler/jobs_fetch.go new file mode 100644 index 00000000000000..7f6e4d14147a10 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudscheduler/jobs_fetch.go @@ -0,0 +1,36 @@ +package cloudscheduler + +import ( + "context" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" + + scheduler "cloud.google.com/go/scheduler/apiv1" + "cloud.google.com/go/scheduler/apiv1/schedulerpb" + + locationspb "google.golang.org/api/cloudscheduler/v1" +) + +func fetchJobs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + p := parent.Item.(*locationspb.Location) + gcpClient, err := scheduler.NewCloudSchedulerClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListJobs(ctx, &schedulerpb.ListJobsRequest{Parent: p.Name}) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/cloudscheduler/locations.go b/plugins/source/gcp/resources/services/cloudscheduler/locations.go new file mode 100644 index 00000000000000..f20b3862fc2167 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudscheduler/locations.go @@ -0,0 +1,39 @@ +package cloudscheduler + +import ( + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" + pb "google.golang.org/api/cloudscheduler/v1" +) + +func Locations() *schema.Table { + return &schema.Table{ + Name: "gcp_cloudscheduler_locations", + Description: `https://cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations#Location`, + Resolver: fetchLocations, + Multiplex: client.ProjectMultiplexEnabledServices("cloudscheduler.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Location{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + Relations: []*schema.Table{ + Jobs(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/cloudscheduler/locations_fetch.go b/plugins/source/gcp/resources/services/cloudscheduler/locations_fetch.go new file mode 100644 index 00000000000000..7b8d6cb012a059 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudscheduler/locations_fetch.go @@ -0,0 +1,32 @@ +package cloudscheduler + +import ( + "context" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + + "google.golang.org/api/cloudscheduler/v1" +) + +func fetchLocations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + nextPageToken := "" + gcpClient, err := cloudscheduler.NewService(ctx, c.ClientOptions...) + if err != nil { + return err + } + + for { + output, err := gcpClient.Projects.Locations.List("projects/" + c.ProjectId).PageToken(nextPageToken).Context(ctx).Do() + if err != nil { + return err + } + res <- output.Locations + if output.NextPageToken == "" { + break + } + nextPageToken = output.NextPageToken + } + return nil +} diff --git a/plugins/source/gcp/resources/services/cloudsupport/cases.go b/plugins/source/gcp/resources/services/cloudsupport/cases.go new file mode 100644 index 00000000000000..c9b95c1e6980d3 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudsupport/cases.go @@ -0,0 +1,36 @@ +package cloudsupport + +import ( + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" + pb "google.golang.org/api/cloudsupport/v2beta" +) + +func Cases() *schema.Table { + return &schema.Table{ + Name: "gcp_cloudsupport_cases", + Description: `https://cloud.google.com/support/docs/reference/rest/v2beta/cases#Case`, + Resolver: fetchCases, + Multiplex: client.ProjectMultiplexEnabledServices("cloudsupport.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Case{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/cloudsupport/cases_fetch.go b/plugins/source/gcp/resources/services/cloudsupport/cases_fetch.go new file mode 100644 index 00000000000000..c44fea17163b84 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudsupport/cases_fetch.go @@ -0,0 +1,32 @@ +package cloudsupport + +import ( + "context" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + + cloudsupport "google.golang.org/api/cloudsupport/v2beta" +) + +func fetchCases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + nextPageToken := "" + gcpClient, err := cloudsupport.NewService(ctx, c.ClientOptions...) + if err != nil { + return err + } + + for { + output, err := gcpClient.Cases.List("projects/" + c.ProjectId).PageSize(1000).PageToken(nextPageToken).Context(ctx).Do() + if err != nil { + return err + } + res <- output.Cases + if output.NextPageToken == "" { + break + } + nextPageToken = output.NextPageToken + } + return nil +} diff --git a/plugins/source/gcp/resources/services/cloudsupport/cases_mock_test.go b/plugins/source/gcp/resources/services/cloudsupport/cases_mock_test.go new file mode 100644 index 00000000000000..67d9b1967a89e1 --- /dev/null +++ b/plugins/source/gcp/resources/services/cloudsupport/cases_mock_test.go @@ -0,0 +1,36 @@ +package cloudsupport + +import ( + "encoding/json" + "net/http" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "github.com/julienschmidt/httprouter" + pb "google.golang.org/api/cloudsupport/v2beta" +) + +func createCases(mux *httprouter.Router) error { + var item pb.ListCasesResponse + if err := faker.FakeObject(&item); err != nil { + return err + } + item.NextPageToken = "" + mux.GET("/v2beta/projects/testProject/cases", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + b, err := json.Marshal(&item) + if err != nil { + http.Error(w, "unable to marshal request: "+err.Error(), http.StatusBadRequest) + return + } + if _, err := w.Write(b); err != nil { + http.Error(w, "failed to write", http.StatusBadRequest) + return + } + }) + return nil +} + +func TestCases(t *testing.T) { + client.MockTestRestHelper(t, Cases(), createCases, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/kms/crypto_key_versions.go b/plugins/source/gcp/resources/services/kms/crypto_key_versions.go new file mode 100644 index 00000000000000..614068f226294f --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/crypto_key_versions.go @@ -0,0 +1,36 @@ +package kms + +import ( + pb "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func CryptoKeyVersions() *schema.Table { + return &schema.Table{ + Name: "gcp_kms_crypto_key_versions", + Description: `https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions#CryptoKeyVersion`, + Resolver: fetchCryptoKeyVersions, + Multiplex: client.ProjectMultiplexEnabledServices("cloudkms.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.CryptoKeyVersion{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/kms/crypto_key_versions_fetch.go b/plugins/source/gcp/resources/services/kms/crypto_key_versions_fetch.go new file mode 100644 index 00000000000000..6f7a3444ff172e --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/crypto_key_versions_fetch.go @@ -0,0 +1,33 @@ +package kms + +import ( + "context" + + kms "cloud.google.com/go/kms/apiv1" + "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchCryptoKeyVersions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + p := parent.Item.(*kmspb.CryptoKey) + kmsClient, err := kms.NewKeyManagementClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := kmsClient.ListCryptoKeyVersions(ctx, &kmspb.ListCryptoKeyVersionsRequest{Parent: p.Name}) + for { + key, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + res <- key + } + return nil +} diff --git a/plugins/source/gcp/resources/services/kms/crypto_keys.go b/plugins/source/gcp/resources/services/kms/crypto_keys.go index 50535a5fa040a9..ccfcc738526130 100644 --- a/plugins/source/gcp/resources/services/kms/crypto_keys.go +++ b/plugins/source/gcp/resources/services/kms/crypto_keys.go @@ -37,5 +37,8 @@ func CryptoKeys() *schema.Table { Resolver: resolveRotationPeriod, }, }, + Relations: []*schema.Table{ + CryptoKeyVersions(), + }, } } diff --git a/plugins/source/gcp/resources/services/kms/ekm_connections.go b/plugins/source/gcp/resources/services/kms/ekm_connections.go new file mode 100644 index 00000000000000..29dc1019313a1f --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/ekm_connections.go @@ -0,0 +1,36 @@ +package kms + +import ( + pb "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func EkmConnections() *schema.Table { + return &schema.Table{ + Name: "gcp_kms_ekm_connections", + Description: `https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.ekmConnections#EkmConnection`, + Resolver: fetchEkmConnections, + Multiplex: client.ProjectMultiplexEnabledServices("cloudkms.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.EkmConnection{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/kms/ekm_connections_fetch.go b/plugins/source/gcp/resources/services/kms/ekm_connections_fetch.go new file mode 100644 index 00000000000000..5bfab90b6fd3b4 --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/ekm_connections_fetch.go @@ -0,0 +1,35 @@ +package kms + +import ( + "context" + + kms "cloud.google.com/go/kms/apiv1" + "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func fetchEkmConnections(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + p := parent.Item.(*locationpb.Location) + kmsClient, err := kms.NewEkmClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := kmsClient.ListEkmConnections(ctx, &kmspb.ListEkmConnectionsRequest{Parent: p.Name}) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/kms/import_jobs.go b/plugins/source/gcp/resources/services/kms/import_jobs.go new file mode 100644 index 00000000000000..d0e30f79f7ef55 --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/import_jobs.go @@ -0,0 +1,36 @@ +package kms + +import ( + pb "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func ImportJobs() *schema.Table { + return &schema.Table{ + Name: "gcp_kms_import_jobs", + Description: `https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.importJobs#ImportJob`, + Resolver: fetchImportJobs, + Multiplex: client.ProjectMultiplexEnabledServices("cloudkms.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.ImportJob{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/kms/import_jobs_fetch.go b/plugins/source/gcp/resources/services/kms/import_jobs_fetch.go new file mode 100644 index 00000000000000..3edb5d24b794c7 --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/import_jobs_fetch.go @@ -0,0 +1,33 @@ +package kms + +import ( + "context" + + kms "cloud.google.com/go/kms/apiv1" + "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchImportJobs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + p := parent.Item.(*kmspb.KeyRing) + kmsClient, err := kms.NewKeyManagementClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := kmsClient.ListImportJobs(ctx, &kmspb.ListImportJobsRequest{Parent: p.Name}) + for { + key, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + res <- key + } + return nil +} diff --git a/plugins/source/gcp/resources/services/kms/keyrings.go b/plugins/source/gcp/resources/services/kms/keyrings.go index 493eb3aaab2494..7dfad71085d02f 100644 --- a/plugins/source/gcp/resources/services/kms/keyrings.go +++ b/plugins/source/gcp/resources/services/kms/keyrings.go @@ -7,7 +7,7 @@ import ( "github.com/cloudquery/plugins/source/gcp/client" ) -func Keyrings() *schema.Table { +func KeyRings() *schema.Table { return &schema.Table{ Name: "gcp_kms_keyrings", Description: `https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings#KeyRing`, @@ -34,6 +34,7 @@ func Keyrings() *schema.Table { }, Relations: []*schema.Table{ CryptoKeys(), + ImportJobs(), }, } } diff --git a/plugins/source/gcp/resources/services/kms/keyrings_fetch.go b/plugins/source/gcp/resources/services/kms/keyrings_fetch.go index eb9ca2615a9d96..66b0431a349ffd 100644 --- a/plugins/source/gcp/resources/services/kms/keyrings_fetch.go +++ b/plugins/source/gcp/resources/services/kms/keyrings_fetch.go @@ -13,44 +13,23 @@ import ( func fetchKeyrings(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { c := meta.(*client.Client) + p := parent.Item.(*locationpb.Location) kmsClient, err := kms.NewKeyManagementClient(ctx, c.ClientOptions...) if err != nil { return err } - locations, err := getAllKmsLocations(ctx, c, kmsClient) - if err != nil { - return err - } - for _, l := range locations { - it := kmsClient.ListKeyRings(ctx, &kmspb.ListKeyRingsRequest{Parent: l.Name}) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - return err - } - - res <- resp - } - } - return nil -} - -func getAllKmsLocations(ctx context.Context, c *client.Client, kmsClient *kms.KeyManagementClient) ([]*locationpb.Location, error) { - var locations []*locationpb.Location - it := kmsClient.ListLocations(ctx, &locationpb.ListLocationsRequest{Name: "projects/" + c.ProjectId}) + it := kmsClient.ListKeyRings(ctx, &kmspb.ListKeyRingsRequest{Parent: p.Name}) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { - return nil, err + return err } - locations = append(locations, resp) + + res <- resp } - return locations, nil + return nil } diff --git a/plugins/source/gcp/resources/services/kms/keyrings_mock_test.go b/plugins/source/gcp/resources/services/kms/keyrings_mock_test.go deleted file mode 100644 index fcd565bcf2836b..00000000000000 --- a/plugins/source/gcp/resources/services/kms/keyrings_mock_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package kms - -import ( - "context" - "fmt" - "testing" - - "cloud.google.com/go/kms/apiv1/kmspb" - "github.com/cloudquery/plugin-sdk/faker" - "github.com/cloudquery/plugins/source/gcp/client" - locationpb "google.golang.org/genproto/googleapis/cloud/location" - "google.golang.org/grpc" - "google.golang.org/protobuf/types/known/timestamppb" -) - -func createKeyrings(gsrv *grpc.Server) error { - fakeServer := &fakeKeyringsServer{} - kmspb.RegisterKeyManagementServiceServer(gsrv, fakeServer) - locationpb.RegisterLocationsServer(gsrv, new(fakeLocationsServer)) - - location := &locationpb.Location{ - DisplayName: "testLocation", - Name: "projects/testProject/location/testLocation", - } - - var keyring kmspb.KeyRing - if err := faker.FakeObject(&keyring); err != nil { - return err - } - keyring.Name = fmt.Sprintf("projects/testProject/location/%s/keyring/%s", location.Name, keyring.Name) - keyring.CreateTime = timestamppb.Now() - var key kmspb.CryptoKey - if err := faker.FakeObject(&key); err != nil { - return err - } - key.Name = fmt.Sprintf("%s/cryptokey/%s", keyring.Name, "test") - key.CreateTime = timestamppb.Now() - key.NextRotationTime = timestamppb.Now() - key.Primary.CreateTime = timestamppb.Now() - key.Primary.DestroyEventTime = timestamppb.Now() - key.Primary.DestroyTime = timestamppb.Now() - key.Primary.GenerateTime = timestamppb.Now() - key.Primary.ImportTime = timestamppb.Now() - - return nil -} - -type fakeKeyringsServer struct { - kmspb.UnimplementedKeyManagementServiceServer -} - -func (*fakeKeyringsServer) ListKeyRings(context.Context, *kmspb.ListKeyRingsRequest) (*kmspb.ListKeyRingsResponse, error) { - resp := kmspb.ListKeyRingsResponse{} - if err := faker.FakeObject(&resp); err != nil { - return nil, fmt.Errorf("failed to fake data: %w", err) - } - resp.NextPageToken = "" - return &resp, nil -} - -func (*fakeKeyringsServer) ListCryptoKeys(context.Context, *kmspb.ListCryptoKeysRequest) (*kmspb.ListCryptoKeysResponse, error) { - resp := kmspb.ListCryptoKeysResponse{} - if err := faker.FakeObject(&resp); err != nil { - return nil, fmt.Errorf("failed to fake data: %w", err) - } - resp.NextPageToken = "" - return &resp, nil -} - -type fakeLocationsServer struct { - location *locationpb.Location - locationpb.UnimplementedLocationsServer -} - -func (srv *fakeLocationsServer) ListLocations(context.Context, *locationpb.ListLocationsRequest) (*locationpb.ListLocationsResponse, error) { - return &locationpb.ListLocationsResponse{Locations: []*locationpb.Location{srv.location}}, nil -} - -func TestKeyrings(t *testing.T) { - client.MockTestGrpcHelper(t, Keyrings(), createKeyrings, client.TestOptions{}) -} diff --git a/plugins/source/gcp/resources/services/kms/locations.go b/plugins/source/gcp/resources/services/kms/locations.go new file mode 100644 index 00000000000000..86c8cf04743b21 --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/locations.go @@ -0,0 +1,40 @@ +package kms + +import ( + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func Locations() *schema.Table { + return &schema.Table{ + Name: "gcp_kms_locations", + Description: `https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings#KeyRing`, + Resolver: fetchLocations, + Multiplex: client.ProjectMultiplexEnabledServices("cloudkms.googleapis.com"), + Transform: transformers.TransformWithStruct(&locationpb.Location{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + Relations: []*schema.Table{ + KeyRings(), + EkmConnections(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/kms/locations_fetch.go b/plugins/source/gcp/resources/services/kms/locations_fetch.go new file mode 100644 index 00000000000000..21719e91d3fce0 --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/locations_fetch.go @@ -0,0 +1,32 @@ +package kms + +import ( + "context" + + kms "cloud.google.com/go/kms/apiv1" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func fetchLocations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + kmsClient, err := kms.NewKeyManagementClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := kmsClient.ListLocations(ctx, &locationpb.ListLocationsRequest{Name: "projects/" + c.ProjectId}) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/kms/locations_mock_test.go b/plugins/source/gcp/resources/services/kms/locations_mock_test.go new file mode 100644 index 00000000000000..118c265b32ef2b --- /dev/null +++ b/plugins/source/gcp/resources/services/kms/locations_mock_test.go @@ -0,0 +1,111 @@ +package kms + +import ( + "context" + "fmt" + "testing" + + "cloud.google.com/go/kms/apiv1/kmspb" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func createLocations(gsrv *grpc.Server) error { + fakeServer := &fakeServer{} + kmspb.RegisterKeyManagementServiceServer(gsrv, fakeServer) + kmspb.RegisterEkmServiceServer(gsrv, fakeServer) + locationpb.RegisterLocationsServer(gsrv, fakeServer) + + location := &locationpb.Location{ + DisplayName: "testLocation", + Name: "projects/testProject/location/testLocation", + } + + var keyring kmspb.KeyRing + if err := faker.FakeObject(&keyring); err != nil { + return err + } + keyring.Name = fmt.Sprintf("projects/testProject/location/%s/keyring/%s", location.Name, keyring.Name) + keyring.CreateTime = timestamppb.Now() + var key kmspb.CryptoKey + if err := faker.FakeObject(&key); err != nil { + return err + } + key.Name = fmt.Sprintf("%s/cryptokey/%s", keyring.Name, "test") + key.CreateTime = timestamppb.Now() + key.NextRotationTime = timestamppb.Now() + key.Primary.CreateTime = timestamppb.Now() + key.Primary.DestroyEventTime = timestamppb.Now() + key.Primary.DestroyTime = timestamppb.Now() + key.Primary.GenerateTime = timestamppb.Now() + key.Primary.ImportTime = timestamppb.Now() + + return nil +} + +type fakeServer struct { + kmspb.UnimplementedKeyManagementServiceServer + kmspb.UnimplementedEkmServiceServer + locationpb.UnimplementedLocationsServer +} + +func (*fakeServer) ListKeyRings(context.Context, *kmspb.ListKeyRingsRequest) (*kmspb.ListKeyRingsResponse, error) { + resp := kmspb.ListKeyRingsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListCryptoKeys(context.Context, *kmspb.ListCryptoKeysRequest) (*kmspb.ListCryptoKeysResponse, error) { + resp := kmspb.ListCryptoKeysResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListCryptoKeyVersions(context.Context, *kmspb.ListCryptoKeyVersionsRequest) (*kmspb.ListCryptoKeyVersionsResponse, error) { + resp := kmspb.ListCryptoKeyVersionsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListLocations(context.Context, *locationpb.ListLocationsRequest) (*locationpb.ListLocationsResponse, error) { + resp := locationpb.ListLocationsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListImportJobs(context.Context, *kmspb.ListImportJobsRequest) (*kmspb.ListImportJobsResponse, error) { + resp := kmspb.ListImportJobsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListEkmConnections(context.Context, *kmspb.ListEkmConnectionsRequest) (*kmspb.ListEkmConnectionsResponse, error) { + resp := kmspb.ListEkmConnectionsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestLocations(t *testing.T) { + client.MockTestGrpcHelper(t, Locations(), createLocations, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/livestream/channels.go b/plugins/source/gcp/resources/services/livestream/channels.go new file mode 100644 index 00000000000000..1c3f7c4f9acebc --- /dev/null +++ b/plugins/source/gcp/resources/services/livestream/channels.go @@ -0,0 +1,36 @@ +package livestream + +import ( + pb "cloud.google.com/go/video/livestream/apiv1/livestreampb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Channels() *schema.Table { + return &schema.Table{ + Name: "gcp_livestream_channels", + Description: `https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels`, + Resolver: fetchChannels, + Multiplex: client.ProjectMultiplexEnabledServices("livestream.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Channel{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/livestream/channels_fetch.go b/plugins/source/gcp/resources/services/livestream/channels_fetch.go new file mode 100644 index 00000000000000..7e81d64df27c5d --- /dev/null +++ b/plugins/source/gcp/resources/services/livestream/channels_fetch.go @@ -0,0 +1,36 @@ +package livestream + +import ( + "context" + + livestream "cloud.google.com/go/video/livestream/apiv1" + pb "cloud.google.com/go/video/livestream/apiv1/livestreampb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchChannels(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := livestream.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListChannels(ctx, &pb.ListChannelsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/livestream/inputs.go b/plugins/source/gcp/resources/services/livestream/inputs.go new file mode 100644 index 00000000000000..7a842a91a029da --- /dev/null +++ b/plugins/source/gcp/resources/services/livestream/inputs.go @@ -0,0 +1,36 @@ +package livestream + +import ( + pb "cloud.google.com/go/video/livestream/apiv1/livestreampb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Inputs() *schema.Table { + return &schema.Table{ + Name: "gcp_livestream_inputs", + Description: `https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs`, + Resolver: fetchInputs, + Multiplex: client.ProjectMultiplexEnabledServices("livestream.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Input{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/livestream/inputs_fetch.go b/plugins/source/gcp/resources/services/livestream/inputs_fetch.go new file mode 100644 index 00000000000000..c69e09db289756 --- /dev/null +++ b/plugins/source/gcp/resources/services/livestream/inputs_fetch.go @@ -0,0 +1,36 @@ +package livestream + +import ( + "context" + + livestream "cloud.google.com/go/video/livestream/apiv1" + pb "cloud.google.com/go/video/livestream/apiv1/livestreampb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchInputs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := livestream.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListInputs(ctx, &pb.ListInputsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/resourcemanager/folders.go b/plugins/source/gcp/resources/services/resourcemanager/folders.go index 01b458d8218d0e..f52b5db0a3e324 100644 --- a/plugins/source/gcp/resources/services/resourcemanager/folders.go +++ b/plugins/source/gcp/resources/services/resourcemanager/folders.go @@ -18,7 +18,18 @@ func Folders() *schema.Table { { Name: "organization_id", Type: schema.TypeString, - Resolver: resolveOrganizationId, + Resolver: client.ResolveOrganization, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, }, }, } diff --git a/plugins/source/gcp/resources/services/resourcemanager/folders_fetch.go b/plugins/source/gcp/resources/services/resourcemanager/folders_fetch.go index c29c33e7df9f05..dfedf5f6a70869 100644 --- a/plugins/source/gcp/resources/services/resourcemanager/folders_fetch.go +++ b/plugins/source/gcp/resources/services/resourcemanager/folders_fetch.go @@ -2,7 +2,6 @@ package resourcemanager import ( "context" - "strings" "google.golang.org/api/iterator" @@ -37,12 +36,3 @@ func fetchFolders(ctx context.Context, meta schema.ClientMeta, parent *schema.Re } return nil } - -func resolveOrganizationId(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { - item := r.Item.(*pb.Folder) - if !strings.HasPrefix(item.Parent, "organizations/") { - return nil - } - - return r.Set(c.Name, strings.TrimPrefix(item.Parent, "organizations/")) -} diff --git a/plugins/source/gcp/resources/services/translate/glossaries.go b/plugins/source/gcp/resources/services/translate/glossaries.go new file mode 100644 index 00000000000000..fc1996b88cfff9 --- /dev/null +++ b/plugins/source/gcp/resources/services/translate/glossaries.go @@ -0,0 +1,36 @@ +package translate + +import ( + pb "cloud.google.com/go/translate/apiv3/translatepb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Glossaries() *schema.Table { + return &schema.Table{ + Name: "gcp_translate_glossaries", + Description: `https://cloud.google.com/translate/docs/reference/rest/v3/projects.locations.glossaries#resource:-glossary`, + Resolver: fetchGlossaries, + Multiplex: client.ProjectMultiplexEnabledServices("translate.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Glossary{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/translate/glossaries_fetch.go b/plugins/source/gcp/resources/services/translate/glossaries_fetch.go new file mode 100644 index 00000000000000..52d275b6987394 --- /dev/null +++ b/plugins/source/gcp/resources/services/translate/glossaries_fetch.go @@ -0,0 +1,36 @@ +package translate + +import ( + "context" + + translate "cloud.google.com/go/translate/apiv3" + pb "cloud.google.com/go/translate/apiv3/translatepb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchGlossaries(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := translate.NewTranslationClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListGlossaries(ctx, &pb.ListGlossariesRequest{ + Parent: "projects/" + c.ProjectId + "/locations/global", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/job_templates.go b/plugins/source/gcp/resources/services/videotranscoder/job_templates.go new file mode 100644 index 00000000000000..f7824c2c190fc8 --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/job_templates.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func JobTemplates() *schema.Table { + return &schema.Table{ + Name: "gcp_videotranscoder_job_templates", + Description: `https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobTemplates`, + Resolver: fetchJobTemplates, + Multiplex: client.ProjectMultiplexEnabledServices("transcoder.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.JobTemplate{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/job_templates_fetch.go b/plugins/source/gcp/resources/services/videotranscoder/job_templates_fetch.go new file mode 100644 index 00000000000000..0951c4808e1664 --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/job_templates_fetch.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + "context" + + transcoder "cloud.google.com/go/video/transcoder/apiv1" + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchJobTemplates(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := transcoder.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListJobTemplates(ctx, &pb.ListJobTemplatesRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/job_templates_mock_test.go b/plugins/source/gcp/resources/services/videotranscoder/job_templates_mock_test.go new file mode 100644 index 00000000000000..a725eeafdf87ce --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/job_templates_mock_test.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" +) + +func createJobTemplatesServer(gsrv *grpc.Server) error { + fakeServer := &fakeJobTemplatesServer{} + pb.RegisterTranscoderServiceServer(gsrv, fakeServer) + return nil +} + +type fakeJobTemplatesServer struct { + pb.UnimplementedTranscoderServiceServer +} + +func (*fakeJobTemplatesServer) ListJobTemplates(context.Context, *pb.ListJobTemplatesRequest) (*pb.ListJobTemplatesResponse, error) { + resp := pb.ListJobTemplatesResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestJobTemplates(t *testing.T) { + client.MockTestGrpcHelper(t, JobTemplates(), createJobTemplatesServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/jobs.go b/plugins/source/gcp/resources/services/videotranscoder/jobs.go new file mode 100644 index 00000000000000..5137da28211fcc --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/jobs.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Jobs() *schema.Table { + return &schema.Table{ + Name: "gcp_videotranscoder_jobs", + Description: `https://cloud.google.com/transcoder/docs/reference/rest/v1/projects.locations.jobs`, + Resolver: fetchJobs, + Multiplex: client.ProjectMultiplexEnabledServices("transcoder.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Job{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/jobs_fetch.go b/plugins/source/gcp/resources/services/videotranscoder/jobs_fetch.go new file mode 100644 index 00000000000000..2f35c4862d34ba --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/jobs_fetch.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + "context" + + transcoder "cloud.google.com/go/video/transcoder/apiv1" + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchJobs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := transcoder.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListJobs(ctx, &pb.ListJobsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/videotranscoder/jobs_mock_test.go b/plugins/source/gcp/resources/services/videotranscoder/jobs_mock_test.go new file mode 100644 index 00000000000000..27bbcf9dfbf451 --- /dev/null +++ b/plugins/source/gcp/resources/services/videotranscoder/jobs_mock_test.go @@ -0,0 +1,36 @@ +package videotranscoder + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" +) + +func createJobsServer(gsrv *grpc.Server) error { + fakeServer := &fakeJobsServer{} + pb.RegisterTranscoderServiceServer(gsrv, fakeServer) + return nil +} + +type fakeJobsServer struct { + pb.UnimplementedTranscoderServiceServer +} + +func (*fakeJobsServer) ListJobs(context.Context, *pb.ListJobsRequest) (*pb.ListJobsResponse, error) { + resp := pb.ListJobsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestInstances(t *testing.T) { + client.MockTestGrpcHelper(t, Jobs(), createJobsServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/vision/products.go b/plugins/source/gcp/resources/services/vision/products.go new file mode 100644 index 00000000000000..9e88f76bb83f76 --- /dev/null +++ b/plugins/source/gcp/resources/services/vision/products.go @@ -0,0 +1,44 @@ +package vision + +import ( + pb "cloud.google.com/go/vision/v2/apiv1/visionpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Products() *schema.Table { + return &schema.Table{ + Name: "gcp_vision_products", + Description: `https://cloud.google.com/vision/docs/reference/rest/v1/projects.locations.products`, + Resolver: fetchProducts, + // The list of locations was copied by me from the APIs error message. Yuck. + Multiplex: client.ProjectLocationMultiplexEnabledServices("vision.googleapis.com", + []string{ + "us-west1", "us-east1", "asia-east1", "europe-west1", + }), + Transform: transformers.TransformWithStruct(&pb.Product{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + + Relations: []*schema.Table{ + ReferenceImages(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/vision/products_fetch.go b/plugins/source/gcp/resources/services/vision/products_fetch.go new file mode 100644 index 00000000000000..e391cd8d896854 --- /dev/null +++ b/plugins/source/gcp/resources/services/vision/products_fetch.go @@ -0,0 +1,37 @@ +package vision + +import ( + "context" + + vision "cloud.google.com/go/vision/v2/apiv1" + pb "cloud.google.com/go/vision/v2/apiv1/visionpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchProducts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := vision.NewProductSearchClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListProducts(ctx, &pb.ListProductsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/" + c.Location, + PageSize: 100, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vision/products_mock_test.go b/plugins/source/gcp/resources/services/vision/products_mock_test.go new file mode 100644 index 00000000000000..458456afdcad31 --- /dev/null +++ b/plugins/source/gcp/resources/services/vision/products_mock_test.go @@ -0,0 +1,45 @@ +package vision + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/vision/v2/apiv1/visionpb" +) + +func createServer(gsrv *grpc.Server) error { + fakeServer := &fakeServer{} + pb.RegisterProductSearchServer(gsrv, fakeServer) + return nil +} + +type fakeServer struct { + pb.UnimplementedProductSearchServer +} + +func (*fakeServer) ListProducts(context.Context, *pb.ListProductsRequest) (*pb.ListProductsResponse, error) { + resp := pb.ListProductsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListReferenceImages(context.Context, *pb.ListReferenceImagesRequest) (*pb.ListReferenceImagesResponse, error) { + resp := pb.ListReferenceImagesResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestInstances(t *testing.T) { + client.MockTestGrpcHelper(t, Products(), createServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/vision/reference_image.go b/plugins/source/gcp/resources/services/vision/reference_image.go new file mode 100644 index 00000000000000..e990081b8ebfc6 --- /dev/null +++ b/plugins/source/gcp/resources/services/vision/reference_image.go @@ -0,0 +1,35 @@ +package vision + +import ( + pb "cloud.google.com/go/vision/v2/apiv1/visionpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func ReferenceImages() *schema.Table { + return &schema.Table{ + Name: "gcp_vision_product_reference_images", + Description: `https://cloud.google.com/vision/docs/reference/rest/v1/projects.locations.products.referenceImages`, + Resolver: fetchReferenceImages, + Transform: transformers.TransformWithStruct(&pb.ReferenceImage{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vision/reference_image_fetch.go b/plugins/source/gcp/resources/services/vision/reference_image_fetch.go new file mode 100644 index 00000000000000..b0e02e02e80f27 --- /dev/null +++ b/plugins/source/gcp/resources/services/vision/reference_image_fetch.go @@ -0,0 +1,38 @@ +package vision + +import ( + "context" + + vision "cloud.google.com/go/vision/v2/apiv1" + pb "cloud.google.com/go/vision/v2/apiv1/visionpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchReferenceImages(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.Product) + + gcpClient, err := vision.NewProductSearchClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListReferenceImages(ctx, &pb.ListReferenceImagesRequest{ + Parent: parentItem.Name, + PageSize: 100, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/groups.go b/plugins/source/gcp/resources/services/vmmigration/groups.go new file mode 100644 index 00000000000000..d2fb0f22e3fa57 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/groups.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Groups() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_groups", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.groups`, + Resolver: fetchGroups, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Group{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/groups_fetch.go b/plugins/source/gcp/resources/services/vmmigration/groups_fetch.go new file mode 100644 index 00000000000000..e0eaaecc9572af --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/groups_fetch.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListGroups(ctx, &pb.ListGroupsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/groups_mock_test.go b/plugins/source/gcp/resources/services/vmmigration/groups_mock_test.go new file mode 100644 index 00000000000000..292abfd4aaafc7 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/groups_mock_test.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" +) + +func createGroupsServer(gsrv *grpc.Server) error { + fakeServer := &fakeGroupsServer{} + pb.RegisterVmMigrationServer(gsrv, fakeServer) + return nil +} + +type fakeGroupsServer struct { + pb.UnimplementedVmMigrationServer +} + +func (*fakeGroupsServer) ListGroups(context.Context, *pb.ListGroupsRequest) (*pb.ListGroupsResponse, error) { + resp := pb.ListGroupsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestGroups(t *testing.T) { + client.MockTestGrpcHelper(t, Groups(), createGroupsServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs.go b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs.go new file mode 100644 index 00000000000000..cacec07701fa5c --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func CloneJobs() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_source_migrating_vm_clone_jobs", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms.cloneJobs`, + Resolver: fetchCloneJobs, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.CloneJob{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs_fetch.go b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs_fetch.go new file mode 100644 index 00000000000000..b87aa4362fe942 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_clone_jobs_fetch.go @@ -0,0 +1,37 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchCloneJobs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.MigratingVm) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListCloneJobs(ctx, &pb.ListCloneJobsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs.go b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs.go new file mode 100644 index 00000000000000..09d8be6d11d729 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func CutoverJobs() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_source_migrating_vm_cutover_jobs", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms.cutoverJobs`, + Resolver: fetchCutoverJobs, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.CutoverJob{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs_fetch.go b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs_fetch.go new file mode 100644 index 00000000000000..5f57220bda7949 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/source_migrating_vm_cutover_jobs_fetch.go @@ -0,0 +1,37 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchCutoverJobs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.MigratingVm) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListCutoverJobs(ctx, &pb.ListCutoverJobsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources.go b/plugins/source/gcp/resources/services/vmmigration/sources.go new file mode 100644 index 00000000000000..57a7bfdc93e8b3 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources.go @@ -0,0 +1,42 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Sources() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_sources", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources`, + Resolver: fetchSources, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Source{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + + Relations: []*schema.Table{ + DatacenterConnectors(), + MigratingVms(), + UtilizationReports(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors.go b/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors.go new file mode 100644 index 00000000000000..5a6efa00846a95 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func DatacenterConnectors() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_source_datacenter_connectors", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.datacenterConnectors`, + Resolver: fetchDatacenterConnectors, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.DatacenterConnector{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors_fetch.go b/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors_fetch.go new file mode 100644 index 00000000000000..597edd6d12c93e --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_datacenter_connectors_fetch.go @@ -0,0 +1,37 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchDatacenterConnectors(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.Source) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListDatacenterConnectors(ctx, &pb.ListDatacenterConnectorsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_fetch.go b/plugins/source/gcp/resources/services/vmmigration/sources_fetch.go new file mode 100644 index 00000000000000..8e920daef793e1 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_fetch.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchSources(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListSources(ctx, &pb.ListSourcesRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_fetch_mock_test.go b/plugins/source/gcp/resources/services/vmmigration/sources_fetch_mock_test.go new file mode 100644 index 00000000000000..5a33c03f66cc9e --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_fetch_mock_test.go @@ -0,0 +1,81 @@ +package vmmigration + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" +) + +func createSourcesServer(gsrv *grpc.Server) error { + fakeServer := &fakeSourcesServer{} + pb.RegisterVmMigrationServer(gsrv, fakeServer) + return nil +} + +type fakeSourcesServer struct { + pb.UnimplementedVmMigrationServer +} + +func (*fakeSourcesServer) ListSources(context.Context, *pb.ListSourcesRequest) (*pb.ListSourcesResponse, error) { + resp := pb.ListSourcesResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeSourcesServer) ListMigratingVms(context.Context, *pb.ListMigratingVmsRequest) (*pb.ListMigratingVmsResponse, error) { + resp := pb.ListMigratingVmsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeSourcesServer) ListDatacenterConnectors(context.Context, *pb.ListDatacenterConnectorsRequest) (*pb.ListDatacenterConnectorsResponse, error) { + resp := pb.ListDatacenterConnectorsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeSourcesServer) ListCloneJobs(context.Context, *pb.ListCloneJobsRequest) (*pb.ListCloneJobsResponse, error) { + resp := pb.ListCloneJobsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeSourcesServer) ListCutoverJobs(context.Context, *pb.ListCutoverJobsRequest) (*pb.ListCutoverJobsResponse, error) { + resp := pb.ListCutoverJobsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeSourcesServer) ListUtilizationReports(context.Context, *pb.ListUtilizationReportsRequest) (*pb.ListUtilizationReportsResponse, error) { + resp := pb.ListUtilizationReportsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestInstances(t *testing.T) { + client.MockTestGrpcHelper(t, Sources(), createSourcesServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms.go b/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms.go new file mode 100644 index 00000000000000..ed178eb075f864 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms.go @@ -0,0 +1,41 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func MigratingVms() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_source_migrating_vms", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.migratingVms`, + Resolver: fetchMigratingVms, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.MigratingVm{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + + Relations: []*schema.Table{ + CloneJobs(), + CutoverJobs(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms_fetch.go b/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms_fetch.go new file mode 100644 index 00000000000000..36e9b771e60f79 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/sources_migrating_vms_fetch.go @@ -0,0 +1,37 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchMigratingVms(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.Source) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListMigratingVms(ctx, &pb.ListMigratingVmsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/target_projects.go b/plugins/source/gcp/resources/services/vmmigration/target_projects.go new file mode 100644 index 00000000000000..3534ae17be9a9f --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/target_projects.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func TargetProjects() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_target_projects", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.targetProjects`, + Resolver: fetchTargetProjects, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.TargetProject{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/target_projects_fetch.go b/plugins/source/gcp/resources/services/vmmigration/target_projects_fetch.go new file mode 100644 index 00000000000000..a2879204e6f59f --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/target_projects_fetch.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchTargetProjects(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListTargetProjects(ctx, &pb.ListTargetProjectsRequest{ + Parent: "projects/" + c.ProjectId + "/locations/-", + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vmmigration/target_projects_mock_test.go b/plugins/source/gcp/resources/services/vmmigration/target_projects_mock_test.go new file mode 100644 index 00000000000000..a4afd721684e7d --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/target_projects_mock_test.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" +) + +func createTargetProjectsServer(gsrv *grpc.Server) error { + fakeServer := &fakeTargetProjectsServer{} + pb.RegisterVmMigrationServer(gsrv, fakeServer) + return nil +} + +type fakeTargetProjectsServer struct { + pb.UnimplementedVmMigrationServer +} + +func (*fakeTargetProjectsServer) ListTargetProjects(context.Context, *pb.ListTargetProjectsRequest) (*pb.ListTargetProjectsResponse, error) { + resp := pb.ListTargetProjectsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func TestTargetProjects(t *testing.T) { + client.MockTestGrpcHelper(t, TargetProjects(), createTargetProjectsServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/vmmigration/utilization_reports.go b/plugins/source/gcp/resources/services/vmmigration/utilization_reports.go new file mode 100644 index 00000000000000..6139a42a76edf0 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/utilization_reports.go @@ -0,0 +1,36 @@ +package vmmigration + +import ( + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func UtilizationReports() *schema.Table { + return &schema.Table{ + Name: "gcp_vmmigration_source_utilization_reports", + Description: `https://cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources.utilizationReports`, + Resolver: fetchUtilizationReports, + Multiplex: client.ProjectMultiplexEnabledServices("vmmigration.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.UtilizationReport{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vmmigration/utilization_reports_fetch.go b/plugins/source/gcp/resources/services/vmmigration/utilization_reports_fetch.go new file mode 100644 index 00000000000000..e61b7631fb54f2 --- /dev/null +++ b/plugins/source/gcp/resources/services/vmmigration/utilization_reports_fetch.go @@ -0,0 +1,37 @@ +package vmmigration + +import ( + "context" + + vmmigration "cloud.google.com/go/vmmigration/apiv1" + pb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchUtilizationReports(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.Source) + + gcpClient, err := vmmigration.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListUtilizationReports(ctx, &pb.ListUtilizationReportsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vpcaccess/connectors.go b/plugins/source/gcp/resources/services/vpcaccess/connectors.go new file mode 100644 index 00000000000000..82db3bc67bde51 --- /dev/null +++ b/plugins/source/gcp/resources/services/vpcaccess/connectors.go @@ -0,0 +1,37 @@ +package vpcaccess + +import ( + pb "cloud.google.com/go/vpcaccess/apiv1/vpcaccesspb" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Connectors() *schema.Table { + return &schema.Table{ + Name: "gcp_vpcaccess_connectors", + Description: `https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors`, + Resolver: fetchConnectors, + Multiplex: client.ProjectMultiplexEnabledServices("vpcaccess.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Connector{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/vpcaccess/connectors_fetch.go b/plugins/source/gcp/resources/services/vpcaccess/connectors_fetch.go new file mode 100644 index 00000000000000..91c804784b2c34 --- /dev/null +++ b/plugins/source/gcp/resources/services/vpcaccess/connectors_fetch.go @@ -0,0 +1,38 @@ +package vpcaccess + +import ( + "context" + + vpcaccess "cloud.google.com/go/vpcaccess/apiv1" + pb "cloud.google.com/go/vpcaccess/apiv1/vpcaccesspb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func fetchConnectors(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*locationpb.Location) + + gcpClient, err := vpcaccess.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListConnectors(ctx, &pb.ListConnectorsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/vpcaccess/locations.go b/plugins/source/gcp/resources/services/vpcaccess/locations.go new file mode 100644 index 00000000000000..6ffcc5b1775681 --- /dev/null +++ b/plugins/source/gcp/resources/services/vpcaccess/locations.go @@ -0,0 +1,40 @@ +package vpcaccess + +import ( + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func Locations() *schema.Table { + return &schema.Table{ + Name: "gcp_vpcaccess_locations", + Description: `https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/Shared.Types/ListLocationsResponse#Location`, + Resolver: fetchLocations, + Multiplex: client.ProjectMultiplexEnabledServices("vpcaccess.googleapis.com"), + Transform: transformers.TransformWithStruct(&locationpb.Location{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + + Relations: []*schema.Table{ + Connectors(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/vpcaccess/locations_fetch.go b/plugins/source/gcp/resources/services/vpcaccess/locations_fetch.go new file mode 100644 index 00000000000000..fd2b4cb0a73139 --- /dev/null +++ b/plugins/source/gcp/resources/services/vpcaccess/locations_fetch.go @@ -0,0 +1,36 @@ +package vpcaccess + +import ( + "context" + + vpcaccess "cloud.google.com/go/vpcaccess/apiv1" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func fetchLocations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := vpcaccess.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListLocations(ctx, &locationpb.ListLocationsRequest{ + Name: "projects/" + c.ProjectId, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls.go b/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls.go new file mode 100644 index 00000000000000..1084e0f86c36c6 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls.go @@ -0,0 +1,52 @@ +package websecurityscanner + +import ( + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func CrawledUrls() *schema.Table { + return &schema.Table{ + Name: "gcp_websecurityscanner_scan_config_scan_run_crawled_urls", + Description: `https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns.crawledUrls/list#CrawledUrl`, + Resolver: fetchCrawledUrls, + Multiplex: client.ProjectMultiplexEnabledServices("websecurityscanner.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.CrawledUrl{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "scan_run_name", + Type: schema.TypeString, + Resolver: schema.ParentColumnResolver("name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "http_method", + Type: schema.TypeString, + Resolver: schema.PathResolver("HttpMethod"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "url", + Type: schema.TypeString, + Resolver: schema.PathResolver("Url"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls_fetch.go b/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls_fetch.go new file mode 100644 index 00000000000000..4fe63fd2f944ea --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/crawled_urls_fetch.go @@ -0,0 +1,37 @@ +package websecurityscanner + +import ( + "context" + + websecurityscanner "cloud.google.com/go/websecurityscanner/apiv1" + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchCrawledUrls(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.ScanRun) + + gcpClient, err := websecurityscanner.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListCrawledUrls(ctx, &pb.ListCrawledUrlsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/findings.go b/plugins/source/gcp/resources/services/websecurityscanner/findings.go new file mode 100644 index 00000000000000..c241fb4e4f4981 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/findings.go @@ -0,0 +1,36 @@ +package websecurityscanner + +import ( + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func Findings() *schema.Table { + return &schema.Table{ + Name: "gcp_websecurityscanner_scan_config_scan_run_findings", + Description: `https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns.findings`, + Resolver: fetchFindings, + Multiplex: client.ProjectMultiplexEnabledServices("websecurityscanner.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.Finding{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/findings_fetch.go b/plugins/source/gcp/resources/services/websecurityscanner/findings_fetch.go new file mode 100644 index 00000000000000..406c7708c4a3c6 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/findings_fetch.go @@ -0,0 +1,66 @@ +package websecurityscanner + +import ( + "context" + "fmt" + + websecurityscanner "cloud.google.com/go/websecurityscanner/apiv1" + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" +) + +func fetchFindings(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.ScanRun) + + gcpClient, err := websecurityscanner.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + findingTypes, err := getFindingTypes(ctx, gcpClient, parentItem.Name, c.CallOptions...) + if err != nil { + return err + } + + for _, findingType := range findingTypes { + it := gcpClient.ListFindings(ctx, &pb.ListFindingsRequest{ + Parent: parentItem.Name, + Filter: fmt.Sprintf(`"finding_type="%s"`, findingType), + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + } + + return nil +} + +func getFindingTypes(ctx context.Context, gcpClient *websecurityscanner.Client, parentId string, callOptions ...gax.CallOption) ([]string, error) { + response, err := gcpClient.ListFindingTypeStats(ctx, &pb.ListFindingTypeStatsRequest{ + Parent: parentId, + }, callOptions...) + + if err != nil { + return nil, err + } + + findingTypes := make([]string, len(response.FindingTypeStats)) + + for _, typestat := range response.FindingTypeStats { + findingTypes = append(findingTypes, typestat.FindingType) + } + + return findingTypes, nil +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/scan_configs.go b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs.go new file mode 100644 index 00000000000000..94fb70c5aa0bd6 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs.go @@ -0,0 +1,39 @@ +package websecurityscanner + +import ( + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func ScanConfigs() *schema.Table { + return &schema.Table{ + Name: "gcp_websecurityscanner_scan_configs", + Description: `https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs#resource:-scanconfig`, + Resolver: fetchScanConfigs, + Multiplex: client.ProjectMultiplexEnabledServices("websecurityscanner.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.ScanConfig{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + Relations: []*schema.Table{ + ScanRuns(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_fetch.go b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_fetch.go new file mode 100644 index 00000000000000..024c3017b08849 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_fetch.go @@ -0,0 +1,36 @@ +package websecurityscanner + +import ( + "context" + + websecurityscanner "cloud.google.com/go/websecurityscanner/apiv1" + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchScanConfigs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + + gcpClient, err := websecurityscanner.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListScanConfigs(ctx, &pb.ListScanConfigsRequest{ + Parent: "projects/" + c.ProjectId, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_mock_test.go b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_mock_test.go new file mode 100644 index 00000000000000..42bb653d37aac7 --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/scan_configs_mock_test.go @@ -0,0 +1,71 @@ +package websecurityscanner + +import ( + "context" + "fmt" + "testing" + + "github.com/cloudquery/plugin-sdk/faker" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/grpc" + + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" +) + +func createServer(gsrv *grpc.Server) error { + fakeServer := &fakeServer{} + pb.RegisterWebSecurityScannerServer(gsrv, fakeServer) + return nil +} + +type fakeServer struct { + pb.UnimplementedWebSecurityScannerServer +} + +func (*fakeServer) ListScanConfigs(context.Context, *pb.ListScanConfigsRequest) (*pb.ListScanConfigsResponse, error) { + resp := pb.ListScanConfigsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListFindings(context.Context, *pb.ListFindingsRequest) (*pb.ListFindingsResponse, error) { + resp := pb.ListFindingsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListScanRuns(context.Context, *pb.ListScanRunsRequest) (*pb.ListScanRunsResponse, error) { + resp := pb.ListScanRunsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListCrawledUrls(context.Context, *pb.ListCrawledUrlsRequest) (*pb.ListCrawledUrlsResponse, error) { + resp := pb.ListCrawledUrlsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + resp.NextPageToken = "" + return &resp, nil +} + +func (*fakeServer) ListFindingTypeStats(context.Context, *pb.ListFindingTypeStatsRequest) (*pb.ListFindingTypeStatsResponse, error) { + resp := pb.ListFindingTypeStatsResponse{} + if err := faker.FakeObject(&resp); err != nil { + return nil, fmt.Errorf("failed to fake data: %w", err) + } + return &resp, nil +} + +func TestInstances(t *testing.T) { + client.MockTestGrpcHelper(t, ScanConfigs(), createServer, client.TestOptions{}) +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/scan_runs.go b/plugins/source/gcp/resources/services/websecurityscanner/scan_runs.go new file mode 100644 index 00000000000000..fd360c76eb86ac --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/scan_runs.go @@ -0,0 +1,41 @@ +package websecurityscanner + +import ( + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/plugins/source/gcp/client" +) + +func ScanRuns() *schema.Table { + return &schema.Table{ + Name: "gcp_websecurityscanner_scan_config_scan_runs", + Description: `https://cloud.google.com/security-command-center/docs/reference/web-security-scanner/rest/v1/projects.scanConfigs.scanRuns`, + Resolver: fetchScanRuns, + Multiplex: client.ProjectMultiplexEnabledServices("websecurityscanner.googleapis.com"), + Transform: transformers.TransformWithStruct(&pb.ScanRun{}, client.Options()...), + Columns: []schema.Column{ + { + Name: "project_id", + Type: schema.TypeString, + Resolver: client.ResolveProject, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + + Relations: []*schema.Table{ + Findings(), + CrawledUrls(), + }, + } +} diff --git a/plugins/source/gcp/resources/services/websecurityscanner/scan_runs_fetch.go b/plugins/source/gcp/resources/services/websecurityscanner/scan_runs_fetch.go new file mode 100644 index 00000000000000..94862a90aee47a --- /dev/null +++ b/plugins/source/gcp/resources/services/websecurityscanner/scan_runs_fetch.go @@ -0,0 +1,37 @@ +package websecurityscanner + +import ( + "context" + + websecurityscanner "cloud.google.com/go/websecurityscanner/apiv1" + pb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugins/source/gcp/client" + "google.golang.org/api/iterator" +) + +func fetchScanRuns(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + c := meta.(*client.Client) + parentItem := parent.Item.(*pb.ScanConfig) + + gcpClient, err := websecurityscanner.NewClient(ctx, c.ClientOptions...) + if err != nil { + return err + } + + it := gcpClient.ListScanRuns(ctx, &pb.ListScanRunsRequest{ + Parent: parentItem.Name, + }, c.CallOptions...) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + + res <- resp + } + return nil +} diff --git a/plugins/source/gcp/test/policy_cq_config.yml b/plugins/source/gcp/test/policy_cq_config.yml index d4992bece2eac1..2515c5c7289d02 100644 --- a/plugins/source/gcp/test/policy_cq_config.yml +++ b/plugins/source/gcp/test/policy_cq_config.yml @@ -10,6 +10,6 @@ kind: destination spec: name: postgresql path: cloudquery/postgresql - version: "v2.0.4" # latest version of postgresql plugin + version: "v2.0.5" # latest version of postgresql plugin spec: connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/plugins/source/github/CHANGELOG.md b/plugins/source/github/CHANGELOG.md index 3b35f57180c213..b230bf3f020db9 100644 --- a/plugins/source/github/CHANGELOG.md +++ b/plugins/source/github/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [2.1.1](https://github.com/cloudquery/cloudquery/compare/plugins-source-github-v2.1.0...plugins-source-github-v2.1.1) (2023-01-12) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.0 ([#6745](https://github.com/cloudquery/cloudquery/issues/6745)) ([9c41854](https://github.com/cloudquery/cloudquery/commit/9c418547c3bbff97449765e337182230fb5e40d5)) +* **github:** Fix panic in workflow fetching ([#6693](https://github.com/cloudquery/cloudquery/issues/6693)) ([a582f0b](https://github.com/cloudquery/cloudquery/commit/a582f0b76bb28be4ca6a9448fcf452d7408b12fd)) + +## [2.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-github-v2.0.0...plugins-source-github-v2.1.0) (2023-01-10) + + +### Features + +* **github:** Migrate codegen to transformations ([#6428](https://github.com/cloudquery/cloudquery/issues/6428)) ([71c84fc](https://github.com/cloudquery/cloudquery/commit/71c84fcee0ae1496f16d290b605bda81316f3087)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [2.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-github-v1.4.2...plugins-source-github-v2.0.0) (2023-01-03) diff --git a/plugins/source/github/client/client.go b/plugins/source/github/client/client.go index 7b2ff0dd36e95e..7d787c9b71f59c 100644 --- a/plugins/source/github/client/client.go +++ b/plugins/source/github/client/client.go @@ -42,7 +42,7 @@ func (c Client) WithOrg(org string) schema.ClientMeta { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var spec Spec err := s.UnmarshalSpec(&spec) if err != nil { diff --git a/plugins/source/github/client/testing.go b/plugins/source/github/client/testing.go index 7e4b51704c96b6..37442ca3334083 100644 --- a/plugins/source/github/client/testing.go +++ b/plugins/source/github/client/testing.go @@ -23,7 +23,7 @@ func GithubMockTestHelper(t *testing.T, table *schema.Table, builder func(*testi l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { return &Client{ logger: l, Github: builder(t, ctrl), diff --git a/plugins/source/github/docs/tables/README.md b/plugins/source/github/docs/tables/README.md index 5fa32d41af9b92..219008448f98a8 100644 --- a/plugins/source/github/docs/tables/README.md +++ b/plugins/source/github/docs/tables/README.md @@ -2,24 +2,24 @@ ## Tables -- [github_workflows](github_workflows.md) - [github_billing_action](github_billing_action.md) -- [github_billing_storage](github_billing_storage.md) - [github_billing_package](github_billing_package.md) +- [github_billing_storage](github_billing_storage.md) - [github_external_groups](github_external_groups.md) -- [github_issues](github_issues.md) - [github_hooks](github_hooks.md) - [github_hook_deliveries](github_hook_deliveries.md) - [github_installations](github_installations.md) +- [github_issues](github_issues.md) - [github_organizations](github_organizations.md) - [github_organization_dependabot_alerts](github_organization_dependabot_alerts.md) - [github_organization_dependabot_secrets](github_organization_dependabot_secrets.md) - [github_organization_members](github_organization_members.md) - [github_repositories](github_repositories.md) - - [github_repository_dependabot_alerts](github_repository_dependabot_alerts.md) - - [github_repository_dependabot_secrets](github_repository_dependabot_secrets.md) - [github_releases](github_releases.md) - [github_release_assets](github_release_assets.md) + - [github_repository_dependabot_alerts](github_repository_dependabot_alerts.md) + - [github_repository_dependabot_secrets](github_repository_dependabot_secrets.md) - [github_teams](github_teams.md) - [github_team_members](github_team_members.md) - - [github_team_repositories](github_team_repositories.md) \ No newline at end of file + - [github_team_repositories](github_team_repositories.md) +- [github_workflows](github_workflows.md) \ No newline at end of file diff --git a/plugins/source/github/docs/tables/github_repositories.md b/plugins/source/github/docs/tables/github_repositories.md index 11ec90a65e8f24..9a0d5d8d01f90b 100644 --- a/plugins/source/github/docs/tables/github_repositories.md +++ b/plugins/source/github/docs/tables/github_repositories.md @@ -5,9 +5,9 @@ The composite primary key for this table is (**org**, **id**). ## Relations The following tables depend on github_repositories: + - [github_releases](github_releases.md) - [github_repository_dependabot_alerts](github_repository_dependabot_alerts.md) - [github_repository_dependabot_secrets](github_repository_dependabot_secrets.md) - - [github_releases](github_releases.md) ## Columns diff --git a/plugins/source/github/docs/tables/github_workflows.md b/plugins/source/github/docs/tables/github_workflows.md index 6b25d3179af876..e91e9504ef2129 100644 --- a/plugins/source/github/docs/tables/github_workflows.md +++ b/plugins/source/github/docs/tables/github_workflows.md @@ -21,4 +21,5 @@ The composite primary key for this table is (**org**, **id**). |updated_at|Timestamp| |url|String| |html_url|String| -|badge_url|String| \ No newline at end of file +|badge_url|String| +|repository|String| \ No newline at end of file diff --git a/plugins/source/github/go.mod b/plugins/source/github/go.mod index ad2db256fd5153..29c8c3b225cb1a 100644 --- a/plugins/source/github/go.mod +++ b/plugins/source/github/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/github go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/google/go-github/v48 v48.2.0 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/github/go.sum b/plugins/source/github/go.sum index e4d34c7279aa68..387e385170b6fe 100644 --- a/plugins/source/github/go.sum +++ b/plugins/source/github/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/github/resources/services/actions/workflows.go b/plugins/source/github/resources/services/actions/workflows.go index f1ffc779a18d6b..eba3231173f74a 100644 --- a/plugins/source/github/resources/services/actions/workflows.go +++ b/plugins/source/github/resources/services/actions/workflows.go @@ -4,7 +4,6 @@ import ( "github.com/cloudquery/cloudquery/plugins/source/github/client" "github.com/cloudquery/plugin-sdk/schema" "github.com/cloudquery/plugin-sdk/transformers" - "github.com/google/go-github/v48/github" ) func Workflows() *schema.Table { @@ -12,13 +11,12 @@ func Workflows() *schema.Table { Name: "github_workflows", Resolver: fetchWorkflows, Multiplex: client.OrgMultiplex, - Transform: transformers.TransformWithStruct(&github.Workflow{}, client.SharedTransformers()...), + Transform: transformers.TransformWithStruct(&Workflow{}, client.SharedTransformers()...), Columns: []schema.Column{ { - Name: "org", - Type: schema.TypeString, - Resolver: client.ResolveOrg, - Description: `The Github Organization of the resource.`, + Name: "org", + Type: schema.TypeString, + Resolver: client.ResolveOrg, CreationOptions: schema.ColumnCreationOptions{ PrimaryKey: true, }, diff --git a/plugins/source/github/resources/services/actions/workflows_fetch.go b/plugins/source/github/resources/services/actions/workflows_fetch.go index e64cee38ed62a1..90f1e7ee17018d 100644 --- a/plugins/source/github/resources/services/actions/workflows_fetch.go +++ b/plugins/source/github/resources/services/actions/workflows_fetch.go @@ -10,6 +10,11 @@ import ( "github.com/google/go-github/v48/github" ) +type Workflow struct { + *github.Workflow + Repository string `json:"repository"` +} + func fetchWorkflows(ctx context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- any) error { c := meta.(*client.Client) opts := &github.RepositoryListByOrgOptions{ListOptions: github.ListOptions{PerPage: 100}} @@ -25,7 +30,9 @@ func fetchWorkflows(ctx context.Context, meta schema.ClientMeta, _ *schema.Resou if err != nil { return err } - res <- workflows.Workflows + for _, w := range workflows.Workflows { + res <- Workflow{Workflow: w, Repository: *repo.Name} + } opts.Page = resp.NextPage if opts.Page == resp.LastPage { break @@ -42,7 +49,14 @@ func fetchWorkflows(ctx context.Context, meta schema.ClientMeta, _ *schema.Resou func resolveContents(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource, c schema.Column) error { cl := meta.(*client.Client) - workflow := resource.Item.(*github.Workflow) + workflow := resource.Item.(Workflow) + if *workflow.Path == "" { + // Workflow path is empty, so we cannot retrieve the contents. + // It is unclear when and why this happens in the GitHub API, but in this case we + // leave the content column empty out of necessity. + // See https://github.com/cloudquery/cloudquery/issues/6667 for details. + return nil + } parsedUrl, err := url.Parse(*workflow.HTMLURL) if err != nil { @@ -50,7 +64,7 @@ func resolveContents(ctx context.Context, meta schema.ClientMeta, resource *sche } pathParts := strings.Split(parsedUrl.Path, "/") - if len(pathParts) < 2 { + if len(pathParts) < 5 { return nil } owner := pathParts[1] diff --git a/plugins/source/gitlab/CHANGELOG.md b/plugins/source/gitlab/CHANGELOG.md index a1b2d862515d86..20ac3e3646c156 100644 --- a/plugins/source/gitlab/CHANGELOG.md +++ b/plugins/source/gitlab/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [2.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-gitlab-v1.1.0...plugins-source-gitlab-v2.0.0) (2023-01-10) + + +### ⚠ BREAKING CHANGES + +* **deps:** `gitlab_users` columns `last_sign_in_ip, current_sign_in_ip` type changed from `IntArray` to `Inet` + +### Features + +* **gitlab:** Migrate codegen to transformation ([#6429](https://github.com/cloudquery/cloudquery/issues/6429)) ([34d9f1f](https://github.com/cloudquery/cloudquery/commit/34d9f1fa6fb3d6eb0aeaa0a86ad2bfa5b8b08994)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([b821650](https://github.com/cloudquery/cloudquery/commit/b821650a9d4e97aa7eb8fa0fe210c835cea4146b)) + ## [1.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-gitlab-v1.0.1...plugins-source-gitlab-v1.1.0) (2023-01-03) diff --git a/plugins/source/gitlab/client/client.go b/plugins/source/gitlab/client/client.go index 9bcefb52f806fa..00133f3c3b91b6 100644 --- a/plugins/source/gitlab/client/client.go +++ b/plugins/source/gitlab/client/client.go @@ -14,10 +14,11 @@ import ( type Client struct { // This is a client that you need to create and initialize in Configure // It will be passed for each resource fetcher. - logger zerolog.Logger - Gitlab *gitlab.Client - spec specs.Source - BaseURL string + logger zerolog.Logger + Gitlab *gitlab.Client + spec specs.Source + BaseURL string + MinAccessLevel *gitlab.AccessLevelValue } func (c *Client) Logger() *zerolog.Logger { @@ -28,7 +29,7 @@ func (c *Client) ID() string { return c.spec.Name } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { gitlabSpec := &Spec{} if err := s.UnmarshalSpec(gitlabSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal gitlab spec: %w", err) @@ -37,9 +38,14 @@ func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ... return nil, err } + var minAccessLevel *gitlab.AccessLevelValue opts := []gitlab.ClientOptionFunc{} if gitlabSpec.BaseURL != "" { opts = append(opts, gitlab.WithBaseURL(gitlabSpec.BaseURL)) + } else { + // on GitLab SaaS we don't want to sync the whole of GitLab, so we sync based on access level + // TODO: use gitlab.MinimalAccessPermissions once supported. Related https://gitlab.com/gitlab-org/gitlab/-/issues/296089#note_496386453 + minAccessLevel = gitlab.AccessLevel(gitlab.GuestPermissions) } c, err := gitlab.NewClient(gitlabSpec.Token, opts...) @@ -48,8 +54,9 @@ func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ... } return &Client{ - logger: logger, - Gitlab: c, - spec: s, + logger: logger, + Gitlab: c, + spec: s, + MinAccessLevel: minAccessLevel, }, nil } diff --git a/plugins/source/gitlab/client/spec.go b/plugins/source/gitlab/client/spec.go index 0edf7480296bdc..a025f63368b57c 100644 --- a/plugins/source/gitlab/client/spec.go +++ b/plugins/source/gitlab/client/spec.go @@ -12,11 +12,5 @@ func (s Spec) Validate() error { if gitlabToken == "" { return errors.New("missing GitLab API token in configuration file") } - if s.BaseURL == "" { - return errors.New("missing GitLab base URL in configuration file") - } - if s.BaseURL == "gitlab.com" { - return errors.New("base URL cannot be `gitlab.com` this plugin only supports self hosted instances") - } return nil } diff --git a/plugins/source/gitlab/client/testing.go b/plugins/source/gitlab/client/testing.go index 194081ba0b5b2f..a557232f036c58 100644 --- a/plugins/source/gitlab/client/testing.go +++ b/plugins/source/gitlab/client/testing.go @@ -30,7 +30,7 @@ func GitlabMockTestHelper(t *testing.T, table *schema.Table, createService func( l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createService(mux) if err != nil { return nil, fmt.Errorf("failed to createService: %w", err) diff --git a/plugins/source/gitlab/docs/tables/README.md b/plugins/source/gitlab/docs/tables/README.md index 4481f021cfe241..42cd719ace538f 100644 --- a/plugins/source/gitlab/docs/tables/README.md +++ b/plugins/source/gitlab/docs/tables/README.md @@ -5,7 +5,7 @@ - [gitlab_groups](gitlab_groups.md) - [gitlab_group_members](gitlab_group_members.md) - [gitlab_projects](gitlab_projects.md) - - [gitlab_projects_releases](gitlab_projects_releases.md) - [gitlab_project_branches](gitlab_project_branches.md) + - [gitlab_projects_releases](gitlab_projects_releases.md) - [gitlab_settings](gitlab_settings.md) - [gitlab_users](gitlab_users.md) \ No newline at end of file diff --git a/plugins/source/gitlab/docs/tables/gitlab_projects.md b/plugins/source/gitlab/docs/tables/gitlab_projects.md index f421ed7b9bda0b..69de847cb68a7d 100644 --- a/plugins/source/gitlab/docs/tables/gitlab_projects.md +++ b/plugins/source/gitlab/docs/tables/gitlab_projects.md @@ -5,8 +5,8 @@ The composite primary key for this table is (**base_url**, **id**). ## Relations The following tables depend on gitlab_projects: - - [gitlab_projects_releases](gitlab_projects_releases.md) - [gitlab_project_branches](gitlab_project_branches.md) + - [gitlab_projects_releases](gitlab_projects_releases.md) ## Columns diff --git a/plugins/source/gitlab/go.mod b/plugins/source/gitlab/go.mod index e3ada81485f7d2..00b9bfad6f5978 100644 --- a/plugins/source/gitlab/go.mod +++ b/plugins/source/gitlab/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/gitlab go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/julienschmidt/httprouter v1.3.0 github.com/rs/zerolog v1.28.0 github.com/xanzy/go-gitlab v0.74.0 diff --git a/plugins/source/gitlab/go.sum b/plugins/source/gitlab/go.sum index 57d4363f02625c..2a4c4764d4affb 100644 --- a/plugins/source/gitlab/go.sum +++ b/plugins/source/gitlab/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/gitlab/resources/services/groups/groups_fetch.go b/plugins/source/gitlab/resources/services/groups/groups_fetch.go index 2e9cb4fb294315..ca8ad21d45eede 100644 --- a/plugins/source/gitlab/resources/services/groups/groups_fetch.go +++ b/plugins/source/gitlab/resources/services/groups/groups_fetch.go @@ -12,6 +12,7 @@ func fetchGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Res c := meta.(*client.Client) opt := &gitlab.ListGroupsOptions{ + MinAccessLevel: c.MinAccessLevel, ListOptions: gitlab.ListOptions{ PerPage: 1000, }, diff --git a/plugins/source/gitlab/resources/services/projects/projects_fetch.go b/plugins/source/gitlab/resources/services/projects/projects_fetch.go index 6e2c6820a75f79..6d5c8835ce4e00 100644 --- a/plugins/source/gitlab/resources/services/projects/projects_fetch.go +++ b/plugins/source/gitlab/resources/services/projects/projects_fetch.go @@ -12,6 +12,7 @@ func fetchProjects(ctx context.Context, meta schema.ClientMeta, parent *schema.R c := meta.(*client.Client) opt := &gitlab.ListProjectsOptions{ + MinAccessLevel: c.MinAccessLevel, ListOptions: gitlab.ListOptions{ PerPage: 1000, }, diff --git a/plugins/source/gitlab/resources/services/settings/settings_fetch.go b/plugins/source/gitlab/resources/services/settings/settings_fetch.go index 7c1661c00f19c0..2d5f94a4d1dd10 100644 --- a/plugins/source/gitlab/resources/services/settings/settings_fetch.go +++ b/plugins/source/gitlab/resources/services/settings/settings_fetch.go @@ -11,7 +11,7 @@ import ( func fetchSettings(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { c := meta.(*client.Client) if c.BaseURL == "" { - c.Logger().Warn().Msg("not supported for GitLab SaaS, skipping...") + c.Logger().Info().Str("table", "gitlab_settings").Msg("not supported for GitLab SaaS, skipping...") return nil } setting, _, err := c.Gitlab.Settings.GetSettings(gitlab.WithContext(ctx)) diff --git a/plugins/source/gitlab/resources/services/users/users_fetch.go b/plugins/source/gitlab/resources/services/users/users_fetch.go index eb751f732a0a85..48cde323488786 100644 --- a/plugins/source/gitlab/resources/services/users/users_fetch.go +++ b/plugins/source/gitlab/resources/services/users/users_fetch.go @@ -10,6 +10,10 @@ import ( func fetchUsers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { c := meta.(*client.Client) + if c.BaseURL == "" { + c.Logger().Info().Str("table", "gitlab_users").Msg("not supported for GitLab SaaS, skipping...") + return nil + } opt := &gitlab.ListUsersOptions{ ListOptions: gitlab.ListOptions{ diff --git a/plugins/source/hackernews/CHANGELOG.md b/plugins/source/hackernews/CHANGELOG.md index 6cf2493f1d2ec9..27279d89a71159 100644 --- a/plugins/source/hackernews/CHANGELOG.md +++ b/plugins/source/hackernews/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.1.1](https://github.com/cloudquery/cloudquery/compare/plugins-source-hackernews-v1.1.0...plugins-source-hackernews-v1.1.1) (2023-01-11) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.2 ([#6695](https://github.com/cloudquery/cloudquery/issues/6695)) ([694ab9f](https://github.com/cloudquery/cloudquery/commit/694ab9f3e20473146e3620d7b03bb17eb259d697)) + +## [1.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-hackernews-v1.0.0...plugins-source-hackernews-v1.1.0) (2023-01-10) + + +### Features + +* **hackernews:** Add ability to start from given date ([#6560](https://github.com/cloudquery/cloudquery/issues/6560)) ([977fa16](https://github.com/cloudquery/cloudquery/commit/977fa1693f07040daed9a77ed437bbced4f0b69c)) + ## 1.0.0 (2023-01-10) diff --git a/plugins/source/hackernews/Makefile b/plugins/source/hackernews/Makefile index 9c53b098c13894..766171e431f325 100644 --- a/plugins/source/hackernews/Makefile +++ b/plugins/source/hackernews/Makefile @@ -1,7 +1,7 @@ # Test unit .PHONY: test test: - go test -timeout 3m ./... + go test -race -timeout 3m ./... # Install tools .PHONY: install-tools diff --git a/plugins/source/hackernews/client/client.go b/plugins/source/hackernews/client/client.go index 7c6e4330259869..3c0023c079f809 100644 --- a/plugins/source/hackernews/client/client.go +++ b/plugins/source/hackernews/client/client.go @@ -37,7 +37,7 @@ func (*Client) ID() string { return "hackernews" } -func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Source, opts ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Source, opts source.Options) (schema.ClientMeta, error) { var config Spec err := sourceSpec.UnmarshalSpec(&config) if err != nil { @@ -54,11 +54,6 @@ func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Sour return nil, fmt.Errorf("failed to create hackernews client: %w", err) } - o := source.Options{} - for _, opt := range opts { - opt(&o) - } - return &Client{ logger: logger, sourceSpec: sourceSpec, @@ -66,6 +61,6 @@ func Configure(ctx context.Context, logger zerolog.Logger, sourceSpec specs.Sour HackerNews: client, maxRetries: defaultMaxRetries, backoff: defaultBackoff, - Backend: o.Backend, + Backend: opts.Backend, }, nil } diff --git a/plugins/source/hackernews/client/testing.go b/plugins/source/hackernews/client/testing.go index bbb9978fd6281e..296ad86ba16022 100644 --- a/plugins/source/hackernews/client/testing.go +++ b/plugins/source/hackernews/client/testing.go @@ -28,7 +28,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { startTime := "" if !opts.StartTime.IsZero() { startTime = opts.StartTime.Format(time.RFC3339) diff --git a/plugins/source/hackernews/go.mod b/plugins/source/hackernews/go.mod index 15bf9021e21347..a848c61258b07d 100644 --- a/plugins/source/hackernews/go.mod +++ b/plugins/source/hackernews/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/hackernews go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/hermanschaaf/hackernews v1.0.1 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/hackernews/go.sum b/plugins/source/hackernews/go.sum index eeaecac02066fa..beead3bec7e59c 100644 --- a/plugins/source/hackernews/go.sum +++ b/plugins/source/hackernews/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/heroku/client/client.go b/plugins/source/heroku/client/client.go index 8c50696938e6d9..d6567625679672 100644 --- a/plugins/source/heroku/client/client.go +++ b/plugins/source/heroku/client/client.go @@ -28,7 +28,7 @@ func (c *Client) ID() string { return c.spec.Name } -func Configure(ctx context.Context, l zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, l zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var herokuSpec Spec if err := s.UnmarshalSpec(&herokuSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal heroku spec: %w", err) diff --git a/plugins/source/heroku/client/testing.go b/plugins/source/heroku/client/testing.go index c0e134adcacdd1..f084524723bf5e 100644 --- a/plugins/source/heroku/client/testing.go +++ b/plugins/source/heroku/client/testing.go @@ -26,7 +26,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createService func() (*he zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { svc, err := createService() if err != nil { return nil, fmt.Errorf("failed to createService %w", err) diff --git a/plugins/source/heroku/docs/tables/README.md b/plugins/source/heroku/docs/tables/README.md index 957189c144dcd5..0a8b2b4711b664 100644 --- a/plugins/source/heroku/docs/tables/README.md +++ b/plugins/source/heroku/docs/tables/README.md @@ -3,29 +3,29 @@ ## Tables - [heroku_account_features](heroku_account_features.md) -- [heroku_add_ons](heroku_add_ons.md) - [heroku_add_on_attachments](heroku_add_on_attachments.md) - [heroku_add_on_configs](heroku_add_on_configs.md) - [heroku_add_on_region_capabilities](heroku_add_on_region_capabilities.md) - [heroku_add_on_services](heroku_add_on_services.md) -- [heroku_add_on_webhooks](heroku_add_on_webhooks.md) - [heroku_add_on_webhook_deliveries](heroku_add_on_webhook_deliveries.md) - [heroku_add_on_webhook_events](heroku_add_on_webhook_events.md) -- [heroku_apps](heroku_apps.md) +- [heroku_add_on_webhooks](heroku_add_on_webhooks.md) +- [heroku_add_ons](heroku_add_ons.md) - [heroku_app_features](heroku_app_features.md) - [heroku_app_transfers](heroku_app_transfers.md) -- [heroku_app_webhooks](heroku_app_webhooks.md) - [heroku_app_webhook_deliveries](heroku_app_webhook_deliveries.md) - [heroku_app_webhook_events](heroku_app_webhook_events.md) -- [heroku_builds](heroku_builds.md) +- [heroku_app_webhooks](heroku_app_webhooks.md) +- [heroku_apps](heroku_apps.md) - [heroku_buildpack_installations](heroku_buildpack_installations.md) +- [heroku_builds](heroku_builds.md) - [heroku_collaborators](heroku_collaborators.md) - [heroku_credits](heroku_credits.md) - [heroku_domains](heroku_domains.md) -- [heroku_dynos](heroku_dynos.md) - [heroku_dyno_sizes](heroku_dyno_sizes.md) -- [heroku_enterprise_accounts](heroku_enterprise_accounts.md) +- [heroku_dynos](heroku_dynos.md) - [heroku_enterprise_account_members](heroku_enterprise_account_members.md) +- [heroku_enterprise_accounts](heroku_enterprise_accounts.md) - [heroku_formations](heroku_formations.md) - [heroku_inbound_rulesets](heroku_inbound_rulesets.md) - [heroku_invoices](heroku_invoices.md) @@ -36,22 +36,22 @@ - [heroku_outbound_rulesets](heroku_outbound_rulesets.md) - [heroku_peerings](heroku_peerings.md) - [heroku_permission_entities](heroku_permission_entities.md) -- [heroku_pipelines](heroku_pipelines.md) - [heroku_pipeline_builds](heroku_pipeline_builds.md) - [heroku_pipeline_couplings](heroku_pipeline_couplings.md) - [heroku_pipeline_deployments](heroku_pipeline_deployments.md) - [heroku_pipeline_releases](heroku_pipeline_releases.md) +- [heroku_pipelines](heroku_pipelines.md) - [heroku_regions](heroku_regions.md) - [heroku_releases](heroku_releases.md) - [heroku_review_apps](heroku_review_apps.md) -- [heroku_spaces](heroku_spaces.md) - [heroku_space_app_accesses](heroku_space_app_accesses.md) +- [heroku_spaces](heroku_spaces.md) - [heroku_stacks](heroku_stacks.md) - [heroku_team_app_permissions](heroku_team_app_permissions.md) - [heroku_team_features](heroku_team_features.md) -- [heroku_teams](heroku_teams.md) - [heroku_team_invitations](heroku_team_invitations.md) - [heroku_team_invoices](heroku_team_invoices.md) - [heroku_team_members](heroku_team_members.md) - [heroku_team_spaces](heroku_team_spaces.md) +- [heroku_teams](heroku_teams.md) - [heroku_vpn_connections](heroku_vpn_connections.md) \ No newline at end of file diff --git a/plugins/source/heroku/go.mod b/plugins/source/heroku/go.mod index a4cd381964d0f3..97823215651f69 100644 --- a/plugins/source/heroku/go.mod +++ b/plugins/source/heroku/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/heroku go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/go-cmp v0.5.9 github.com/googleapis/gax-go/v2 v2.7.0 github.com/heroku/heroku-go/v5 v5.5.0 diff --git a/plugins/source/heroku/go.sum b/plugins/source/heroku/go.sum index 1849902cc09297..57d2d89aad6d39 100644 --- a/plugins/source/heroku/go.sum +++ b/plugins/source/heroku/go.sum @@ -49,8 +49,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/k8s/CHANGELOG.md b/plugins/source/k8s/CHANGELOG.md index a95a1bf4ba9858..20c9e3b24813b0 100644 --- a/plugins/source/k8s/CHANGELOG.md +++ b/plugins/source/k8s/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [3.0.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-k8s-v2.5.4...plugins-source-k8s-v3.0.0) (2023-01-10) + + +### ⚠ BREAKING CHANGES + +* **deps:** `k8s_certificates_signing_requests` columns `status_certificate, spec_request` type changed from `IntArray` to `ByteArray` + +### Features + +* **k8s:** Migrate codegen to transformations ([#6493](https://github.com/cloudquery/cloudquery/issues/6493)) ([d766e56](https://github.com/cloudquery/cloudquery/commit/d766e56fb8519c378b0ba10cef734032796f9d4d)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([d8f704e](https://github.com/cloudquery/cloudquery/commit/d8f704e86d51d2edecb66f48301c126a91e199c7)) +* **k8s:** Fix a typo in source/k8s/views/resource.sql: cq_table -> _cq_table ([#6415](https://github.com/cloudquery/cloudquery/issues/6415)) ([0d1393c](https://github.com/cloudquery/cloudquery/commit/0d1393cd2c10ac3c9c2eb30779761e1454c94e50)) + ## [2.5.4](https://github.com/cloudquery/cloudquery/compare/plugins-source-k8s-v2.5.3...plugins-source-k8s-v2.5.4) (2023-01-03) diff --git a/plugins/source/k8s/client/client.go b/plugins/source/k8s/client/client.go index 8e26fe65878f28..f7d3777a3743ee 100644 --- a/plugins/source/k8s/client/client.go +++ b/plugins/source/k8s/client/client.go @@ -52,7 +52,7 @@ func (c Client) WithContext(k8sContext string) *Client { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var k8sSpec Spec if err := s.UnmarshalSpec(&k8sSpec); err != nil { diff --git a/plugins/source/k8s/client/helpers.go b/plugins/source/k8s/client/helpers.go index 1322b63eed6574..de161b75896264 100644 --- a/plugins/source/k8s/client/helpers.go +++ b/plugins/source/k8s/client/helpers.go @@ -52,34 +52,85 @@ func ResolveContext(_ context.Context, meta schema.ClientMeta, r *schema.Resourc return r.Set(c.Name, client.Context) } -// In k8s, IP Addresses may sometimes be empty-strings - but postgresql doesn't like that. -// So, the resolver for ip-addresses should recognize that case and not set null instead. +// In k8s, IP Addresses may sometimes be empty-strings or `None` - but postgresql doesn't like that. +// So, the resolver for ip-addresses should recognize that case and set null instead. func StringToInetPathResolver(path string) schema.ColumnResolver { return func(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { value := funk.Get(r.Item, path, funk.WithAllowZero()) stringValue, ok := value.(string) - if ok && stringValue != "" { + if ok && stringValue != "" && stringValue != "None" { return r.Set(c.Name, value) } + return r.Set(c.Name, nil) } } -// In k8s, IP Addresses may sometimes be empty-strings - but postgresql doesn't like that. -// So, the resolver for ip-addresses should recognize that case and not set null instead. +// In k8s, IP Addresses may sometimes be empty-strings or `None` - but postgresql doesn't like that. +// So, the resolver for ip-addresses should recognize that case and set null instead. +func StringToInetArrayPathResolver(path string) schema.ColumnResolver { + return func(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { + value := funk.Get(r.Item, path, funk.WithAllowZero()) + + stringArrayValue, ok := value.([]string) + if !ok { + return r.Set(c.Name, nil) + } + + sanitized := []*string{} + + for i := range stringArrayValue { + if stringArrayValue[i] != "" && stringArrayValue[i] != "None" { + sanitized = append(sanitized, &stringArrayValue[i]) + } else { + sanitized = append(sanitized, nil) + } + } + + return r.Set(c.Name, sanitized) + } +} + +// In k8s, IP Addresses may sometimes be empty-strings or `None` - but postgresql doesn't like that. +// So, the resolver for ip-addresses should recognize that case and set null instead. func StringToCidrPathResolver(path string) schema.ColumnResolver { return func(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { value := funk.Get(r.Item, path, funk.WithAllowZero()) stringValue, ok := value.(string) - if ok && stringValue != "" { + if ok && stringValue != "" && stringValue != "None" { return r.Set(c.Name, value) } return r.Set(c.Name, nil) } } +// In k8s, IP Addresses may sometimes be empty-strings or `None` - but postgresql doesn't like that. +// So, the resolver for ip-addresses should recognize that case and set null instead. +func StringToCidrArrayPathResolver(path string) schema.ColumnResolver { + return func(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { + value := funk.Get(r.Item, path, funk.WithAllowZero()) + + stringArrayValue, ok := value.([]string) + if !ok { + return r.Set(c.Name, nil) + } + + sanitized := []*string{} + + for i := range stringArrayValue { + if stringArrayValue[i] != "" && stringArrayValue[i] != "None" { + sanitized = append(sanitized, &stringArrayValue[i]) + } else { + sanitized = append(sanitized, nil) + } + } + + return r.Set(c.Name, sanitized) + } +} + // isK8sTimeStruct returns true if the given type is a metav1.Time struct or a pointer to it. func isK8sTimeStruct(fieldType reflect.Type) bool { fieldKind := fieldType.Kind() diff --git a/plugins/source/k8s/client/testing.go b/plugins/source/k8s/client/testing.go index 6b1d59c6e38c60..b4602240180384 100644 --- a/plugins/source/k8s/client/testing.go +++ b/plugins/source/k8s/client/testing.go @@ -26,7 +26,7 @@ func K8sMockTestHelper(t *testing.T, table *schema.Table, builder func(*testing. l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - configureFunc := func(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + configureFunc := func(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var k8sSpec Spec if err := s.UnmarshalSpec(&k8sSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal k8s spec: %w", err) diff --git a/plugins/source/k8s/docs/tables/README.md b/plugins/source/k8s/docs/tables/README.md index 26c8468ba476a4..7d38b054e75961 100644 --- a/plugins/source/k8s/docs/tables/README.md +++ b/plugins/source/k8s/docs/tables/README.md @@ -2,7 +2,6 @@ ## Tables -- [k8s_discovery_endpoint_slices](k8s_discovery_endpoint_slices.md) - [k8s_admissionregistration_mutating_webhook_configurations](k8s_admissionregistration_mutating_webhook_configurations.md) - [k8s_admissionregistration_validating_webhook_configurations](k8s_admissionregistration_validating_webhook_configurations.md) - [k8s_apps_daemon_sets](k8s_apps_daemon_sets.md) @@ -10,8 +9,8 @@ - [k8s_apps_replica_sets](k8s_apps_replica_sets.md) - [k8s_apps_stateful_sets](k8s_apps_stateful_sets.md) - [k8s_autoscaling_hpas](k8s_autoscaling_hpas.md) -- [k8s_batch_jobs](k8s_batch_jobs.md) - [k8s_batch_cron_jobs](k8s_batch_cron_jobs.md) +- [k8s_batch_jobs](k8s_batch_jobs.md) - [k8s_certificates_signing_requests](k8s_certificates_signing_requests.md) - [k8s_coordination_leases](k8s_coordination_leases.md) - [k8s_core_component_statuses](k8s_core_component_statuses.md) @@ -21,22 +20,23 @@ - [k8s_core_limit_ranges](k8s_core_limit_ranges.md) - [k8s_core_namespaces](k8s_core_namespaces.md) - [k8s_core_nodes](k8s_core_nodes.md) -- [k8s_core_pvs](k8s_core_pvs.md) -- [k8s_core_pvcs](k8s_core_pvcs.md) - [k8s_core_pods](k8s_core_pods.md) +- [k8s_core_pvcs](k8s_core_pvcs.md) +- [k8s_core_pvs](k8s_core_pvs.md) - [k8s_core_replication_controllers](k8s_core_replication_controllers.md) - [k8s_core_resource_quotas](k8s_core_resource_quotas.md) - [k8s_core_secrets](k8s_core_secrets.md) -- [k8s_core_services](k8s_core_services.md) - [k8s_core_service_accounts](k8s_core_service_accounts.md) +- [k8s_core_services](k8s_core_services.md) +- [k8s_discovery_endpoint_slices](k8s_discovery_endpoint_slices.md) +- [k8s_networking_ingress_classes](k8s_networking_ingress_classes.md) - [k8s_networking_ingresses](k8s_networking_ingresses.md) - [k8s_networking_network_policies](k8s_networking_network_policies.md) -- [k8s_networking_ingress_classes](k8s_networking_ingress_classes.md) - [k8s_nodes_runtime_classes](k8s_nodes_runtime_classes.md) -- [k8s_rbac_cluster_roles](k8s_rbac_cluster_roles.md) - [k8s_rbac_cluster_role_bindings](k8s_rbac_cluster_role_bindings.md) -- [k8s_rbac_roles](k8s_rbac_roles.md) +- [k8s_rbac_cluster_roles](k8s_rbac_cluster_roles.md) - [k8s_rbac_role_bindings](k8s_rbac_role_bindings.md) +- [k8s_rbac_roles](k8s_rbac_roles.md) - [k8s_storage_csi_drivers](k8s_storage_csi_drivers.md) - [k8s_storage_csi_nodes](k8s_storage_csi_nodes.md) - [k8s_storage_csi_storage_capacities](k8s_storage_csi_storage_capacities.md) diff --git a/plugins/source/k8s/go.mod b/plugins/source/k8s/go.mod index d84a244704dd57..5e5eed96fa661d 100644 --- a/plugins/source/k8s/go.mod +++ b/plugins/source/k8s/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/k8s go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/google/gnostic v0.6.9 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/k8s/go.sum b/plugins/source/k8s/go.sum index 8faa144bda1197..c017371a720616 100644 --- a/plugins/source/k8s/go.sum +++ b/plugins/source/k8s/go.sum @@ -44,10 +44,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.23.0 h1:pjgxQdozJ9fgD1v7r+d4YQR73bhC0t7fjT52C5HTpkg= -github.com/cloudquery/plugin-sdk v1.23.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= diff --git a/plugins/source/k8s/resources/services/core/nodes.go b/plugins/source/k8s/resources/services/core/nodes.go index b2903df29bd47f..1064fe3a18dfd7 100644 --- a/plugins/source/k8s/resources/services/core/nodes.go +++ b/plugins/source/k8s/resources/services/core/nodes.go @@ -41,7 +41,7 @@ func Nodes() *schema.Table { { Name: "spec_pod_cidrs", Type: schema.TypeCIDRArray, - Resolver: schema.PathResolver("Spec.PodCIDRs"), + Resolver: client.StringToCidrArrayPathResolver("Spec.PodCIDRs"), }, }, } diff --git a/plugins/source/k8s/resources/services/core/services.go b/plugins/source/k8s/resources/services/core/services.go index e037fdf5f6525f..fe0174677f78f8 100644 --- a/plugins/source/k8s/resources/services/core/services.go +++ b/plugins/source/k8s/resources/services/core/services.go @@ -38,12 +38,12 @@ func Services() *schema.Table { { Name: "spec_cluster_ips", Type: schema.TypeInetArray, - Resolver: schema.PathResolver("Spec.ClusterIPs"), + Resolver: client.StringToInetArrayPathResolver("Spec.ClusterIPs"), }, { Name: "spec_external_ips", Type: schema.TypeInetArray, - Resolver: schema.PathResolver("Spec.ExternalIPs"), + Resolver: client.StringToInetArrayPathResolver("Spec.ExternalIPs"), }, { Name: "spec_load_balancer_ip", diff --git a/plugins/source/k8s/test/policy_cq_config.yml b/plugins/source/k8s/test/policy_cq_config.yml index 2b72597a03cc77..db8b5846bde152 100644 --- a/plugins/source/k8s/test/policy_cq_config.yml +++ b/plugins/source/k8s/test/policy_cq_config.yml @@ -10,6 +10,6 @@ kind: destination spec: name: postgresql path: cloudquery/postgresql - version: "v2.0.4" # latest version of postgresql plugin + version: "v2.0.5" # latest version of postgresql plugin spec: connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/plugins/source/okta/client/client.go b/plugins/source/okta/client/client.go index 4e98cc5d4b819a..53fde9972a5b5c 100644 --- a/plugins/source/okta/client/client.go +++ b/plugins/source/okta/client/client.go @@ -42,7 +42,7 @@ func New(logger zerolog.Logger, s specs.Source, okt *okta.APIClient) *Client { } } -func Configure(_ context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(_ context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { oktaSpec := &Spec{} if err := s.UnmarshalSpec(oktaSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal okta spec: %w", err) diff --git a/plugins/source/okta/client/testing.go b/plugins/source/okta/client/testing.go index 5d6fc9fdde21b7..94d4607b0650fe 100644 --- a/plugins/source/okta/client/testing.go +++ b/plugins/source/okta/client/testing.go @@ -62,7 +62,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var clientSpec Spec if err := spec.UnmarshalSpec(&clientSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal client spec: %w", err) diff --git a/plugins/source/okta/docs/tables/README.md b/plugins/source/okta/docs/tables/README.md index 29ed7bfb4f8eb4..f855f51352b1f6 100644 --- a/plugins/source/okta/docs/tables/README.md +++ b/plugins/source/okta/docs/tables/README.md @@ -2,9 +2,9 @@ ## Tables -- [okta_users](okta_users.md) -- [okta_groups](okta_groups.md) - - [okta_group_users](okta_group_users.md) - [okta_applications](okta_applications.md) + - [okta_application_group_assignments](okta_application_group_assignments.md) - [okta_application_users](okta_application_users.md) - - [okta_application_group_assignments](okta_application_group_assignments.md) \ No newline at end of file +- [okta_groups](okta_groups.md) + - [okta_group_users](okta_group_users.md) +- [okta_users](okta_users.md) \ No newline at end of file diff --git a/plugins/source/okta/docs/tables/okta_applications.md b/plugins/source/okta/docs/tables/okta_applications.md index 6519065674ca04..008de09527753f 100644 --- a/plugins/source/okta/docs/tables/okta_applications.md +++ b/plugins/source/okta/docs/tables/okta_applications.md @@ -5,8 +5,8 @@ The primary key for this table is **id**. ## Relations The following tables depend on okta_applications: - - [okta_application_users](okta_application_users.md) - [okta_application_group_assignments](okta_application_group_assignments.md) + - [okta_application_users](okta_application_users.md) ## Columns diff --git a/plugins/source/okta/go.mod b/plugins/source/okta/go.mod index 4840689484e788..daa23ccbbbc482 100644 --- a/plugins/source/okta/go.mod +++ b/plugins/source/okta/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/okta go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gorilla/mux v1.8.0 github.com/okta/okta-sdk-golang/v3 v3.0.1 github.com/rs/zerolog v1.28.0 diff --git a/plugins/source/okta/go.sum b/plugins/source/okta/go.sum index 401f4b9b81085b..f5af1a44aeaf0c 100644 --- a/plugins/source/okta/go.sum +++ b/plugins/source/okta/go.sum @@ -42,8 +42,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/oracle/.gitignore b/plugins/source/oracle/.gitignore new file mode 100644 index 00000000000000..ab29e641fe5493 --- /dev/null +++ b/plugins/source/oracle/.gitignore @@ -0,0 +1 @@ +oracle \ No newline at end of file diff --git a/plugins/source/oracle/.goreleaser.yaml b/plugins/source/oracle/.goreleaser.yaml new file mode 100644 index 00000000000000..98ca77363cd0a5 --- /dev/null +++ b/plugins/source/oracle/.goreleaser.yaml @@ -0,0 +1,14 @@ +variables: + component: source/oracle + binary: oracle + +project_name: plugins/source/oracle + +monorepo: + tag_prefix: plugins-source-oracle- + dir: plugins/source/oracle + +includes: + - from_file: + # Relative to the directory Go Releaser is run from (which is the root of the repository) + path: ./plugins/.goreleaser.yaml \ No newline at end of file diff --git a/plugins/source/oracle/CHANGELOG.md b/plugins/source/oracle/CHANGELOG.md new file mode 100644 index 00000000000000..0280207b17536a --- /dev/null +++ b/plugins/source/oracle/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## 1.0.0 (2023-01-17) + + +### Features + +* Oracle plugin ([#6353](https://github.com/cloudquery/cloudquery/issues/6353)) ([740a428](https://github.com/cloudquery/cloudquery/commit/740a428cb2f6c64c762aae4c0d7071a492b72b39)) + + +### Bug Fixes + +* Add oracle goreleaser ([#6838](https://github.com/cloudquery/cloudquery/issues/6838)) ([7ec3abd](https://github.com/cloudquery/cloudquery/commit/7ec3abd3cfba8a4c6ea2543aca352b6b0e28de21)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.25.1 ([#6805](https://github.com/cloudquery/cloudquery/issues/6805)) ([9da0ce2](https://github.com/cloudquery/cloudquery/commit/9da0ce283f50410eb9274375ec1d22131a80d937)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.26.0 ([#6839](https://github.com/cloudquery/cloudquery/issues/6839)) ([6ccda8d](https://github.com/cloudquery/cloudquery/commit/6ccda8d0bc6e7ce75f4a64a18911e349ccaac277)) diff --git a/plugins/source/oracle/Makefile b/plugins/source/oracle/Makefile new file mode 100644 index 00000000000000..0ee03da5713b25 --- /dev/null +++ b/plugins/source/oracle/Makefile @@ -0,0 +1,22 @@ +# Test unit +.PHONY: test +test: + go test -race -timeout 3m ./... + +.PHONY: lint +lint: + golangci-lint run --config ../../.golangci.yml + +.PHONY: gen-code +gen-code: + go run codegen/*.go + +.PHONY: gen-docs +gen-docs: + rm -rf ./docs/tables/* + go run main.go doc ./docs/tables + sed 's_(\(.*\))_(https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/\1)_' docs/tables/README.md > ../../../website/pages/docs/plugins/sources/oracle/tables.md + +# All gen targets +.PHONY: gen +gen: gen-docs \ No newline at end of file diff --git a/plugins/source/oracle/README.md b/plugins/source/oracle/README.md new file mode 100644 index 00000000000000..f032be9c873d5d --- /dev/null +++ b/plugins/source/oracle/README.md @@ -0,0 +1,7 @@ +# Oracle Source Plugin + +The Oracle source plugin extracts information from the Oracle Cloud (`oci`) API. + +## Links + +- [User Guide](https://cloudquery.io/docs/plugins/sources/oracle/overview) \ No newline at end of file diff --git a/plugins/source/oracle/client/client.go b/plugins/source/oracle/client/client.go new file mode 100644 index 00000000000000..56a09b10af337f --- /dev/null +++ b/plugins/source/oracle/client/client.go @@ -0,0 +1,224 @@ +package client + +import ( + "context" + "fmt" + "strings" + + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" + "github.com/oracle/oci-go-sdk/v65/objectstorage" + "github.com/rs/zerolog" +) + +type Client struct { + // A map of region->`OracleClients` struct. + // Every OracleClients struct contains all the clients we need for a single regionXcompartment + OracleClients map[string]*OracleClients + AllCompartmentOcids []string + + TenancyOcid string // Tenancy == RootCompartment + HomeRegion string + + ObjectStorageNamespace string // A global value, used for object-storage (i.e. buckets) + + // All availibility domains in the tenancy. + RegionAvaililbilityDomainMap map[string][]string + + // These are different per "cq-client", i.e. per multiplexed-cq-client. + // By default (if no multiplexer is defined), Region is set to the home region, and CompartmentOcid is set to the tenancy ocid. + Region string + CompartmentOcid string + AvailibilityDomain string // For fetches that are multiplexed by availibility domain (and not region) + + logger zerolog.Logger +} + +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { + configProvider := common.DefaultConfigProvider() + + tenancyOcid, err := configProvider.TenancyOCID() + if err != nil { + return nil, err + } + + // The identity-client in the home region, that we use for initialization. + homeIdentityClient, err := identity.NewIdentityClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + + allCompartmentOcids, err := getAllCompartmentIdsInTenancy(ctx, homeIdentityClient, tenancyOcid) + if err != nil { + return nil, err + } + logger.Info().Int("num_compartments", len(allCompartmentOcids)).Msg("syncing from all compartments in tenancy") + + allRegions, homeRegion, err := getAllSubscribedRegions(ctx, homeIdentityClient, tenancyOcid) + if err != nil { + return nil, err + } + logger.Info().Int("num_regions", len(allRegions)).Msg("syncing from all subscribed regions") + + oracleClients, err := initOracleClientsInAllRegions(configProvider, allRegions) + if err != nil { + return nil, err + } + + objectStorageNamespace, err := getObjectStorageNamespace(ctx, oracleClients[homeRegion].ObjectstorageObjectstorageClient) + + if err != nil { + return nil, err + } + + regionAvailibilityDomainMap, err := getRegionAvailibilityDomainMap(ctx, oracleClients, tenancyOcid) + if err != nil { + return nil, err + } + + logger = logger.With().Str("region", homeRegion).Str("compartment_ocid", tenancyOcid).Logger() + + return &Client{ + OracleClients: oracleClients, + AllCompartmentOcids: allCompartmentOcids, + HomeRegion: homeRegion, + TenancyOcid: tenancyOcid, + RegionAvaililbilityDomainMap: regionAvailibilityDomainMap, + ObjectStorageNamespace: objectStorageNamespace, + Region: homeRegion, // Default value if no multiplexer is defined + CompartmentOcid: tenancyOcid, // Default value if no multiplexer is defined + logger: logger, + }, nil +} + +// cq-client id is comprised of region and compartment-ocid. +func (c *Client) ID() string { + return strings.Join([]string{c.Region, c.CompartmentOcid}, ":") +} + +func (c *Client) Logger() *zerolog.Logger { + return &c.logger +} + +func (c *Client) withRegion(region string) *Client { + newClient := *c + newClient.logger = c.logger.With().Str("region", region).Logger() + newClient.Region = region + return &newClient +} + +func (c *Client) withCompartment(compartmentOcid string) *Client { + newClient := *c + newClient.logger = c.logger.With().Str("compartment_ocid", compartmentOcid).Logger() + newClient.CompartmentOcid = compartmentOcid + return &newClient +} + +func (c *Client) withAvailibilityDomain(availabilityDomain string) *Client { + newClient := *c + newClient.logger = c.logger.With().Str("availability_domain", availabilityDomain).Logger() + newClient.AvailibilityDomain = availabilityDomain + return &newClient +} + +// Returns a list of all compartment-ids in a tenancy, recursively. (including the tenancy itself, which is the 'root compartment'). +func getAllCompartmentIdsInTenancy(ctx context.Context, client identity.IdentityClient, tenancyId string) ([]string, error) { + allCompartmentIds := []string{tenancyId} + + var page *string + for { + request := identity.ListCompartmentsRequest{ + CompartmentId: common.String(tenancyId), + CompartmentIdInSubtree: common.Bool(true), // recursively traverse the compartment hierarchy + LifecycleState: identity.CompartmentLifecycleStateActive, + Page: page, + } + + response, err := client.ListCompartments(ctx, request) + if err != nil { + return nil, fmt.Errorf("failed to list compartments in tenancy: %w", err) + } + + for i := range response.Items { + allCompartmentIds = append(allCompartmentIds, *response.Items[i].Id) + } + + page = response.OpcNextPage + if response.OpcNextPage == nil { + break + } + } + + return allCompartmentIds, nil +} + +// Returns a list of all subscribed regions in a tenancy. Also returns the name of the home-region. +func getAllSubscribedRegions(ctx context.Context, client identity.IdentityClient, tenancyOcid string) ([]string, string, error) { + request := identity.ListRegionSubscriptionsRequest{ + TenancyId: common.String(tenancyOcid), + } + + response, err := client.ListRegionSubscriptions(ctx, request) + if err != nil { + return nil, "", err + } + + regionNames := make([]string, 0) + var homeRegion string + + for _, region := range response.Items { + if region.Status != identity.RegionSubscriptionStatusReady { + continue + } + + regionNames = append(regionNames, *region.RegionName) + if *region.IsHomeRegion { + homeRegion = *region.RegionName + } + } + + if homeRegion == "" { + return nil, "", fmt.Errorf("no home region found") + } + + return regionNames, homeRegion, nil +} + +func getObjectStorageNamespace(ctx context.Context, client *objectstorage.ObjectStorageClient) (string, error) { + request := objectstorage.GetNamespaceRequest{} + + response, err := client.GetNamespace(ctx, request) + if err != nil { + return "", err + } + + return *response.Value, nil +} + +func getRegionAvailibilityDomainMap(ctx context.Context, oracleClients map[string]*OracleClients, tenancyOcid string) (map[string][]string, error) { + regionAvailibilityDomainMap := make(map[string][]string) + + for region, clients := range oracleClients { + request := identity.ListAvailabilityDomainsRequest{ + CompartmentId: common.String(tenancyOcid), + } + + response, err := clients.IdentityIdentityClient.ListAvailabilityDomains(ctx, request) + if err != nil { + return nil, err + } + + availabilityDomains := make([]string, 0) + + for _, domain := range response.Items { + availabilityDomains = append(availabilityDomains, *domain.Name) + } + + regionAvailibilityDomainMap[region] = availabilityDomains + } + + return regionAvailibilityDomainMap, nil +} diff --git a/plugins/source/oracle/client/multiplex.go b/plugins/source/oracle/client/multiplex.go new file mode 100644 index 00000000000000..2efc3e557fb625 --- /dev/null +++ b/plugins/source/oracle/client/multiplex.go @@ -0,0 +1,49 @@ +package client + +import "github.com/cloudquery/plugin-sdk/schema" + +func RegionCompartmentMultiplex(meta schema.ClientMeta) []schema.ClientMeta { + cqClient := meta.(*Client) + + multiplexedClients := make([]schema.ClientMeta, 0, len(cqClient.OracleClients)*len(cqClient.AllCompartmentOcids)) + + // The `OracleClients` map is keyed by region. + for region := range cqClient.OracleClients { + for _, compartmentOcid := range cqClient.AllCompartmentOcids { + multiplexedClients = append(multiplexedClients, cqClient.withRegion(region).withCompartment(compartmentOcid)) + } + } + + return multiplexedClients +} + +// Returns a new cq-client for the home-region and root-compartment. +// root-compartment - tenancy ocid. +func TenancyMultiplex(meta schema.ClientMeta) []schema.ClientMeta { + cqClient := meta.(*Client) + + multiplexedClient := cqClient.withRegion(cqClient.HomeRegion).withCompartment(cqClient.TenancyOcid) + + return []schema.ClientMeta{ + multiplexedClient, + } +} + +func AvailibilityDomainCompartmentMultiplex(meta schema.ClientMeta) []schema.ClientMeta { + cqClient := meta.(*Client) + + multiplexedClients := make([]schema.ClientMeta, 0) + + for region, availibilityDomains := range cqClient.RegionAvaililbilityDomainMap { + for _, availibilityDomain := range availibilityDomains { + for _, compartmentOcid := range cqClient.AllCompartmentOcids { + multiplexedClients = append(multiplexedClients, cqClient. + withRegion(region). + withCompartment(compartmentOcid). + withAvailibilityDomain(availibilityDomain)) + } + } + } + + return multiplexedClients +} diff --git a/plugins/source/oracle/client/oracle_clients.go b/plugins/source/oracle/client/oracle_clients.go new file mode 100644 index 00000000000000..36323221614598 --- /dev/null +++ b/plugins/source/oracle/client/oracle_clients.go @@ -0,0 +1,1570 @@ +// This is "almost-autogenerated" by a python script `generate_OracleClients.py` + +package client + +import ( + "github.com/oracle/oci-go-sdk/v65/adm" + "github.com/oracle/oci-go-sdk/v65/aianomalydetection" + "github.com/oracle/oci-go-sdk/v65/ailanguage" + "github.com/oracle/oci-go-sdk/v65/aispeech" + "github.com/oracle/oci-go-sdk/v65/aivision" + "github.com/oracle/oci-go-sdk/v65/analytics" + "github.com/oracle/oci-go-sdk/v65/announcementsservice" + "github.com/oracle/oci-go-sdk/v65/apigateway" + "github.com/oracle/oci-go-sdk/v65/apmconfig" + "github.com/oracle/oci-go-sdk/v65/apmcontrolplane" + "github.com/oracle/oci-go-sdk/v65/apmsynthetics" + "github.com/oracle/oci-go-sdk/v65/apmtraces" + "github.com/oracle/oci-go-sdk/v65/applicationmigration" + "github.com/oracle/oci-go-sdk/v65/appmgmtcontrol" + "github.com/oracle/oci-go-sdk/v65/artifacts" + "github.com/oracle/oci-go-sdk/v65/audit" + "github.com/oracle/oci-go-sdk/v65/autoscaling" + "github.com/oracle/oci-go-sdk/v65/bastion" + "github.com/oracle/oci-go-sdk/v65/bds" + "github.com/oracle/oci-go-sdk/v65/blockchain" + "github.com/oracle/oci-go-sdk/v65/budget" + "github.com/oracle/oci-go-sdk/v65/certificates" + "github.com/oracle/oci-go-sdk/v65/certificatesmanagement" + "github.com/oracle/oci-go-sdk/v65/cims" + "github.com/oracle/oci-go-sdk/v65/cloudbridge" + "github.com/oracle/oci-go-sdk/v65/cloudguard" + "github.com/oracle/oci-go-sdk/v65/cloudmigrations" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/computeinstanceagent" + "github.com/oracle/oci-go-sdk/v65/containerengine" + "github.com/oracle/oci-go-sdk/v65/containerinstances" + "github.com/oracle/oci-go-sdk/v65/core" + "github.com/oracle/oci-go-sdk/v65/dashboardservice" + "github.com/oracle/oci-go-sdk/v65/database" + "github.com/oracle/oci-go-sdk/v65/databasemanagement" + "github.com/oracle/oci-go-sdk/v65/databasemigration" + "github.com/oracle/oci-go-sdk/v65/databasetools" + "github.com/oracle/oci-go-sdk/v65/datacatalog" + "github.com/oracle/oci-go-sdk/v65/dataconnectivity" + "github.com/oracle/oci-go-sdk/v65/dataflow" + "github.com/oracle/oci-go-sdk/v65/dataintegration" + "github.com/oracle/oci-go-sdk/v65/datalabelingservice" + "github.com/oracle/oci-go-sdk/v65/datalabelingservicedataplane" + "github.com/oracle/oci-go-sdk/v65/datasafe" + "github.com/oracle/oci-go-sdk/v65/datascience" + "github.com/oracle/oci-go-sdk/v65/devops" + "github.com/oracle/oci-go-sdk/v65/disasterrecovery" + "github.com/oracle/oci-go-sdk/v65/dns" + "github.com/oracle/oci-go-sdk/v65/dts" + "github.com/oracle/oci-go-sdk/v65/email" + "github.com/oracle/oci-go-sdk/v65/emwarehouse" + "github.com/oracle/oci-go-sdk/v65/events" + "github.com/oracle/oci-go-sdk/v65/filestorage" + "github.com/oracle/oci-go-sdk/v65/functions" + "github.com/oracle/oci-go-sdk/v65/fusionapps" + "github.com/oracle/oci-go-sdk/v65/goldengate" + "github.com/oracle/oci-go-sdk/v65/governancerulescontrolplane" + "github.com/oracle/oci-go-sdk/v65/healthchecks" + "github.com/oracle/oci-go-sdk/v65/identity" + "github.com/oracle/oci-go-sdk/v65/integration" + "github.com/oracle/oci-go-sdk/v65/jms" + "github.com/oracle/oci-go-sdk/v65/keymanagement" + "github.com/oracle/oci-go-sdk/v65/licensemanager" + "github.com/oracle/oci-go-sdk/v65/limits" + "github.com/oracle/oci-go-sdk/v65/loadbalancer" + "github.com/oracle/oci-go-sdk/v65/lockbox" + "github.com/oracle/oci-go-sdk/v65/loganalytics" + "github.com/oracle/oci-go-sdk/v65/logging" + "github.com/oracle/oci-go-sdk/v65/managementagent" + "github.com/oracle/oci-go-sdk/v65/managementdashboard" + "github.com/oracle/oci-go-sdk/v65/marketplace" + "github.com/oracle/oci-go-sdk/v65/mediaservices" + "github.com/oracle/oci-go-sdk/v65/monitoring" + "github.com/oracle/oci-go-sdk/v65/mysql" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" + "github.com/oracle/oci-go-sdk/v65/networkloadbalancer" + "github.com/oracle/oci-go-sdk/v65/nosql" + "github.com/oracle/oci-go-sdk/v65/objectstorage" + "github.com/oracle/oci-go-sdk/v65/oce" + "github.com/oracle/oci-go-sdk/v65/ocvp" + "github.com/oracle/oci-go-sdk/v65/oda" + "github.com/oracle/oci-go-sdk/v65/onesubscription" + "github.com/oracle/oci-go-sdk/v65/ons" + "github.com/oracle/oci-go-sdk/v65/opa" + "github.com/oracle/oci-go-sdk/v65/opensearch" + "github.com/oracle/oci-go-sdk/v65/operatoraccesscontrol" + "github.com/oracle/oci-go-sdk/v65/opsi" + "github.com/oracle/oci-go-sdk/v65/optimizer" + "github.com/oracle/oci-go-sdk/v65/osmanagement" + "github.com/oracle/oci-go-sdk/v65/ospgateway" + "github.com/oracle/oci-go-sdk/v65/osubbillingschedule" + "github.com/oracle/oci-go-sdk/v65/osuborganizationsubscription" + "github.com/oracle/oci-go-sdk/v65/osubsubscription" + "github.com/oracle/oci-go-sdk/v65/osubusage" + "github.com/oracle/oci-go-sdk/v65/queue" + "github.com/oracle/oci-go-sdk/v65/resourcemanager" + "github.com/oracle/oci-go-sdk/v65/resourcesearch" + "github.com/oracle/oci-go-sdk/v65/rover" + "github.com/oracle/oci-go-sdk/v65/sch" + "github.com/oracle/oci-go-sdk/v65/secrets" + "github.com/oracle/oci-go-sdk/v65/servicecatalog" + "github.com/oracle/oci-go-sdk/v65/servicemanagerproxy" + "github.com/oracle/oci-go-sdk/v65/servicemesh" + "github.com/oracle/oci-go-sdk/v65/stackmonitoring" + "github.com/oracle/oci-go-sdk/v65/streaming" + "github.com/oracle/oci-go-sdk/v65/tenantmanagercontrolplane" + "github.com/oracle/oci-go-sdk/v65/threatintelligence" + "github.com/oracle/oci-go-sdk/v65/usage" + "github.com/oracle/oci-go-sdk/v65/usageapi" + "github.com/oracle/oci-go-sdk/v65/vault" + "github.com/oracle/oci-go-sdk/v65/visualbuilder" + "github.com/oracle/oci-go-sdk/v65/vnmonitoring" + "github.com/oracle/oci-go-sdk/v65/vulnerabilityscanning" + "github.com/oracle/oci-go-sdk/v65/waa" + "github.com/oracle/oci-go-sdk/v65/waas" + "github.com/oracle/oci-go-sdk/v65/waf" + "github.com/oracle/oci-go-sdk/v65/workrequests" +) + +type OracleClients struct { + AdmApplicationdependencymanagementClient *adm.ApplicationDependencyManagementClient + AianomalydetectionAnomalydetectionClient *aianomalydetection.AnomalyDetectionClient + AilanguageAiservicelanguageClient *ailanguage.AIServiceLanguageClient + AispeechAiservicespeechClient *aispeech.AIServiceSpeechClient + AivisionAiservicevisionClient *aivision.AIServiceVisionClient + AnalyticsAnalyticsClient *analytics.AnalyticsClient + AnnouncementsserviceAnnouncementClient *announcementsservice.AnnouncementClient + AnnouncementsserviceAnnouncementspreferencesClient *announcementsservice.AnnouncementsPreferencesClient + AnnouncementsserviceAnnouncementsubscriptionClient *announcementsservice.AnnouncementSubscriptionClient + ApigatewayApigatewayClient *apigateway.ApiGatewayClient + ApigatewayDeploymentClient *apigateway.DeploymentClient + ApigatewayGatewayClient *apigateway.GatewayClient + ApigatewaySubscribersClient *apigateway.SubscribersClient + ApigatewayUsageplansClient *apigateway.UsagePlansClient + ApigatewayWorkrequestsClient *apigateway.WorkRequestsClient + ApmconfigConfigClient *apmconfig.ConfigClient + ApmcontrolplaneApmdomainClient *apmcontrolplane.ApmDomainClient + ApmsyntheticsApmsyntheticClient *apmsynthetics.ApmSyntheticClient + ApmtracesQueryClient *apmtraces.QueryClient + ApplicationmigrationApplicationmigrationClient *applicationmigration.ApplicationMigrationClient + AppmgmtcontrolAppmgmtcontrolClient *appmgmtcontrol.AppmgmtControlClient + ArtifactsArtifactsClient *artifacts.ArtifactsClient + AuditAuditClient *audit.AuditClient + AutoscalingAutoscalingClient *autoscaling.AutoScalingClient + BastionBastionClient *bastion.BastionClient + BdsBdsClient *bds.BdsClient + BlockchainBlockchainplatformClient *blockchain.BlockchainPlatformClient + BudgetBudgetClient *budget.BudgetClient + CertificatesCertificatesClient *certificates.CertificatesClient + CertificatesmanagementCertificatesmanagementClient *certificatesmanagement.CertificatesManagementClient + CimsIncidentClient *cims.IncidentClient + CloudbridgeCommonClient *cloudbridge.CommonClient + CloudbridgeDiscoveryClient *cloudbridge.DiscoveryClient + CloudbridgeInventoryClient *cloudbridge.InventoryClient + CloudbridgeOcbagentsvcClient *cloudbridge.OcbAgentSvcClient + CloudguardCloudguardClient *cloudguard.CloudGuardClient + CloudmigrationsMigrationClient *cloudmigrations.MigrationClient + ComputeinstanceagentComputeinstanceagentClient *computeinstanceagent.ComputeInstanceAgentClient + ComputeinstanceagentPluginClient *computeinstanceagent.PluginClient + ComputeinstanceagentPluginconfigClient *computeinstanceagent.PluginconfigClient + ContainerengineContainerengineClient *containerengine.ContainerEngineClient + ContainerinstancesContainerinstanceClient *containerinstances.ContainerInstanceClient + CoreBlockstorageClient *core.BlockstorageClient + CoreComputeClient *core.ComputeClient + CoreComputemanagementClient *core.ComputeManagementClient + CoreVirtualnetworkClient *core.VirtualNetworkClient + DashboardserviceDashboardClient *dashboardservice.DashboardClient + DashboardserviceDashboardgroupClient *dashboardservice.DashboardGroupClient + DatabaseDatabaseClient *database.DatabaseClient + DatabasemanagementDbmanagementClient *databasemanagement.DbManagementClient + DatabasemanagementDiagnosabilityClient *databasemanagement.DiagnosabilityClient + DatabasemanagementSqltuningClient *databasemanagement.SqlTuningClient + DatabasemigrationDatabasemigrationClient *databasemigration.DatabaseMigrationClient + DatabasetoolsDatabasetoolsClient *databasetools.DatabaseToolsClient + DatacatalogDatacatalogClient *datacatalog.DataCatalogClient + DataconnectivityDataconnectivitymanagementClient *dataconnectivity.DataConnectivityManagementClient + DataflowDataflowClient *dataflow.DataFlowClient + DataintegrationDataintegrationClient *dataintegration.DataIntegrationClient + DatalabelingserviceDatalabelingmanagementClient *datalabelingservice.DataLabelingManagementClient + DatalabelingservicedataplaneDatalabelingClient *datalabelingservicedataplane.DataLabelingClient + DatasafeDatasafeClient *datasafe.DataSafeClient + DatascienceDatascienceClient *datascience.DataScienceClient + DevopsDevopsClient *devops.DevopsClient + DisasterrecoveryDisasterrecoveryClient *disasterrecovery.DisasterRecoveryClient + DnsDnsClient *dns.DnsClient + DtsApplianceexportjobClient *dts.ApplianceExportJobClient + DtsShippingvendorsClient *dts.ShippingVendorsClient + DtsTransferapplianceClient *dts.TransferApplianceClient + DtsTransferapplianceentitlementClient *dts.TransferApplianceEntitlementClient + DtsTransferdeviceClient *dts.TransferDeviceClient + DtsTransferjobClient *dts.TransferJobClient + DtsTransferpackageClient *dts.TransferPackageClient + EmailEmailClient *email.EmailClient + EmwarehouseEmwarehouseClient *emwarehouse.EmWarehouseClient + EventsEventsClient *events.EventsClient + FilestorageFilestorageClient *filestorage.FileStorageClient + FunctionsFunctionsmanagementClient *functions.FunctionsManagementClient + FusionappsFusionapplicationsClient *fusionapps.FusionApplicationsClient + GoldengateGoldengateClient *goldengate.GoldenGateClient + GovernancerulescontrolplaneGovernanceruleClient *governancerulescontrolplane.GovernanceRuleClient + GovernancerulescontrolplaneWorkrequestClient *governancerulescontrolplane.WorkRequestClient + HealthchecksHealthchecksClient *healthchecks.HealthChecksClient + IdentityIdentityClient *identity.IdentityClient + IntegrationIntegrationinstanceClient *integration.IntegrationInstanceClient + JmsJavamanagementserviceClient *jms.JavaManagementServiceClient + KeymanagementKmsvaultClient *keymanagement.KmsVaultClient + LicensemanagerLicensemanagerClient *licensemanager.LicenseManagerClient + LimitsLimitsClient *limits.LimitsClient + LimitsQuotasClient *limits.QuotasClient + LoadbalancerLoadbalancerClient *loadbalancer.LoadBalancerClient + LockboxLockboxClient *lockbox.LockboxClient + LoganalyticsLoganalyticsClient *loganalytics.LogAnalyticsClient + LoggingLoggingmanagementClient *logging.LoggingManagementClient + ManagementagentManagementagentClient *managementagent.ManagementAgentClient + ManagementdashboardDashxapisClient *managementdashboard.DashxApisClient + MarketplaceMarketplaceClient *marketplace.MarketplaceClient + MediaservicesMediaservicesClient *mediaservices.MediaServicesClient + MonitoringMonitoringClient *monitoring.MonitoringClient + MysqlChannelsClient *mysql.ChannelsClient + MysqlDbbackupsClient *mysql.DbBackupsClient + MysqlDbsystemClient *mysql.DbSystemClient + MysqlMysqlaasClient *mysql.MysqlaasClient + MysqlReplicasClient *mysql.ReplicasClient + MysqlWorkrequestsClient *mysql.WorkRequestsClient + NetworkfirewallNetworkfirewallClient *networkfirewall.NetworkFirewallClient + NetworkloadbalancerNetworkloadbalancerClient *networkloadbalancer.NetworkLoadBalancerClient + NosqlNosqlClient *nosql.NosqlClient + ObjectstorageObjectstorageClient *objectstorage.ObjectStorageClient + OceOceinstanceClient *oce.OceInstanceClient + OcvpEsxihostClient *ocvp.EsxiHostClient + OcvpSddcClient *ocvp.SddcClient + OcvpWorkrequestClient *ocvp.WorkRequestClient + OdaManagementClient *oda.ManagementClient + OdaOdaClient *oda.OdaClient + OdaOdapackageClient *oda.OdapackageClient + OnesubscriptionBillingscheduleClient *onesubscription.BillingScheduleClient + OnesubscriptionCommitmentClient *onesubscription.CommitmentClient + OnesubscriptionComputedusageClient *onesubscription.ComputedUsageClient + OnesubscriptionInvoicesummaryClient *onesubscription.InvoiceSummaryClient + OnesubscriptionOrganizationsubscriptionClient *onesubscription.OrganizationSubscriptionClient + OnesubscriptionRatecardClient *onesubscription.RatecardClient + OnesubscriptionSubscribedserviceClient *onesubscription.SubscribedServiceClient + OnesubscriptionSubscriptionClient *onesubscription.SubscriptionClient + OnsNotificationcontrolplaneClient *ons.NotificationControlPlaneClient + OnsNotificationdataplaneClient *ons.NotificationDataPlaneClient + OpaOpainstanceClient *opa.OpaInstanceClient + OpensearchOpensearchclusterClient *opensearch.OpensearchClusterClient + OpensearchOpensearchclusterbackupClient *opensearch.OpensearchClusterBackupClient + OperatoraccesscontrolAccessrequestsClient *operatoraccesscontrol.AccessRequestsClient + OperatoraccesscontrolOperatoractionsClient *operatoraccesscontrol.OperatorActionsClient + OperatoraccesscontrolOperatorcontrolClient *operatoraccesscontrol.OperatorControlClient + OperatoraccesscontrolOperatorcontrolassignmentClient *operatoraccesscontrol.OperatorControlAssignmentClient + OpsiOperationsinsightsClient *opsi.OperationsInsightsClient + OptimizerOptimizerClient *optimizer.OptimizerClient + OsmanagementEventClient *osmanagement.EventClient + OsmanagementOsmanagementClient *osmanagement.OsManagementClient + OspgatewayInvoiceserviceClient *ospgateway.InvoiceServiceClient + OspgatewaySubscriptionserviceClient *ospgateway.SubscriptionServiceClient + OsubbillingscheduleBillingscheduleClient *osubbillingschedule.BillingScheduleClient + OsuborganizationsubscriptionOrganizationsubscriptionClient *osuborganizationsubscription.OrganizationSubscriptionClient + OsubsubscriptionCommitmentClient *osubsubscription.CommitmentClient + OsubsubscriptionRatecardClient *osubsubscription.RatecardClient + OsubsubscriptionSubscriptionClient *osubsubscription.SubscriptionClient + OsubusageComputedusageClient *osubusage.ComputedUsageClient + QueueQueueadminClient *queue.QueueAdminClient + ResourcemanagerResourcemanagerClient *resourcemanager.ResourceManagerClient + ResourcesearchResourcesearchClient *resourcesearch.ResourceSearchClient + RoverRoverclusterClient *rover.RoverClusterClient + RoverRoverentitlementClient *rover.RoverEntitlementClient + RoverRovernodeClient *rover.RoverNodeClient + RoverShapeClient *rover.ShapeClient + SchServiceconnectorClient *sch.ServiceConnectorClient + SecretsSecretsClient *secrets.SecretsClient + ServicecatalogServicecatalogClient *servicecatalog.ServiceCatalogClient + ServicemanagerproxyServicemanagerproxyClient *servicemanagerproxy.ServiceManagerProxyClient + ServicemeshServicemeshClient *servicemesh.ServiceMeshClient + StackmonitoringStackmonitoringClient *stackmonitoring.StackMonitoringClient + StreamingStreamadminClient *streaming.StreamAdminClient + TenantmanagercontrolplaneDomainClient *tenantmanagercontrolplane.DomainClient + TenantmanagercontrolplaneDomaingovernanceClient *tenantmanagercontrolplane.DomainGovernanceClient + TenantmanagercontrolplaneLinkClient *tenantmanagercontrolplane.LinkClient + TenantmanagercontrolplaneOrganizationClient *tenantmanagercontrolplane.OrganizationClient + TenantmanagercontrolplaneRecipientinvitationClient *tenantmanagercontrolplane.RecipientInvitationClient + TenantmanagercontrolplaneSenderinvitationClient *tenantmanagercontrolplane.SenderInvitationClient + TenantmanagercontrolplaneSubscriptionClient *tenantmanagercontrolplane.SubscriptionClient + TenantmanagercontrolplaneWorkrequestClient *tenantmanagercontrolplane.WorkRequestClient + ThreatintelligenceThreatintelClient *threatintelligence.ThreatintelClient + UsageRewardsClient *usage.RewardsClient + UsageapiUsageapiClient *usageapi.UsageapiClient + VaultVaultsClient *vault.VaultsClient + VisualbuilderVbinstanceClient *visualbuilder.VbInstanceClient + VnmonitoringVnmonitoringClient *vnmonitoring.VnMonitoringClient + VulnerabilityscanningVulnerabilityscanningClient *vulnerabilityscanning.VulnerabilityScanningClient + WaaWaaClient *waa.WaaClient + WaaWorkrequestClient *waa.WorkRequestClient + WaasRedirectClient *waas.RedirectClient + WaasWaasClient *waas.WaasClient + WafWafClient *waf.WafClient + WorkrequestsWorkrequestClient *workrequests.WorkRequestClient +} + +func initOracleClientsInAllRegions( + configProvider common.ConfigurationProvider, + allRegionOcids []string) (map[string]*OracleClients, error) { + oracleClients := make(map[string]*OracleClients) + + for _, regionOcid := range allRegionOcids { + oracleClients[regionOcid] = &OracleClients{} + + admApplicationDependencyManagementClient, err := adm.NewApplicationDependencyManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + admApplicationDependencyManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].AdmApplicationdependencymanagementClient = &admApplicationDependencyManagementClient + + aianomalydetectionAnomalyDetectionClient, err := aianomalydetection.NewAnomalyDetectionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + aianomalydetectionAnomalyDetectionClient.SetRegion(regionOcid) + oracleClients[regionOcid].AianomalydetectionAnomalydetectionClient = &aianomalydetectionAnomalyDetectionClient + + ailanguageAIServiceLanguageClient, err := ailanguage.NewAIServiceLanguageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ailanguageAIServiceLanguageClient.SetRegion(regionOcid) + oracleClients[regionOcid].AilanguageAiservicelanguageClient = &ailanguageAIServiceLanguageClient + + aispeechAIServiceSpeechClient, err := aispeech.NewAIServiceSpeechClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + aispeechAIServiceSpeechClient.SetRegion(regionOcid) + oracleClients[regionOcid].AispeechAiservicespeechClient = &aispeechAIServiceSpeechClient + + aivisionAIServiceVisionClient, err := aivision.NewAIServiceVisionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + aivisionAIServiceVisionClient.SetRegion(regionOcid) + oracleClients[regionOcid].AivisionAiservicevisionClient = &aivisionAIServiceVisionClient + + analyticsAnalyticsClient, err := analytics.NewAnalyticsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + analyticsAnalyticsClient.SetRegion(regionOcid) + oracleClients[regionOcid].AnalyticsAnalyticsClient = &analyticsAnalyticsClient + + announcementsserviceAnnouncementClient, err := announcementsservice.NewAnnouncementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + announcementsserviceAnnouncementClient.SetRegion(regionOcid) + oracleClients[regionOcid].AnnouncementsserviceAnnouncementClient = &announcementsserviceAnnouncementClient + + announcementsserviceAnnouncementSubscriptionClient, err := announcementsservice.NewAnnouncementSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + announcementsserviceAnnouncementSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].AnnouncementsserviceAnnouncementsubscriptionClient = &announcementsserviceAnnouncementSubscriptionClient + + announcementsserviceAnnouncementsPreferencesClient, err := announcementsservice.NewAnnouncementsPreferencesClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + announcementsserviceAnnouncementsPreferencesClient.SetRegion(regionOcid) + oracleClients[regionOcid].AnnouncementsserviceAnnouncementspreferencesClient = &announcementsserviceAnnouncementsPreferencesClient + + apigatewayApiGatewayClient, err := apigateway.NewApiGatewayClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewayApiGatewayClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewayApigatewayClient = &apigatewayApiGatewayClient + + apigatewayDeploymentClient, err := apigateway.NewDeploymentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewayDeploymentClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewayDeploymentClient = &apigatewayDeploymentClient + + apigatewayGatewayClient, err := apigateway.NewGatewayClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewayGatewayClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewayGatewayClient = &apigatewayGatewayClient + + apigatewaySubscribersClient, err := apigateway.NewSubscribersClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewaySubscribersClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewaySubscribersClient = &apigatewaySubscribersClient + + apigatewayUsagePlansClient, err := apigateway.NewUsagePlansClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewayUsagePlansClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewayUsageplansClient = &apigatewayUsagePlansClient + + apigatewayWorkRequestsClient, err := apigateway.NewWorkRequestsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apigatewayWorkRequestsClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApigatewayWorkrequestsClient = &apigatewayWorkRequestsClient + + apmconfigConfigClient, err := apmconfig.NewConfigClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apmconfigConfigClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApmconfigConfigClient = &apmconfigConfigClient + + apmcontrolplaneApmDomainClient, err := apmcontrolplane.NewApmDomainClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apmcontrolplaneApmDomainClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApmcontrolplaneApmdomainClient = &apmcontrolplaneApmDomainClient + + apmsyntheticsApmSyntheticClient, err := apmsynthetics.NewApmSyntheticClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apmsyntheticsApmSyntheticClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApmsyntheticsApmsyntheticClient = &apmsyntheticsApmSyntheticClient + + apmtracesQueryClient, err := apmtraces.NewQueryClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + apmtracesQueryClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApmtracesQueryClient = &apmtracesQueryClient + + applicationmigrationApplicationMigrationClient, err := applicationmigration.NewApplicationMigrationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + applicationmigrationApplicationMigrationClient.SetRegion(regionOcid) + oracleClients[regionOcid].ApplicationmigrationApplicationmigrationClient = &applicationmigrationApplicationMigrationClient + + appmgmtcontrolAppmgmtControlClient, err := appmgmtcontrol.NewAppmgmtControlClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + appmgmtcontrolAppmgmtControlClient.SetRegion(regionOcid) + oracleClients[regionOcid].AppmgmtcontrolAppmgmtcontrolClient = &appmgmtcontrolAppmgmtControlClient + + artifactsArtifactsClient, err := artifacts.NewArtifactsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + artifactsArtifactsClient.SetRegion(regionOcid) + oracleClients[regionOcid].ArtifactsArtifactsClient = &artifactsArtifactsClient + + auditAuditClient, err := audit.NewAuditClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + auditAuditClient.SetRegion(regionOcid) + oracleClients[regionOcid].AuditAuditClient = &auditAuditClient + + autoscalingAutoScalingClient, err := autoscaling.NewAutoScalingClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + autoscalingAutoScalingClient.SetRegion(regionOcid) + oracleClients[regionOcid].AutoscalingAutoscalingClient = &autoscalingAutoScalingClient + + bastionBastionClient, err := bastion.NewBastionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + bastionBastionClient.SetRegion(regionOcid) + oracleClients[regionOcid].BastionBastionClient = &bastionBastionClient + + bdsBdsClient, err := bds.NewBdsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + bdsBdsClient.SetRegion(regionOcid) + oracleClients[regionOcid].BdsBdsClient = &bdsBdsClient + + blockchainBlockchainPlatformClient, err := blockchain.NewBlockchainPlatformClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + blockchainBlockchainPlatformClient.SetRegion(regionOcid) + oracleClients[regionOcid].BlockchainBlockchainplatformClient = &blockchainBlockchainPlatformClient + + budgetBudgetClient, err := budget.NewBudgetClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + budgetBudgetClient.SetRegion(regionOcid) + oracleClients[regionOcid].BudgetBudgetClient = &budgetBudgetClient + + certificatesCertificatesClient, err := certificates.NewCertificatesClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + certificatesCertificatesClient.SetRegion(regionOcid) + oracleClients[regionOcid].CertificatesCertificatesClient = &certificatesCertificatesClient + + certificatesmanagementCertificatesManagementClient, err := certificatesmanagement.NewCertificatesManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + certificatesmanagementCertificatesManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].CertificatesmanagementCertificatesmanagementClient = &certificatesmanagementCertificatesManagementClient + + cimsIncidentClient, err := cims.NewIncidentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cimsIncidentClient.SetRegion(regionOcid) + oracleClients[regionOcid].CimsIncidentClient = &cimsIncidentClient + + cloudbridgeCommonClient, err := cloudbridge.NewCommonClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudbridgeCommonClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudbridgeCommonClient = &cloudbridgeCommonClient + + cloudbridgeDiscoveryClient, err := cloudbridge.NewDiscoveryClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudbridgeDiscoveryClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudbridgeDiscoveryClient = &cloudbridgeDiscoveryClient + + cloudbridgeInventoryClient, err := cloudbridge.NewInventoryClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudbridgeInventoryClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudbridgeInventoryClient = &cloudbridgeInventoryClient + + cloudbridgeOcbAgentSvcClient, err := cloudbridge.NewOcbAgentSvcClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudbridgeOcbAgentSvcClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudbridgeOcbagentsvcClient = &cloudbridgeOcbAgentSvcClient + + cloudguardCloudGuardClient, err := cloudguard.NewCloudGuardClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudguardCloudGuardClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudguardCloudguardClient = &cloudguardCloudGuardClient + + cloudmigrationsMigrationClient, err := cloudmigrations.NewMigrationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + cloudmigrationsMigrationClient.SetRegion(regionOcid) + oracleClients[regionOcid].CloudmigrationsMigrationClient = &cloudmigrationsMigrationClient + + computeinstanceagentComputeInstanceAgentClient, err := computeinstanceagent.NewComputeInstanceAgentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + computeinstanceagentComputeInstanceAgentClient.SetRegion(regionOcid) + oracleClients[regionOcid].ComputeinstanceagentComputeinstanceagentClient = &computeinstanceagentComputeInstanceAgentClient + + computeinstanceagentPluginClient, err := computeinstanceagent.NewPluginClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + computeinstanceagentPluginClient.SetRegion(regionOcid) + oracleClients[regionOcid].ComputeinstanceagentPluginClient = &computeinstanceagentPluginClient + + computeinstanceagentPluginconfigClient, err := computeinstanceagent.NewPluginconfigClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + computeinstanceagentPluginconfigClient.SetRegion(regionOcid) + oracleClients[regionOcid].ComputeinstanceagentPluginconfigClient = &computeinstanceagentPluginconfigClient + + containerengineContainerEngineClient, err := containerengine.NewContainerEngineClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + containerengineContainerEngineClient.SetRegion(regionOcid) + oracleClients[regionOcid].ContainerengineContainerengineClient = &containerengineContainerEngineClient + + containerinstancesContainerInstanceClient, err := containerinstances.NewContainerInstanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + containerinstancesContainerInstanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].ContainerinstancesContainerinstanceClient = &containerinstancesContainerInstanceClient + + coreBlockstorageClient, err := core.NewBlockstorageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + coreBlockstorageClient.SetRegion(regionOcid) + oracleClients[regionOcid].CoreBlockstorageClient = &coreBlockstorageClient + + coreComputeClient, err := core.NewComputeClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + coreComputeClient.SetRegion(regionOcid) + oracleClients[regionOcid].CoreComputeClient = &coreComputeClient + + coreComputeManagementClient, err := core.NewComputeManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + coreComputeManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].CoreComputemanagementClient = &coreComputeManagementClient + + coreVirtualNetworkClient, err := core.NewVirtualNetworkClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + coreVirtualNetworkClient.SetRegion(regionOcid) + oracleClients[regionOcid].CoreVirtualnetworkClient = &coreVirtualNetworkClient + + dashboardserviceDashboardClient, err := dashboardservice.NewDashboardClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dashboardserviceDashboardClient.SetRegion(regionOcid) + oracleClients[regionOcid].DashboardserviceDashboardClient = &dashboardserviceDashboardClient + + dashboardserviceDashboardGroupClient, err := dashboardservice.NewDashboardGroupClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dashboardserviceDashboardGroupClient.SetRegion(regionOcid) + oracleClients[regionOcid].DashboardserviceDashboardgroupClient = &dashboardserviceDashboardGroupClient + + databaseDatabaseClient, err := database.NewDatabaseClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databaseDatabaseClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabaseDatabaseClient = &databaseDatabaseClient + + databasemanagementDbManagementClient, err := databasemanagement.NewDbManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databasemanagementDbManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabasemanagementDbmanagementClient = &databasemanagementDbManagementClient + + databasemanagementDiagnosabilityClient, err := databasemanagement.NewDiagnosabilityClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databasemanagementDiagnosabilityClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabasemanagementDiagnosabilityClient = &databasemanagementDiagnosabilityClient + + databasemanagementSqlTuningClient, err := databasemanagement.NewSqlTuningClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databasemanagementSqlTuningClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabasemanagementSqltuningClient = &databasemanagementSqlTuningClient + + databasemigrationDatabaseMigrationClient, err := databasemigration.NewDatabaseMigrationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databasemigrationDatabaseMigrationClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabasemigrationDatabasemigrationClient = &databasemigrationDatabaseMigrationClient + + databasetoolsDatabaseToolsClient, err := databasetools.NewDatabaseToolsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + databasetoolsDatabaseToolsClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatabasetoolsDatabasetoolsClient = &databasetoolsDatabaseToolsClient + + datacatalogDataCatalogClient, err := datacatalog.NewDataCatalogClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + datacatalogDataCatalogClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatacatalogDatacatalogClient = &datacatalogDataCatalogClient + + dataconnectivityDataConnectivityManagementClient, err := dataconnectivity.NewDataConnectivityManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dataconnectivityDataConnectivityManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].DataconnectivityDataconnectivitymanagementClient = &dataconnectivityDataConnectivityManagementClient + + dataflowDataFlowClient, err := dataflow.NewDataFlowClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dataflowDataFlowClient.SetRegion(regionOcid) + oracleClients[regionOcid].DataflowDataflowClient = &dataflowDataFlowClient + + dataintegrationDataIntegrationClient, err := dataintegration.NewDataIntegrationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dataintegrationDataIntegrationClient.SetRegion(regionOcid) + oracleClients[regionOcid].DataintegrationDataintegrationClient = &dataintegrationDataIntegrationClient + + datalabelingserviceDataLabelingManagementClient, err := datalabelingservice.NewDataLabelingManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + datalabelingserviceDataLabelingManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatalabelingserviceDatalabelingmanagementClient = &datalabelingserviceDataLabelingManagementClient + + datalabelingservicedataplaneDataLabelingClient, err := datalabelingservicedataplane.NewDataLabelingClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + datalabelingservicedataplaneDataLabelingClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatalabelingservicedataplaneDatalabelingClient = &datalabelingservicedataplaneDataLabelingClient + + datasafeDataSafeClient, err := datasafe.NewDataSafeClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + datasafeDataSafeClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatasafeDatasafeClient = &datasafeDataSafeClient + + datascienceDataScienceClient, err := datascience.NewDataScienceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + datascienceDataScienceClient.SetRegion(regionOcid) + oracleClients[regionOcid].DatascienceDatascienceClient = &datascienceDataScienceClient + + devopsDevopsClient, err := devops.NewDevopsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + devopsDevopsClient.SetRegion(regionOcid) + oracleClients[regionOcid].DevopsDevopsClient = &devopsDevopsClient + + disasterrecoveryDisasterRecoveryClient, err := disasterrecovery.NewDisasterRecoveryClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + disasterrecoveryDisasterRecoveryClient.SetRegion(regionOcid) + oracleClients[regionOcid].DisasterrecoveryDisasterrecoveryClient = &disasterrecoveryDisasterRecoveryClient + + dnsDnsClient, err := dns.NewDnsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dnsDnsClient.SetRegion(regionOcid) + oracleClients[regionOcid].DnsDnsClient = &dnsDnsClient + + dtsApplianceExportJobClient, err := dts.NewApplianceExportJobClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsApplianceExportJobClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsApplianceexportjobClient = &dtsApplianceExportJobClient + + dtsShippingVendorsClient, err := dts.NewShippingVendorsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsShippingVendorsClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsShippingvendorsClient = &dtsShippingVendorsClient + + dtsTransferApplianceClient, err := dts.NewTransferApplianceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsTransferApplianceClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsTransferapplianceClient = &dtsTransferApplianceClient + + dtsTransferApplianceEntitlementClient, err := dts.NewTransferApplianceEntitlementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsTransferApplianceEntitlementClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsTransferapplianceentitlementClient = &dtsTransferApplianceEntitlementClient + + dtsTransferDeviceClient, err := dts.NewTransferDeviceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsTransferDeviceClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsTransferdeviceClient = &dtsTransferDeviceClient + + dtsTransferJobClient, err := dts.NewTransferJobClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsTransferJobClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsTransferjobClient = &dtsTransferJobClient + + dtsTransferPackageClient, err := dts.NewTransferPackageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + dtsTransferPackageClient.SetRegion(regionOcid) + oracleClients[regionOcid].DtsTransferpackageClient = &dtsTransferPackageClient + + emailEmailClient, err := email.NewEmailClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + emailEmailClient.SetRegion(regionOcid) + oracleClients[regionOcid].EmailEmailClient = &emailEmailClient + + emwarehouseEmWarehouseClient, err := emwarehouse.NewEmWarehouseClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + emwarehouseEmWarehouseClient.SetRegion(regionOcid) + oracleClients[regionOcid].EmwarehouseEmwarehouseClient = &emwarehouseEmWarehouseClient + + eventsEventsClient, err := events.NewEventsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + eventsEventsClient.SetRegion(regionOcid) + oracleClients[regionOcid].EventsEventsClient = &eventsEventsClient + + filestorageFileStorageClient, err := filestorage.NewFileStorageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + filestorageFileStorageClient.SetRegion(regionOcid) + oracleClients[regionOcid].FilestorageFilestorageClient = &filestorageFileStorageClient + + functionsFunctionsManagementClient, err := functions.NewFunctionsManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + functionsFunctionsManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].FunctionsFunctionsmanagementClient = &functionsFunctionsManagementClient + + fusionappsFusionApplicationsClient, err := fusionapps.NewFusionApplicationsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + fusionappsFusionApplicationsClient.SetRegion(regionOcid) + oracleClients[regionOcid].FusionappsFusionapplicationsClient = &fusionappsFusionApplicationsClient + + goldengateGoldenGateClient, err := goldengate.NewGoldenGateClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + goldengateGoldenGateClient.SetRegion(regionOcid) + oracleClients[regionOcid].GoldengateGoldengateClient = &goldengateGoldenGateClient + + governancerulescontrolplaneGovernanceRuleClient, err := governancerulescontrolplane.NewGovernanceRuleClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + governancerulescontrolplaneGovernanceRuleClient.SetRegion(regionOcid) + oracleClients[regionOcid].GovernancerulescontrolplaneGovernanceruleClient = &governancerulescontrolplaneGovernanceRuleClient + + governancerulescontrolplaneWorkRequestClient, err := governancerulescontrolplane.NewWorkRequestClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + governancerulescontrolplaneWorkRequestClient.SetRegion(regionOcid) + oracleClients[regionOcid].GovernancerulescontrolplaneWorkrequestClient = &governancerulescontrolplaneWorkRequestClient + + healthchecksHealthChecksClient, err := healthchecks.NewHealthChecksClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + healthchecksHealthChecksClient.SetRegion(regionOcid) + oracleClients[regionOcid].HealthchecksHealthchecksClient = &healthchecksHealthChecksClient + + identityIdentityClient, err := identity.NewIdentityClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + identityIdentityClient.SetRegion(regionOcid) + oracleClients[regionOcid].IdentityIdentityClient = &identityIdentityClient + + integrationIntegrationInstanceClient, err := integration.NewIntegrationInstanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + integrationIntegrationInstanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].IntegrationIntegrationinstanceClient = &integrationIntegrationInstanceClient + + jmsJavaManagementServiceClient, err := jms.NewJavaManagementServiceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + jmsJavaManagementServiceClient.SetRegion(regionOcid) + oracleClients[regionOcid].JmsJavamanagementserviceClient = &jmsJavaManagementServiceClient + + keymanagementKmsVaultClient, err := keymanagement.NewKmsVaultClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + keymanagementKmsVaultClient.SetRegion(regionOcid) + oracleClients[regionOcid].KeymanagementKmsvaultClient = &keymanagementKmsVaultClient + + licensemanagerLicenseManagerClient, err := licensemanager.NewLicenseManagerClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + licensemanagerLicenseManagerClient.SetRegion(regionOcid) + oracleClients[regionOcid].LicensemanagerLicensemanagerClient = &licensemanagerLicenseManagerClient + + limitsLimitsClient, err := limits.NewLimitsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + limitsLimitsClient.SetRegion(regionOcid) + oracleClients[regionOcid].LimitsLimitsClient = &limitsLimitsClient + + limitsQuotasClient, err := limits.NewQuotasClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + limitsQuotasClient.SetRegion(regionOcid) + oracleClients[regionOcid].LimitsQuotasClient = &limitsQuotasClient + + loadbalancerLoadBalancerClient, err := loadbalancer.NewLoadBalancerClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + loadbalancerLoadBalancerClient.SetRegion(regionOcid) + oracleClients[regionOcid].LoadbalancerLoadbalancerClient = &loadbalancerLoadBalancerClient + + lockboxLockboxClient, err := lockbox.NewLockboxClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + lockboxLockboxClient.SetRegion(regionOcid) + oracleClients[regionOcid].LockboxLockboxClient = &lockboxLockboxClient + + loganalyticsLogAnalyticsClient, err := loganalytics.NewLogAnalyticsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + loganalyticsLogAnalyticsClient.SetRegion(regionOcid) + oracleClients[regionOcid].LoganalyticsLoganalyticsClient = &loganalyticsLogAnalyticsClient + + loggingLoggingManagementClient, err := logging.NewLoggingManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + loggingLoggingManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].LoggingLoggingmanagementClient = &loggingLoggingManagementClient + + managementagentManagementAgentClient, err := managementagent.NewManagementAgentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + managementagentManagementAgentClient.SetRegion(regionOcid) + oracleClients[regionOcid].ManagementagentManagementagentClient = &managementagentManagementAgentClient + + managementdashboardDashxApisClient, err := managementdashboard.NewDashxApisClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + managementdashboardDashxApisClient.SetRegion(regionOcid) + oracleClients[regionOcid].ManagementdashboardDashxapisClient = &managementdashboardDashxApisClient + + marketplaceMarketplaceClient, err := marketplace.NewMarketplaceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + marketplaceMarketplaceClient.SetRegion(regionOcid) + oracleClients[regionOcid].MarketplaceMarketplaceClient = &marketplaceMarketplaceClient + + mediaservicesMediaServicesClient, err := mediaservices.NewMediaServicesClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mediaservicesMediaServicesClient.SetRegion(regionOcid) + oracleClients[regionOcid].MediaservicesMediaservicesClient = &mediaservicesMediaServicesClient + + monitoringMonitoringClient, err := monitoring.NewMonitoringClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + monitoringMonitoringClient.SetRegion(regionOcid) + oracleClients[regionOcid].MonitoringMonitoringClient = &monitoringMonitoringClient + + mysqlChannelsClient, err := mysql.NewChannelsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlChannelsClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlChannelsClient = &mysqlChannelsClient + + mysqlDbBackupsClient, err := mysql.NewDbBackupsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlDbBackupsClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlDbbackupsClient = &mysqlDbBackupsClient + + mysqlDbSystemClient, err := mysql.NewDbSystemClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlDbSystemClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlDbsystemClient = &mysqlDbSystemClient + + mysqlMysqlaasClient, err := mysql.NewMysqlaasClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlMysqlaasClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlMysqlaasClient = &mysqlMysqlaasClient + + mysqlReplicasClient, err := mysql.NewReplicasClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlReplicasClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlReplicasClient = &mysqlReplicasClient + + mysqlWorkRequestsClient, err := mysql.NewWorkRequestsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + mysqlWorkRequestsClient.SetRegion(regionOcid) + oracleClients[regionOcid].MysqlWorkrequestsClient = &mysqlWorkRequestsClient + + networkfirewallNetworkFirewallClient, err := networkfirewall.NewNetworkFirewallClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + networkfirewallNetworkFirewallClient.SetRegion(regionOcid) + oracleClients[regionOcid].NetworkfirewallNetworkfirewallClient = &networkfirewallNetworkFirewallClient + + networkloadbalancerNetworkLoadBalancerClient, err := networkloadbalancer.NewNetworkLoadBalancerClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + networkloadbalancerNetworkLoadBalancerClient.SetRegion(regionOcid) + oracleClients[regionOcid].NetworkloadbalancerNetworkloadbalancerClient = &networkloadbalancerNetworkLoadBalancerClient + + nosqlNosqlClient, err := nosql.NewNosqlClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + nosqlNosqlClient.SetRegion(regionOcid) + oracleClients[regionOcid].NosqlNosqlClient = &nosqlNosqlClient + + objectstorageObjectStorageClient, err := objectstorage.NewObjectStorageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + objectstorageObjectStorageClient.SetRegion(regionOcid) + oracleClients[regionOcid].ObjectstorageObjectstorageClient = &objectstorageObjectStorageClient + + oceOceInstanceClient, err := oce.NewOceInstanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + oceOceInstanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].OceOceinstanceClient = &oceOceInstanceClient + + ocvpEsxiHostClient, err := ocvp.NewEsxiHostClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ocvpEsxiHostClient.SetRegion(regionOcid) + oracleClients[regionOcid].OcvpEsxihostClient = &ocvpEsxiHostClient + + ocvpSddcClient, err := ocvp.NewSddcClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ocvpSddcClient.SetRegion(regionOcid) + oracleClients[regionOcid].OcvpSddcClient = &ocvpSddcClient + + ocvpWorkRequestClient, err := ocvp.NewWorkRequestClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ocvpWorkRequestClient.SetRegion(regionOcid) + oracleClients[regionOcid].OcvpWorkrequestClient = &ocvpWorkRequestClient + + odaManagementClient, err := oda.NewManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + odaManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].OdaManagementClient = &odaManagementClient + + odaOdaClient, err := oda.NewOdaClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + odaOdaClient.SetRegion(regionOcid) + oracleClients[regionOcid].OdaOdaClient = &odaOdaClient + + odaOdapackageClient, err := oda.NewOdapackageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + odaOdapackageClient.SetRegion(regionOcid) + oracleClients[regionOcid].OdaOdapackageClient = &odaOdapackageClient + + onesubscriptionBillingScheduleClient, err := onesubscription.NewBillingScheduleClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionBillingScheduleClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionBillingscheduleClient = &onesubscriptionBillingScheduleClient + + onesubscriptionCommitmentClient, err := onesubscription.NewCommitmentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionCommitmentClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionCommitmentClient = &onesubscriptionCommitmentClient + + onesubscriptionComputedUsageClient, err := onesubscription.NewComputedUsageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionComputedUsageClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionComputedusageClient = &onesubscriptionComputedUsageClient + + onesubscriptionInvoiceSummaryClient, err := onesubscription.NewInvoiceSummaryClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionInvoiceSummaryClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionInvoicesummaryClient = &onesubscriptionInvoiceSummaryClient + + onesubscriptionOrganizationSubscriptionClient, err := onesubscription.NewOrganizationSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionOrganizationSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionOrganizationsubscriptionClient = &onesubscriptionOrganizationSubscriptionClient + + onesubscriptionRatecardClient, err := onesubscription.NewRatecardClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionRatecardClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionRatecardClient = &onesubscriptionRatecardClient + + onesubscriptionSubscribedServiceClient, err := onesubscription.NewSubscribedServiceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionSubscribedServiceClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionSubscribedserviceClient = &onesubscriptionSubscribedServiceClient + + onesubscriptionSubscriptionClient, err := onesubscription.NewSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onesubscriptionSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnesubscriptionSubscriptionClient = &onesubscriptionSubscriptionClient + + onsNotificationControlPlaneClient, err := ons.NewNotificationControlPlaneClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onsNotificationControlPlaneClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnsNotificationcontrolplaneClient = &onsNotificationControlPlaneClient + + onsNotificationDataPlaneClient, err := ons.NewNotificationDataPlaneClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + onsNotificationDataPlaneClient.SetRegion(regionOcid) + oracleClients[regionOcid].OnsNotificationdataplaneClient = &onsNotificationDataPlaneClient + + opaOpaInstanceClient, err := opa.NewOpaInstanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + opaOpaInstanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].OpaOpainstanceClient = &opaOpaInstanceClient + + opensearchOpensearchClusterBackupClient, err := opensearch.NewOpensearchClusterBackupClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + opensearchOpensearchClusterBackupClient.SetRegion(regionOcid) + oracleClients[regionOcid].OpensearchOpensearchclusterbackupClient = &opensearchOpensearchClusterBackupClient + + opensearchOpensearchClusterClient, err := opensearch.NewOpensearchClusterClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + opensearchOpensearchClusterClient.SetRegion(regionOcid) + oracleClients[regionOcid].OpensearchOpensearchclusterClient = &opensearchOpensearchClusterClient + + operatoraccesscontrolAccessRequestsClient, err := operatoraccesscontrol.NewAccessRequestsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + operatoraccesscontrolAccessRequestsClient.SetRegion(regionOcid) + oracleClients[regionOcid].OperatoraccesscontrolAccessrequestsClient = &operatoraccesscontrolAccessRequestsClient + + operatoraccesscontrolOperatorActionsClient, err := operatoraccesscontrol.NewOperatorActionsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + operatoraccesscontrolOperatorActionsClient.SetRegion(regionOcid) + oracleClients[regionOcid].OperatoraccesscontrolOperatoractionsClient = &operatoraccesscontrolOperatorActionsClient + + operatoraccesscontrolOperatorControlAssignmentClient, err := operatoraccesscontrol.NewOperatorControlAssignmentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + operatoraccesscontrolOperatorControlAssignmentClient.SetRegion(regionOcid) + oracleClients[regionOcid].OperatoraccesscontrolOperatorcontrolassignmentClient = &operatoraccesscontrolOperatorControlAssignmentClient + + operatoraccesscontrolOperatorControlClient, err := operatoraccesscontrol.NewOperatorControlClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + operatoraccesscontrolOperatorControlClient.SetRegion(regionOcid) + oracleClients[regionOcid].OperatoraccesscontrolOperatorcontrolClient = &operatoraccesscontrolOperatorControlClient + + opsiOperationsInsightsClient, err := opsi.NewOperationsInsightsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + opsiOperationsInsightsClient.SetRegion(regionOcid) + oracleClients[regionOcid].OpsiOperationsinsightsClient = &opsiOperationsInsightsClient + + optimizerOptimizerClient, err := optimizer.NewOptimizerClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + optimizerOptimizerClient.SetRegion(regionOcid) + oracleClients[regionOcid].OptimizerOptimizerClient = &optimizerOptimizerClient + + osmanagementEventClient, err := osmanagement.NewEventClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osmanagementEventClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsmanagementEventClient = &osmanagementEventClient + + osmanagementOsManagementClient, err := osmanagement.NewOsManagementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osmanagementOsManagementClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsmanagementOsmanagementClient = &osmanagementOsManagementClient + + ospgatewayInvoiceServiceClient, err := ospgateway.NewInvoiceServiceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ospgatewayInvoiceServiceClient.SetRegion(regionOcid) + oracleClients[regionOcid].OspgatewayInvoiceserviceClient = &ospgatewayInvoiceServiceClient + + ospgatewaySubscriptionServiceClient, err := ospgateway.NewSubscriptionServiceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + ospgatewaySubscriptionServiceClient.SetRegion(regionOcid) + oracleClients[regionOcid].OspgatewaySubscriptionserviceClient = &ospgatewaySubscriptionServiceClient + + osubbillingscheduleBillingScheduleClient, err := osubbillingschedule.NewBillingScheduleClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osubbillingscheduleBillingScheduleClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsubbillingscheduleBillingscheduleClient = &osubbillingscheduleBillingScheduleClient + + osuborganizationsubscriptionOrganizationSubscriptionClient, err := osuborganizationsubscription.NewOrganizationSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osuborganizationsubscriptionOrganizationSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsuborganizationsubscriptionOrganizationsubscriptionClient = &osuborganizationsubscriptionOrganizationSubscriptionClient + + osubsubscriptionCommitmentClient, err := osubsubscription.NewCommitmentClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osubsubscriptionCommitmentClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsubsubscriptionCommitmentClient = &osubsubscriptionCommitmentClient + + osubsubscriptionRatecardClient, err := osubsubscription.NewRatecardClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osubsubscriptionRatecardClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsubsubscriptionRatecardClient = &osubsubscriptionRatecardClient + + osubsubscriptionSubscriptionClient, err := osubsubscription.NewSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osubsubscriptionSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsubsubscriptionSubscriptionClient = &osubsubscriptionSubscriptionClient + + osubusageComputedUsageClient, err := osubusage.NewComputedUsageClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + osubusageComputedUsageClient.SetRegion(regionOcid) + oracleClients[regionOcid].OsubusageComputedusageClient = &osubusageComputedUsageClient + + queueQueueAdminClient, err := queue.NewQueueAdminClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + queueQueueAdminClient.SetRegion(regionOcid) + oracleClients[regionOcid].QueueQueueadminClient = &queueQueueAdminClient + + resourcemanagerResourceManagerClient, err := resourcemanager.NewResourceManagerClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + resourcemanagerResourceManagerClient.SetRegion(regionOcid) + oracleClients[regionOcid].ResourcemanagerResourcemanagerClient = &resourcemanagerResourceManagerClient + + resourcesearchResourceSearchClient, err := resourcesearch.NewResourceSearchClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + resourcesearchResourceSearchClient.SetRegion(regionOcid) + oracleClients[regionOcid].ResourcesearchResourcesearchClient = &resourcesearchResourceSearchClient + + roverRoverClusterClient, err := rover.NewRoverClusterClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + roverRoverClusterClient.SetRegion(regionOcid) + oracleClients[regionOcid].RoverRoverclusterClient = &roverRoverClusterClient + + roverRoverEntitlementClient, err := rover.NewRoverEntitlementClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + roverRoverEntitlementClient.SetRegion(regionOcid) + oracleClients[regionOcid].RoverRoverentitlementClient = &roverRoverEntitlementClient + + roverRoverNodeClient, err := rover.NewRoverNodeClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + roverRoverNodeClient.SetRegion(regionOcid) + oracleClients[regionOcid].RoverRovernodeClient = &roverRoverNodeClient + + roverShapeClient, err := rover.NewShapeClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + roverShapeClient.SetRegion(regionOcid) + oracleClients[regionOcid].RoverShapeClient = &roverShapeClient + + schServiceConnectorClient, err := sch.NewServiceConnectorClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + schServiceConnectorClient.SetRegion(regionOcid) + oracleClients[regionOcid].SchServiceconnectorClient = &schServiceConnectorClient + + secretsSecretsClient, err := secrets.NewSecretsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + secretsSecretsClient.SetRegion(regionOcid) + oracleClients[regionOcid].SecretsSecretsClient = &secretsSecretsClient + + servicecatalogServiceCatalogClient, err := servicecatalog.NewServiceCatalogClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + servicecatalogServiceCatalogClient.SetRegion(regionOcid) + oracleClients[regionOcid].ServicecatalogServicecatalogClient = &servicecatalogServiceCatalogClient + + servicemanagerproxyServiceManagerProxyClient, err := servicemanagerproxy.NewServiceManagerProxyClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + servicemanagerproxyServiceManagerProxyClient.SetRegion(regionOcid) + oracleClients[regionOcid].ServicemanagerproxyServicemanagerproxyClient = &servicemanagerproxyServiceManagerProxyClient + + servicemeshServiceMeshClient, err := servicemesh.NewServiceMeshClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + servicemeshServiceMeshClient.SetRegion(regionOcid) + oracleClients[regionOcid].ServicemeshServicemeshClient = &servicemeshServiceMeshClient + + stackmonitoringStackMonitoringClient, err := stackmonitoring.NewStackMonitoringClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + stackmonitoringStackMonitoringClient.SetRegion(regionOcid) + oracleClients[regionOcid].StackmonitoringStackmonitoringClient = &stackmonitoringStackMonitoringClient + + streamingStreamAdminClient, err := streaming.NewStreamAdminClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + streamingStreamAdminClient.SetRegion(regionOcid) + oracleClients[regionOcid].StreamingStreamadminClient = &streamingStreamAdminClient + + tenantmanagercontrolplaneDomainClient, err := tenantmanagercontrolplane.NewDomainClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneDomainClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneDomainClient = &tenantmanagercontrolplaneDomainClient + + tenantmanagercontrolplaneDomainGovernanceClient, err := tenantmanagercontrolplane.NewDomainGovernanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneDomainGovernanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneDomaingovernanceClient = &tenantmanagercontrolplaneDomainGovernanceClient + + tenantmanagercontrolplaneLinkClient, err := tenantmanagercontrolplane.NewLinkClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneLinkClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneLinkClient = &tenantmanagercontrolplaneLinkClient + + tenantmanagercontrolplaneOrganizationClient, err := tenantmanagercontrolplane.NewOrganizationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneOrganizationClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneOrganizationClient = &tenantmanagercontrolplaneOrganizationClient + + tenantmanagercontrolplaneRecipientInvitationClient, err := tenantmanagercontrolplane.NewRecipientInvitationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneRecipientInvitationClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneRecipientinvitationClient = &tenantmanagercontrolplaneRecipientInvitationClient + + tenantmanagercontrolplaneSenderInvitationClient, err := tenantmanagercontrolplane.NewSenderInvitationClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneSenderInvitationClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneSenderinvitationClient = &tenantmanagercontrolplaneSenderInvitationClient + + tenantmanagercontrolplaneSubscriptionClient, err := tenantmanagercontrolplane.NewSubscriptionClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneSubscriptionClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneSubscriptionClient = &tenantmanagercontrolplaneSubscriptionClient + + tenantmanagercontrolplaneWorkRequestClient, err := tenantmanagercontrolplane.NewWorkRequestClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + tenantmanagercontrolplaneWorkRequestClient.SetRegion(regionOcid) + oracleClients[regionOcid].TenantmanagercontrolplaneWorkrequestClient = &tenantmanagercontrolplaneWorkRequestClient + + threatintelligenceThreatintelClient, err := threatintelligence.NewThreatintelClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + threatintelligenceThreatintelClient.SetRegion(regionOcid) + oracleClients[regionOcid].ThreatintelligenceThreatintelClient = &threatintelligenceThreatintelClient + + usageRewardsClient, err := usage.NewRewardsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + usageRewardsClient.SetRegion(regionOcid) + oracleClients[regionOcid].UsageRewardsClient = &usageRewardsClient + + usageapiUsageapiClient, err := usageapi.NewUsageapiClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + usageapiUsageapiClient.SetRegion(regionOcid) + oracleClients[regionOcid].UsageapiUsageapiClient = &usageapiUsageapiClient + + vaultVaultsClient, err := vault.NewVaultsClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + vaultVaultsClient.SetRegion(regionOcid) + oracleClients[regionOcid].VaultVaultsClient = &vaultVaultsClient + + visualbuilderVbInstanceClient, err := visualbuilder.NewVbInstanceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + visualbuilderVbInstanceClient.SetRegion(regionOcid) + oracleClients[regionOcid].VisualbuilderVbinstanceClient = &visualbuilderVbInstanceClient + + vnmonitoringVnMonitoringClient, err := vnmonitoring.NewVnMonitoringClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + vnmonitoringVnMonitoringClient.SetRegion(regionOcid) + oracleClients[regionOcid].VnmonitoringVnmonitoringClient = &vnmonitoringVnMonitoringClient + + vulnerabilityscanningVulnerabilityScanningClient, err := vulnerabilityscanning.NewVulnerabilityScanningClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + vulnerabilityscanningVulnerabilityScanningClient.SetRegion(regionOcid) + oracleClients[regionOcid].VulnerabilityscanningVulnerabilityscanningClient = &vulnerabilityscanningVulnerabilityScanningClient + + waaWaaClient, err := waa.NewWaaClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + waaWaaClient.SetRegion(regionOcid) + oracleClients[regionOcid].WaaWaaClient = &waaWaaClient + + waaWorkRequestClient, err := waa.NewWorkRequestClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + waaWorkRequestClient.SetRegion(regionOcid) + oracleClients[regionOcid].WaaWorkrequestClient = &waaWorkRequestClient + + waasRedirectClient, err := waas.NewRedirectClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + waasRedirectClient.SetRegion(regionOcid) + oracleClients[regionOcid].WaasRedirectClient = &waasRedirectClient + + waasWaasClient, err := waas.NewWaasClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + waasWaasClient.SetRegion(regionOcid) + oracleClients[regionOcid].WaasWaasClient = &waasWaasClient + + wafWafClient, err := waf.NewWafClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + wafWafClient.SetRegion(regionOcid) + oracleClients[regionOcid].WafWafClient = &wafWafClient + + workrequestsWorkRequestClient, err := workrequests.NewWorkRequestClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + workrequestsWorkRequestClient.SetRegion(regionOcid) + oracleClients[regionOcid].WorkrequestsWorkrequestClient = &workrequestsWorkRequestClient + } + + return oracleClients, nil +} diff --git a/plugins/source/oracle/client/resovers.go b/plugins/source/oracle/client/resovers.go new file mode 100644 index 00000000000000..f35caa7f4e9bef --- /dev/null +++ b/plugins/source/oracle/client/resovers.go @@ -0,0 +1,19 @@ +package client + +import ( + "context" + + "github.com/cloudquery/plugin-sdk/schema" +) + +// grabs the region from the cq-client, not from the resource. +func ResolveOracleRegion(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error { + client := meta.(*Client) + return r.Set("region", client.Region) +} + +// grabs the compartment-id from the cq-client, not from the resource. +func ResolveCompartmentId(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error { + client := meta.(*Client) + return r.Set("compartment_id", client.CompartmentOcid) +} diff --git a/plugins/source/oracle/client/transform.go b/plugins/source/oracle/client/transform.go new file mode 100644 index 00000000000000..3dadff81443003 --- /dev/null +++ b/plugins/source/oracle/client/transform.go @@ -0,0 +1,23 @@ +package client + +import ( + "reflect" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/common" +) + +func OracleTypeTransformer(field reflect.StructField) (schema.ValueType, error) { + fieldType := field.Type + + if fieldType.Kind() == reflect.Ptr { + fieldType = fieldType.Elem() + } + + if fieldType.Kind() == reflect.Struct && fieldType == reflect.TypeOf(common.SDKTime{}) { + return schema.TypeTimestamp, nil + } + + return transformers.DefaultTypeTransformer(field) +} diff --git a/plugins/source/oracle/codegen/generate.go b/plugins/source/oracle/codegen/generate.go new file mode 100644 index 00000000000000..6004a770fe645b --- /dev/null +++ b/plugins/source/oracle/codegen/generate.go @@ -0,0 +1,161 @@ +package main + +import ( + "bytes" + "embed" + "fmt" + "go/format" + "os" + "path" + "runtime" + "sort" + "strings" + "text/template" + + "github.com/iancoleman/strcase" +) + +//go:embed templates/*.go.tpl +var templatesFS embed.FS + +func generateTable(table *Table, dir string) error { + var tpl *template.Template + + tpl, err := template.New("table.go.tpl").Funcs(template.FuncMap{ + "ToCamel": strcase.ToCamel, + "ToLower": strings.ToLower}).ParseFS(templatesFS, path.Join("templates/table.go.tpl")) + if err != nil { + return err + } + + var buff bytes.Buffer + if err := tpl.Execute(&buff, table); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + + filePath := path.Join(dir, table.SubService+".go") + + content := buff.Bytes() + formattedContent, err := format.Source(buff.Bytes()) + if err != nil { + fmt.Printf("failed to format source: %s: %v\n", filePath, err) + } else { + content = formattedContent + } + + if err := os.WriteFile(filePath, content, 0644); err != nil { + return fmt.Errorf("failed to write file %s: %w", filePath, err) + } + + return nil +} + +func generateFetch(table *Table, dir string) error { + var tpl *template.Template + + tpl, err := template.New("fetch.go.tpl").Funcs(template.FuncMap{ + "ToCamel": strcase.ToCamel, + "ToLower": strings.ToLower}).ParseFS(templatesFS, path.Join("templates/fetch.go.tpl")) + if err != nil { + return nil + } + + var buff bytes.Buffer + if err := tpl.Execute(&buff, table); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + + filePath := path.Join(dir, table.SubService+"_fetch.go") + + content := buff.Bytes() + formattedContent, err := format.Source(buff.Bytes()) + if err != nil { + fmt.Printf("failed to format source: %s: %v\n", filePath, err) + } else { + content = formattedContent + } + + if err := os.WriteFile(filePath, content, 0644); err != nil { + return fmt.Errorf("failed to write file %s: %w", filePath, err) + } + + return nil +} + +func generateTables(tables []Table) error { + for _, table := range tables { + _, runtime_filename, _, ok := runtime.Caller(0) + if !ok { + return fmt.Errorf("failed to get caller information") + } + + dir := path.Join(path.Dir(runtime_filename), "../resources/services/", table.Service) + + if err := generateTable(&table, dir); err != nil { + return err + } + } + return nil +} + +func generateFetchers(tables []Table) error { + for _, table := range tables { + _, runtime_filename, _, ok := runtime.Caller(0) + if !ok { + return fmt.Errorf("failed to get caller information") + } + + dir := path.Join(path.Dir(runtime_filename), "../resources/services/", table.Service) + + if err := generateFetch(&table, dir); err != nil { + return err + } + } + return nil +} + +func generateTableList(tables []Table) error { + sort.Slice(tables, func(i int, j int) bool { + if tables[i].Service < tables[j].Service { + return true + } + if tables[i].Service > tables[j].Service { + return false + } + return tables[i].SubService < tables[j].SubService + }) + + tpl, err := template.New("table_list.go.tpl").Funcs(template.FuncMap{ + "ToCamel": strcase.ToCamel, + "ToLower": strings.ToLower, + }).ParseFS(templatesFS, "templates/table_list.go.tpl") + + if err != nil { + return fmt.Errorf("failed to parse templates: %w", err) + } + + var buff bytes.Buffer + if err := tpl.Execute(&buff, tables); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + + _, runtime_filename, _, ok := runtime.Caller(0) + if !ok { + return fmt.Errorf("failed to get caller information") + } + + filePath := path.Join(path.Dir(runtime_filename), "../resources/plugin/autogen_tables.go") + content := buff.Bytes() + formattedContent, err := format.Source(buff.Bytes()) + if err != nil { + fmt.Printf("failed to format source: %s: %v\n", filePath, err) + } else { + content = formattedContent + } + if err := os.WriteFile(filePath, content, 0644); err != nil { + return fmt.Errorf("failed to write file %s: %w", filePath, err) + } + + return nil + +} diff --git a/plugins/source/oracle/codegen/main.go b/plugins/source/oracle/codegen/main.go new file mode 100644 index 00000000000000..b9b221f566e966 --- /dev/null +++ b/plugins/source/oracle/codegen/main.go @@ -0,0 +1,245 @@ +// Prerequisites: A populated `client.OracleClients` struct. +// Outputs resource structs in `resources/services/...` + +package main + +import ( + "context" + "fmt" + "log" + "path" + "reflect" + "strings" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/iancoleman/strcase" + "golang.org/x/exp/slices" +) + +// These services were manually tested, and they work. +var servicesAllowlist = []string{ + "compute", + "identity", + "virtualnetwork", + "database", + "blockstorage", + "objectstorage", + "filestorage", + "loadbalancer", + "networkloadbalancer", + "networkfirewall", +} + +var servicesDenylist = []string{ + "identity", // Skipped because most of these resources are global + + "database", // Skipped because some tables require extra parameters that I don't know where to find... + "objectstorage", // skipped because it requires usage of 'objectstoragenamespace'.. + + "blockstorage", // Skipped because the recipe-autogeneration missed the most important tables (volumes) + + "filestorage", // Skipped because requests are AD-based, not region-based. +} + +func main() { + oracleClientsStruct := client.OracleClients{} + + oracleClientsStructType := reflect.TypeOf(oracleClientsStruct) + + tables := make([]Table, 0) + + for i := 0; i < oracleClientsStructType.NumField(); i++ { + clientField := oracleClientsStructType.Field(i) + clientType := clientField.Type + + numTopLevelCompartmentScopeMethods := 0 + + pkg := path.Base(clientType.Elem().PkgPath()) + service := extractServiceNameFromClient(clientType.Elem()) + + if !slices.Contains(servicesAllowlist, service) { + continue + } + + if slices.Contains(servicesDenylist, service) { + continue + } + + for j := 0; j < clientType.NumMethod(); j++ { + method := clientType.Method(j) + + if !strings.HasPrefix(method.Name, "List") { + continue + } + + isValid, reason := isListMethodValid(method) + if !isValid { + fmt.Println("Skipping method", clientType, method.Name, "because", reason) + continue + } + + if !isTopLevelCompartmentScopeMethod(method) { + continue + } + + table, err := createTableStruct(pkg, service, method, clientField.Name) + if err != nil { + fmt.Println("Skipping method", clientType, method.Name, "because", err) + continue + } + + tables = append(tables, table) + numTopLevelCompartmentScopeMethods++ + } + + if numTopLevelCompartmentScopeMethods == 0 { + // fmt.Println("WARNING: No top-level copmartment-scope List methods found for", clientType.String()) + continue + } + } + + if err := generateTables(tables); err != nil { + log.Fatal(err) + } + + if err := generateFetchers(tables); err != nil { + log.Fatal(err) + } + + if err := generateTableList(tables); err != nil { + log.Fatal(err) + } +} + +func extractServiceNameFromClient(clientType reflect.Type) string { + clientName := clientType.Name() + pkg := path.Base(clientType.PkgPath()) + + if !strings.HasSuffix(clientName, "Client") { + panic(fmt.Sprintf("Client name '%s' does not end with 'Client'", clientName)) + } + + // The "core" package contains several different "services", but all the + // rest are pretty-good 1:1 mappings to what we like to call "services". + if pkg == "core" { + return strings.ToLower(strings.TrimSuffix(clientName, "Client")) + } else { + return pkg + } +} + +// Checks some prerequisites for a `List` method. +// If the list method is not 'valid', it will also return a string "reason" +func isListMethodValid(method reflect.Method) (bool, string) { + if method.Func.Type().NumIn() != 3 { // The "receiver" counts as an input + return false, fmt.Sprintf("it has %d inputs, but it should have exactly 3", method.Func.Type().NumIn()) + } + + if !(method.Func.Type().In(1).Implements(reflect.TypeOf((*context.Context)(nil)).Elem())) { + return false, "its first input is not a context.Context" + } + + if method.Func.Type().In(2).Kind() != reflect.Struct { + return false, "its second input is not a struct" + } + + if !strings.HasSuffix(method.Func.Type().In(2).Name(), "Request") { + return false, "its second input is not a request struct" + } + + _, isPaginated := method.Func.Type().In(2).FieldByName("Page") + if !isPaginated { + return false, "it is not paginated" + } + + if method.Func.Type().NumOut() != 2 { + return false, fmt.Sprintf("it has %d outputs, but it should have exactly 2", method.Func.Type().NumOut()) + } + + if !method.Func.Type().Out(1).Implements(reflect.TypeOf((*error)(nil)).Elem()) { + return false, "its second output is not an error" + } + + if method.Func.Type().Out(0).Kind() != reflect.Struct { + return false, "its first output is not a struct" + } + + if !strings.HasSuffix(method.Func.Type().Out(0).Name(), "Response") { + return false, "its first output is not a response struct" + } + + return true, "" +} + +// Top-level `List` methods usually have exactly on `mandatory` field in the request struct - the `compartment_id`. +// Relational `List` methods usually have a `mandatory` field that is the parent's id. +// See examples: +// - https://github.com/oracle/oci-go-sdk/blob/1a34e432f90fade18d83a84b6d8921e8c9ddd5b7/core/list_instances_request_response.go#L19-L22 +// - https://github.com/oracle/oci-go-sdk/blob/1a34e432f90fade18d83a84b6d8921e8c9ddd5b7/core/list_instance_devices_request_response.go#L19-L22 +func isTopLevelCompartmentScopeMethod(method reflect.Method) bool { + requestStruct := method.Func.Type().In(2) + + if requestStruct.Kind() == reflect.Pointer { + requestStruct = requestStruct.Elem() + } + + numMandatoryFields := 0 + mandatoryFieldIndex := -1 + for i := 0; i < requestStruct.NumField(); i++ { + field := requestStruct.Field(i) + if field.Tag.Get("mandatory") == "true" { + numMandatoryFields++ + mandatoryFieldIndex = i + } + } + + if numMandatoryFields != 1 { + return false + } + + mandatoryField := requestStruct.Field(mandatoryFieldIndex) + + return mandatoryField.Name == "CompartmentId" +} + +func createTableStruct(pkg string, service string, method reflect.Method, clientName string) (Table, error) { + responseStruct := method.Func.Type().Out(0) + itemsField, ok := responseStruct.FieldByName("Items") + if !ok { + return Table{}, fmt.Errorf("response struct does not have an 'Items' field") + } + + itemsType := itemsField.Type + if itemsType.Kind() != reflect.Slice { + return Table{}, fmt.Errorf("field 'Items' in struct '%s' is not a slice", responseStruct.Name()) + } + + itemsElemType := itemsType.Elem() + + if itemsElemType.Kind() != reflect.Struct { + return Table{}, fmt.Errorf("item in 'Items' field is not a struct (but a %s)", itemsElemType.Kind()) + } + + _, hasId := itemsElemType.FieldByName("Id") + if !hasId { + return Table{}, fmt.Errorf("struct '%s' does not have an 'Id' field", itemsElemType.Name()) + } + + return Table{ + Package: pkg, + Service: service, + SubService: extractSubserviceNameFromListMethodName(method.Name), + StructName: itemsElemType.Name(), + ClientName: clientName, + ListFunctionName: method.Name, + }, nil +} + +// E.g. ListInstances -> instances +func extractSubserviceNameFromListMethodName(listMethodName string) string { + if !strings.HasPrefix(listMethodName, "List") { + panic(fmt.Sprintf("List method name '%s' does not start with 'List'", listMethodName)) + } + + return strcase.ToSnake(strings.TrimPrefix(listMethodName, "List")) +} diff --git a/plugins/source/oracle/codegen/table.go b/plugins/source/oracle/codegen/table.go new file mode 100644 index 00000000000000..5f040327b8b38a --- /dev/null +++ b/plugins/source/oracle/codegen/table.go @@ -0,0 +1,13 @@ +package main + +type Table struct { + Package string + + Service string + SubService string + + StructName string + + ListFunctionName string + ClientName string +} diff --git a/plugins/source/oracle/codegen/templates/fetch.go.tpl b/plugins/source/oracle/codegen/templates/fetch.go.tpl new file mode 100644 index 00000000000000..d222795bb48c41 --- /dev/null +++ b/plugins/source/oracle/codegen/templates/fetch.go.tpl @@ -0,0 +1,38 @@ +package {{.Service}} + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/{{.Package}}" +) + +func fetch{{.SubService | ToCamel}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := {{.Package}}.{{.ListFunctionName}}Request{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].{{.ClientName}}.{{.ListFunctionName}}(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/codegen/templates/table.go.tpl b/plugins/source/oracle/codegen/templates/table.go.tpl new file mode 100644 index 00000000000000..f66a1032cf452f --- /dev/null +++ b/plugins/source/oracle/codegen/templates/table.go.tpl @@ -0,0 +1,44 @@ +package {{.Service}} + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/{{.Package}}" +) + +func {{.SubService | ToCamel}}() *schema.Table { + return &schema.Table{ + Name: "oracle_{{.Service}}_{{.SubService}}", + Resolver: fetch{{.SubService | ToCamel}}, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&{{.Package}}.{{.StructName}}{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/codegen/templates/table_list.go.tpl b/plugins/source/oracle/codegen/templates/table_list.go.tpl new file mode 100644 index 00000000000000..3de7723de854ce --- /dev/null +++ b/plugins/source/oracle/codegen/templates/table_list.go.tpl @@ -0,0 +1,16 @@ +package plugin + +import ( + "github.com/cloudquery/plugin-sdk/schema" +{{- range $resource := . }} + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/{{ $resource.Service }}" +{{- end }} +) + +func AutogenTables() []*schema.Table { + return []*schema.Table{ + {{- range $resource := . }} + {{ $resource.Service }}.{{ $resource.SubService | ToCamel }}(), + {{- end }} + } +} diff --git a/plugins/source/oracle/docs/tables/README.md b/plugins/source/oracle/docs/tables/README.md new file mode 100644 index 00000000000000..2467cfbd8f5f7b --- /dev/null +++ b/plugins/source/oracle/docs/tables/README.md @@ -0,0 +1,82 @@ +# Source Plugin: oracle + +## Tables + +- [oracle_blockstorage_boot_volume_backups](oracle_blockstorage_boot_volume_backups.md) +- [oracle_blockstorage_boot_volume_replicas](oracle_blockstorage_boot_volume_replicas.md) +- [oracle_blockstorage_boot_volumes](oracle_blockstorage_boot_volumes.md) +- [oracle_blockstorage_volume_backup_policies](oracle_blockstorage_volume_backup_policies.md) +- [oracle_blockstorage_volume_backups](oracle_blockstorage_volume_backups.md) +- [oracle_blockstorage_volume_group_backups](oracle_blockstorage_volume_group_backups.md) +- [oracle_blockstorage_volume_groups](oracle_blockstorage_volume_groups.md) +- [oracle_blockstorage_volumes](oracle_blockstorage_volumes.md) +- [oracle_compute_compute_capacity_reservations](oracle_compute_compute_capacity_reservations.md) +- [oracle_compute_console_histories](oracle_compute_console_histories.md) +- [oracle_compute_dedicated_vm_hosts](oracle_compute_dedicated_vm_hosts.md) +- [oracle_compute_images](oracle_compute_images.md) +- [oracle_compute_instance_console_connections](oracle_compute_instance_console_connections.md) +- [oracle_compute_instances](oracle_compute_instances.md) +- [oracle_compute_vnic_attachments](oracle_compute_vnic_attachments.md) +- [oracle_database_autonomous_container_databases](oracle_database_autonomous_container_databases.md) +- [oracle_database_autonomous_databases](oracle_database_autonomous_databases.md) +- [oracle_database_autonomous_exadata_infrastructures](oracle_database_autonomous_exadata_infrastructures.md) +- [oracle_database_autonomous_vm_clusters](oracle_database_autonomous_vm_clusters.md) +- [oracle_database_backup_destination](oracle_database_backup_destination.md) +- [oracle_database_cloud_autonomous_vm_clusters](oracle_database_cloud_autonomous_vm_clusters.md) +- [oracle_database_cloud_exadata_infrastructures](oracle_database_cloud_exadata_infrastructures.md) +- [oracle_database_cloud_vm_clusters](oracle_database_cloud_vm_clusters.md) +- [oracle_database_exadata_infrastructures](oracle_database_exadata_infrastructures.md) +- [oracle_database_external_container_databases](oracle_database_external_container_databases.md) +- [oracle_database_external_non_container_databases](oracle_database_external_non_container_databases.md) +- [oracle_database_external_pluggable_databases](oracle_database_external_pluggable_databases.md) +- [oracle_database_key_stores](oracle_database_key_stores.md) +- [oracle_database_vm_clusters](oracle_database_vm_clusters.md) +- [oracle_filestorage_export_sets](oracle_filestorage_export_sets.md) +- [oracle_filestorage_exports](oracle_filestorage_exports.md) +- [oracle_filestorage_file_systems](oracle_filestorage_file_systems.md) +- [oracle_filestorage_mount_targets](oracle_filestorage_mount_targets.md) +- [oracle_filestorage_replication_targets](oracle_filestorage_replication_targets.md) +- [oracle_filestorage_replications](oracle_filestorage_replications.md) +- [oracle_identity_compartments](oracle_identity_compartments.md) +- [oracle_identity_cost_tracking_tags](oracle_identity_cost_tracking_tags.md) +- [oracle_identity_domains](oracle_identity_domains.md) +- [oracle_identity_dynamic_groups](oracle_identity_dynamic_groups.md) +- [oracle_identity_groups](oracle_identity_groups.md) +- [oracle_identity_iam_work_requests](oracle_identity_iam_work_requests.md) +- [oracle_identity_network_sources](oracle_identity_network_sources.md) +- [oracle_identity_policies](oracle_identity_policies.md) +- [oracle_identity_tag_namespaces](oracle_identity_tag_namespaces.md) +- [oracle_identity_tagging_work_requests](oracle_identity_tagging_work_requests.md) +- [oracle_identity_users](oracle_identity_users.md) +- [oracle_identity_work_requests](oracle_identity_work_requests.md) +- [oracle_loadbalancer_load_balancers](oracle_loadbalancer_load_balancers.md) +- [oracle_networkfirewall_network_firewall_policies](oracle_networkfirewall_network_firewall_policies.md) +- [oracle_networkfirewall_network_firewalls](oracle_networkfirewall_network_firewalls.md) +- [oracle_networkfirewall_work_requests](oracle_networkfirewall_work_requests.md) +- [oracle_networkloadbalancer_network_load_balancers](oracle_networkloadbalancer_network_load_balancers.md) +- [oracle_networkloadbalancer_work_requests](oracle_networkloadbalancer_work_requests.md) +- [oracle_objectstorage_buckets](oracle_objectstorage_buckets.md) +- [oracle_objectstorage_work_requests](oracle_objectstorage_work_requests.md) +- [oracle_virtualnetwork_byoip_ranges](oracle_virtualnetwork_byoip_ranges.md) +- [oracle_virtualnetwork_capture_filters](oracle_virtualnetwork_capture_filters.md) +- [oracle_virtualnetwork_cpes](oracle_virtualnetwork_cpes.md) +- [oracle_virtualnetwork_cross_connect_groups](oracle_virtualnetwork_cross_connect_groups.md) +- [oracle_virtualnetwork_cross_connects](oracle_virtualnetwork_cross_connects.md) +- [oracle_virtualnetwork_dhcp_options](oracle_virtualnetwork_dhcp_options.md) +- [oracle_virtualnetwork_drg_attachments](oracle_virtualnetwork_drg_attachments.md) +- [oracle_virtualnetwork_drgs](oracle_virtualnetwork_drgs.md) +- [oracle_virtualnetwork_fast_connect_provider_services](oracle_virtualnetwork_fast_connect_provider_services.md) +- [oracle_virtualnetwork_internet_gateways](oracle_virtualnetwork_internet_gateways.md) +- [oracle_virtualnetwork_ip_sec_connections](oracle_virtualnetwork_ip_sec_connections.md) +- [oracle_virtualnetwork_local_peering_gateways](oracle_virtualnetwork_local_peering_gateways.md) +- [oracle_virtualnetwork_nat_gateways](oracle_virtualnetwork_nat_gateways.md) +- [oracle_virtualnetwork_public_ip_pools](oracle_virtualnetwork_public_ip_pools.md) +- [oracle_virtualnetwork_remote_peering_connections](oracle_virtualnetwork_remote_peering_connections.md) +- [oracle_virtualnetwork_route_tables](oracle_virtualnetwork_route_tables.md) +- [oracle_virtualnetwork_security_lists](oracle_virtualnetwork_security_lists.md) +- [oracle_virtualnetwork_service_gateways](oracle_virtualnetwork_service_gateways.md) +- [oracle_virtualnetwork_subnets](oracle_virtualnetwork_subnets.md) +- [oracle_virtualnetwork_vcns](oracle_virtualnetwork_vcns.md) +- [oracle_virtualnetwork_virtual_circuits](oracle_virtualnetwork_virtual_circuits.md) +- [oracle_virtualnetwork_vlans](oracle_virtualnetwork_vlans.md) +- [oracle_virtualnetwork_vtaps](oracle_virtualnetwork_vtaps.md) \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_backups.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_backups.md new file mode 100644 index 00000000000000..53a1d2aead53b5 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_backups.md @@ -0,0 +1,31 @@ +# Table: oracle_blockstorage_boot_volume_backups + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|boot_volume_id|String| +|defined_tags|JSON| +|system_tags|JSON| +|expiration_time|Timestamp| +|freeform_tags|JSON| +|image_id|String| +|kms_key_id|String| +|size_in_g_bs|Int| +|source_boot_volume_backup_id|String| +|source_type|String| +|time_request_received|Timestamp| +|type|String| +|unique_size_in_g_bs|Int| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_replicas.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_replicas.md new file mode 100644 index 00000000000000..e4cb194d9256dc --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_replicas.md @@ -0,0 +1,27 @@ +# Table: oracle_blockstorage_boot_volume_replicas + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|display_name|String| +|lifecycle_state|String| +|size_in_g_bs|Int| +|time_created|Timestamp| +|time_last_synced|Timestamp| +|boot_volume_id|String| +|defined_tags|JSON| +|freeform_tags|JSON| +|image_id|String| +|total_data_transferred_in_g_bs|Int| +|volume_group_replica_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volumes.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volumes.md new file mode 100644 index 00000000000000..57a2a2c6763c2d --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volumes.md @@ -0,0 +1,33 @@ +# Table: oracle_blockstorage_boot_volumes + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|lifecycle_state|String| +|size_in_m_bs|Int| +|time_created|Timestamp| +|defined_tags|JSON| +|system_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|image_id|String| +|is_hydrated|Bool| +|vpus_per_gb|Int| +|size_in_g_bs|Int| +|volume_group_id|String| +|kms_key_id|String| +|is_auto_tune_enabled|Bool| +|auto_tuned_vpus_per_gb|Int| +|boot_volume_replicas|JSON| +|autotune_policies|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backup_policies.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backup_policies.md new file mode 100644 index 00000000000000..598a2be3031447 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backup_policies.md @@ -0,0 +1,21 @@ +# Table: oracle_blockstorage_volume_backup_policies + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|schedules|JSON| +|time_created|Timestamp| +|destination_region|String| +|defined_tags|JSON| +|freeform_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backups.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backups.md new file mode 100644 index 00000000000000..4753700180bb03 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backups.md @@ -0,0 +1,32 @@ +# Table: oracle_blockstorage_volume_backups + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|type|String| +|defined_tags|JSON| +|system_tags|JSON| +|expiration_time|Timestamp| +|freeform_tags|JSON| +|kms_key_id|String| +|size_in_g_bs|Int| +|size_in_m_bs|Int| +|source_type|String| +|source_volume_backup_id|String| +|time_request_received|Timestamp| +|unique_size_in_g_bs|Int| +|unique_size_in_mbs|Int| +|volume_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_group_backups.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_group_backups.md new file mode 100644 index 00000000000000..9aab3686aa0fb4 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_group_backups.md @@ -0,0 +1,31 @@ +# Table: oracle_blockstorage_volume_group_backups + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|type|String| +|volume_backup_ids|StringArray| +|defined_tags|JSON| +|expiration_time|Timestamp| +|freeform_tags|JSON| +|size_in_m_bs|Int| +|size_in_g_bs|Int| +|source_type|String| +|time_request_received|Timestamp| +|unique_size_in_mbs|Int| +|unique_size_in_gbs|Int| +|volume_group_id|String| +|source_volume_group_backup_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_groups.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_groups.md new file mode 100644 index 00000000000000..d8b4b120896c2e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_groups.md @@ -0,0 +1,26 @@ +# Table: oracle_blockstorage_volume_groups + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|display_name|String| +|lifecycle_state|String| +|size_in_m_bs|Int| +|time_created|Timestamp| +|volume_ids|StringArray| +|defined_tags|JSON| +|freeform_tags|JSON| +|size_in_g_bs|Int| +|is_hydrated|Bool| +|volume_group_replicas|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_blockstorage_volumes.md b/plugins/source/oracle/docs/tables/oracle_blockstorage_volumes.md new file mode 100644 index 00000000000000..c9dd6a58b7ecfe --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_blockstorage_volumes.md @@ -0,0 +1,32 @@ +# Table: oracle_blockstorage_volumes + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|display_name|String| +|lifecycle_state|String| +|size_in_m_bs|Int| +|time_created|Timestamp| +|defined_tags|JSON| +|freeform_tags|JSON| +|system_tags|JSON| +|is_hydrated|Bool| +|kms_key_id|String| +|vpus_per_gb|Int| +|size_in_g_bs|Int| +|volume_group_id|String| +|is_auto_tune_enabled|Bool| +|auto_tuned_vpus_per_gb|Int| +|block_volume_replicas|JSON| +|autotune_policies|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_compute_capacity_reservations.md b/plugins/source/oracle/docs/tables/oracle_compute_compute_capacity_reservations.md new file mode 100644 index 00000000000000..902cada34cecf1 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_compute_capacity_reservations.md @@ -0,0 +1,24 @@ +# Table: oracle_compute_compute_capacity_reservations + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|time_created|Timestamp| +|display_name|String| +|defined_tags|JSON| +|freeform_tags|JSON| +|lifecycle_state|String| +|reserved_instance_count|Int| +|used_instance_count|Int| +|is_default_reservation|Bool| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_console_histories.md b/plugins/source/oracle/docs/tables/oracle_compute_console_histories.md new file mode 100644 index 00000000000000..3337e8b11c8784 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_console_histories.md @@ -0,0 +1,22 @@ +# Table: oracle_compute_console_histories + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|instance_id|String| +|lifecycle_state|String| +|time_created|Timestamp| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_dedicated_vm_hosts.md b/plugins/source/oracle/docs/tables/oracle_compute_dedicated_vm_hosts.md new file mode 100644 index 00000000000000..0f7099d8b1ceba --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_dedicated_vm_hosts.md @@ -0,0 +1,25 @@ +# Table: oracle_compute_dedicated_vm_hosts + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|dedicated_vm_host_shape|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|remaining_ocpus|Float| +|total_ocpus|Float| +|fault_domain|String| +|total_memory_in_g_bs|Float| +|remaining_memory_in_g_bs|Float| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_images.md b/plugins/source/oracle/docs/tables/oracle_compute_images.md new file mode 100644 index 00000000000000..564b49a5c8d986 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_images.md @@ -0,0 +1,30 @@ +# Table: oracle_compute_images + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|create_image_allowed|Bool| +|lifecycle_state|String| +|operating_system|String| +|operating_system_version|String| +|time_created|Timestamp| +|base_image_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|launch_mode|String| +|launch_options|JSON| +|agent_features|JSON| +|listing_type|String| +|size_in_m_bs|Int| +|billable_size_in_g_bs|Int| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_instance_console_connections.md b/plugins/source/oracle/docs/tables/oracle_compute_instance_console_connections.md new file mode 100644 index 00000000000000..83a213c2a6b5b4 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_instance_console_connections.md @@ -0,0 +1,23 @@ +# Table: oracle_compute_instance_console_connections + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|connection_string|String| +|defined_tags|JSON| +|fingerprint|String| +|freeform_tags|JSON| +|instance_id|String| +|lifecycle_state|String| +|service_host_key_fingerprint|String| +|vnc_connection_string|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_instances.md b/plugins/source/oracle/docs/tables/oracle_compute_instances.md new file mode 100644 index 00000000000000..46f4f25dd98a4e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_instances.md @@ -0,0 +1,38 @@ +# Table: oracle_compute_instances + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|lifecycle_state|String| +|shape|String| +|time_created|Timestamp| +|capacity_reservation_id|String| +|dedicated_vm_host_id|String| +|defined_tags|JSON| +|display_name|String| +|extended_metadata|JSON| +|fault_domain|String| +|freeform_tags|JSON| +|image_id|String| +|ipxe_script|String| +|launch_mode|String| +|launch_options|JSON| +|instance_options|JSON| +|availability_config|JSON| +|preemptible_instance_config|JSON| +|metadata|JSON| +|shape_config|JSON| +|system_tags|JSON| +|agent_config|JSON| +|time_maintenance_reboot_due|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_compute_vnic_attachments.md b/plugins/source/oracle/docs/tables/oracle_compute_vnic_attachments.md new file mode 100644 index 00000000000000..e026d93500b2c2 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_compute_vnic_attachments.md @@ -0,0 +1,25 @@ +# Table: oracle_compute_vnic_attachments + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|instance_id|String| +|lifecycle_state|String| +|time_created|Timestamp| +|display_name|String| +|nic_index|Int| +|subnet_id|String| +|vlan_id|String| +|vlan_tag|Int| +|vnic_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_autonomous_container_databases.md b/plugins/source/oracle/docs/tables/oracle_database_autonomous_container_databases.md new file mode 100644 index 00000000000000..407a388827d85c --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_autonomous_container_databases.md @@ -0,0 +1,48 @@ +# Table: oracle_database_autonomous_container_databases + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|service_level_agreement_type|String| +|lifecycle_state|String| +|patch_model|String| +|db_unique_name|String| +|autonomous_exadata_infrastructure_id|String| +|autonomous_vm_cluster_id|String| +|infrastructure_type|String| +|cloud_autonomous_vm_cluster_id|String| +|kms_key_id|String| +|vault_id|String| +|kms_key_version_id|String| +|key_history_entry|JSON| +|lifecycle_details|String| +|time_created|Timestamp| +|patch_id|String| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|maintenance_window|JSON| +|standby_maintenance_buffer_in_days|Int| +|freeform_tags|JSON| +|defined_tags|JSON| +|role|String| +|availability_domain|String| +|db_version|String| +|backup_config|JSON| +|key_store_id|String| +|key_store_wallet_name|String| +|memory_per_oracle_compute_unit_in_g_bs|Int| +|available_cpus|Float| +|total_cpus|Int| +|reclaimable_cpus|Float| +|provisionable_cpus|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_autonomous_databases.md b/plugins/source/oracle/docs/tables/oracle_database_autonomous_databases.md new file mode 100644 index 00000000000000..5c881e7ccf5ec3 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_autonomous_databases.md @@ -0,0 +1,104 @@ +# Table: oracle_database_autonomous_databases + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|db_name|String| +|cpu_core_count|Int| +|data_storage_size_in_t_bs|Int| +|lifecycle_details|String| +|kms_key_id|String| +|vault_id|String| +|kms_key_lifecycle_details|String| +|kms_key_version_id|String| +|character_set|String| +|ncharacter_set|String| +|is_free_tier|Bool| +|system_tags|JSON| +|time_reclamation_of_free_autonomous_database|Timestamp| +|time_deletion_of_free_autonomous_database|Timestamp| +|backup_config|JSON| +|key_history_entry|JSON| +|ocpu_count|Float| +|provisionable_cpus|JSON| +|memory_per_oracle_compute_unit_in_g_bs|Int| +|data_storage_size_in_g_bs|Int| +|infrastructure_type|String| +|is_dedicated|Bool| +|autonomous_container_database_id|String| +|time_created|Timestamp| +|display_name|String| +|service_console_url|String| +|connection_strings|JSON| +|connection_urls|JSON| +|license_model|String| +|used_data_storage_size_in_t_bs|Int| +|freeform_tags|JSON| +|defined_tags|JSON| +|subnet_id|String| +|nsg_ids|StringArray| +|private_endpoint|String| +|private_endpoint_label|String| +|private_endpoint_ip|String| +|db_version|String| +|is_preview|Bool| +|db_workload|String| +|is_access_control_enabled|Bool| +|whitelisted_ips|StringArray| +|are_primary_whitelisted_ips_used|Bool| +|standby_whitelisted_ips|StringArray| +|apex_details|JSON| +|is_auto_scaling_enabled|Bool| +|data_safe_status|String| +|operations_insights_status|String| +|database_management_status|String| +|time_maintenance_begin|Timestamp| +|time_maintenance_end|Timestamp| +|is_refreshable_clone|Bool| +|time_of_last_refresh|Timestamp| +|time_of_last_refresh_point|Timestamp| +|time_of_next_refresh|Timestamp| +|open_mode|String| +|refreshable_status|String| +|refreshable_mode|String| +|source_id|String| +|permission_level|String| +|time_of_last_switchover|Timestamp| +|time_of_last_failover|Timestamp| +|is_data_guard_enabled|Bool| +|failed_data_recovery_in_seconds|Int| +|standby_db|JSON| +|is_local_data_guard_enabled|Bool| +|is_remote_data_guard_enabled|Bool| +|local_standby_db|JSON| +|role|String| +|available_upgrade_versions|StringArray| +|key_store_id|String| +|key_store_wallet_name|String| +|supported_regions_to_clone_to|StringArray| +|customer_contacts|JSON| +|time_local_data_guard_enabled|Timestamp| +|dataguard_region_type|String| +|time_data_guard_role_changed|Timestamp| +|peer_db_ids|StringArray| +|is_mtls_connection_required|Bool| +|is_reconnect_clone_enabled|Bool| +|time_until_reconnect_clone_enabled|Timestamp| +|autonomous_maintenance_schedule_type|String| +|scheduled_operations|JSON| +|is_auto_scaling_for_storage_enabled|Bool| +|allocated_storage_size_in_t_bs|Float| +|actual_used_data_storage_size_in_t_bs|Float| +|max_cpu_core_count|Int| +|database_edition|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_autonomous_exadata_infrastructures.md b/plugins/source/oracle/docs/tables/oracle_database_autonomous_exadata_infrastructures.md new file mode 100644 index 00000000000000..a1f1864cc4e677 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_autonomous_exadata_infrastructures.md @@ -0,0 +1,33 @@ +# Table: oracle_database_autonomous_exadata_infrastructures + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|availability_domain|String| +|subnet_id|String| +|shape|String| +|hostname|String| +|domain|String| +|lifecycle_state|String| +|maintenance_window|JSON| +|nsg_ids|StringArray| +|lifecycle_details|String| +|license_model|String| +|time_created|Timestamp| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|scan_dns_name|String| +|zone_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_autonomous_vm_clusters.md b/plugins/source/oracle/docs/tables/oracle_database_autonomous_vm_clusters.md new file mode 100644 index 00000000000000..3e0cfbd47b5a0e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_autonomous_vm_clusters.md @@ -0,0 +1,47 @@ +# Table: oracle_database_autonomous_vm_clusters + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|exadata_infrastructure_id|String| +|vm_cluster_network_id|String| +|time_created|Timestamp| +|lifecycle_details|String| +|time_zone|String| +|is_local_backup_enabled|Bool| +|cpus_enabled|Int| +|ocpus_enabled|Float| +|available_cpus|Int| +|total_container_databases|Int| +|memory_per_oracle_compute_unit_in_g_bs|Int| +|cpu_core_count_per_node|Int| +|autonomous_data_storage_size_in_t_bs|Float| +|maintenance_window|JSON| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|memory_size_in_g_bs|Int| +|db_node_storage_size_in_g_bs|Int| +|data_storage_size_in_t_bs|Float| +|data_storage_size_in_g_bs|Float| +|available_data_storage_size_in_t_bs|Float| +|license_model|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|reclaimable_cpus|Int| +|available_container_databases|Int| +|available_autonomous_data_storage_size_in_t_bs|Float| +|scan_listener_port_tls|Int| +|scan_listener_port_non_tls|Int| +|is_mtls_enabled|Bool| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_backup_destination.md b/plugins/source/oracle/docs/tables/oracle_database_backup_destination.md new file mode 100644 index 00000000000000..5404c456def68c --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_backup_destination.md @@ -0,0 +1,29 @@ +# Table: oracle_database_backup_destination + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|type|String| +|associated_databases|JSON| +|connection_string|String| +|vpc_users|StringArray| +|local_mount_point_path|String| +|nfs_mount_type|String| +|nfs_server|StringArray| +|nfs_server_export|String| +|lifecycle_state|String| +|time_created|Timestamp| +|lifecycle_details|String| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_cloud_autonomous_vm_clusters.md b/plugins/source/oracle/docs/tables/oracle_database_cloud_autonomous_vm_clusters.md new file mode 100644 index 00000000000000..a0d7b5ccc4d6b9 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_cloud_autonomous_vm_clusters.md @@ -0,0 +1,51 @@ +# Table: oracle_database_cloud_autonomous_vm_clusters + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|subnet_id|String| +|lifecycle_state|String| +|display_name|String| +|cloud_exadata_infrastructure_id|String| +|description|String| +|nsg_ids|StringArray| +|last_update_history_entry_id|String| +|time_created|Timestamp| +|time_updated|Timestamp| +|cluster_time_zone|String| +|lifecycle_details|String| +|hostname|String| +|domain|String| +|shape|String| +|node_count|Int| +|data_storage_size_in_t_bs|Float| +|data_storage_size_in_g_bs|Float| +|cpu_core_count|Int| +|ocpu_count|Float| +|cpu_core_count_per_node|Int| +|memory_size_in_g_bs|Int| +|license_model|String| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|maintenance_window|JSON| +|freeform_tags|JSON| +|defined_tags|JSON| +|available_cpus|Float| +|reclaimable_cpus|Float| +|available_container_databases|Int| +|total_container_databases|Int| +|available_autonomous_data_storage_size_in_t_bs|Float| +|autonomous_data_storage_size_in_t_bs|Float| +|db_node_storage_size_in_g_bs|Int| +|memory_per_oracle_compute_unit_in_g_bs|Int| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_cloud_exadata_infrastructures.md b/plugins/source/oracle/docs/tables/oracle_database_cloud_exadata_infrastructures.md new file mode 100644 index 00000000000000..e3b12f676b9362 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_cloud_exadata_infrastructures.md @@ -0,0 +1,41 @@ +# Table: oracle_database_cloud_exadata_infrastructures + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|display_name|String| +|shape|String| +|availability_domain|String| +|compute_count|Int| +|storage_count|Int| +|total_storage_size_in_g_bs|Int| +|available_storage_size_in_g_bs|Int| +|cpu_count|Int| +|max_cpu_count|Int| +|memory_size_in_g_bs|Int| +|max_memory_in_g_bs|Int| +|db_node_storage_size_in_g_bs|Int| +|max_db_node_storage_in_g_bs|Int| +|data_storage_size_in_t_bs|Float| +|max_data_storage_in_t_bs|Float| +|additional_storage_count|Int| +|activated_storage_count|Int| +|time_created|Timestamp| +|lifecycle_details|String| +|maintenance_window|JSON| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|customer_contacts|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_cloud_vm_clusters.md b/plugins/source/oracle/docs/tables/oracle_database_cloud_vm_clusters.md new file mode 100644 index 00000000000000..f27fab00925a05 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_cloud_vm_clusters.md @@ -0,0 +1,58 @@ +# Table: oracle_database_cloud_vm_clusters + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|availability_domain|String| +|subnet_id|String| +|shape|String| +|lifecycle_state|String| +|display_name|String| +|hostname|String| +|domain|String| +|cpu_core_count|Int| +|cloud_exadata_infrastructure_id|String| +|ssh_public_keys|StringArray| +|backup_subnet_id|String| +|nsg_ids|StringArray| +|backup_network_nsg_ids|StringArray| +|last_update_history_entry_id|String| +|listener_port|Int| +|node_count|Int| +|storage_size_in_g_bs|Int| +|time_created|Timestamp| +|lifecycle_details|String| +|time_zone|String| +|ocpu_count|Float| +|memory_size_in_g_bs|Int| +|db_node_storage_size_in_g_bs|Int| +|data_storage_size_in_t_bs|Float| +|db_servers|StringArray| +|cluster_name|String| +|data_storage_percentage|Int| +|is_local_backup_enabled|Bool| +|is_sparse_diskgroup_enabled|Bool| +|gi_version|String| +|system_version|String| +|license_model|String| +|disk_redundancy|String| +|scan_ip_ids|StringArray| +|vip_ids|StringArray| +|scan_dns_record_id|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|scan_dns_name|String| +|zone_id|String| +|scan_listener_port_tcp|Int| +|scan_listener_port_tcp_ssl|Int| +|data_collection_options|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_exadata_infrastructures.md b/plugins/source/oracle/docs/tables/oracle_database_exadata_infrastructures.md new file mode 100644 index 00000000000000..2580beb73a0af9 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_exadata_infrastructures.md @@ -0,0 +1,57 @@ +# Table: oracle_database_exadata_infrastructures + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|display_name|String| +|shape|String| +|time_zone|String| +|cpus_enabled|Int| +|max_cpu_count|Int| +|memory_size_in_g_bs|Int| +|max_memory_in_g_bs|Int| +|db_node_storage_size_in_g_bs|Int| +|max_db_node_storage_in_g_bs|Int| +|data_storage_size_in_t_bs|Float| +|max_data_storage_in_t_bs|Float| +|rack_serial_number|String| +|storage_count|Int| +|additional_storage_count|Int| +|activated_storage_count|Int| +|compute_count|Int| +|additional_compute_count|Int| +|additional_compute_system_model|String| +|cloud_control_plane_server1|String| +|cloud_control_plane_server2|String| +|netmask|String| +|gateway|String| +|admin_network_cidr|String| +|infini_band_network_cidr|String| +|corporate_proxy|String| +|dns_server|StringArray| +|ntp_server|StringArray| +|time_created|Timestamp| +|lifecycle_details|String| +|csi_number|String| +|contacts|JSON| +|maintenance_slo_status|String| +|maintenance_window|JSON| +|storage_server_version|String| +|db_server_version|String| +|monthly_db_server_version|String| +|last_maintenance_run_id|String| +|next_maintenance_run_id|String| +|is_cps_offline_report_enabled|Bool| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_external_container_databases.md b/plugins/source/oracle/docs/tables/oracle_database_external_container_databases.md new file mode 100644 index 00000000000000..bcebb5c35a2bb6 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_external_container_databases.md @@ -0,0 +1,32 @@ +# Table: oracle_database_external_container_databases + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_details|String| +|db_unique_name|String| +|db_id|String| +|database_version|String| +|database_edition|String| +|time_zone|String| +|character_set|String| +|ncharacter_set|String| +|db_packs|String| +|database_configuration|String| +|database_management_config|JSON| +|stack_monitoring_config|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_external_non_container_databases.md b/plugins/source/oracle/docs/tables/oracle_database_external_non_container_databases.md new file mode 100644 index 00000000000000..32ec8375a6a6d8 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_external_non_container_databases.md @@ -0,0 +1,33 @@ +# Table: oracle_database_external_non_container_databases + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_details|String| +|db_unique_name|String| +|db_id|String| +|database_version|String| +|database_edition|String| +|time_zone|String| +|character_set|String| +|ncharacter_set|String| +|db_packs|String| +|database_configuration|String| +|database_management_config|JSON| +|stack_monitoring_config|JSON| +|operations_insights_config|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_external_pluggable_databases.md b/plugins/source/oracle/docs/tables/oracle_database_external_pluggable_databases.md new file mode 100644 index 00000000000000..6a83ca214a7f76 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_external_pluggable_databases.md @@ -0,0 +1,35 @@ +# Table: oracle_database_external_pluggable_databases + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|external_container_database_id|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_details|String| +|db_unique_name|String| +|db_id|String| +|database_version|String| +|database_edition|String| +|time_zone|String| +|character_set|String| +|ncharacter_set|String| +|db_packs|String| +|database_configuration|String| +|database_management_config|JSON| +|stack_monitoring_config|JSON| +|source_id|String| +|operations_insights_config|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_key_stores.md b/plugins/source/oracle/docs/tables/oracle_database_key_stores.md new file mode 100644 index 00000000000000..61ffd79e061955 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_key_stores.md @@ -0,0 +1,22 @@ +# Table: oracle_database_key_stores + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|lifecycle_details|String| +|associated_databases|JSON| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_database_vm_clusters.md b/plugins/source/oracle/docs/tables/oracle_database_vm_clusters.md new file mode 100644 index 00000000000000..b458172ca1ea94 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_database_vm_clusters.md @@ -0,0 +1,40 @@ +# Table: oracle_database_vm_clusters + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|last_patch_history_entry_id|String| +|lifecycle_state|String| +|display_name|String| +|time_created|Timestamp| +|lifecycle_details|String| +|time_zone|String| +|is_local_backup_enabled|Bool| +|exadata_infrastructure_id|String| +|is_sparse_diskgroup_enabled|Bool| +|vm_cluster_network_id|String| +|cpus_enabled|Int| +|ocpus_enabled|Float| +|memory_size_in_g_bs|Int| +|db_node_storage_size_in_g_bs|Int| +|data_storage_size_in_t_bs|Float| +|data_storage_size_in_g_bs|Float| +|shape|String| +|gi_version|String| +|system_version|String| +|ssh_public_keys|StringArray| +|license_model|String| +|db_servers|StringArray| +|freeform_tags|JSON| +|defined_tags|JSON| +|data_collection_options|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_export_sets.md b/plugins/source/oracle/docs/tables/oracle_filestorage_export_sets.md new file mode 100644 index 00000000000000..0b79349cf6a143 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_export_sets.md @@ -0,0 +1,20 @@ +# Table: oracle_filestorage_export_sets + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|vcn_id|String| +|availability_domain|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_exports.md b/plugins/source/oracle/docs/tables/oracle_filestorage_exports.md new file mode 100644 index 00000000000000..b58f389a4ca939 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_exports.md @@ -0,0 +1,20 @@ +# Table: oracle_filestorage_exports + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|export_set_id|String| +|file_system_id|String| +|lifecycle_state|String| +|path|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_file_systems.md b/plugins/source/oracle/docs/tables/oracle_filestorage_file_systems.md new file mode 100644 index 00000000000000..87c8440eee6f33 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_file_systems.md @@ -0,0 +1,27 @@ +# Table: oracle_filestorage_file_systems + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|metered_bytes|Int| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|availability_domain|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|kms_key_id|String| +|source_details|JSON| +|is_clone_parent|Bool| +|is_hydrated|Bool| +|lifecycle_details|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_mount_targets.md b/plugins/source/oracle/docs/tables/oracle_filestorage_mount_targets.md new file mode 100644 index 00000000000000..a1940c7a921bdc --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_mount_targets.md @@ -0,0 +1,25 @@ +# Table: oracle_filestorage_mount_targets + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|private_ip_ids|StringArray| +|subnet_id|String| +|time_created|Timestamp| +|availability_domain|String| +|export_set_id|String| +|nsg_ids|StringArray| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_replication_targets.md b/plugins/source/oracle/docs/tables/oracle_filestorage_replication_targets.md new file mode 100644 index 00000000000000..792e961ce0ea6f --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_replication_targets.md @@ -0,0 +1,23 @@ +# Table: oracle_filestorage_replication_targets + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|display_name|String| +|time_created|Timestamp| +|availability_domain|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_details|String| +|recovery_point_time|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_filestorage_replications.md b/plugins/source/oracle/docs/tables/oracle_filestorage_replications.md new file mode 100644 index 00000000000000..8cb5f235345b66 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_filestorage_replications.md @@ -0,0 +1,24 @@ +# Table: oracle_filestorage_replications + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|display_name|String| +|time_created|Timestamp| +|availability_domain|String| +|replication_interval|Int| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_details|String| +|recovery_point_time|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_compartments.md b/plugins/source/oracle/docs/tables/oracle_identity_compartments.md new file mode 100644 index 00000000000000..728365e7d5d8a7 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_compartments.md @@ -0,0 +1,22 @@ +# Table: oracle_identity_compartments + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|name|String| +|description|String| +|time_created|Timestamp| +|lifecycle_state|String| +|inactive_status|Int| +|is_accessible|Bool| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_cost_tracking_tags.md b/plugins/source/oracle/docs/tables/oracle_identity_cost_tracking_tags.md new file mode 100644 index 00000000000000..82742c7d9e7839 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_cost_tracking_tags.md @@ -0,0 +1,24 @@ +# Table: oracle_identity_cost_tracking_tags + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|tag_namespace_id|String| +|tag_namespace_name|String| +|name|String| +|description|String| +|is_retired|Bool| +|time_created|Timestamp| +|freeform_tags|JSON| +|defined_tags|JSON| +|lifecycle_state|String| +|is_cost_tracking|Bool| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_domains.md b/plugins/source/oracle/docs/tables/oracle_identity_domains.md new file mode 100644 index 00000000000000..a3c5707b231e4d --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_domains.md @@ -0,0 +1,29 @@ +# Table: oracle_identity_domains + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|description|String| +|url|String| +|home_region_url|String| +|home_region|String| +|replica_regions|JSON| +|type|String| +|license_type|String| +|is_hidden_on_login|Bool| +|time_created|Timestamp| +|lifecycle_state|String| +|lifecycle_details|String| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_dynamic_groups.md b/plugins/source/oracle/docs/tables/oracle_identity_dynamic_groups.md new file mode 100644 index 00000000000000..b466c3597d2391 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_dynamic_groups.md @@ -0,0 +1,22 @@ +# Table: oracle_identity_dynamic_groups + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|name|String| +|description|String| +|matching_rule|String| +|time_created|Timestamp| +|lifecycle_state|String| +|inactive_status|Int| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_groups.md b/plugins/source/oracle/docs/tables/oracle_identity_groups.md new file mode 100644 index 00000000000000..44a9ac838a33e0 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_groups.md @@ -0,0 +1,21 @@ +# Table: oracle_identity_groups + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|name|String| +|description|String| +|time_created|Timestamp| +|lifecycle_state|String| +|inactive_status|Int| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_iam_work_requests.md b/plugins/source/oracle/docs/tables/oracle_identity_iam_work_requests.md new file mode 100644 index 00000000000000..b20fe3853a5f6e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_iam_work_requests.md @@ -0,0 +1,22 @@ +# Table: oracle_identity_iam_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|percent_complete|Float| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_network_sources.md b/plugins/source/oracle/docs/tables/oracle_identity_network_sources.md new file mode 100644 index 00000000000000..500e3fb72e8fe2 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_network_sources.md @@ -0,0 +1,22 @@ +# Table: oracle_identity_network_sources + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|name|String| +|description|String| +|public_source_list|StringArray| +|virtual_source_list|JSON| +|services|StringArray| +|time_created|Timestamp| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_policies.md b/plugins/source/oracle/docs/tables/oracle_identity_policies.md new file mode 100644 index 00000000000000..df04e1c9365c36 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_policies.md @@ -0,0 +1,24 @@ +# Table: oracle_identity_policies + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|name|String| +|statements|StringArray| +|description|String| +|time_created|Timestamp| +|lifecycle_state|String| +|inactive_status|Int| +|version_date|JSON| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_tag_namespaces.md b/plugins/source/oracle/docs/tables/oracle_identity_tag_namespaces.md new file mode 100644 index 00000000000000..97f72ec5fc4702 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_tag_namespaces.md @@ -0,0 +1,23 @@ +# Table: oracle_identity_tag_namespaces + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|name|String| +|description|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|is_retired|Bool| +|lifecycle_state|String| +|time_created|Timestamp| +|locks|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_tagging_work_requests.md b/plugins/source/oracle/docs/tables/oracle_identity_tagging_work_requests.md new file mode 100644 index 00000000000000..21d91d065242ab --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_tagging_work_requests.md @@ -0,0 +1,22 @@ +# Table: oracle_identity_tagging_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| +|percent_complete|Float| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_users.md b/plugins/source/oracle/docs/tables/oracle_identity_users.md new file mode 100644 index 00000000000000..14f8c63c23546c --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_users.md @@ -0,0 +1,30 @@ +# Table: oracle_identity_users + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|compartment_id|String| +|name|String| +|description|String| +|time_created|Timestamp| +|lifecycle_state|String| +|is_mfa_activated|Bool| +|email|String| +|email_verified|Bool| +|db_user_name|String| +|identity_provider_id|String| +|external_identifier|String| +|inactive_status|Int| +|freeform_tags|JSON| +|defined_tags|JSON| +|capabilities|JSON| +|last_successful_login_time|Timestamp| +|previous_successful_login_time|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_identity_work_requests.md b/plugins/source/oracle/docs/tables/oracle_identity_work_requests.md new file mode 100644 index 00000000000000..d9ca36b923e801 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_identity_work_requests.md @@ -0,0 +1,23 @@ +# Table: oracle_identity_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|errors|JSON| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| +|percent_complete|Float| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_loadbalancer_load_balancers.md b/plugins/source/oracle/docs/tables/oracle_loadbalancer_load_balancers.md new file mode 100644 index 00000000000000..01a64b4a8ed792 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_loadbalancer_load_balancers.md @@ -0,0 +1,35 @@ +# Table: oracle_loadbalancer_load_balancers + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|shape_name|String| +|ip_addresses|JSON| +|shape_details|JSON| +|is_private|Bool| +|subnet_ids|StringArray| +|network_security_group_ids|StringArray| +|listeners|JSON| +|hostnames|JSON| +|ssl_cipher_suites|JSON| +|certificates|JSON| +|backend_sets|JSON| +|path_route_sets|JSON| +|freeform_tags|JSON| +|defined_tags|JSON| +|system_tags|JSON| +|rule_sets|JSON| +|routing_policies|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewall_policies.md b/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewall_policies.md new file mode 100644 index 00000000000000..44a5e86c6bb888 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewall_policies.md @@ -0,0 +1,23 @@ +# Table: oracle_networkfirewall_network_firewall_policies + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|time_created|Timestamp| +|lifecycle_state|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|time_updated|Timestamp| +|lifecycle_details|String| +|system_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewalls.md b/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewalls.md new file mode 100644 index 00000000000000..114f40a328b1a3 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewalls.md @@ -0,0 +1,28 @@ +# Table: oracle_networkfirewall_network_firewalls + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|subnet_id|String| +|network_firewall_policy_id|String| +|time_created|Timestamp| +|lifecycle_state|String| +|freeform_tags|JSON| +|defined_tags|JSON| +|availability_domain|String| +|ipv4_address|String| +|ipv6_address|String| +|time_updated|Timestamp| +|lifecycle_details|String| +|system_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_networkfirewall_work_requests.md b/plugins/source/oracle/docs/tables/oracle_networkfirewall_work_requests.md new file mode 100644 index 00000000000000..a08f28907e3417 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_networkfirewall_work_requests.md @@ -0,0 +1,22 @@ +# Table: oracle_networkfirewall_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|percent_complete|Float| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_network_load_balancers.md b/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_network_load_balancers.md new file mode 100644 index 00000000000000..e10440f819c133 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_network_load_balancers.md @@ -0,0 +1,31 @@ +# Table: oracle_networkloadbalancer_network_load_balancers + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|lifecycle_state|String| +|time_created|Timestamp| +|ip_addresses|JSON| +|subnet_id|String| +|lifecycle_details|String| +|nlb_ip_version|String| +|time_updated|Timestamp| +|is_private|Bool| +|is_preserve_source_destination|Bool| +|network_security_group_ids|StringArray| +|listeners|JSON| +|backend_sets|JSON| +|freeform_tags|JSON| +|defined_tags|JSON| +|system_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_work_requests.md b/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_work_requests.md new file mode 100644 index 00000000000000..65ef4b87d22353 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_work_requests.md @@ -0,0 +1,22 @@ +# Table: oracle_networkloadbalancer_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|percent_complete|Float| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_objectstorage_buckets.md b/plugins/source/oracle/docs/tables/oracle_objectstorage_buckets.md new file mode 100644 index 00000000000000..9df9157f26b4c6 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_objectstorage_buckets.md @@ -0,0 +1,21 @@ +# Table: oracle_objectstorage_buckets + +The composite primary key for this table is (**region**, **compartment_id**, **namespace**, **name**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|namespace (PK)|String| +|name (PK)|String| +|created_by|String| +|time_created|Timestamp| +|etag|String| +|freeform_tags|JSON| +|defined_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_objectstorage_work_requests.md b/plugins/source/oracle/docs/tables/oracle_objectstorage_work_requests.md new file mode 100644 index 00000000000000..d404cf603200db --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_objectstorage_work_requests.md @@ -0,0 +1,22 @@ +# Table: oracle_objectstorage_work_requests + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|operation_type|String| +|status|String| +|resources|JSON| +|percent_complete|Float| +|time_accepted|Timestamp| +|time_started|Timestamp| +|time_finished|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_byoip_ranges.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_byoip_ranges.md new file mode 100644 index 00000000000000..c63252f8d1dc49 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_byoip_ranges.md @@ -0,0 +1,24 @@ +# Table: oracle_virtualnetwork_byoip_ranges + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|byoip_range_vcn_ipv6_allocations|JSON| +|cidr_block|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|ipv6_cidr_block|String| +|lifecycle_state|String| +|lifecycle_details|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_capture_filters.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_capture_filters.md new file mode 100644 index 00000000000000..f6cae921ba36c5 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_capture_filters.md @@ -0,0 +1,22 @@ +# Table: oracle_virtualnetwork_capture_filters + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|filter_type|String| +|time_created|Timestamp| +|vtap_capture_filter_rules|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cpes.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cpes.md new file mode 100644 index 00000000000000..c69f3a41d8fa66 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cpes.md @@ -0,0 +1,21 @@ +# Table: oracle_virtualnetwork_cpes + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|ip_address|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|cpe_device_shape_id|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connect_groups.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connect_groups.md new file mode 100644 index 00000000000000..8cef5c3c9daac3 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connect_groups.md @@ -0,0 +1,24 @@ +# Table: oracle_virtualnetwork_cross_connect_groups + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|lifecycle_state|String| +|customer_reference_name|String| +|time_created|Timestamp| +|macsec_properties|JSON| +|oci_physical_device_name|String| +|oci_logical_device_name|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connects.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connects.md new file mode 100644 index 00000000000000..40123235740148 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connects.md @@ -0,0 +1,28 @@ +# Table: oracle_virtualnetwork_cross_connects + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|cross_connect_group_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|lifecycle_state|String| +|location_name|String| +|port_name|String| +|port_speed_shape_name|String| +|customer_reference_name|String| +|time_created|Timestamp| +|macsec_properties|JSON| +|oci_physical_device_name|String| +|oci_logical_device_name|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_dhcp_options.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_dhcp_options.md new file mode 100644 index 00000000000000..75821fd819d0da --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_dhcp_options.md @@ -0,0 +1,23 @@ +# Table: oracle_virtualnetwork_dhcp_options + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|options|JSON| +|time_created|Timestamp| +|vcn_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|domain_name_type|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drg_attachments.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drg_attachments.md new file mode 100644 index 00000000000000..e284bfe1d48020 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drg_attachments.md @@ -0,0 +1,26 @@ +# Table: oracle_virtualnetwork_drg_attachments + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|drg_id|String| +|lifecycle_state|String| +|display_name|String| +|time_created|Timestamp| +|drg_route_table_id|String| +|defined_tags|JSON| +|freeform_tags|JSON| +|route_table_id|String| +|vcn_id|String| +|export_drg_route_distribution_id|String| +|is_cross_tenancy|Bool| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drgs.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drgs.md new file mode 100644 index 00000000000000..4fe223815fc5dd --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drgs.md @@ -0,0 +1,22 @@ +# Table: oracle_virtualnetwork_drgs + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|time_created|Timestamp| +|default_drg_route_tables|JSON| +|default_export_drg_route_distribution_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_fast_connect_provider_services.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_fast_connect_provider_services.md new file mode 100644 index 00000000000000..0d1a5930dec07e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_fast_connect_provider_services.md @@ -0,0 +1,26 @@ +# Table: oracle_virtualnetwork_fast_connect_provider_services + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|private_peering_bgp_management|String| +|provider_name|String| +|provider_service_name|String| +|public_peering_bgp_management|String| +|customer_asn_management|String| +|provider_service_key_management|String| +|bandwith_shape_management|String| +|required_total_cross_connects|Int| +|type|String| +|description|String| +|supported_virtual_circuit_types|StringArray| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_internet_gateways.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_internet_gateways.md new file mode 100644 index 00000000000000..78540ea5106764 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_internet_gateways.md @@ -0,0 +1,23 @@ +# Table: oracle_virtualnetwork_internet_gateways + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|vcn_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|is_enabled|Bool| +|time_created|Timestamp| +|route_table_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_ip_sec_connections.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_ip_sec_connections.md new file mode 100644 index 00000000000000..f0419018c4fd33 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_ip_sec_connections.md @@ -0,0 +1,25 @@ +# Table: oracle_virtualnetwork_ip_sec_connections + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|cpe_id|String| +|drg_id|String| +|lifecycle_state|String| +|static_routes|StringArray| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|cpe_local_identifier|String| +|cpe_local_identifier_type|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_local_peering_gateways.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_local_peering_gateways.md new file mode 100644 index 00000000000000..67321339ee02f5 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_local_peering_gateways.md @@ -0,0 +1,28 @@ +# Table: oracle_virtualnetwork_local_peering_gateways + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|is_cross_tenancy_peering|Bool| +|lifecycle_state|String| +|peering_status|String| +|peer_id|String| +|time_created|Timestamp| +|vcn_id|String| +|defined_tags|JSON| +|freeform_tags|JSON| +|peer_advertised_cidr|String| +|peer_advertised_cidr_details|StringArray| +|peering_status_details|String| +|route_table_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_nat_gateways.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_nat_gateways.md new file mode 100644 index 00000000000000..6a8a31f00619ea --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_nat_gateways.md @@ -0,0 +1,25 @@ +# Table: oracle_virtualnetwork_nat_gateways + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|block_traffic|Bool| +|lifecycle_state|String| +|nat_ip|String| +|time_created|Timestamp| +|vcn_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|public_ip_id|String| +|route_table_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_public_ip_pools.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_public_ip_pools.md new file mode 100644 index 00000000000000..0a26374c6378db --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_public_ip_pools.md @@ -0,0 +1,20 @@ +# Table: oracle_virtualnetwork_public_ip_pools + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|lifecycle_state|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_remote_peering_connections.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_remote_peering_connections.md new file mode 100644 index 00000000000000..9e33a1d5513d6e --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_remote_peering_connections.md @@ -0,0 +1,26 @@ +# Table: oracle_virtualnetwork_remote_peering_connections + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|drg_id|String| +|is_cross_tenancy_peering|Bool| +|lifecycle_state|String| +|peering_status|String| +|time_created|Timestamp| +|defined_tags|JSON| +|freeform_tags|JSON| +|peer_id|String| +|peer_region_name|String| +|peer_tenancy_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_route_tables.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_route_tables.md new file mode 100644 index 00000000000000..574fceeb2f7bf7 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_route_tables.md @@ -0,0 +1,22 @@ +# Table: oracle_virtualnetwork_route_tables + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|lifecycle_state|String| +|route_rules|JSON| +|vcn_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_security_lists.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_security_lists.md new file mode 100644 index 00000000000000..d97ba956e047e0 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_security_lists.md @@ -0,0 +1,23 @@ +# Table: oracle_virtualnetwork_security_lists + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|display_name|String| +|egress_security_rules|JSON| +|ingress_security_rules|JSON| +|lifecycle_state|String| +|time_created|Timestamp| +|vcn_id|String| +|defined_tags|JSON| +|freeform_tags|JSON| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_service_gateways.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_service_gateways.md new file mode 100644 index 00000000000000..5a87bbb091d1c2 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_service_gateways.md @@ -0,0 +1,24 @@ +# Table: oracle_virtualnetwork_service_gateways + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|block_traffic|Bool| +|lifecycle_state|String| +|services|JSON| +|vcn_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|route_table_id|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_subnets.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_subnets.md new file mode 100644 index 00000000000000..b7f5a804dc3a3a --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_subnets.md @@ -0,0 +1,35 @@ +# Table: oracle_virtualnetwork_subnets + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|cidr_block|String| +|lifecycle_state|String| +|route_table_id|String| +|vcn_id|String| +|virtual_router_ip|String| +|virtual_router_mac|String| +|availability_domain|String| +|defined_tags|JSON| +|dhcp_options_id|String| +|display_name|String| +|dns_label|String| +|freeform_tags|JSON| +|ipv6_cidr_block|String| +|ipv6_cidr_blocks|StringArray| +|ipv6_virtual_router_ip|String| +|prohibit_internet_ingress|Bool| +|prohibit_public_ip_on_vnic|Bool| +|security_list_ids|StringArray| +|subnet_domain_name|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vcns.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vcns.md new file mode 100644 index 00000000000000..201a4f77c2beb8 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vcns.md @@ -0,0 +1,30 @@ +# Table: oracle_virtualnetwork_vcns + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|cidr_block|String| +|cidr_blocks|StringArray| +|lifecycle_state|String| +|byoipv6_cidr_blocks|StringArray| +|ipv6_private_cidr_blocks|StringArray| +|default_dhcp_options_id|String| +|default_route_table_id|String| +|default_security_list_id|String| +|defined_tags|JSON| +|display_name|String| +|dns_label|String| +|freeform_tags|JSON| +|ipv6_cidr_blocks|StringArray| +|time_created|Timestamp| +|vcn_domain_name|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_virtual_circuits.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_virtual_circuits.md new file mode 100644 index 00000000000000..49545ae1647e01 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_virtual_circuits.md @@ -0,0 +1,42 @@ +# Table: oracle_virtualnetwork_virtual_circuits + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|bandwidth_shape_name|String| +|bgp_management|String| +|bgp_session_state|String| +|bgp_ipv6_session_state|String| +|cross_connect_mappings|JSON| +|routing_policy|StringArray| +|bgp_admin_state|String| +|is_bfd_enabled|Bool| +|customer_bgp_asn|Int| +|customer_asn|Int| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|gateway_id|String| +|lifecycle_state|String| +|oracle_bgp_asn|Int| +|provider_name|String| +|provider_service_id|String| +|provider_service_key_name|String| +|provider_service_name|String| +|provider_state|String| +|public_prefixes|StringArray| +|reference_comment|String| +|service_type|String| +|time_created|Timestamp| +|type|String| +|ip_mtu|String| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vlans.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vlans.md new file mode 100644 index 00000000000000..6434facd5f7428 --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vlans.md @@ -0,0 +1,26 @@ +# Table: oracle_virtualnetwork_vlans + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|cidr_block|String| +|lifecycle_state|String| +|vcn_id|String| +|availability_domain|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|nsg_ids|StringArray| +|vlan_tag|Int| +|route_table_id|String| +|time_created|Timestamp| \ No newline at end of file diff --git a/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vtaps.md b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vtaps.md new file mode 100644 index 00000000000000..e88601126e7edf --- /dev/null +++ b/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vtaps.md @@ -0,0 +1,35 @@ +# Table: oracle_virtualnetwork_vtaps + +The composite primary key for this table is (**region**, **compartment_id**, **id**). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|region (PK)|String| +|compartment_id (PK)|String| +|id (PK)|String| +|vcn_id|String| +|lifecycle_state|String| +|source_id|String| +|capture_filter_id|String| +|defined_tags|JSON| +|display_name|String| +|freeform_tags|JSON| +|lifecycle_state_details|String| +|time_created|Timestamp| +|target_id|String| +|target_ip|String| +|encapsulation_protocol|String| +|vxlan_network_identifier|Int| +|is_vtap_enabled|Bool| +|source_type|String| +|traffic_mode|String| +|max_packet_size|Int| +|target_type|String| +|source_private_endpoint_ip|String| +|source_private_endpoint_subnet_id|String| \ No newline at end of file diff --git a/plugins/source/oracle/go.mod b/plugins/source/oracle/go.mod new file mode 100644 index 00000000000000..87750f3f45a105 --- /dev/null +++ b/plugins/source/oracle/go.mod @@ -0,0 +1,37 @@ +module github.com/cloudquery/cloudquery/plugins/source/oracle + +go 1.19 + +require ( + github.com/cloudquery/plugin-sdk v1.27.0 + github.com/iancoleman/strcase v0.2.0 + github.com/oracle/oci-go-sdk/v65 v65.28.0 + github.com/rs/zerolog v1.28.0 + golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 +) + +require ( + github.com/getsentry/sentry-go v0.16.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/gofrs/flock v0.8.1 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/sony/gobreaker v0.5.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/thoas/go-funk v0.9.3 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/plugins/source/oracle/go.sum b/plugins/source/oracle/go.sum new file mode 100644 index 00000000000000..08d72239091f2b --- /dev/null +++ b/plugins/source/oracle/go.sum @@ -0,0 +1,477 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/getsentry/sentry-go v0.16.0 h1:owk+S+5XcgJLlGR/3+3s6N4d+uKwqYvh/eS0AIMjPWo= +github.com/getsentry/sentry-go v0.16.0/go.mod h1:ZXCloQLj0pG7mja5NK6NPf2V4A88YJ4pNlc2mOHwh6Y= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 h1:hRcWZ7716+E1tkMSZJ/QeeC2dPGGB1R/4z4m9RsL8Qg= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3/go.mod h1:54asssGY3Bohr5FRbew+bjfuQTT2WS9V7hW7gPqmcKM= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/oracle/oci-go-sdk/v65 v65.28.0 h1:FgBWmHzT1y9H9tRQYOiX22Z8ec5p6/M5sSYRGcbWAno= +github.com/oracle/oci-go-sdk/v65 v65.28.0/go.mod h1:oyMrMa1vOzzKTmPN+kqrTR9y9kPA2tU1igN3NUSNTIE= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/schollz/progressbar/v3 v3.12.2 h1:yLqqqpQNMxGxHY8uEshRihaHWwa0rf0yb7/Zrpgq2C0= +github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= +github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= +github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/plugins/source/oracle/main.go b/plugins/source/oracle/main.go new file mode 100644 index 00000000000000..458efa49bd5c32 --- /dev/null +++ b/plugins/source/oracle/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/plugin" + "github.com/cloudquery/plugin-sdk/serve" +) + +const sentryDSN = "https://e97f52f0673f44849bab5617a4e07959@o1396617.ingest.sentry.io/4504474234650624" + +func main() { + serve.Source(plugin.Plugin(), serve.WithSourceSentryDSN(sentryDSN)) +} diff --git a/plugins/source/oracle/resources/plugin/autogen_tables.go b/plugins/source/oracle/resources/plugin/autogen_tables.go new file mode 100644 index 00000000000000..582927358bb79e --- /dev/null +++ b/plugins/source/oracle/resources/plugin/autogen_tables.go @@ -0,0 +1,51 @@ +package plugin + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/compute" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/loadbalancer" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/networkfirewall" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/networkloadbalancer" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/virtualnetwork" + "github.com/cloudquery/plugin-sdk/schema" +) + +func AutogenTables() []*schema.Table { + return []*schema.Table{ + compute.ComputeCapacityReservations(), + compute.ConsoleHistories(), + compute.DedicatedVmHosts(), + compute.Images(), + compute.InstanceConsoleConnections(), + compute.Instances(), + compute.VnicAttachments(), + loadbalancer.LoadBalancers(), + networkfirewall.NetworkFirewallPolicies(), + networkfirewall.NetworkFirewalls(), + networkfirewall.WorkRequests(), + networkloadbalancer.NetworkLoadBalancers(), + networkloadbalancer.WorkRequests(), + virtualnetwork.ByoipRanges(), + virtualnetwork.CaptureFilters(), + virtualnetwork.Cpes(), + virtualnetwork.CrossConnectGroups(), + virtualnetwork.CrossConnects(), + virtualnetwork.DhcpOptions(), + virtualnetwork.DrgAttachments(), + virtualnetwork.Drgs(), + virtualnetwork.FastConnectProviderServices(), + virtualnetwork.InternetGateways(), + virtualnetwork.IpSecConnections(), + virtualnetwork.LocalPeeringGateways(), + virtualnetwork.NatGateways(), + virtualnetwork.PublicIpPools(), + virtualnetwork.RemotePeeringConnections(), + virtualnetwork.RouteTables(), + virtualnetwork.SecurityLists(), + virtualnetwork.ServiceGateways(), + virtualnetwork.Subnets(), + virtualnetwork.Vcns(), + virtualnetwork.VirtualCircuits(), + virtualnetwork.Vlans(), + virtualnetwork.Vtaps(), + } +} diff --git a/plugins/source/oracle/resources/plugin/plugin.go b/plugins/source/oracle/resources/plugin/plugin.go new file mode 100644 index 00000000000000..55605863b666ee --- /dev/null +++ b/plugins/source/oracle/resources/plugin/plugin.go @@ -0,0 +1,79 @@ +package plugin + +import ( + "sort" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/blockstorage" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/database" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/filestorage" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/identity" + "github.com/cloudquery/cloudquery/plugins/source/oracle/resources/services/objectstorage" + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" +) + +var ( + Version = "development" +) + +var customTables = []*schema.Table{ + blockstorage.BootVolumeBackups(), + blockstorage.BootVolumeReplicas(), + blockstorage.BootVolumes(), + blockstorage.VolumeBackupPolicies(), + blockstorage.VolumeBackups(), + blockstorage.VolumeGroupBackups(), + blockstorage.VolumeGroups(), + blockstorage.Volumes(), + database.AutonomousContainerDatabases(), + database.AutonomousDatabases(), + database.AutonomousExadataInfrastructures(), + database.AutonomousVmClusters(), + database.BackupDestination(), + database.CloudAutonomousVmClusters(), + database.CloudExadataInfrastructures(), + database.CloudVmClusters(), + database.ExadataInfrastructures(), + database.ExternalContainerDatabases(), + database.ExternalNonContainerDatabases(), + database.ExternalPluggableDatabases(), + database.KeyStores(), + database.VmClusters(), + filestorage.ExportSets(), + filestorage.Exports(), + filestorage.FileSystems(), + filestorage.MountTargets(), + filestorage.ReplicationTargets(), + filestorage.Replications(), + identity.Compartments(), + identity.CostTrackingTags(), + identity.Domains(), + identity.DynamicGroups(), + identity.Groups(), + identity.IamWorkRequests(), + identity.NetworkSources(), + identity.Policies(), + identity.TagNamespaces(), + identity.TaggingWorkRequests(), + identity.Users(), + identity.WorkRequests(), + objectstorage.Buckets(), + objectstorage.WorkRequests(), +} + +func Plugin() *source.Plugin { + allTables := append(AutogenTables(), customTables...) + + sort.Slice(allTables, func(i, j int) bool { + return allTables[i].Name < allTables[j].Name + }) + + // here you can append custom non-generated tables + return source.NewPlugin( + "oracle", + Version, + allTables, + client.Configure, + ) +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups.go b/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups.go new file mode 100644 index 00000000000000..778273bcc53720 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func BootVolumeBackups() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_boot_volume_backups", + Resolver: fetchBootVolumeBackups, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.BootVolumeBackup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups_fetch.go b/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups_fetch.go new file mode 100644 index 00000000000000..1b93bdc4a68d44 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volume_backups_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchBootVolumeBackups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListBootVolumeBackupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListBootVolumeBackups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas.go b/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas.go new file mode 100644 index 00000000000000..e834259d51575d --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func BootVolumeReplicas() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_boot_volume_replicas", + Resolver: fetchBootVolumeReplicas, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.BootVolumeReplica{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas_fetch.go b/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas_fetch.go new file mode 100644 index 00000000000000..57363fa31fffda --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volume_replicas_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchBootVolumeReplicas(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListBootVolumeReplicasRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListBootVolumeReplicas(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volumes.go b/plugins/source/oracle/resources/services/blockstorage/boot_volumes.go new file mode 100644 index 00000000000000..ef4622275a6898 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volumes.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func BootVolumes() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_boot_volumes", + Resolver: fetchBootVolumes, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.BootVolume{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/boot_volumes_fetch.go b/plugins/source/oracle/resources/services/blockstorage/boot_volumes_fetch.go new file mode 100644 index 00000000000000..b0d3fa4a2df9f7 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/boot_volumes_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchBootVolumes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListBootVolumesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListBootVolumes(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies.go b/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies.go new file mode 100644 index 00000000000000..855286c62f1465 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VolumeBackupPolicies() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_volume_backup_policies", + Resolver: fetchVolumeBackupPolicies, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VolumeBackupPolicy{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies_fetch.go b/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies_fetch.go new file mode 100644 index 00000000000000..2373311e3efea8 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_backup_policies_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVolumeBackupPolicies(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVolumeBackupPoliciesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListVolumeBackupPolicies(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_backups.go b/plugins/source/oracle/resources/services/blockstorage/volume_backups.go new file mode 100644 index 00000000000000..84db3e129bd54f --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_backups.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VolumeBackups() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_volume_backups", + Resolver: fetchVolumeBackups, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VolumeBackup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_backups_fetch.go b/plugins/source/oracle/resources/services/blockstorage/volume_backups_fetch.go new file mode 100644 index 00000000000000..2da73cd22e4c6d --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_backups_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVolumeBackups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVolumeBackupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListVolumeBackups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_group_backups.go b/plugins/source/oracle/resources/services/blockstorage/volume_group_backups.go new file mode 100644 index 00000000000000..a4e62a93f2202b --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_group_backups.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VolumeGroupBackups() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_volume_group_backups", + Resolver: fetchVolumeGroupBackups, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VolumeGroupBackup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_group_backups_fetch.go b/plugins/source/oracle/resources/services/blockstorage/volume_group_backups_fetch.go new file mode 100644 index 00000000000000..a926b5818a1972 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_group_backups_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVolumeGroupBackups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVolumeGroupBackupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListVolumeGroupBackups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_groups.go b/plugins/source/oracle/resources/services/blockstorage/volume_groups.go new file mode 100644 index 00000000000000..1db648e1db07bf --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_groups.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VolumeGroups() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_volume_groups", + Resolver: fetchVolumeGroups, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VolumeGroup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volume_groups_fetch.go b/plugins/source/oracle/resources/services/blockstorage/volume_groups_fetch.go new file mode 100644 index 00000000000000..d8e86e0a4a0f58 --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volume_groups_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVolumeGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVolumeGroupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListVolumeGroups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volumes.go b/plugins/source/oracle/resources/services/blockstorage/volumes.go new file mode 100644 index 00000000000000..d5119c74eb721b --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volumes.go @@ -0,0 +1,44 @@ +package blockstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Volumes() *schema.Table { + return &schema.Table{ + Name: "oracle_blockstorage_volumes", + Resolver: fetchVolumes, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Volume{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/blockstorage/volumes_fetch.go b/plugins/source/oracle/resources/services/blockstorage/volumes_fetch.go new file mode 100644 index 00000000000000..df9f6cfc517fbb --- /dev/null +++ b/plugins/source/oracle/resources/services/blockstorage/volumes_fetch.go @@ -0,0 +1,38 @@ +package blockstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVolumes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVolumesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreBlockstorageClient.ListVolumes(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/compute_capacity_reservations.go b/plugins/source/oracle/resources/services/compute/compute_capacity_reservations.go new file mode 100644 index 00000000000000..03f74f889e9853 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/compute_capacity_reservations.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func ComputeCapacityReservations() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_compute_capacity_reservations", + Resolver: fetchComputeCapacityReservations, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.ComputeCapacityReservationSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/compute_capacity_reservations_fetch.go b/plugins/source/oracle/resources/services/compute/compute_capacity_reservations_fetch.go new file mode 100644 index 00000000000000..3b1322c0beff0c --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/compute_capacity_reservations_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchComputeCapacityReservations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListComputeCapacityReservationsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListComputeCapacityReservations(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/console_histories.go b/plugins/source/oracle/resources/services/compute/console_histories.go new file mode 100644 index 00000000000000..09c38234c2a63c --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/console_histories.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func ConsoleHistories() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_console_histories", + Resolver: fetchConsoleHistories, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.ConsoleHistory{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/console_histories_fetch.go b/plugins/source/oracle/resources/services/compute/console_histories_fetch.go new file mode 100644 index 00000000000000..9e7158065c704a --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/console_histories_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchConsoleHistories(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListConsoleHistoriesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListConsoleHistories(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts.go b/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts.go new file mode 100644 index 00000000000000..5aacce02cd41e1 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func DedicatedVmHosts() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_dedicated_vm_hosts", + Resolver: fetchDedicatedVmHosts, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.DedicatedVmHostSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts_fetch.go b/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts_fetch.go new file mode 100644 index 00000000000000..2d5f55d609c64a --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/dedicated_vm_hosts_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchDedicatedVmHosts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListDedicatedVmHostsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListDedicatedVmHosts(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/images.go b/plugins/source/oracle/resources/services/compute/images.go new file mode 100644 index 00000000000000..c8e0bb5deb162d --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/images.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Images() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_images", + Resolver: fetchImages, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Image{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/images_fetch.go b/plugins/source/oracle/resources/services/compute/images_fetch.go new file mode 100644 index 00000000000000..60e7df23304193 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/images_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchImages(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListImagesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListImages(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/instance_console_connections.go b/plugins/source/oracle/resources/services/compute/instance_console_connections.go new file mode 100644 index 00000000000000..c6df71b13ed821 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/instance_console_connections.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func InstanceConsoleConnections() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_instance_console_connections", + Resolver: fetchInstanceConsoleConnections, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.InstanceConsoleConnection{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/instance_console_connections_fetch.go b/plugins/source/oracle/resources/services/compute/instance_console_connections_fetch.go new file mode 100644 index 00000000000000..066a70e29d1cfb --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/instance_console_connections_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchInstanceConsoleConnections(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListInstanceConsoleConnectionsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListInstanceConsoleConnections(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/instances.go b/plugins/source/oracle/resources/services/compute/instances.go new file mode 100644 index 00000000000000..a9382f4932aa15 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/instances.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Instances() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_instances", + Resolver: fetchInstances, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Instance{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/instances_fetch.go b/plugins/source/oracle/resources/services/compute/instances_fetch.go new file mode 100644 index 00000000000000..391bdec452062b --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/instances_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchInstances(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListInstancesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListInstances(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/compute/vnic_attachments.go b/plugins/source/oracle/resources/services/compute/vnic_attachments.go new file mode 100644 index 00000000000000..ef51ba1d38e3b2 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/vnic_attachments.go @@ -0,0 +1,44 @@ +package compute + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VnicAttachments() *schema.Table { + return &schema.Table{ + Name: "oracle_compute_vnic_attachments", + Resolver: fetchVnicAttachments, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VnicAttachment{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/compute/vnic_attachments_fetch.go b/plugins/source/oracle/resources/services/compute/vnic_attachments_fetch.go new file mode 100644 index 00000000000000..0f86d311589065 --- /dev/null +++ b/plugins/source/oracle/resources/services/compute/vnic_attachments_fetch.go @@ -0,0 +1,38 @@ +package compute + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVnicAttachments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVnicAttachmentsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreComputeClient.ListVnicAttachments(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_container_databases.go b/plugins/source/oracle/resources/services/database/autonomous_container_databases.go new file mode 100644 index 00000000000000..c22042d697d6a3 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_container_databases.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func AutonomousContainerDatabases() *schema.Table { + return &schema.Table{ + Name: "oracle_database_autonomous_container_databases", + Resolver: fetchAutonomousContainerDatabases, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.AutonomousContainerDatabaseSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_container_databases_fetch.go b/plugins/source/oracle/resources/services/database/autonomous_container_databases_fetch.go new file mode 100644 index 00000000000000..8b86a79037acb6 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_container_databases_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchAutonomousContainerDatabases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListAutonomousContainerDatabasesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListAutonomousContainerDatabases(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_databases.go b/plugins/source/oracle/resources/services/database/autonomous_databases.go new file mode 100644 index 00000000000000..f2ac1c585e3ed2 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_databases.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func AutonomousDatabases() *schema.Table { + return &schema.Table{ + Name: "oracle_database_autonomous_databases", + Resolver: fetchAutonomousDatabases, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.AutonomousDatabaseSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_databases_fetch.go b/plugins/source/oracle/resources/services/database/autonomous_databases_fetch.go new file mode 100644 index 00000000000000..323cbf3f6ef1bf --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_databases_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchAutonomousDatabases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListAutonomousDatabasesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListAutonomousDatabases(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures.go b/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures.go new file mode 100644 index 00000000000000..b05bcef9f8893e --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func AutonomousExadataInfrastructures() *schema.Table { + return &schema.Table{ + Name: "oracle_database_autonomous_exadata_infrastructures", + Resolver: fetchAutonomousExadataInfrastructures, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.AutonomousExadataInfrastructureSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures_fetch.go b/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures_fetch.go new file mode 100644 index 00000000000000..d70781cda5615e --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_exadata_infrastructures_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchAutonomousExadataInfrastructures(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListAutonomousExadataInfrastructuresRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListAutonomousExadataInfrastructures(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_vm_clusters.go b/plugins/source/oracle/resources/services/database/autonomous_vm_clusters.go new file mode 100644 index 00000000000000..bf8e18c33b7b62 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_vm_clusters.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func AutonomousVmClusters() *schema.Table { + return &schema.Table{ + Name: "oracle_database_autonomous_vm_clusters", + Resolver: fetchAutonomousVmClusters, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.AutonomousVmClusterSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/autonomous_vm_clusters_fetch.go b/plugins/source/oracle/resources/services/database/autonomous_vm_clusters_fetch.go new file mode 100644 index 00000000000000..1b52c8abbe68ec --- /dev/null +++ b/plugins/source/oracle/resources/services/database/autonomous_vm_clusters_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchAutonomousVmClusters(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListAutonomousVmClustersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListAutonomousVmClusters(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/backup_destination.go b/plugins/source/oracle/resources/services/database/backup_destination.go new file mode 100644 index 00000000000000..99dfafe26467fb --- /dev/null +++ b/plugins/source/oracle/resources/services/database/backup_destination.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func BackupDestination() *schema.Table { + return &schema.Table{ + Name: "oracle_database_backup_destination", + Resolver: fetchBackupDestination, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.BackupDestinationSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/backup_destination_fetch.go b/plugins/source/oracle/resources/services/database/backup_destination_fetch.go new file mode 100644 index 00000000000000..3ec7b8904fcf0a --- /dev/null +++ b/plugins/source/oracle/resources/services/database/backup_destination_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchBackupDestination(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListBackupDestinationRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListBackupDestination(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters.go b/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters.go new file mode 100644 index 00000000000000..9047012baa6038 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func CloudAutonomousVmClusters() *schema.Table { + return &schema.Table{ + Name: "oracle_database_cloud_autonomous_vm_clusters", + Resolver: fetchCloudAutonomousVmClusters, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.CloudAutonomousVmClusterSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters_fetch.go b/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters_fetch.go new file mode 100644 index 00000000000000..06037740100635 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_autonomous_vm_clusters_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchCloudAutonomousVmClusters(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListCloudAutonomousVmClustersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListCloudAutonomousVmClusters(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures.go b/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures.go new file mode 100644 index 00000000000000..07be50ef601b18 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func CloudExadataInfrastructures() *schema.Table { + return &schema.Table{ + Name: "oracle_database_cloud_exadata_infrastructures", + Resolver: fetchCloudExadataInfrastructures, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.CloudExadataInfrastructureSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures_fetch.go b/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures_fetch.go new file mode 100644 index 00000000000000..83fd43c202c94c --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_exadata_infrastructures_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchCloudExadataInfrastructures(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListCloudExadataInfrastructuresRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListCloudExadataInfrastructures(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/cloud_vm_clusters.go b/plugins/source/oracle/resources/services/database/cloud_vm_clusters.go new file mode 100644 index 00000000000000..19aae381bf7591 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_vm_clusters.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func CloudVmClusters() *schema.Table { + return &schema.Table{ + Name: "oracle_database_cloud_vm_clusters", + Resolver: fetchCloudVmClusters, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.CloudVmClusterSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/cloud_vm_clusters_fetch.go b/plugins/source/oracle/resources/services/database/cloud_vm_clusters_fetch.go new file mode 100644 index 00000000000000..394e0ad9c99163 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/cloud_vm_clusters_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchCloudVmClusters(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListCloudVmClustersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListCloudVmClusters(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/exadata_infrastructures.go b/plugins/source/oracle/resources/services/database/exadata_infrastructures.go new file mode 100644 index 00000000000000..58157dd7343102 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/exadata_infrastructures.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func ExadataInfrastructures() *schema.Table { + return &schema.Table{ + Name: "oracle_database_exadata_infrastructures", + Resolver: fetchExadataInfrastructures, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.ExadataInfrastructureSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/exadata_infrastructures_fetch.go b/plugins/source/oracle/resources/services/database/exadata_infrastructures_fetch.go new file mode 100644 index 00000000000000..fe73e28867eeda --- /dev/null +++ b/plugins/source/oracle/resources/services/database/exadata_infrastructures_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchExadataInfrastructures(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListExadataInfrastructuresRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListExadataInfrastructures(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/external_container_databases.go b/plugins/source/oracle/resources/services/database/external_container_databases.go new file mode 100644 index 00000000000000..47e871e2455f50 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_container_databases.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func ExternalContainerDatabases() *schema.Table { + return &schema.Table{ + Name: "oracle_database_external_container_databases", + Resolver: fetchExternalContainerDatabases, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.ExternalContainerDatabaseSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/external_container_databases_fetch.go b/plugins/source/oracle/resources/services/database/external_container_databases_fetch.go new file mode 100644 index 00000000000000..f87c84cabdc27c --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_container_databases_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchExternalContainerDatabases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListExternalContainerDatabasesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListExternalContainerDatabases(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/external_non_container_databases.go b/plugins/source/oracle/resources/services/database/external_non_container_databases.go new file mode 100644 index 00000000000000..3e47ffce1ec818 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_non_container_databases.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func ExternalNonContainerDatabases() *schema.Table { + return &schema.Table{ + Name: "oracle_database_external_non_container_databases", + Resolver: fetchExternalNonContainerDatabases, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.ExternalNonContainerDatabaseSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/external_non_container_databases_fetch.go b/plugins/source/oracle/resources/services/database/external_non_container_databases_fetch.go new file mode 100644 index 00000000000000..7015d3c3b12677 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_non_container_databases_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchExternalNonContainerDatabases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListExternalNonContainerDatabasesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListExternalNonContainerDatabases(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/external_pluggable_databases.go b/plugins/source/oracle/resources/services/database/external_pluggable_databases.go new file mode 100644 index 00000000000000..502ddfdc738762 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_pluggable_databases.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func ExternalPluggableDatabases() *schema.Table { + return &schema.Table{ + Name: "oracle_database_external_pluggable_databases", + Resolver: fetchExternalPluggableDatabases, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.ExternalPluggableDatabaseSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/external_pluggable_databases_fetch.go b/plugins/source/oracle/resources/services/database/external_pluggable_databases_fetch.go new file mode 100644 index 00000000000000..af35b94f7ff797 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/external_pluggable_databases_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchExternalPluggableDatabases(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListExternalPluggableDatabasesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListExternalPluggableDatabases(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/key_stores.go b/plugins/source/oracle/resources/services/database/key_stores.go new file mode 100644 index 00000000000000..5131f39617c2b8 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/key_stores.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func KeyStores() *schema.Table { + return &schema.Table{ + Name: "oracle_database_key_stores", + Resolver: fetchKeyStores, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.KeyStoreSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/key_stores_fetch.go b/plugins/source/oracle/resources/services/database/key_stores_fetch.go new file mode 100644 index 00000000000000..d43264ff8088c1 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/key_stores_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchKeyStores(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListKeyStoresRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListKeyStores(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/database/vm_clusters.go b/plugins/source/oracle/resources/services/database/vm_clusters.go new file mode 100644 index 00000000000000..8b0e2eb9e7d394 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/vm_clusters.go @@ -0,0 +1,44 @@ +package database + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func VmClusters() *schema.Table { + return &schema.Table{ + Name: "oracle_database_vm_clusters", + Resolver: fetchVmClusters, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&database.VmClusterSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/database/vm_clusters_fetch.go b/plugins/source/oracle/resources/services/database/vm_clusters_fetch.go new file mode 100644 index 00000000000000..d96aa91fcdaa06 --- /dev/null +++ b/plugins/source/oracle/resources/services/database/vm_clusters_fetch.go @@ -0,0 +1,38 @@ +package database + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/database" +) + +func fetchVmClusters(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := database.ListVmClustersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].DatabaseDatabaseClient.ListVmClusters(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/export_sets.go b/plugins/source/oracle/resources/services/filestorage/export_sets.go new file mode 100644 index 00000000000000..888b81de4ba971 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/export_sets.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func ExportSets() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_export_sets", + Resolver: fetchExportSets, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.ExportSetSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/export_sets_fetch.go b/plugins/source/oracle/resources/services/filestorage/export_sets_fetch.go new file mode 100644 index 00000000000000..ebf15cb7a820a5 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/export_sets_fetch.go @@ -0,0 +1,39 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchExportSets(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListExportSetsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + AvailabilityDomain: common.String(cqClient.AvailibilityDomain), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListExportSets(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/exports.go b/plugins/source/oracle/resources/services/filestorage/exports.go new file mode 100644 index 00000000000000..c5ddd38075dc24 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/exports.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func Exports() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_exports", + Resolver: fetchExports, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.ExportSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/exports_fetch.go b/plugins/source/oracle/resources/services/filestorage/exports_fetch.go new file mode 100644 index 00000000000000..2664f244be1f8f --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/exports_fetch.go @@ -0,0 +1,38 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchExports(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListExportsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListExports(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/file_systems.go b/plugins/source/oracle/resources/services/filestorage/file_systems.go new file mode 100644 index 00000000000000..5eaf4f3afff9dd --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/file_systems.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func FileSystems() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_file_systems", + Resolver: fetchFileSystems, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.FileSystemSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/file_systems_fetch.go b/plugins/source/oracle/resources/services/filestorage/file_systems_fetch.go new file mode 100644 index 00000000000000..8799befaba229e --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/file_systems_fetch.go @@ -0,0 +1,39 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchFileSystems(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListFileSystemsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + AvailabilityDomain: common.String(cqClient.AvailibilityDomain), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListFileSystems(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/mount_targets.go b/plugins/source/oracle/resources/services/filestorage/mount_targets.go new file mode 100644 index 00000000000000..bfd5a3224a5d8b --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/mount_targets.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func MountTargets() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_mount_targets", + Resolver: fetchMountTargets, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.MountTargetSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/mount_targets_fetch.go b/plugins/source/oracle/resources/services/filestorage/mount_targets_fetch.go new file mode 100644 index 00000000000000..172b2575c2ab8a --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/mount_targets_fetch.go @@ -0,0 +1,39 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchMountTargets(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListMountTargetsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + AvailabilityDomain: common.String(cqClient.AvailibilityDomain), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListMountTargets(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/replication_targets.go b/plugins/source/oracle/resources/services/filestorage/replication_targets.go new file mode 100644 index 00000000000000..022eaac1435f52 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/replication_targets.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func ReplicationTargets() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_replication_targets", + Resolver: fetchReplicationTargets, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.ReplicationTargetSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/replication_targets_fetch.go b/plugins/source/oracle/resources/services/filestorage/replication_targets_fetch.go new file mode 100644 index 00000000000000..6c266783ea9f2d --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/replication_targets_fetch.go @@ -0,0 +1,39 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchReplicationTargets(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListReplicationTargetsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + AvailabilityDomain: common.String(cqClient.AvailibilityDomain), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListReplicationTargets(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/filestorage/replications.go b/plugins/source/oracle/resources/services/filestorage/replications.go new file mode 100644 index 00000000000000..bb738ea7dbad69 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/replications.go @@ -0,0 +1,44 @@ +package filestorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func Replications() *schema.Table { + return &schema.Table{ + Name: "oracle_filestorage_replications", + Resolver: fetchReplications, + Multiplex: client.AvailibilityDomainCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&filestorage.ReplicationSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/filestorage/replications_fetch.go b/plugins/source/oracle/resources/services/filestorage/replications_fetch.go new file mode 100644 index 00000000000000..0dad11fb58b017 --- /dev/null +++ b/plugins/source/oracle/resources/services/filestorage/replications_fetch.go @@ -0,0 +1,39 @@ +package filestorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/filestorage" +) + +func fetchReplications(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := filestorage.ListReplicationsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + AvailabilityDomain: common.String(cqClient.AvailibilityDomain), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].FilestorageFilestorageClient.ListReplications(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/compartments.go b/plugins/source/oracle/resources/services/identity/compartments.go new file mode 100644 index 00000000000000..2a8391e939cb50 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/compartments.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func Compartments() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_compartments", + Resolver: fetchCompartments, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.Compartment{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/compartments_fetch.go b/plugins/source/oracle/resources/services/identity/compartments_fetch.go new file mode 100644 index 00000000000000..5f2dcda105d2f9 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/compartments_fetch.go @@ -0,0 +1,39 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchCompartments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListCompartmentsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + CompartmentIdInSubtree: common.Bool(true), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListCompartments(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/cost_tracking_tags.go b/plugins/source/oracle/resources/services/identity/cost_tracking_tags.go new file mode 100644 index 00000000000000..68a231dad04f3a --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/cost_tracking_tags.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func CostTrackingTags() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_cost_tracking_tags", + Resolver: fetchCostTrackingTags, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.Tag{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/cost_tracking_tags_fetch.go b/plugins/source/oracle/resources/services/identity/cost_tracking_tags_fetch.go new file mode 100644 index 00000000000000..840848f1ea4897 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/cost_tracking_tags_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchCostTrackingTags(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListCostTrackingTagsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListCostTrackingTags(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/domains.go b/plugins/source/oracle/resources/services/identity/domains.go new file mode 100644 index 00000000000000..1b15d4bed65885 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/domains.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func Domains() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_domains", + Resolver: fetchDomains, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.DomainSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/domains_fetch.go b/plugins/source/oracle/resources/services/identity/domains_fetch.go new file mode 100644 index 00000000000000..79c29ec15d002b --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/domains_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchDomains(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListDomainsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListDomains(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/dynamic_groups.go b/plugins/source/oracle/resources/services/identity/dynamic_groups.go new file mode 100644 index 00000000000000..27a4cbb3c78458 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/dynamic_groups.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func DynamicGroups() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_dynamic_groups", + Resolver: fetchDynamicGroups, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.DynamicGroup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/dynamic_groups_fetch.go b/plugins/source/oracle/resources/services/identity/dynamic_groups_fetch.go new file mode 100644 index 00000000000000..3c5ee62409b9a1 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/dynamic_groups_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchDynamicGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListDynamicGroupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListDynamicGroups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/groups.go b/plugins/source/oracle/resources/services/identity/groups.go new file mode 100644 index 00000000000000..247dbb46df9b50 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/groups.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func Groups() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_groups", + Resolver: fetchGroups, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.Group{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/groups_fetch.go b/plugins/source/oracle/resources/services/identity/groups_fetch.go new file mode 100644 index 00000000000000..9dbe70a2b7ac23 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/groups_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListGroupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListGroups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/iam_work_requests.go b/plugins/source/oracle/resources/services/identity/iam_work_requests.go new file mode 100644 index 00000000000000..e64cb67845294b --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/iam_work_requests.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func IamWorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_iam_work_requests", + Resolver: fetchIamWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.IamWorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/iam_work_requests_fetch.go b/plugins/source/oracle/resources/services/identity/iam_work_requests_fetch.go new file mode 100644 index 00000000000000..335e45ff9cccee --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/iam_work_requests_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchIamWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListIamWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListIamWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/network_sources.go b/plugins/source/oracle/resources/services/identity/network_sources.go new file mode 100644 index 00000000000000..24a949670a06f4 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/network_sources.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func NetworkSources() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_network_sources", + Resolver: fetchNetworkSources, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.NetworkSourcesSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/network_sources_fetch.go b/plugins/source/oracle/resources/services/identity/network_sources_fetch.go new file mode 100644 index 00000000000000..5439b916bf4697 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/network_sources_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchNetworkSources(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListNetworkSourcesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListNetworkSources(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/policies.go b/plugins/source/oracle/resources/services/identity/policies.go new file mode 100644 index 00000000000000..b184082fb4d823 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/policies.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func Policies() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_policies", + Resolver: fetchPolicies, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.Policy{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/policies_fetch.go b/plugins/source/oracle/resources/services/identity/policies_fetch.go new file mode 100644 index 00000000000000..b742729057f0fa --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/policies_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchPolicies(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListPoliciesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListPolicies(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/tag_namespaces.go b/plugins/source/oracle/resources/services/identity/tag_namespaces.go new file mode 100644 index 00000000000000..7d94a8f7ffd368 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/tag_namespaces.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func TagNamespaces() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_tag_namespaces", + Resolver: fetchTagNamespaces, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.TagNamespaceSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/tag_namespaces_fetch.go b/plugins/source/oracle/resources/services/identity/tag_namespaces_fetch.go new file mode 100644 index 00000000000000..756c8f5ff990b7 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/tag_namespaces_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchTagNamespaces(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListTagNamespacesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListTagNamespaces(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/tagging_work_requests.go b/plugins/source/oracle/resources/services/identity/tagging_work_requests.go new file mode 100644 index 00000000000000..7a28baf5898968 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/tagging_work_requests.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func TaggingWorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_tagging_work_requests", + Resolver: fetchTaggingWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.TaggingWorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/tagging_work_requests_fetch.go b/plugins/source/oracle/resources/services/identity/tagging_work_requests_fetch.go new file mode 100644 index 00000000000000..92896de192a207 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/tagging_work_requests_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchTaggingWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListTaggingWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListTaggingWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/users.go b/plugins/source/oracle/resources/services/identity/users.go new file mode 100644 index 00000000000000..712a8ab9df482b --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/users.go @@ -0,0 +1,28 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func Users() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_users", + Resolver: fetchUsers, + Multiplex: client.TenancyMultiplex, + Transform: transformers.TransformWithStruct(&identity.User{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/users_fetch.go b/plugins/source/oracle/resources/services/identity/users_fetch.go new file mode 100644 index 00000000000000..fc3292201ef58f --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/users_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchUsers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListUsersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListUsers(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/identity/work_requests.go b/plugins/source/oracle/resources/services/identity/work_requests.go new file mode 100644 index 00000000000000..a249fcdc1cdcce --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/work_requests.go @@ -0,0 +1,44 @@ +package identity + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func WorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_identity_work_requests", + Resolver: fetchWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&identity.WorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/identity/work_requests_fetch.go b/plugins/source/oracle/resources/services/identity/work_requests_fetch.go new file mode 100644 index 00000000000000..5949cc970caee7 --- /dev/null +++ b/plugins/source/oracle/resources/services/identity/work_requests_fetch.go @@ -0,0 +1,38 @@ +package identity + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/identity" +) + +func fetchWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := identity.ListWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].IdentityIdentityClient.ListWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/loadbalancer/load_balancers.go b/plugins/source/oracle/resources/services/loadbalancer/load_balancers.go new file mode 100644 index 00000000000000..4f45d9c95c733d --- /dev/null +++ b/plugins/source/oracle/resources/services/loadbalancer/load_balancers.go @@ -0,0 +1,44 @@ +package loadbalancer + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/loadbalancer" +) + +func LoadBalancers() *schema.Table { + return &schema.Table{ + Name: "oracle_loadbalancer_load_balancers", + Resolver: fetchLoadBalancers, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&loadbalancer.LoadBalancer{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/loadbalancer/load_balancers_fetch.go b/plugins/source/oracle/resources/services/loadbalancer/load_balancers_fetch.go new file mode 100644 index 00000000000000..fa3654406b42d4 --- /dev/null +++ b/plugins/source/oracle/resources/services/loadbalancer/load_balancers_fetch.go @@ -0,0 +1,38 @@ +package loadbalancer + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/loadbalancer" +) + +func fetchLoadBalancers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := loadbalancer.ListLoadBalancersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].LoadbalancerLoadbalancerClient.ListLoadBalancers(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies.go b/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies.go new file mode 100644 index 00000000000000..feadfc461c74fc --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies.go @@ -0,0 +1,44 @@ +package networkfirewall + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func NetworkFirewallPolicies() *schema.Table { + return &schema.Table{ + Name: "oracle_networkfirewall_network_firewall_policies", + Resolver: fetchNetworkFirewallPolicies, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&networkfirewall.NetworkFirewallPolicySummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies_fetch.go b/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies_fetch.go new file mode 100644 index 00000000000000..650021028cfeac --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/network_firewall_policies_fetch.go @@ -0,0 +1,38 @@ +package networkfirewall + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func fetchNetworkFirewallPolicies(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := networkfirewall.ListNetworkFirewallPoliciesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].NetworkfirewallNetworkfirewallClient.ListNetworkFirewallPolicies(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/network_firewalls.go b/plugins/source/oracle/resources/services/networkfirewall/network_firewalls.go new file mode 100644 index 00000000000000..ab6b6df0a43826 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/network_firewalls.go @@ -0,0 +1,44 @@ +package networkfirewall + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func NetworkFirewalls() *schema.Table { + return &schema.Table{ + Name: "oracle_networkfirewall_network_firewalls", + Resolver: fetchNetworkFirewalls, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&networkfirewall.NetworkFirewallSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/network_firewalls_fetch.go b/plugins/source/oracle/resources/services/networkfirewall/network_firewalls_fetch.go new file mode 100644 index 00000000000000..27cd81cbc597eb --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/network_firewalls_fetch.go @@ -0,0 +1,38 @@ +package networkfirewall + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func fetchNetworkFirewalls(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := networkfirewall.ListNetworkFirewallsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].NetworkfirewallNetworkfirewallClient.ListNetworkFirewalls(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/work_requests.go b/plugins/source/oracle/resources/services/networkfirewall/work_requests.go new file mode 100644 index 00000000000000..de5a9f8d3a25a9 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/work_requests.go @@ -0,0 +1,44 @@ +package networkfirewall + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func WorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_networkfirewall_work_requests", + Resolver: fetchWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&networkfirewall.WorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/networkfirewall/work_requests_fetch.go b/plugins/source/oracle/resources/services/networkfirewall/work_requests_fetch.go new file mode 100644 index 00000000000000..6be569d95f4fe3 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkfirewall/work_requests_fetch.go @@ -0,0 +1,38 @@ +package networkfirewall + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/networkfirewall" +) + +func fetchWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := networkfirewall.ListWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].NetworkfirewallNetworkfirewallClient.ListWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers.go b/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers.go new file mode 100644 index 00000000000000..cd96b679492ce1 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers.go @@ -0,0 +1,44 @@ +package networkloadbalancer + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/networkloadbalancer" +) + +func NetworkLoadBalancers() *schema.Table { + return &schema.Table{ + Name: "oracle_networkloadbalancer_network_load_balancers", + Resolver: fetchNetworkLoadBalancers, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&networkloadbalancer.NetworkLoadBalancerSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers_fetch.go b/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers_fetch.go new file mode 100644 index 00000000000000..7517af56c5bbb6 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkloadbalancer/network_load_balancers_fetch.go @@ -0,0 +1,38 @@ +package networkloadbalancer + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/networkloadbalancer" +) + +func fetchNetworkLoadBalancers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := networkloadbalancer.ListNetworkLoadBalancersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].NetworkloadbalancerNetworkloadbalancerClient.ListNetworkLoadBalancers(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/networkloadbalancer/work_requests.go b/plugins/source/oracle/resources/services/networkloadbalancer/work_requests.go new file mode 100644 index 00000000000000..a4133787314685 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkloadbalancer/work_requests.go @@ -0,0 +1,44 @@ +package networkloadbalancer + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/networkloadbalancer" +) + +func WorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_networkloadbalancer_work_requests", + Resolver: fetchWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&networkloadbalancer.WorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/networkloadbalancer/work_requests_fetch.go b/plugins/source/oracle/resources/services/networkloadbalancer/work_requests_fetch.go new file mode 100644 index 00000000000000..2d57cacd23ff58 --- /dev/null +++ b/plugins/source/oracle/resources/services/networkloadbalancer/work_requests_fetch.go @@ -0,0 +1,38 @@ +package networkloadbalancer + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/networkloadbalancer" +) + +func fetchWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := networkloadbalancer.ListWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].NetworkloadbalancerNetworkloadbalancerClient.ListWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/objectstorage/buckets.go b/plugins/source/oracle/resources/services/objectstorage/buckets.go new file mode 100644 index 00000000000000..e7349a96112711 --- /dev/null +++ b/plugins/source/oracle/resources/services/objectstorage/buckets.go @@ -0,0 +1,52 @@ +package objectstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/objectstorage" +) + +func Buckets() *schema.Table { + return &schema.Table{ + Name: "oracle_objectstorage_buckets", + Resolver: fetchBuckets, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&objectstorage.BucketSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "namespace", + Type: schema.TypeString, + Resolver: schema.PathResolver("Namespace"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "name", + Type: schema.TypeString, + Resolver: schema.PathResolver("Name"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/objectstorage/buckets_fetch.go b/plugins/source/oracle/resources/services/objectstorage/buckets_fetch.go new file mode 100644 index 00000000000000..482943cfce6f3f --- /dev/null +++ b/plugins/source/oracle/resources/services/objectstorage/buckets_fetch.go @@ -0,0 +1,39 @@ +package objectstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/objectstorage" +) + +func fetchBuckets(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := objectstorage.ListBucketsRequest{ + NamespaceName: common.String(cqClient.ObjectStorageNamespace), + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].ObjectstorageObjectstorageClient.ListBuckets(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/objectstorage/work_requests.go b/plugins/source/oracle/resources/services/objectstorage/work_requests.go new file mode 100644 index 00000000000000..ea726b97a4ac04 --- /dev/null +++ b/plugins/source/oracle/resources/services/objectstorage/work_requests.go @@ -0,0 +1,44 @@ +package objectstorage + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/objectstorage" +) + +func WorkRequests() *schema.Table { + return &schema.Table{ + Name: "oracle_objectstorage_work_requests", + Resolver: fetchWorkRequests, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&objectstorage.WorkRequestSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/objectstorage/work_requests_fetch.go b/plugins/source/oracle/resources/services/objectstorage/work_requests_fetch.go new file mode 100644 index 00000000000000..42940e81e6ed41 --- /dev/null +++ b/plugins/source/oracle/resources/services/objectstorage/work_requests_fetch.go @@ -0,0 +1,38 @@ +package objectstorage + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/objectstorage" +) + +func fetchWorkRequests(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := objectstorage.ListWorkRequestsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].ObjectstorageObjectstorageClient.ListWorkRequests(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges.go b/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges.go new file mode 100644 index 00000000000000..c979a21f322232 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func ByoipRanges() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_byoip_ranges", + Resolver: fetchByoipRanges, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.ByoipRangeSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges_fetch.go new file mode 100644 index 00000000000000..28ab7f9e3ae8f5 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/byoip_ranges_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchByoipRanges(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListByoipRangesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListByoipRanges(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/capture_filters.go b/plugins/source/oracle/resources/services/virtualnetwork/capture_filters.go new file mode 100644 index 00000000000000..a7fcc3c4a60c1f --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/capture_filters.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func CaptureFilters() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_capture_filters", + Resolver: fetchCaptureFilters, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.CaptureFilter{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/capture_filters_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/capture_filters_fetch.go new file mode 100644 index 00000000000000..659af16de832f3 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/capture_filters_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchCaptureFilters(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListCaptureFiltersRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListCaptureFilters(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cpes.go b/plugins/source/oracle/resources/services/virtualnetwork/cpes.go new file mode 100644 index 00000000000000..298526c4c2f054 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cpes.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Cpes() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_cpes", + Resolver: fetchCpes, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Cpe{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cpes_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/cpes_fetch.go new file mode 100644 index 00000000000000..c912fcea8bb021 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cpes_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchCpes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListCpesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListCpes(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups.go b/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups.go new file mode 100644 index 00000000000000..6c4f40f21afa53 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func CrossConnectGroups() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_cross_connect_groups", + Resolver: fetchCrossConnectGroups, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.CrossConnectGroup{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups_fetch.go new file mode 100644 index 00000000000000..33ef7e143b0f6e --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cross_connect_groups_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchCrossConnectGroups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListCrossConnectGroupsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListCrossConnectGroups(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cross_connects.go b/plugins/source/oracle/resources/services/virtualnetwork/cross_connects.go new file mode 100644 index 00000000000000..9b2e4bafbc61bb --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cross_connects.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func CrossConnects() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_cross_connects", + Resolver: fetchCrossConnects, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.CrossConnect{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/cross_connects_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/cross_connects_fetch.go new file mode 100644 index 00000000000000..c5b2e88e2e5858 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/cross_connects_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchCrossConnects(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListCrossConnectsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListCrossConnects(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options.go b/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options.go new file mode 100644 index 00000000000000..455f5a70d774b6 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func DhcpOptions() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_dhcp_options", + Resolver: fetchDhcpOptions, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.DhcpOptions{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options_fetch.go new file mode 100644 index 00000000000000..12b04a9c29b8a9 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/dhcp_options_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchDhcpOptions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListDhcpOptionsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListDhcpOptions(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments.go b/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments.go new file mode 100644 index 00000000000000..0badbdbb361364 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func DrgAttachments() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_drg_attachments", + Resolver: fetchDrgAttachments, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.DrgAttachment{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments_fetch.go new file mode 100644 index 00000000000000..4d948f502c3287 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/drg_attachments_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchDrgAttachments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListDrgAttachmentsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListDrgAttachments(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/drgs.go b/plugins/source/oracle/resources/services/virtualnetwork/drgs.go new file mode 100644 index 00000000000000..cb0e87a75faf35 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/drgs.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Drgs() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_drgs", + Resolver: fetchDrgs, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Drg{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/drgs_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/drgs_fetch.go new file mode 100644 index 00000000000000..d4b85e51e232f6 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/drgs_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchDrgs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListDrgsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListDrgs(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services.go b/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services.go new file mode 100644 index 00000000000000..e80ca71d55dd3a --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func FastConnectProviderServices() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_fast_connect_provider_services", + Resolver: fetchFastConnectProviderServices, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.FastConnectProviderService{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services_fetch.go new file mode 100644 index 00000000000000..495decd03d2b43 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/fast_connect_provider_services_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchFastConnectProviderServices(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListFastConnectProviderServicesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListFastConnectProviderServices(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways.go b/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways.go new file mode 100644 index 00000000000000..858cd6b8ff627e --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func InternetGateways() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_internet_gateways", + Resolver: fetchInternetGateways, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.InternetGateway{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways_fetch.go new file mode 100644 index 00000000000000..46726ae8d6f442 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/internet_gateways_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchInternetGateways(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListInternetGatewaysRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListInternetGateways(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections.go b/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections.go new file mode 100644 index 00000000000000..bd8c613726135b --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func IpSecConnections() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_ip_sec_connections", + Resolver: fetchIpSecConnections, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.IpSecConnection{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections_fetch.go new file mode 100644 index 00000000000000..790a0026fcb9de --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/ip_sec_connections_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchIpSecConnections(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListIPSecConnectionsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListIPSecConnections(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways.go b/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways.go new file mode 100644 index 00000000000000..001c67aad44e68 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func LocalPeeringGateways() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_local_peering_gateways", + Resolver: fetchLocalPeeringGateways, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.LocalPeeringGateway{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways_fetch.go new file mode 100644 index 00000000000000..fcd1824d661842 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/local_peering_gateways_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchLocalPeeringGateways(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListLocalPeeringGatewaysRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListLocalPeeringGateways(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways.go b/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways.go new file mode 100644 index 00000000000000..2d567c5a2a0c57 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func NatGateways() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_nat_gateways", + Resolver: fetchNatGateways, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.NatGateway{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways_fetch.go new file mode 100644 index 00000000000000..da561829b141f1 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/nat_gateways_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchNatGateways(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListNatGatewaysRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListNatGateways(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools.go b/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools.go new file mode 100644 index 00000000000000..6924a4899c547d --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func PublicIpPools() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_public_ip_pools", + Resolver: fetchPublicIpPools, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.PublicIpPoolSummary{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools_fetch.go new file mode 100644 index 00000000000000..84cea62a2bd0ac --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/public_ip_pools_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchPublicIpPools(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListPublicIpPoolsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListPublicIpPools(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections.go b/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections.go new file mode 100644 index 00000000000000..682a5ff2746cfc --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func RemotePeeringConnections() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_remote_peering_connections", + Resolver: fetchRemotePeeringConnections, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.RemotePeeringConnection{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections_fetch.go new file mode 100644 index 00000000000000..ab179ad9fbd1ca --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/remote_peering_connections_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchRemotePeeringConnections(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListRemotePeeringConnectionsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListRemotePeeringConnections(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/route_tables.go b/plugins/source/oracle/resources/services/virtualnetwork/route_tables.go new file mode 100644 index 00000000000000..cece325694b19f --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/route_tables.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func RouteTables() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_route_tables", + Resolver: fetchRouteTables, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.RouteTable{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/route_tables_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/route_tables_fetch.go new file mode 100644 index 00000000000000..546ab8a7edaa90 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/route_tables_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchRouteTables(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListRouteTablesRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListRouteTables(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/security_lists.go b/plugins/source/oracle/resources/services/virtualnetwork/security_lists.go new file mode 100644 index 00000000000000..24b36f414ba016 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/security_lists.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func SecurityLists() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_security_lists", + Resolver: fetchSecurityLists, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.SecurityList{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/security_lists_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/security_lists_fetch.go new file mode 100644 index 00000000000000..bde72eed124d2b --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/security_lists_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchSecurityLists(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListSecurityListsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListSecurityLists(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/service_gateways.go b/plugins/source/oracle/resources/services/virtualnetwork/service_gateways.go new file mode 100644 index 00000000000000..bd5fc6e768545b --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/service_gateways.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func ServiceGateways() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_service_gateways", + Resolver: fetchServiceGateways, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.ServiceGateway{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/service_gateways_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/service_gateways_fetch.go new file mode 100644 index 00000000000000..5eee7b5bdaa225 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/service_gateways_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchServiceGateways(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListServiceGatewaysRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListServiceGateways(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/subnets.go b/plugins/source/oracle/resources/services/virtualnetwork/subnets.go new file mode 100644 index 00000000000000..7ba68fbf9d4862 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/subnets.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Subnets() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_subnets", + Resolver: fetchSubnets, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Subnet{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/subnets_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/subnets_fetch.go new file mode 100644 index 00000000000000..48db29648c6335 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/subnets_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchSubnets(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListSubnetsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListSubnets(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vcns.go b/plugins/source/oracle/resources/services/virtualnetwork/vcns.go new file mode 100644 index 00000000000000..375c864add0e56 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vcns.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Vcns() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_vcns", + Resolver: fetchVcns, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Vcn{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vcns_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/vcns_fetch.go new file mode 100644 index 00000000000000..b05acf22a984ad --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vcns_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVcns(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVcnsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListVcns(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits.go b/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits.go new file mode 100644 index 00000000000000..2e8d8e3a402060 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func VirtualCircuits() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_virtual_circuits", + Resolver: fetchVirtualCircuits, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.VirtualCircuit{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits_fetch.go new file mode 100644 index 00000000000000..94bbbbf82ea147 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/virtual_circuits_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVirtualCircuits(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVirtualCircuitsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListVirtualCircuits(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vlans.go b/plugins/source/oracle/resources/services/virtualnetwork/vlans.go new file mode 100644 index 00000000000000..0c53271981c95b --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vlans.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Vlans() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_vlans", + Resolver: fetchVlans, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Vlan{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vlans_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/vlans_fetch.go new file mode 100644 index 00000000000000..41daf6b1189fa4 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vlans_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVlans(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVlansRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListVlans(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vtaps.go b/plugins/source/oracle/resources/services/virtualnetwork/vtaps.go new file mode 100644 index 00000000000000..3cfd1ebc5451c8 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vtaps.go @@ -0,0 +1,44 @@ +package virtualnetwork + +import ( + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func Vtaps() *schema.Table { + return &schema.Table{ + Name: "oracle_virtualnetwork_vtaps", + Resolver: fetchVtaps, + Multiplex: client.RegionCompartmentMultiplex, + Transform: transformers.TransformWithStruct(&core.Vtap{}, + transformers.WithTypeTransformer(client.OracleTypeTransformer)), + Columns: []schema.Column{ + { + Name: "region", + Type: schema.TypeString, + Resolver: client.ResolveOracleRegion, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "compartment_id", + Type: schema.TypeString, + Resolver: client.ResolveCompartmentId, + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("Id"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} diff --git a/plugins/source/oracle/resources/services/virtualnetwork/vtaps_fetch.go b/plugins/source/oracle/resources/services/virtualnetwork/vtaps_fetch.go new file mode 100644 index 00000000000000..c91b0af5c765e6 --- /dev/null +++ b/plugins/source/oracle/resources/services/virtualnetwork/vtaps_fetch.go @@ -0,0 +1,38 @@ +package virtualnetwork + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/oracle/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" +) + +func fetchVtaps(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cqClient := meta.(*client.Client) + + var page *string + for { + request := core.ListVtapsRequest{ + CompartmentId: common.String(cqClient.CompartmentOcid), + Page: page, + } + + response, err := cqClient.OracleClients[cqClient.Region].CoreVirtualnetworkClient.ListVtaps(ctx, request) + + if err != nil { + return err + } + + res <- response.Items + + if response.OpcNextPage == nil { + break + } + + page = response.OpcNextPage + } + + return nil +} diff --git a/plugins/source/pagerduty/client/client.go b/plugins/source/pagerduty/client/client.go index 341b054491666f..a6bf26aecf4523 100644 --- a/plugins/source/pagerduty/client/client.go +++ b/plugins/source/pagerduty/client/client.go @@ -22,7 +22,7 @@ type Client struct { logger zerolog.Logger } -func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { authToken, err := getAuthToken() if err != nil { return nil, err diff --git a/plugins/source/pagerduty/client/testing.go b/plugins/source/pagerduty/client/testing.go index 12503bf7b9c07b..0f0698266ec6c3 100644 --- a/plugins/source/pagerduty/client/testing.go +++ b/plugins/source/pagerduty/client/testing.go @@ -46,7 +46,7 @@ func PagerdutyMockTestHelper(t *testing.T, table *schema.Table, buildMockHttpCli version := "vDev" - configureTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + configureTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { pagerdutyClient := pagerduty.NewClient("test_auth_token") pagerdutyClient.HTTPClient = buildMockHttpClient() diff --git a/plugins/source/pagerduty/docs/tables/README.md b/plugins/source/pagerduty/docs/tables/README.md index eef66e6169416b..55e7332c90e2f6 100644 --- a/plugins/source/pagerduty/docs/tables/README.md +++ b/plugins/source/pagerduty/docs/tables/README.md @@ -3,14 +3,14 @@ ## Tables - [pagerduty_addons](pagerduty_addons.md) -- [pagerduty_incidents](pagerduty_incidents.md) - - [pagerduty_incident_alerts](pagerduty_incident_alerts.md) - - [pagerduty_incident_notes](pagerduty_incident_notes.md) - - [pagerduty_incident_log_entries](pagerduty_incident_log_entries.md) - [pagerduty_business_services](pagerduty_business_services.md) - [pagerduty_escalation_policies](pagerduty_escalation_policies.md) - [pagerduty_extension_schemas](pagerduty_extension_schemas.md) - [pagerduty_extensions](pagerduty_extensions.md) +- [pagerduty_incidents](pagerduty_incidents.md) + - [pagerduty_incident_alerts](pagerduty_incident_alerts.md) + - [pagerduty_incident_log_entries](pagerduty_incident_log_entries.md) + - [pagerduty_incident_notes](pagerduty_incident_notes.md) - [pagerduty_maintenance_windows](pagerduty_maintenance_windows.md) - [pagerduty_priorities](pagerduty_priorities.md) - [pagerduty_rulesets](pagerduty_rulesets.md) diff --git a/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md b/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md index 30802f6ff12dc6..c0a753966d808b 100644 --- a/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md +++ b/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md @@ -8,8 +8,8 @@ The primary key for this table is **id**. The following tables depend on pagerduty_incidents: - [pagerduty_incident_alerts](pagerduty_incident_alerts.md) - - [pagerduty_incident_notes](pagerduty_incident_notes.md) - [pagerduty_incident_log_entries](pagerduty_incident_log_entries.md) + - [pagerduty_incident_notes](pagerduty_incident_notes.md) ## Columns diff --git a/plugins/source/pagerduty/go.mod b/plugins/source/pagerduty/go.mod index fe291f2e4724f5..4ea0c34308aa16 100644 --- a/plugins/source/pagerduty/go.mod +++ b/plugins/source/pagerduty/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/PagerDuty/go-pagerduty v1.6.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 gopkg.in/yaml.v3 v3.0.1 diff --git a/plugins/source/pagerduty/go.sum b/plugins/source/pagerduty/go.sum index 55772e80b52e72..5d118fa0267adf 100644 --- a/plugins/source/pagerduty/go.sum +++ b/plugins/source/pagerduty/go.sum @@ -44,8 +44,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/salesforce/CHANGELOG.md b/plugins/source/salesforce/CHANGELOG.md index 20a8d841b9276a..2733870d36ba37 100644 --- a/plugins/source/salesforce/CHANGELOG.md +++ b/plugins/source/salesforce/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-source-salesforce-v1.0.1...plugins-source-salesforce-v1.0.2) (2023-01-10) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [1.0.1](https://github.com/cloudquery/cloudquery/compare/plugins-source-salesforce-v1.0.0...plugins-source-salesforce-v1.0.1) (2023-01-03) diff --git a/plugins/source/salesforce/client/client.go b/plugins/source/salesforce/client/client.go index 4806e701f8b6d8..5b5b35aed1209b 100644 --- a/plugins/source/salesforce/client/client.go +++ b/plugins/source/salesforce/client/client.go @@ -55,7 +55,7 @@ type ListObjectsResponse struct { Sobject []Sobject `json:"sobjects"` } -func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { cqClient := Client{ logger: logger, } diff --git a/plugins/source/salesforce/client/testing.go b/plugins/source/salesforce/client/testing.go index b827bbd04f42c4..6e6cb4c6e5c915 100644 --- a/plugins/source/salesforce/client/testing.go +++ b/plugins/source/salesforce/client/testing.go @@ -27,7 +27,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. h := httptest.NewServer(router) defer h.Close() - configureTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + configureTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createServices(router) if err != nil { return nil, err diff --git a/plugins/source/salesforce/go.mod b/plugins/source/salesforce/go.mod index a38a4512976aa4..d86527d618cc8b 100644 --- a/plugins/source/salesforce/go.mod +++ b/plugins/source/salesforce/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/salesforce go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gorilla/mux v1.8.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/source/salesforce/go.sum b/plugins/source/salesforce/go.sum index cce7dfdcbaab29..9f4259861e7ed1 100644 --- a/plugins/source/salesforce/go.sum +++ b/plugins/source/salesforce/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -203,6 +203,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/source/shopify/client/client.go b/plugins/source/shopify/client/client.go index 89c14c8e755ff4..a9731252fe7dc6 100644 --- a/plugins/source/shopify/client/client.go +++ b/plugins/source/shopify/client/client.go @@ -40,7 +40,7 @@ func (c *Client) ID() string { return c.sourceSpec.Name } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { spSpec := &Spec{} if err := s.UnmarshalSpec(spSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal shopify spec: %w", err) diff --git a/plugins/source/shopify/client/testing.go b/plugins/source/shopify/client/testing.go index 68fd0cf0a2d1a7..deda2414284619 100644 --- a/plugins/source/shopify/client/testing.go +++ b/plugins/source/shopify/client/testing.go @@ -72,7 +72,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var spSpec Spec if err := spec.UnmarshalSpec(&spSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal shopify spec: %w", err) diff --git a/plugins/source/shopify/docs/tables/README.md b/plugins/source/shopify/docs/tables/README.md index 30201b1d8148ea..90f49ef7b93ebb 100644 --- a/plugins/source/shopify/docs/tables/README.md +++ b/plugins/source/shopify/docs/tables/README.md @@ -2,11 +2,11 @@ ## Tables +- [shopify_abandoned_checkouts](shopify_abandoned_checkouts.md) - [shopify_customers](shopify_customers.md) - [shopify_orders](shopify_orders.md) -- [shopify_products](shopify_products.md) - - [shopify_product_variants](shopify_product_variants.md) - - [shopify_product_images](shopify_product_images.md) - [shopify_price_rules](shopify_price_rules.md) - [shopify_price_rule_discount_codes](shopify_price_rule_discount_codes.md) -- [shopify_abandoned_checkouts](shopify_abandoned_checkouts.md) \ No newline at end of file +- [shopify_products](shopify_products.md) + - [shopify_product_images](shopify_product_images.md) + - [shopify_product_variants](shopify_product_variants.md) \ No newline at end of file diff --git a/plugins/source/shopify/docs/tables/shopify_products.md b/plugins/source/shopify/docs/tables/shopify_products.md index f381746e2cd966..4894f78c142e7e 100644 --- a/plugins/source/shopify/docs/tables/shopify_products.md +++ b/plugins/source/shopify/docs/tables/shopify_products.md @@ -5,8 +5,8 @@ The primary key for this table is **id**. ## Relations The following tables depend on shopify_products: - - [shopify_product_variants](shopify_product_variants.md) - [shopify_product_images](shopify_product_images.md) + - [shopify_product_variants](shopify_product_variants.md) ## Columns diff --git a/plugins/source/shopify/go.mod b/plugins/source/shopify/go.mod index 7a95bd603a789f..2373b040fb051f 100644 --- a/plugins/source/shopify/go.mod +++ b/plugins/source/shopify/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/shopify go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gorilla/mux v1.8.0 github.com/rs/zerolog v1.28.0 golang.org/x/time v0.3.0 diff --git a/plugins/source/shopify/go.sum b/plugins/source/shopify/go.sum index febe033b98a4f4..683ec9f19abdad 100644 --- a/plugins/source/shopify/go.sum +++ b/plugins/source/shopify/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/slack/CHANGELOG.md b/plugins/source/slack/CHANGELOG.md index 7115820e1a2fd3..f5fd49073ead31 100644 --- a/plugins/source/slack/CHANGELOG.md +++ b/plugins/source/slack/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-slack-v1.0.2...plugins-source-slack-v1.1.0) (2023-01-10) + + +### Features + +* **slack:** Migrate codegen to transformations ([#6471](https://github.com/cloudquery/cloudquery/issues/6471)) ([5fb3f72](https://github.com/cloudquery/cloudquery/commit/5fb3f7218826378d9ee725e5f6339d5f5c385401)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [1.0.2](https://github.com/cloudquery/cloudquery/compare/plugins-source-slack-v1.0.1...plugins-source-slack-v1.0.2) (2023-01-03) diff --git a/plugins/source/slack/client/client.go b/plugins/source/slack/client/client.go index 0c00400a6124ec..84459945b9e019 100644 --- a/plugins/source/slack/client/client.go +++ b/plugins/source/slack/client/client.go @@ -50,7 +50,7 @@ func (c *Client) withTeamID(teamID string) schema.ClientMeta { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { var config Spec err := s.UnmarshalSpec(&config) if err != nil { diff --git a/plugins/source/slack/client/testing.go b/plugins/source/slack/client/testing.go index af9304c648e42e..59bd4536756694 100644 --- a/plugins/source/slack/client/testing.go +++ b/plugins/source/slack/client/testing.go @@ -25,7 +25,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, l := zerolog.New(zerolog.NewTestWriter(t)).Output( zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { return &Client{ logger: l, Slack: builder(t, ctrl), diff --git a/plugins/source/slack/go.mod b/plugins/source/slack/go.mod index be52c01f443125..1ff15ce9c09355 100644 --- a/plugins/source/slack/go.mod +++ b/plugins/source/slack/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/slack go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/rs/zerolog v1.28.0 github.com/slack-go/slack v0.12.1 diff --git a/plugins/source/slack/go.sum b/plugins/source/slack/go.sum index 7087514d9456ec..d50834a970c1ee 100644 --- a/plugins/source/slack/go.sum +++ b/plugins/source/slack/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/snyk/client/client.go b/plugins/source/snyk/client/client.go index c90bafa8594087..603dc4c84859e6 100644 --- a/plugins/source/snyk/client/client.go +++ b/plugins/source/snyk/client/client.go @@ -30,7 +30,7 @@ func (c *Client) Logger() *zerolog.Logger { return &c.logger } -func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { snykSpec := new(Spec) err := spec.UnmarshalSpec(snykSpec) if err != nil { diff --git a/plugins/source/snyk/client/testing.go b/plugins/source/snyk/client/testing.go index d37b7ef4db170f..a8a2710dfde278 100644 --- a/plugins/source/snyk/client/testing.go +++ b/plugins/source/snyk/client/testing.go @@ -24,7 +24,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createService func(*httpr ts := httptest.NewUnstartedServer(mux) defer ts.Close() - newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, _ specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, _ specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createService(mux) if err != nil { return nil, fmt.Errorf("failed to createService: %w", err) diff --git a/plugins/source/snyk/go.mod b/plugins/source/snyk/go.mod index 405c41e75da82a..cc76ec4e800d53 100644 --- a/plugins/source/snyk/go.mod +++ b/plugins/source/snyk/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/snyk go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/google/uuid v1.3.0 github.com/julienschmidt/httprouter v1.3.0 github.com/pavel-snyk/snyk-sdk-go v0.4.1 diff --git a/plugins/source/snyk/go.sum b/plugins/source/snyk/go.sum index cda9adc2bfb34b..2433fbbe9d44d7 100644 --- a/plugins/source/snyk/go.sum +++ b/plugins/source/snyk/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cloudquery/snyk-sdk-go v0.1.0 h1:lJ/3EhLwUAdcR/sukSA+EzAnRE1jRRxm8ewLESCNW5Q= github.com/cloudquery/snyk-sdk-go v0.1.0/go.mod h1:LRL1TRuuM925gnyGp54WtS9p8S4yJMd0oS4JpLg+n7Y= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= diff --git a/plugins/source/stripe/.gitignore b/plugins/source/stripe/.gitignore new file mode 100644 index 00000000000000..7b36aeeeeddfc7 --- /dev/null +++ b/plugins/source/stripe/.gitignore @@ -0,0 +1,3 @@ +stripe +/resources/testdata/*.json +.cq diff --git a/plugins/source/stripe/.goreleaser.yaml b/plugins/source/stripe/.goreleaser.yaml new file mode 100644 index 00000000000000..546ab511214635 --- /dev/null +++ b/plugins/source/stripe/.goreleaser.yaml @@ -0,0 +1,14 @@ +variables: + component: source/stripe + binary: stripe + +project_name: plugins/source/stripe + +monorepo: + tag_prefix: plugins-source-stripe- + dir: plugins/source/stripe + +includes: + - from_file: + # Relative to the directory Go Releaser is run from (which is the root of the repository) + path: ./plugins/.goreleaser.yaml \ No newline at end of file diff --git a/plugins/source/stripe/Makefile b/plugins/source/stripe/Makefile new file mode 100644 index 00000000000000..fb06f49b89ba28 --- /dev/null +++ b/plugins/source/stripe/Makefile @@ -0,0 +1,28 @@ +# Test unit +.PHONY: test +test: gen-fixtures + wget -nc https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json -P ./resources/testdata + go test -race -timeout 3m ./... + +.PHONY: gen-docs +gen-docs: + rm -rf ./docs/tables/* + go run main.go doc ./docs/tables + sed 's_(\(.*\))_(https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/\1)_' docs/tables/README.md > ../../../website/pages/docs/plugins/sources/stripe/tables.md + +.PHONY: lint +lint: + golangci-lint run --config ../../.golangci.yml + +.PHONY: gen-fixtures +gen-fixtures: + rm -vf ./resources/testdata/fixtures_gen.json + go run codegen/fixtures/main.go + +.PHONY: gen-code +gen-code: + go run codegen/main.go + +# All gen targets +.PHONY: gen +gen: gen-fixtures gen-docs diff --git a/plugins/source/stripe/README.md b/plugins/source/stripe/README.md new file mode 100644 index 00000000000000..bc6c948f3fd8a5 --- /dev/null +++ b/plugins/source/stripe/README.md @@ -0,0 +1,7 @@ +# Stripe Plugin + +The CloudQuery Stripe plugin pulls data out of Stripe and loads it into any supported CloudQuery destination (e.g. PostgreSQL). + +## Links + +- [User Guide](https://docs.cloudquery.io/docs/plugins/sources/stripe/overview) diff --git a/plugins/source/stripe/client/client.go b/plugins/source/stripe/client/client.go new file mode 100644 index 00000000000000..289a8196898097 --- /dev/null +++ b/plugins/source/stripe/client/client.go @@ -0,0 +1,114 @@ +package client + +import ( + "context" + "errors" + "fmt" + "net/http" + "strings" + "time" + + "github.com/cloudquery/plugin-sdk/backend" + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/rs/zerolog" + "github.com/stripe/stripe-go/v74" + "github.com/stripe/stripe-go/v74/client" + "golang.org/x/time/rate" +) + +type Client struct { + logger zerolog.Logger + sourceSpec specs.Source + stSpec Spec + + Services *client.API + Backend backend.Backend +} + +func New(logger zerolog.Logger, sourceSpec specs.Source, stSpec Spec, services *client.API, bk backend.Backend) *Client { + return &Client{ + logger: logger, + sourceSpec: sourceSpec, + stSpec: stSpec, + Services: services, + Backend: bk, + } +} + +func (c *Client) Logger() *zerolog.Logger { + return &c.logger +} + +func (c *Client) ID() string { + return c.sourceSpec.Name +} + +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, opts source.Options) (schema.ClientMeta, error) { + stSpec := &Spec{} + if err := s.UnmarshalSpec(stSpec); err != nil { + return nil, fmt.Errorf("failed to unmarshal stripe spec: %w", err) + } + + services, err := getServiceClient(logger, stSpec) + if err != nil { + return nil, err + } + + if err := validateAccess(services); err != nil { + return nil, err + } + + cl := New(logger, s, *stSpec, services, opts.Backend) + return cl, nil +} + +func getServiceClient(logger zerolog.Logger, spec *Spec) (*client.API, error) { + if spec.APIKey == "" { + return nil, errors.New("no api_key provided") + } + + if !spec.StripeDebug { + logger = logger.Level(zerolog.WarnLevel) + } + + sCfg := &stripe.BackendConfig{ + LeveledLogger: &LeveledLogger{ + Logger: logger.With().Str("source", "stripe-client").Logger(), + }, + } + if spec.MaxRetries > 0 { + sCfg.MaxNetworkRetries = stripe.Int64(spec.MaxRetries) + } + + if spec.RateLimit < 1 { + // https://stripe.com/docs/rate-limits + if strings.HasPrefix(spec.APIKey, "sk_live") { + spec.RateLimit = 90 + } else { + spec.RateLimit = 20 + } + } + + sCfg.HTTPClient = RatelimitedHttpClient(logger, + &http.Client{Timeout: 80 * time.Second}, // default from stripe-go + rate.NewLimiter(rate.Limit(spec.RateLimit), int(spec.RateLimit)), + ) + + c := &client.API{} + c.Init(spec.APIKey, &stripe.Backends{ + API: stripe.GetBackendWithConfig(stripe.APIBackend, sCfg), + Connect: stripe.GetBackendWithConfig(stripe.ConnectBackend, sCfg), + Uploads: stripe.GetBackendWithConfig(stripe.UploadsBackend, sCfg), + }) + return c, nil +} + +func validateAccess(svc *client.API) error { + _, err := svc.Accounts.Get() + if err != nil { + return err + } + return nil +} diff --git a/plugins/source/stripe/client/helpers.go b/plugins/source/stripe/client/helpers.go new file mode 100644 index 00000000000000..e99d978bc53409 --- /dev/null +++ b/plugins/source/stripe/client/helpers.go @@ -0,0 +1,31 @@ +package client + +import ( + "reflect" + + "github.com/cloudquery/plugin-sdk/transformers" +) + +func CreateIgnoreInTestsTransformer(fieldNames ...string) transformers.IgnoreInTestsTransformer { + return func(field reflect.StructField) bool { + for _, v := range fieldNames { + if field.Name == v { + return true + } + } + return false + } +} + +func MaxInt64(a, b *int64) *int64 { + if a == nil { + return b + } + if b == nil { + return a + } + if *a > *b { + return a + } + return b +} diff --git a/plugins/source/stripe/client/log.go b/plugins/source/stripe/client/log.go new file mode 100644 index 00000000000000..5c1602f2f50668 --- /dev/null +++ b/plugins/source/stripe/client/log.go @@ -0,0 +1,23 @@ +package client + +import "github.com/rs/zerolog" + +type LeveledLogger struct { + zerolog.Logger +} + +func (l *LeveledLogger) Debugf(format string, args ...any) { + l.Logger.Debug().Msgf(format, args...) +} + +func (l *LeveledLogger) Infof(format string, args ...any) { + l.Logger.Info().Msgf(format, args...) +} + +func (l *LeveledLogger) Warnf(format string, args ...any) { + l.Logger.Warn().Msgf(format, args...) +} + +func (l *LeveledLogger) Errorf(format string, args ...any) { + l.Logger.Error().Msgf(format, args...) +} diff --git a/plugins/source/stripe/client/ratelimitedhttpclient.go b/plugins/source/stripe/client/ratelimitedhttpclient.go new file mode 100644 index 00000000000000..0890525fbd2a21 --- /dev/null +++ b/plugins/source/stripe/client/ratelimitedhttpclient.go @@ -0,0 +1,43 @@ +package client + +import ( + "net/http" + + "github.com/rs/zerolog" + "golang.org/x/time/rate" +) + +func RatelimitedHttpClient(logger zerolog.Logger, hc *http.Client, limiter *rate.Limiter) *http.Client { + c := *hc + c.Transport = newLimitedTransport(logger, hc.Transport, limiter) + return &c +} + +type limitedTransport struct { + logger zerolog.Logger + wrappedRT http.RoundTripper + limiter *rate.Limiter +} + +func newLimitedTransport(logger zerolog.Logger, t http.RoundTripper, limiter *rate.Limiter) http.RoundTripper { + if t == nil { + t = http.DefaultTransport + } + return &limitedTransport{ + logger: logger, + wrappedRT: t, + limiter: limiter, + } +} + +func (t *limitedTransport) RoundTrip(r *http.Request) (*http.Response, error) { + if !t.limiter.Allow() { + t.logger.Debug().Msg("waiting for rate limiter...") + err := t.limiter.Wait(r.Context()) + if err != nil { + return nil, err + } + } + + return t.wrappedRT.RoundTrip(r) +} diff --git a/plugins/source/stripe/client/spec.go b/plugins/source/stripe/client/spec.go new file mode 100644 index 00000000000000..08be998bcfe968 --- /dev/null +++ b/plugins/source/stripe/client/spec.go @@ -0,0 +1,9 @@ +package client + +type Spec struct { + APIKey string `json:"api_key"` + + MaxRetries int64 `json:"max_retries"` + RateLimit int64 `json:"rate_limit"` + StripeDebug bool `json:"stripe_debug"` +} diff --git a/plugins/source/stripe/client/testing.go b/plugins/source/stripe/client/testing.go new file mode 100644 index 00000000000000..f59cd757c939ad --- /dev/null +++ b/plugins/source/stripe/client/testing.go @@ -0,0 +1,140 @@ +package client + +import ( + "context" + "fmt" + "net" + "net/http" + "os" + "path/filepath" + "runtime" + "testing" + "time" + + "github.com/cloudquery/plugin-sdk/backend" + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/rs/zerolog" + "github.com/stripe/stripe-go/v74" + sclient "github.com/stripe/stripe-go/v74/client" + "github.com/stripe/stripe-mock/server" +) + +type TestOptions struct { + Backend backend.Backend +} + +func MockTestHelper(t *testing.T, table *schema.Table, opts TestOptions) { + version := "vDev" + + t.Helper() + table.IgnoreInTests = false + + logger := zerolog.New(zerolog.NewTestWriter(t)).Output( + zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, + ).Level(zerolog.DebugLevel).With().Timestamp().Logger() + + addr, teardown, err := startMockServer() + if err != nil { + t.Fatalf("startMockServer: %v", err) + } + defer func() { + if err := teardown(); err != nil { + t.Logf("Teardown error: %v", err) + } + }() + + newTestExecutionClient := func(ctx context.Context, logger zerolog.Logger, spec specs.Source, opts source.Options) (schema.ClientMeta, error) { + var stSpec Spec + if err := spec.UnmarshalSpec(&stSpec); err != nil { + return nil, fmt.Errorf("failed to unmarshal stripe spec: %w", err) + } + + cl := sclient.New("sk_test_myTestKey", getBackends(logger, *addr)) + return New(logger, spec, stSpec, cl, opts.Backend), nil + } + + p := source.NewPlugin( + table.Name, + version, + []*schema.Table{ + table, + }, + newTestExecutionClient, + ) + p.SetLogger(logger) + source.TestPluginSync(t, p, specs.Source{ + Name: "dev", + Path: "cloudquery/dev", + Version: version, + Tables: []string{table.Name}, + Destinations: []string{"mock-destination"}, + }) +} + +func startMockServer() (*string, func() error, error) { + _, filename, _, ok := runtime.Caller(0) + if !ok { + return nil, nil, fmt.Errorf("failed to get current file") + } + + stripeSpec, err := server.LoadSpec(nil, filepath.Join(filepath.Dir(filename), "..", "resources", "testdata", "spec3.json")) + if err != nil { + return nil, nil, err + } + fixtures, err := server.LoadFixtures(nil, filepath.Join(filepath.Dir(filename), "..", "resources", "testdata", "fixtures_gen.json")) + if err != nil { + return nil, nil, err + } + + // This is mostly copied from the stripe-mock's main function at https://github.com/stripe/stripe-mock/blob/master/main.go + stub, err := server.NewStubServer(fixtures, stripeSpec, false, false) + if err != nil { + return nil, nil, fmt.Errorf("Error initializing router: %w", err) + } + + httpMux := http.NewServeMux() + httpMux.HandleFunc("/", stub.HandleRequest) + + // Deduplicates doubled slashes in paths. e.g. `//v1/charges` becomes `/v1/charges`. + handler := &server.DoubleSlashFixHandler{Mux: httpMux} + + listener, err := net.Listen("tcp", "localhost:0") // auto-choose port + if err != nil { + return nil, nil, fmt.Errorf("net.Listen: %w", err) + } + + fmt.Printf("Listening for TCP at address: %v\n", listener.Addr()) + + srv := &http.Server{ + Handler: handler, + } + go func() { + err := srv.Serve(listener) + if err != nil && err != http.ErrServerClosed { + panic(err.Error()) + } + }() + + addr := listener.Addr().String() + return &addr, func() error { + return srv.Shutdown(context.Background()) + }, nil +} + +func getBackends(logger zerolog.Logger, addr string) *stripe.Backends { + // This is mostly copied from stripe-go's testing package at https://github.com/stripe/stripe-go/blob/master/testing/testing.go + // Since the code is inside init() it can't be used directly without multiple headaches, and even if we do that we can't force it to run HTTP only. + stripeMockBackend := stripe.GetBackendWithConfig( + stripe.APIBackend, + &stripe.BackendConfig{ + URL: stripe.String("http://" + addr), + LeveledLogger: &LeveledLogger{Logger: logger}, + }, + ) + backends := stripe.NewBackends(nil) + backends.API = stripeMockBackend + backends.Uploads = stripeMockBackend + return backends +} diff --git a/plugins/source/stripe/client/transformers.go b/plugins/source/stripe/client/transformers.go new file mode 100644 index 00000000000000..b7244ad1a88f47 --- /dev/null +++ b/plugins/source/stripe/client/transformers.go @@ -0,0 +1,22 @@ +package client + +import ( + "reflect" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" +) + +func SharedTransformers(others ...transformers.StructTransformerOption) []transformers.StructTransformerOption { + return append([]transformers.StructTransformerOption{ + transformers.WithTypeTransformer(typeTransformer), + }, others...) +} + +func typeTransformer(field reflect.StructField) (schema.ValueType, error) { + if field.Name == "Created" && field.Type == reflect.TypeOf(int64(0)) { + return schema.TypeTimestamp, nil + } + + return schema.TypeInvalid, nil +} diff --git a/plugins/source/stripe/codegen/fixtures/main.go b/plugins/source/stripe/codegen/fixtures/main.go new file mode 100644 index 00000000000000..1427efac8bb287 --- /dev/null +++ b/plugins/source/stripe/codegen/fixtures/main.go @@ -0,0 +1,166 @@ +package main + +import ( + "encoding/json" + "fmt" + "log" + "os" + "path" + "reflect" + "runtime" + "strings" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/codegen/recipes" + "github.com/cloudquery/plugin-sdk/caser" + "github.com/cloudquery/plugin-sdk/faker" + "github.com/stripe/stripe-go/v74" +) + +var dataStructs map[string]any // pkgPath vs. struct + +func main() { + extras := []any{ + &stripe.BankAccount{}, + &stripe.CreditNoteLineItem{}, + &stripe.LineItem{}, + &stripe.SubscriptionItem{}, + &stripe.TaxID{}, + &stripe.TransferReversal{}, + } + + renames := map[string]string{ + "invoice_item": "invoiceitem", + } + + prefixReplaces := map[string]string{ + "billing_portal_": "billing_portal.", + "checkout_": "checkout.", + "identity_": "identity.", + "issuing_": "issuing.", + "radar_": "radar.", + "reporting_": "reporting.", + "sigma_": "", + "terminal_": "terminal.", + "treasury_": "treasury.", + } + + copies := map[string]string{ + "line_item": "item", + } + + _, filename, _, ok := runtime.Caller(0) + if !ok { + log.Fatal("Failed to get caller information") + } + testdataDir := path.Join(path.Dir(filename), "..", "..", "resources", "testdata") + + fixture := struct { + Resources map[string]any `json:"resources"` + }{ + Resources: make(map[string]any), + } + + dataStructs = make(map[string]any) + + if err := traverseRecipes(recipes.AllResources); err != nil { + log.Fatal("traversing recipes: ", err) + } + for _, extra := range extras { + if err := traverseStructs(extra, "", 0); err != nil { + log.Fatal("traversing extras: ", err) + } + } + + csr := caser.New() + for _, ds := range dataStructs { + ds := ds + if err := faker.FakeObject(&ds, faker.WithMaxDepth(6)); err != nil { + log.Fatal(err) + } + + typ := reflect.TypeOf(ds) + for typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + + keyName := csr.ToSnake(typ.Name()) + if n := renames[keyName]; n != "" { + keyName = n + } else { + for k, v := range prefixReplaces { + if strings.HasPrefix(keyName, k) { + keyName = v + keyName[len(k):] + break + } + } + } + + if c, ok := copies[keyName]; ok { + fixture.Resources[c] = ds + } + + fixture.Resources[keyName] = ds + } + + b, _ := json.MarshalIndent(fixture, "", " ") + + fn := path.Join(testdataDir, "fixtures_gen.json") + log.Println("Writing", fn) + if err := os.WriteFile(fn, b, 0644); err != nil { + log.Fatal(err) + } +} + +func traverseRecipes(rr []*recipes.Resource) error { + for _, r := range rr { + if err := traverseStructs(r.DataStruct, "", 0); err != nil { + return err + } + if err := traverseRecipes(r.Children); err != nil { + return err + } + } + return nil +} + +func traverseStructs(ds any, allowedPath string, depth int) error { + if depth > 16 { + return nil + } + typ := reflect.TypeOf(ds) + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + if typ.Kind() != reflect.Struct { + return nil + } + + if allowedPath == "" { + allowedPath = typ.PkgPath() + } else { + if typ.PkgPath() != allowedPath { + return nil + } + } + + mapKey := typ.PkgPath() + "." + typ.Name() + + if _, ok := dataStructs[mapKey]; ok { + if depth == 0 { + return fmt.Errorf("duplicate struct %s", mapKey) + } + + return nil + } + + dataStructs[mapKey] = ds + + for i := 0; i < typ.NumField(); i++ { + f := typ.Field(i) + if err := traverseStructs(reflect.New(f.Type).Interface(), allowedPath, depth+1); err != nil { + return err + } + } + + return nil +} diff --git a/plugins/source/stripe/codegen/main.go b/plugins/source/stripe/codegen/main.go new file mode 100644 index 00000000000000..cb511137e43a9d --- /dev/null +++ b/plugins/source/stripe/codegen/main.go @@ -0,0 +1,138 @@ +package main + +import ( + "bytes" + "embed" + "fmt" + "go/format" + "log" + "os" + "path" + "runtime" + "strconv" + "text/template" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/codegen/recipes" + "github.com/cloudquery/plugin-sdk/caser" + "github.com/gertd/go-pluralize" +) + +//go:embed templates/*.go.tpl +var templatesFS embed.FS + +func main() { + _, filename, _, ok := runtime.Caller(0) + if !ok { + log.Fatal("Failed to get caller information") + } + servicesDir := path.Join(path.Dir(filename), "..", "resources", "services") + + for _, r := range recipes.AllResources { + r.Infer(nil) + } + + generateResources(servicesDir, recipes.AllResources) + + if err := generateTables(servicesDir, recipes.AllResources); err != nil { + log.Fatal(err) + } +} + +func generateResources(servicesDir string, rr []*recipes.Resource) { + for _, r := range rr { + generateResource(servicesDir, *r) + generateResources(servicesDir, r.Children) + } +} + +func generateResource(servicesDir string, r recipes.Resource) { + log.Println("Generating table", r.TableName) + + csr := caser.New() + pl := pluralize.NewClient() + + templates := []string{ + r.FetchTemplate + ".go.tpl", + } + if !r.SkipMocks { + templates = append(templates, "resource_test.go.tpl") + } + for idx, templateName := range templates { + generatingMocks := idx == 1 + + tpl, err := template.New(templateName).Funcs(template.FuncMap{ + "ToSnake": csr.ToSnake, + "ToPascal": csr.ToPascal, + "Pluralize": pl.Plural, + "Singularize": pl.Singular, + "QuoteJoin": func(s []string) string { + var buf bytes.Buffer + for i, v := range s { + buf.WriteString(strconv.Quote(v)) + if i != len(s)-1 { + buf.WriteString(", ") + } + } + return buf.String() + }, + }).ParseFS(templatesFS, "templates/"+templateName) + + if err != nil { + log.Fatal(fmt.Errorf("failed to parse templates: %w", err)) + } + + var buff bytes.Buffer + if err := tpl.Execute(&buff, r); err != nil { + log.Fatal(fmt.Errorf("failed to execute template: %w", err)) + } + + pkgPath := path.Join(servicesDir, r.Service) + if err := os.Mkdir(pkgPath, 0755); err != nil && !os.IsExist(err) { + log.Fatal(err) + } + + var filePath string + if generatingMocks { + filePath = path.Join(pkgPath, r.TableName+"_test.go") + } else { + filePath = path.Join(pkgPath, r.TableName+".go") + } + content, err := format.Source(buff.Bytes()) + if err != nil { + fmt.Println(buff.String()) + log.Fatal(fmt.Errorf("failed to format code for %s: %w", filePath, err)) + } + if err := os.WriteFile(filePath, content, 0644); err != nil { + log.Fatal(fmt.Errorf("failed to write file %s: %w", filePath, err)) + } + } +} + +func generateTables(servicesDir string, rr []*recipes.Resource) error { + csr := caser.New() + pl := pluralize.NewClient() + + tpl, err := template.New("tables.go.tpl").Funcs(template.FuncMap{ + "ToPascal": csr.ToPascal, + "Pluralize": pl.Plural, + "Singularize": pl.Singular, + }).ParseFS(templatesFS, "templates/tables.go.tpl") + + var buff bytes.Buffer + if err := tpl.Execute(&buff, rr); err != nil { + return fmt.Errorf("failed to execute tables template: %w", err) + } + + filePath := path.Join(servicesDir, "../plugin/tables.go") + content := buff.Bytes() + formattedContent, err := format.Source(buff.Bytes()) + if err != nil { + fmt.Printf("failed to format code for %s: %v\n", filePath, err) + } else { + content = formattedContent + } + if err := os.WriteFile(filePath, content, 0644); err != nil { + return fmt.Errorf("failed to write file %s: %w", filePath, err) + } + return nil +} diff --git a/plugins/source/stripe/codegen/recipes/all.go b/plugins/source/stripe/codegen/recipes/all.go new file mode 100644 index 00000000000000..0f0195e1be25bf --- /dev/null +++ b/plugins/source/stripe/codegen/recipes/all.go @@ -0,0 +1,282 @@ +package recipes + +import "github.com/stripe/stripe-go/v74" + +const createdStateParam = "Created" + +var AllResources = []*Resource{ + { + DataStruct: &stripe.Account{}, + StateParamName: createdStateParam, + Children: []*Resource{ + { + DataStruct: &stripe.Capability{}, + ListParams: `Account: stripe.String(p.ID),`, + }, + }, + }, + { + DataStruct: &stripe.ApplePayDomain{}, + }, + { + DataStruct: &stripe.ApplicationFee{}, + StateParamName: createdStateParam, + Children: []*Resource{ + { + DataStruct: &stripe.FeeRefund{}, + ListParams: `ID: stripe.String(p.ID),`, + }, + }, + }, + { + DataStruct: &stripe.Balance{}, + Single: true, + Service: "balance", + }, + { + DataStruct: &stripe.BalanceTransaction{}, + Service: "balance", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.BillingPortalConfiguration{}, + Service: "billing_portal", + }, + { + DataStruct: &stripe.Charge{}, + IgnoreInTests: []string{"Destination", "Dispute", "Level3", "Source"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.CheckoutSession{}, + Service: "checkout", + }, + { + DataStruct: &stripe.CountrySpec{}, + }, + { + DataStruct: &stripe.Coupon{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.CreditNote{}, + }, + { + DataStruct: &stripe.Customer{}, + IgnoreInTests: []string{"DefaultSource"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Dispute{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Event{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.FileLink{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.File{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.IdentityVerificationReport{}, + Service: "identity", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Invoice{}, + IgnoreInTests: []string{"DefaultSource"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.InvoiceItem{}, + Service: "invoices", + Description: "https://stripe.com/docs/api/invoiceitems", + IgnoreInTests: []string{"Plan"}, + }, + { + DataStruct: &stripe.IssuingAuthorization{}, + Service: "issuing", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.IssuingCardholder{}, + Service: "issuing", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.IssuingCard{}, + Service: "issuing", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.IssuingDispute{}, + Service: "issuing", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.IssuingTransaction{}, + Service: "issuing", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.PaymentIntent{}, + Service: "payment", + IgnoreInTests: []string{"Source"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.PaymentLink{}, + Service: "payment", + }, + { + DataStruct: &stripe.PaymentMethod{}, + Service: "payment", + }, + { + DataStruct: &stripe.Payout{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Plan{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Price{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Product{}, + IgnoreInTests: []string{"Attributes", "DeactivateOn"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.PromotionCode{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Quote{}, + }, + { + DataStruct: &stripe.RadarEarlyFraudWarning{}, + Service: "radar", + }, + { + DataStruct: &stripe.Refund{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.ReportingReportRun{}, + Service: "reporting", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.ReportingReportType{}, + Service: "reporting", + }, + { + DataStruct: &stripe.Review{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.ShippingRate{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.SigmaScheduledQueryRun{}, + Service: "sigma", + }, + { + DataStruct: &stripe.Subscription{}, + Service: "subscription", + IgnoreInTests: []string{"DefaultSource"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.SubscriptionSchedule{}, + Service: "subscription", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.TaxCode{}, + Service: "tax", + }, + { + DataStruct: &stripe.TaxRate{}, + Service: "tax", + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.TerminalConfiguration{}, + Service: "terminal", + }, + { + DataStruct: &stripe.TerminalLocation{}, + Service: "terminal", + }, + { + DataStruct: &stripe.TerminalReader{}, + Service: "terminal", + }, + { + DataStruct: &stripe.Topup{}, + IgnoreInTests: []string{"Source"}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.Transfer{}, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.TreasuryFinancialAccount{}, + Service: "treasury", + StateParamName: createdStateParam, + Children: []*Resource{ + { + DataStruct: &stripe.TreasuryCreditReversal{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryDebitReversal{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryInboundTransfer{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryOutboundPayment{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryOutboundTransfer{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryReceivedCredit{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryReceivedDebit{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + }, + { + DataStruct: &stripe.TreasuryTransactionEntry{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + StateParamName: createdStateParam, + }, + { + DataStruct: &stripe.TreasuryTransaction{}, + ListParams: `FinancialAccount: stripe.String(p.ID),`, + StateParamName: createdStateParam, + }, + }, + }, + { + DataStruct: &stripe.WebhookEndpoint{}, + }, +} diff --git a/plugins/source/stripe/codegen/recipes/recipes.go b/plugins/source/stripe/codegen/recipes/recipes.go new file mode 100644 index 00000000000000..ae6396e90730e8 --- /dev/null +++ b/plugins/source/stripe/codegen/recipes/recipes.go @@ -0,0 +1,103 @@ +package recipes + +import ( + "path" + "reflect" + "strings" + + "github.com/cloudquery/plugin-sdk/caser" + "github.com/gertd/go-pluralize" +) + +type Resource struct { + // DataStruct that will be used to generate the cloudquery table + DataStruct any + // SkipFields fields in go struct to skip when generating the table from the go struct + SkipFields []string + PKColumns []string + IgnoreInTests []string + + Description string // optional, auto generated from struct name if not provided + SkipMocks bool + + Service string // optional + TableName string // optional, without "$plugin_" prefix + + Plugin string // name of plugin, auto generated + StructName string // name of struct, auto generated + + Single bool // true if we're getting a single entity, false if we're getting a list/iterator + FetchTemplate string // optional, if not provided will use default template, decided by Single + + HasIDPK bool // has "id" column as PK, auto generated, used in template + + Children []*Resource + Parent *Resource // auto calculated from Children + + ListParams string // optional + StateParamName string // optional *int64 param name. If empty, no state will be persisted. Only if Single is not true. +} + +var ( + pluralizeClient *pluralize.Client + csr *caser.Caser +) + +func init() { + pluralizeClient = pluralize.NewClient() + csr = caser.New() +} + +func (r *Resource) Infer(parent *Resource) { + r.Parent = parent + if parent != nil { + r.Service = parent.Service + r.SkipMocks = true + } + + r.Plugin = path.Base(strings.TrimSuffix(reflect.TypeOf(r).Elem().PkgPath(), "/codegen/recipes")) // "stripe" + r.SkipFields = append(r.SkipFields, "APIResource") + + ds := reflect.TypeOf(r.DataStruct) + if ds.Kind() == reflect.Ptr { + ds = ds.Elem() + } + r.StructName = ds.Name() + + if len(r.PKColumns) == 0 { + if _, ok := ds.FieldByName("ID"); ok { + r.PKColumns = []string{"id"} + r.SkipFields = append(r.SkipFields, "ID") + r.HasIDPK = true + } + } + + var snakeNameBySingularity string + if r.Single { + snakeNameBySingularity = pluralizeClient.Singular(csr.ToSnake(ds.Name())) + } else { + snakeNameBySingularity = pluralizeClient.Plural(csr.ToSnake(ds.Name())) + } + + if r.TableName == "" { + r.TableName = snakeNameBySingularity + } + if r.Service == "" { + r.Service = snakeNameBySingularity + } + if r.Description == "" { + r.Description = "https://stripe.com/docs/api/" + snakeNameBySingularity + } + + if r.FetchTemplate == "" { + if r.Single { + r.FetchTemplate = "get" + } else { + r.FetchTemplate = "list" + } + } + + for i := range r.Children { + r.Children[i].Infer(r) + } +} diff --git a/plugins/source/stripe/codegen/templates/get.go.tpl b/plugins/source/stripe/codegen/templates/get.go.tpl new file mode 100644 index 00000000000000..2dfcc6f6a7271f --- /dev/null +++ b/plugins/source/stripe/codegen/templates/get.go.tpl @@ -0,0 +1,54 @@ +package {{.Service}} + +import ( + "context" + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/stripe/stripe-go/v74" +) + +func {{.TableName | ToPascal}}() *schema.Table { + return &schema.Table{ + Name: "{{.Plugin}}_{{.TableName}}", + {{- if .Description}} + Description: `{{.Description}}`, + {{- end}} + Transform: transformers.TransformWithStruct(&stripe.{{.StructName}}{}, client.SharedTransformers( +{{- if .SkipFields}}transformers.WithSkipFields({{.SkipFields | QuoteJoin}}),{{end -}} +{{- if .IgnoreInTests}}transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer({{.IgnoreInTests | QuoteJoin}})),{{end -}} + )...), + Resolver: fetch{{.TableName | ToPascal}}, +{{if .HasIDPK}} + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, +{{end}} +{{if .Children}} + Relations: []*schema.Table{ + {{- range .Children}} + {{.TableName | ToPascal}}(), + {{- end}} + }, +{{end}} + } +} + +func fetch{{.TableName | ToPascal}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + val, err := cl.Services.{{.TableName | ToPascal}}.Get(&stripe.{{.TableName | ToPascal | Singularize}}Params{}) + if err != nil { + return err + } + res <- val + return nil +} diff --git a/plugins/source/stripe/codegen/templates/list.go.tpl b/plugins/source/stripe/codegen/templates/list.go.tpl new file mode 100644 index 00000000000000..1d078ee7c5af5b --- /dev/null +++ b/plugins/source/stripe/codegen/templates/list.go.tpl @@ -0,0 +1,110 @@ +package {{.Service}} + +import ( + "context" +{{if .StateParamName}} + "fmt" + "strconv" +{{end}} + + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/stripe/stripe-go/v74" +) + +func {{.TableName | ToPascal}}() *schema.Table { + return &schema.Table{ + Name: "{{.Plugin}}_{{.TableName}}", + {{- if .Description}} + Description: `{{.Description}}`, + {{- end}} + Transform: transformers.TransformWithStruct(&stripe.{{.StructName}}{}, client.SharedTransformers( +{{- if .SkipFields}}transformers.WithSkipFields({{.SkipFields | QuoteJoin}}),{{end -}} +{{- if .IgnoreInTests}}transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer({{.IgnoreInTests | QuoteJoin}})),{{end -}} + )...), + Resolver: fetch{{.TableName | ToPascal}}, +{{if .HasIDPK}} + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, +{{if .StateParamName -}} + { + Name: "{{.StateParamName | ToSnake}}", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("{{.StateParamName}}"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, +{{end -}} + }, +{{if .StateParamName -}} + IsIncremental: true, +{{end -}} +{{end}} +{{if .Children}} + Relations: []*schema.Table{ + {{- range .Children}} + {{.TableName | ToPascal}}(), + {{- end}} + }, +{{end}} + } +} + +func fetch{{.TableName | ToPascal}}(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) +{{if and (.Parent) (.ListParams)}} + p := parent.Item.(*stripe.{{.Parent.StructName}}) +{{end}} + + lp := &stripe.{{.TableName | ToPascal | Singularize}}ListParams{ +{{.ListParams}} + } + +{{if .StateParamName}} + const key = "{{.TableName}}" + + if (cl.Backend != nil) { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.{{.StateParamName}} = &vi + } + } +{{end}} + + it := cl.Services.{{.TableName | ToPascal}}.List(lp) + for it.Next() { +{{if .StateParamName -}} + data := it.{{.TableName | ToPascal | Singularize}}() + lp.{{.StateParamName}} = client.MaxInt64(lp.{{.StateParamName}}, &data.{{.StateParamName}}) + res <- data +{{else -}} + res <- it.{{.TableName | ToPascal | Singularize}}() +{{end -}} + } + +{{if .StateParamName -}} + err := it.Err() + if cl.Backend != nil && err == nil && lp.{{.StateParamName}} != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.{{.StateParamName}}, 10)) + } + return err +{{else -}} + return it.Err() +{{end -}} +} diff --git a/plugins/source/stripe/codegen/templates/resource_test.go.tpl b/plugins/source/stripe/codegen/templates/resource_test.go.tpl new file mode 100644 index 00000000000000..01dfec770a4fd0 --- /dev/null +++ b/plugins/source/stripe/codegen/templates/resource_test.go.tpl @@ -0,0 +1,12 @@ +package {{.Service}}_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/{{.Service}}" +) + +func Test{{.TableName | ToPascal}}(t *testing.T) { + client.MockTestHelper(t, {{.Service}}.{{.TableName | ToPascal}}(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/codegen/templates/tables.go.tpl b/plugins/source/stripe/codegen/templates/tables.go.tpl new file mode 100644 index 00000000000000..e9398677238143 --- /dev/null +++ b/plugins/source/stripe/codegen/templates/tables.go.tpl @@ -0,0 +1,16 @@ +package plugin + +import ( +"github.com/cloudquery/plugin-sdk/schema" +{{- range $resource := . }} + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/{{ $resource.Service }}" +{{- end }} +) + +func tables() []*schema.Table { +return []*schema.Table{ +{{- range $resource := . }} + {{ $resource.Service }}.{{ $resource.TableName | ToPascal }}(), +{{- end }} +} +} diff --git a/plugins/source/stripe/docs/tables/README.md b/plugins/source/stripe/docs/tables/README.md new file mode 100644 index 00000000000000..8da5fad67d4cfe --- /dev/null +++ b/plugins/source/stripe/docs/tables/README.md @@ -0,0 +1,66 @@ +# Source Plugin: stripe + +## Tables + +- [stripe_accounts](stripe_accounts.md) (Incremental) + - [stripe_capabilities](stripe_capabilities.md) +- [stripe_apple_pay_domains](stripe_apple_pay_domains.md) +- [stripe_application_fees](stripe_application_fees.md) (Incremental) + - [stripe_fee_refunds](stripe_fee_refunds.md) +- [stripe_balance](stripe_balance.md) +- [stripe_balance_transactions](stripe_balance_transactions.md) (Incremental) +- [stripe_billing_portal_configurations](stripe_billing_portal_configurations.md) +- [stripe_charges](stripe_charges.md) (Incremental) +- [stripe_checkout_sessions](stripe_checkout_sessions.md) +- [stripe_country_specs](stripe_country_specs.md) +- [stripe_coupons](stripe_coupons.md) (Incremental) +- [stripe_credit_notes](stripe_credit_notes.md) +- [stripe_customers](stripe_customers.md) (Incremental) +- [stripe_disputes](stripe_disputes.md) (Incremental) +- [stripe_events](stripe_events.md) (Incremental) +- [stripe_file_links](stripe_file_links.md) (Incremental) +- [stripe_files](stripe_files.md) (Incremental) +- [stripe_identity_verification_reports](stripe_identity_verification_reports.md) (Incremental) +- [stripe_invoice_items](stripe_invoice_items.md) +- [stripe_invoices](stripe_invoices.md) (Incremental) +- [stripe_issuing_authorizations](stripe_issuing_authorizations.md) (Incremental) +- [stripe_issuing_cardholders](stripe_issuing_cardholders.md) (Incremental) +- [stripe_issuing_cards](stripe_issuing_cards.md) (Incremental) +- [stripe_issuing_disputes](stripe_issuing_disputes.md) (Incremental) +- [stripe_issuing_transactions](stripe_issuing_transactions.md) (Incremental) +- [stripe_payment_intents](stripe_payment_intents.md) (Incremental) +- [stripe_payment_links](stripe_payment_links.md) +- [stripe_payment_methods](stripe_payment_methods.md) +- [stripe_payouts](stripe_payouts.md) (Incremental) +- [stripe_plans](stripe_plans.md) (Incremental) +- [stripe_prices](stripe_prices.md) (Incremental) +- [stripe_products](stripe_products.md) (Incremental) +- [stripe_promotion_codes](stripe_promotion_codes.md) (Incremental) +- [stripe_quotes](stripe_quotes.md) +- [stripe_radar_early_fraud_warnings](stripe_radar_early_fraud_warnings.md) +- [stripe_refunds](stripe_refunds.md) (Incremental) +- [stripe_reporting_report_runs](stripe_reporting_report_runs.md) (Incremental) +- [stripe_reporting_report_types](stripe_reporting_report_types.md) +- [stripe_reviews](stripe_reviews.md) (Incremental) +- [stripe_shipping_rates](stripe_shipping_rates.md) (Incremental) +- [stripe_sigma_scheduled_query_runs](stripe_sigma_scheduled_query_runs.md) +- [stripe_subscription_schedules](stripe_subscription_schedules.md) (Incremental) +- [stripe_subscriptions](stripe_subscriptions.md) (Incremental) +- [stripe_tax_codes](stripe_tax_codes.md) +- [stripe_tax_rates](stripe_tax_rates.md) (Incremental) +- [stripe_terminal_configurations](stripe_terminal_configurations.md) +- [stripe_terminal_locations](stripe_terminal_locations.md) +- [stripe_terminal_readers](stripe_terminal_readers.md) +- [stripe_topups](stripe_topups.md) (Incremental) +- [stripe_transfers](stripe_transfers.md) (Incremental) +- [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md) (Incremental) + - [stripe_treasury_credit_reversals](stripe_treasury_credit_reversals.md) + - [stripe_treasury_debit_reversals](stripe_treasury_debit_reversals.md) + - [stripe_treasury_inbound_transfers](stripe_treasury_inbound_transfers.md) + - [stripe_treasury_outbound_payments](stripe_treasury_outbound_payments.md) + - [stripe_treasury_outbound_transfers](stripe_treasury_outbound_transfers.md) + - [stripe_treasury_received_credits](stripe_treasury_received_credits.md) + - [stripe_treasury_received_debits](stripe_treasury_received_debits.md) + - [stripe_treasury_transaction_entries](stripe_treasury_transaction_entries.md) (Incremental) + - [stripe_treasury_transactions](stripe_treasury_transactions.md) (Incremental) +- [stripe_webhook_endpoints](stripe_webhook_endpoints.md) \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_accounts.md b/plugins/source/stripe/docs/tables/stripe_accounts.md new file mode 100644 index 00000000000000..1c2f90845a2fcb --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_accounts.md @@ -0,0 +1,42 @@ +# Table: stripe_accounts + +https://stripe.com/docs/api/accounts + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. +## Relations + +The following tables depend on stripe_accounts: + - [stripe_capabilities](stripe_capabilities.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|business_profile|JSON| +|business_type|String| +|capabilities|JSON| +|charges_enabled|Bool| +|company|JSON| +|controller|JSON| +|country|String| +|default_currency|String| +|deleted|Bool| +|details_submitted|Bool| +|email|String| +|external_accounts|JSON| +|future_requirements|JSON| +|individual|JSON| +|metadata|JSON| +|object|String| +|payouts_enabled|Bool| +|requirements|JSON| +|settings|JSON| +|tos_acceptance|JSON| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_apple_pay_domains.md b/plugins/source/stripe/docs/tables/stripe_apple_pay_domains.md new file mode 100644 index 00000000000000..cfc987c2f04026 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_apple_pay_domains.md @@ -0,0 +1,20 @@ +# Table: stripe_apple_pay_domains + +https://stripe.com/docs/api/apple_pay_domains + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created|Timestamp| +|deleted|Bool| +|domain_name|String| +|livemode|Bool| +|object|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_application_fees.md b/plugins/source/stripe/docs/tables/stripe_application_fees.md new file mode 100644 index 00000000000000..8c159c27e2c663 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_application_fees.md @@ -0,0 +1,33 @@ +# Table: stripe_application_fees + +https://stripe.com/docs/api/application_fees + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. +## Relations + +The following tables depend on stripe_application_fees: + - [stripe_fee_refunds](stripe_fee_refunds.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|account|JSON| +|amount|Int| +|amount_refunded|Int| +|application|JSON| +|balance_transaction|JSON| +|charge|JSON| +|currency|String| +|livemode|Bool| +|object|String| +|originating_transaction|JSON| +|refunded|Bool| +|refunds|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_balance.md b/plugins/source/stripe/docs/tables/stripe_balance.md new file mode 100644 index 00000000000000..17fd60f2917c8c --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_balance.md @@ -0,0 +1,21 @@ +# Table: stripe_balance + +https://stripe.com/docs/api/balance + +The primary key for this table is **_cq_id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id (PK)|UUID| +|_cq_parent_id|UUID| +|available|JSON| +|connect_reserved|JSON| +|instant_available|JSON| +|issuing|JSON| +|livemode|Bool| +|object|String| +|pending|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_balance_transactions.md b/plugins/source/stripe/docs/tables/stripe_balance_transactions.md new file mode 100644 index 00000000000000..f9b44c66779f25 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_balance_transactions.md @@ -0,0 +1,30 @@ +# Table: stripe_balance_transactions + +https://stripe.com/docs/api/balance_transactions + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|available_on|Int| +|currency|String| +|description|String| +|exchange_rate|Float| +|fee|Int| +|fee_details|JSON| +|net|Int| +|object|String| +|reporting_category|String| +|source|JSON| +|status|String| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_billing_portal_configurations.md b/plugins/source/stripe/docs/tables/stripe_billing_portal_configurations.md new file mode 100644 index 00000000000000..900535b4f4699a --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_billing_portal_configurations.md @@ -0,0 +1,27 @@ +# Table: stripe_billing_portal_configurations + +https://stripe.com/docs/api/billing_portal_configurations + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|active|Bool| +|application|JSON| +|business_profile|JSON| +|created|Timestamp| +|default_return_url|String| +|features|JSON| +|is_default|Bool| +|livemode|Bool| +|login_page|JSON| +|metadata|JSON| +|object|String| +|updated|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_capabilities.md b/plugins/source/stripe/docs/tables/stripe_capabilities.md new file mode 100644 index 00000000000000..82cd88c66b5812 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_capabilities.md @@ -0,0 +1,26 @@ +# Table: stripe_capabilities + +https://stripe.com/docs/api/capabilities + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_accounts](stripe_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|account|JSON| +|future_requirements|JSON| +|object|String| +|requested|Bool| +|requested_at|Int| +|requirements|JSON| +|status|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_charges.md b/plugins/source/stripe/docs/tables/stripe_charges.md new file mode 100644 index 00000000000000..7d1f3edd296c4b --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_charges.md @@ -0,0 +1,65 @@ +# Table: stripe_charges + +https://stripe.com/docs/api/charges + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|amount_captured|Int| +|amount_refunded|Int| +|application|JSON| +|application_fee|JSON| +|application_fee_amount|Int| +|authorization_code|String| +|balance_transaction|JSON| +|billing_details|JSON| +|calculated_statement_descriptor|String| +|captured|Bool| +|currency|String| +|customer|JSON| +|description|String| +|destination|JSON| +|dispute|JSON| +|disputed|Bool| +|failure_balance_transaction|JSON| +|failure_code|String| +|failure_message|String| +|fraud_details|JSON| +|invoice|JSON| +|level3|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|on_behalf_of|JSON| +|outcome|JSON| +|paid|Bool| +|payment_intent|JSON| +|payment_method|String| +|payment_method_details|JSON| +|radar_options|JSON| +|receipt_email|String| +|receipt_number|String| +|receipt_url|String| +|refunded|Bool| +|refunds|JSON| +|review|JSON| +|shipping|JSON| +|source|JSON| +|source_transfer|JSON| +|statement_descriptor|String| +|statement_descriptor_suffix|String| +|status|String| +|transfer|JSON| +|transfer_data|JSON| +|transfer_group|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_checkout_sessions.md b/plugins/source/stripe/docs/tables/stripe_checkout_sessions.md new file mode 100644 index 00000000000000..5f52338a358e9f --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_checkout_sessions.md @@ -0,0 +1,61 @@ +# Table: stripe_checkout_sessions + +https://stripe.com/docs/api/checkout_sessions + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|after_expiration|JSON| +|allow_promotion_codes|Bool| +|amount_subtotal|Int| +|amount_total|Int| +|automatic_tax|JSON| +|billing_address_collection|String| +|cancel_url|String| +|client_reference_id|String| +|consent|JSON| +|consent_collection|JSON| +|created|Timestamp| +|currency|String| +|customer|JSON| +|customer_creation|String| +|customer_details|JSON| +|customer_email|String| +|custom_text|JSON| +|expires_at|Int| +|invoice|JSON| +|invoice_creation|JSON| +|line_items|JSON| +|livemode|Bool| +|locale|String| +|metadata|JSON| +|mode|String| +|object|String| +|payment_intent|JSON| +|payment_link|JSON| +|payment_method_collection|String| +|payment_method_options|JSON| +|payment_method_types|StringArray| +|payment_status|String| +|phone_number_collection|JSON| +|recovered_from|String| +|setup_intent|JSON| +|shipping_address_collection|JSON| +|shipping_cost|JSON| +|shipping_details|JSON| +|shipping_options|JSON| +|status|String| +|submit_type|String| +|subscription|JSON| +|success_url|String| +|tax_id_collection|JSON| +|total_details|JSON| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_country_specs.md b/plugins/source/stripe/docs/tables/stripe_country_specs.md new file mode 100644 index 00000000000000..2c434ba7cb9b43 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_country_specs.md @@ -0,0 +1,22 @@ +# Table: stripe_country_specs + +https://stripe.com/docs/api/country_specs + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|default_currency|String| +|object|String| +|supported_bank_account_currencies|JSON| +|supported_payment_currencies|StringArray| +|supported_payment_methods|StringArray| +|supported_transfer_countries|StringArray| +|verification_fields|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_coupons.md b/plugins/source/stripe/docs/tables/stripe_coupons.md new file mode 100644 index 00000000000000..2742ce7f8dd616 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_coupons.md @@ -0,0 +1,33 @@ +# Table: stripe_coupons + +https://stripe.com/docs/api/coupons + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount_off|Int| +|applies_to|JSON| +|currency|String| +|currency_options|JSON| +|deleted|Bool| +|duration|String| +|duration_in_months|Int| +|livemode|Bool| +|max_redemptions|Int| +|metadata|JSON| +|name|String| +|object|String| +|percent_off|Float| +|redeem_by|Int| +|times_redeemed|Int| +|valid|Bool| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_credit_notes.md b/plugins/source/stripe/docs/tables/stripe_credit_notes.md new file mode 100644 index 00000000000000..2afb1ac8c91ab0 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_credit_notes.md @@ -0,0 +1,41 @@ +# Table: stripe_credit_notes + +https://stripe.com/docs/api/credit_notes + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|created|Timestamp| +|currency|String| +|customer|JSON| +|customer_balance_transaction|JSON| +|discount_amount|Int| +|discount_amounts|JSON| +|invoice|JSON| +|lines|JSON| +|livemode|Bool| +|memo|String| +|metadata|JSON| +|number|String| +|object|String| +|out_of_band_amount|Int| +|pdf|String| +|reason|String| +|refund|JSON| +|status|String| +|subtotal|Int| +|subtotal_excluding_tax|Int| +|tax_amounts|JSON| +|total|Int| +|total_excluding_tax|Int| +|type|String| +|voided_at|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_customers.md b/plugins/source/stripe/docs/tables/stripe_customers.md new file mode 100644 index 00000000000000..925984fd07478a --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_customers.md @@ -0,0 +1,44 @@ +# Table: stripe_customers + +https://stripe.com/docs/api/customers + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|address|JSON| +|balance|Int| +|cash_balance|JSON| +|currency|String| +|default_source|JSON| +|deleted|Bool| +|delinquent|Bool| +|description|String| +|discount|JSON| +|email|String| +|invoice_credit_balance|JSON| +|invoice_prefix|String| +|invoice_settings|JSON| +|livemode|Bool| +|metadata|JSON| +|name|String| +|next_invoice_sequence|Int| +|object|String| +|phone|String| +|preferred_locales|StringArray| +|shipping|JSON| +|sources|JSON| +|subscriptions|JSON| +|tax|JSON| +|tax_exempt|String| +|tax_ids|JSON| +|test_clock|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_disputes.md b/plugins/source/stripe/docs/tables/stripe_disputes.md new file mode 100644 index 00000000000000..d5f7eda049ba0c --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_disputes.md @@ -0,0 +1,31 @@ +# Table: stripe_disputes + +https://stripe.com/docs/api/disputes + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|balance_transactions|JSON| +|charge|JSON| +|currency|String| +|evidence|JSON| +|evidence_details|JSON| +|is_charge_refundable|Bool| +|livemode|Bool| +|metadata|JSON| +|network_reason_code|String| +|object|String| +|payment_intent|JSON| +|reason|String| +|status|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_events.md b/plugins/source/stripe/docs/tables/stripe_events.md new file mode 100644 index 00000000000000..9dcc714b5cc7a7 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_events.md @@ -0,0 +1,25 @@ +# Table: stripe_events + +https://stripe.com/docs/api/events + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|account|String| +|api_version|String| +|data|JSON| +|livemode|Bool| +|object|String| +|pending_webhooks|Int| +|request|JSON| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_fee_refunds.md b/plugins/source/stripe/docs/tables/stripe_fee_refunds.md new file mode 100644 index 00000000000000..bcf71c05ee99d2 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_fee_refunds.md @@ -0,0 +1,26 @@ +# Table: stripe_fee_refunds + +https://stripe.com/docs/api/fee_refunds + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_application_fees](stripe_application_fees.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|balance_transaction|JSON| +|created|Timestamp| +|currency|String| +|fee|JSON| +|metadata|JSON| +|object|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_file_links.md b/plugins/source/stripe/docs/tables/stripe_file_links.md new file mode 100644 index 00000000000000..dd18d30645f60f --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_file_links.md @@ -0,0 +1,24 @@ +# Table: stripe_file_links + +https://stripe.com/docs/api/file_links + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|expired|Bool| +|expires_at|Int| +|file|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_files.md b/plugins/source/stripe/docs/tables/stripe_files.md new file mode 100644 index 00000000000000..9a9040fe54da36 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_files.md @@ -0,0 +1,26 @@ +# Table: stripe_files + +https://stripe.com/docs/api/files + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|expires_at|Int| +|filename|String| +|links|JSON| +|object|String| +|purpose|String| +|size|Int| +|title|String| +|type|String| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_identity_verification_reports.md b/plugins/source/stripe/docs/tables/stripe_identity_verification_reports.md new file mode 100644 index 00000000000000..c9e59135d20b45 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_identity_verification_reports.md @@ -0,0 +1,25 @@ +# Table: stripe_identity_verification_reports + +https://stripe.com/docs/api/identity_verification_reports + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|document|JSON| +|id_number|JSON| +|livemode|Bool| +|object|String| +|options|JSON| +|selfie|JSON| +|type|String| +|verification_session|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_invoice_items.md b/plugins/source/stripe/docs/tables/stripe_invoice_items.md new file mode 100644 index 00000000000000..7b9e2c57d6d37b --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_invoice_items.md @@ -0,0 +1,38 @@ +# Table: stripe_invoice_items + +https://stripe.com/docs/api/invoiceitems + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|currency|String| +|customer|JSON| +|date|Int| +|deleted|Bool| +|description|String| +|discountable|Bool| +|discounts|JSON| +|invoice|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|period|JSON| +|plan|JSON| +|price|JSON| +|proration|Bool| +|quantity|Int| +|subscription|JSON| +|subscription_item|String| +|tax_rates|JSON| +|test_clock|JSON| +|unit_amount|Int| +|unit_amount_decimal|Float| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_invoices.md b/plugins/source/stripe/docs/tables/stripe_invoices.md new file mode 100644 index 00000000000000..fd5cd7ffc2c001 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_invoices.md @@ -0,0 +1,92 @@ +# Table: stripe_invoices + +https://stripe.com/docs/api/invoices + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|account_country|String| +|account_name|String| +|account_tax_ids|JSON| +|amount_due|Int| +|amount_paid|Int| +|amount_remaining|Int| +|application|JSON| +|application_fee_amount|Int| +|attempt_count|Int| +|attempted|Bool| +|auto_advance|Bool| +|automatic_tax|JSON| +|billing_reason|String| +|charge|JSON| +|collection_method|String| +|currency|String| +|customer|JSON| +|customer_address|JSON| +|customer_email|String| +|customer_name|String| +|customer_phone|String| +|customer_shipping|JSON| +|customer_tax_exempt|String| +|customer_tax_ids|JSON| +|custom_fields|JSON| +|default_payment_method|JSON| +|default_source|JSON| +|default_tax_rates|JSON| +|deleted|Bool| +|description|String| +|discount|JSON| +|discounts|JSON| +|due_date|Int| +|ending_balance|Int| +|footer|String| +|from_invoice|JSON| +|hosted_invoice_url|String| +|invoice_pdf|String| +|last_finalization_error|JSON| +|latest_revision|JSON| +|lines|JSON| +|livemode|Bool| +|metadata|JSON| +|next_payment_attempt|Int| +|number|String| +|object|String| +|on_behalf_of|JSON| +|paid|Bool| +|paid_out_of_band|Bool| +|payment_intent|JSON| +|payment_settings|JSON| +|period_end|Int| +|period_start|Int| +|post_payment_credit_notes_amount|Int| +|pre_payment_credit_notes_amount|Int| +|quote|JSON| +|receipt_number|String| +|rendering_options|JSON| +|starting_balance|Int| +|statement_descriptor|String| +|status|String| +|status_transitions|JSON| +|subscription|JSON| +|subscription_proration_date|Int| +|subtotal|Int| +|subtotal_excluding_tax|Int| +|tax|Int| +|test_clock|JSON| +|threshold_reason|JSON| +|total|Int| +|total_discount_amounts|JSON| +|total_excluding_tax|Int| +|total_tax_amounts|JSON| +|transfer_data|JSON| +|webhooks_delivered_at|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_issuing_authorizations.md b/plugins/source/stripe/docs/tables/stripe_issuing_authorizations.md new file mode 100644 index 00000000000000..6e4ec9493659be --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_issuing_authorizations.md @@ -0,0 +1,39 @@ +# Table: stripe_issuing_authorizations + +https://stripe.com/docs/api/issuing_authorizations + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|amount_details|JSON| +|approved|Bool| +|authorization_method|String| +|balance_transactions|JSON| +|card|JSON| +|cardholder|JSON| +|currency|String| +|livemode|Bool| +|merchant_amount|Int| +|merchant_currency|String| +|merchant_data|JSON| +|metadata|JSON| +|network_data|JSON| +|object|String| +|pending_request|JSON| +|request_history|JSON| +|status|String| +|transactions|JSON| +|treasury|JSON| +|verification_data|JSON| +|wallet|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_issuing_cardholders.md b/plugins/source/stripe/docs/tables/stripe_issuing_cardholders.md new file mode 100644 index 00000000000000..ac3beb46cce1c6 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_issuing_cardholders.md @@ -0,0 +1,30 @@ +# Table: stripe_issuing_cardholders + +https://stripe.com/docs/api/issuing_cardholders + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|billing|JSON| +|company|JSON| +|email|String| +|individual|JSON| +|livemode|Bool| +|metadata|JSON| +|name|String| +|object|String| +|phone_number|String| +|requirements|JSON| +|spending_controls|JSON| +|status|String| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_issuing_cards.md b/plugins/source/stripe/docs/tables/stripe_issuing_cards.md new file mode 100644 index 00000000000000..916c0e9434b6aa --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_issuing_cards.md @@ -0,0 +1,38 @@ +# Table: stripe_issuing_cards + +https://stripe.com/docs/api/issuing_cards + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|brand|String| +|cancellation_reason|String| +|cardholder|JSON| +|currency|String| +|cvc|String| +|exp_month|Int| +|exp_year|Int| +|financial_account|String| +|last4|String| +|livemode|Bool| +|metadata|JSON| +|number|String| +|object|String| +|replaced_by|JSON| +|replacement_for|JSON| +|replacement_reason|String| +|shipping|JSON| +|spending_controls|JSON| +|status|String| +|type|String| +|wallets|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_issuing_disputes.md b/plugins/source/stripe/docs/tables/stripe_issuing_disputes.md new file mode 100644 index 00000000000000..71a61e18a62e98 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_issuing_disputes.md @@ -0,0 +1,27 @@ +# Table: stripe_issuing_disputes + +https://stripe.com/docs/api/issuing_disputes + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|balance_transactions|JSON| +|currency|String| +|evidence|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|status|String| +|transaction|JSON| +|treasury|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_issuing_transactions.md b/plugins/source/stripe/docs/tables/stripe_issuing_transactions.md new file mode 100644 index 00000000000000..378e3f8d9be2d3 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_issuing_transactions.md @@ -0,0 +1,35 @@ +# Table: stripe_issuing_transactions + +https://stripe.com/docs/api/issuing_transactions + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|amount_details|JSON| +|authorization|JSON| +|balance_transaction|JSON| +|card|JSON| +|cardholder|JSON| +|currency|String| +|dispute|JSON| +|livemode|Bool| +|merchant_amount|Int| +|merchant_currency|String| +|merchant_data|JSON| +|metadata|JSON| +|object|String| +|purchase_details|JSON| +|treasury|JSON| +|type|String| +|wallet|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_payment_intents.md b/plugins/source/stripe/docs/tables/stripe_payment_intents.md new file mode 100644 index 00000000000000..34b3d5114eaec3 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_payment_intents.md @@ -0,0 +1,54 @@ +# Table: stripe_payment_intents + +https://stripe.com/docs/api/payment_intents + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|amount_capturable|Int| +|amount_details|JSON| +|amount_received|Int| +|application|JSON| +|application_fee_amount|Int| +|automatic_payment_methods|JSON| +|canceled_at|Int| +|cancellation_reason|String| +|capture_method|String| +|client_secret|String| +|confirmation_method|String| +|currency|String| +|customer|JSON| +|description|String| +|invoice|JSON| +|last_payment_error|JSON| +|latest_charge|JSON| +|livemode|Bool| +|metadata|JSON| +|next_action|JSON| +|object|String| +|on_behalf_of|JSON| +|payment_method|JSON| +|payment_method_options|JSON| +|payment_method_types|StringArray| +|processing|JSON| +|receipt_email|String| +|review|JSON| +|setup_future_usage|String| +|shipping|JSON| +|source|JSON| +|statement_descriptor|String| +|statement_descriptor_suffix|String| +|status|String| +|transfer_data|JSON| +|transfer_group|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_payment_links.md b/plugins/source/stripe/docs/tables/stripe_payment_links.md new file mode 100644 index 00000000000000..c94ed7be8f053a --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_payment_links.md @@ -0,0 +1,42 @@ +# Table: stripe_payment_links + +https://stripe.com/docs/api/payment_links + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|active|Bool| +|after_completion|JSON| +|allow_promotion_codes|Bool| +|application_fee_amount|Int| +|application_fee_percent|Float| +|automatic_tax|JSON| +|billing_address_collection|String| +|consent_collection|JSON| +|currency|String| +|customer_creation|String| +|custom_text|JSON| +|line_items|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|on_behalf_of|JSON| +|payment_intent_data|JSON| +|payment_method_collection|String| +|payment_method_types|StringArray| +|phone_number_collection|JSON| +|shipping_address_collection|JSON| +|shipping_options|JSON| +|submit_type|String| +|subscription_data|JSON| +|tax_id_collection|JSON| +|transfer_data|JSON| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_payment_methods.md b/plugins/source/stripe/docs/tables/stripe_payment_methods.md new file mode 100644 index 00000000000000..c720766a63a746 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_payment_methods.md @@ -0,0 +1,53 @@ +# Table: stripe_payment_methods + +https://stripe.com/docs/api/payment_methods + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|acss_debit|JSON| +|affirm|JSON| +|afterpay_clearpay|JSON| +|alipay|JSON| +|au_becs_debit|JSON| +|bacs_debit|JSON| +|bancontact|JSON| +|billing_details|JSON| +|blik|JSON| +|boleto|JSON| +|card|JSON| +|card_present|JSON| +|created|Timestamp| +|customer|JSON| +|customer_balance|JSON| +|eps|JSON| +|fpx|JSON| +|giropay|JSON| +|grabpay|JSON| +|ideal|JSON| +|interac_present|JSON| +|klarna|JSON| +|konbini|JSON| +|link|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|oxxo|JSON| +|p24|JSON| +|paynow|JSON| +|pix|JSON| +|promptpay|JSON| +|radar_options|JSON| +|sepa_debit|JSON| +|sofort|JSON| +|type|String| +|us_bank_account|JSON| +|wechat_pay|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_payouts.md b/plugins/source/stripe/docs/tables/stripe_payouts.md new file mode 100644 index 00000000000000..ec5bef4c0a4f71 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_payouts.md @@ -0,0 +1,37 @@ +# Table: stripe_payouts + +https://stripe.com/docs/api/payouts + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|arrival_date|Int| +|automatic|Bool| +|balance_transaction|JSON| +|currency|String| +|description|String| +|destination|JSON| +|failure_balance_transaction|JSON| +|failure_code|String| +|failure_message|String| +|livemode|Bool| +|metadata|JSON| +|method|String| +|object|String| +|original_payout|JSON| +|reversed_by|JSON| +|source_type|String| +|statement_descriptor|String| +|status|String| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_plans.md b/plugins/source/stripe/docs/tables/stripe_plans.md new file mode 100644 index 00000000000000..cb7f98cf6cc605 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_plans.md @@ -0,0 +1,36 @@ +# Table: stripe_plans + +https://stripe.com/docs/api/plans + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|aggregate_usage|String| +|amount|Int| +|amount_decimal|Float| +|billing_scheme|String| +|currency|String| +|deleted|Bool| +|interval|String| +|interval_count|Int| +|livemode|Bool| +|metadata|JSON| +|nickname|String| +|object|String| +|product|JSON| +|tiers|JSON| +|tiers_mode|String| +|transform_usage|JSON| +|trial_period_days|Int| +|usage_type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_prices.md b/plugins/source/stripe/docs/tables/stripe_prices.md new file mode 100644 index 00000000000000..442748558025d0 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_prices.md @@ -0,0 +1,37 @@ +# Table: stripe_prices + +https://stripe.com/docs/api/prices + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|billing_scheme|String| +|currency|String| +|currency_options|JSON| +|custom_unit_amount|JSON| +|deleted|Bool| +|livemode|Bool| +|lookup_key|String| +|metadata|JSON| +|nickname|String| +|object|String| +|product|JSON| +|recurring|JSON| +|tax_behavior|String| +|tiers|JSON| +|tiers_mode|String| +|transform_quantity|JSON| +|type|String| +|unit_amount|Int| +|unit_amount_decimal|Float| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_products.md b/plugins/source/stripe/docs/tables/stripe_products.md new file mode 100644 index 00000000000000..116bb29d1a62a4 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_products.md @@ -0,0 +1,37 @@ +# Table: stripe_products + +https://stripe.com/docs/api/products + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|attributes|StringArray| +|caption|String| +|deactivate_on|StringArray| +|default_price|JSON| +|deleted|Bool| +|description|String| +|images|StringArray| +|livemode|Bool| +|metadata|JSON| +|name|String| +|object|String| +|package_dimensions|JSON| +|shippable|Bool| +|statement_descriptor|String| +|tax_code|JSON| +|type|String| +|unit_label|String| +|updated|Int| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_promotion_codes.md b/plugins/source/stripe/docs/tables/stripe_promotion_codes.md new file mode 100644 index 00000000000000..e8d0d930ccb05a --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_promotion_codes.md @@ -0,0 +1,28 @@ +# Table: stripe_promotion_codes + +https://stripe.com/docs/api/promotion_codes + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|code|String| +|coupon|JSON| +|customer|JSON| +|expires_at|Int| +|livemode|Bool| +|max_redemptions|Int| +|metadata|JSON| +|object|String| +|restrictions|JSON| +|times_redeemed|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_quotes.md b/plugins/source/stripe/docs/tables/stripe_quotes.md new file mode 100644 index 00000000000000..a1edc035968f55 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_quotes.md @@ -0,0 +1,49 @@ +# Table: stripe_quotes + +https://stripe.com/docs/api/quotes + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount_subtotal|Int| +|amount_total|Int| +|application|JSON| +|application_fee_amount|Int| +|application_fee_percent|Float| +|automatic_tax|JSON| +|collection_method|String| +|computed|JSON| +|created|Timestamp| +|currency|String| +|customer|JSON| +|default_tax_rates|JSON| +|description|String| +|discounts|JSON| +|expires_at|Int| +|footer|String| +|from_quote|JSON| +|header|String| +|invoice|JSON| +|invoice_settings|JSON| +|line_items|JSON| +|livemode|Bool| +|metadata|JSON| +|number|String| +|object|String| +|on_behalf_of|JSON| +|status|String| +|status_transitions|JSON| +|subscription|JSON| +|subscription_data|JSON| +|subscription_schedule|JSON| +|test_clock|JSON| +|total_details|JSON| +|transfer_data|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_radar_early_fraud_warnings.md b/plugins/source/stripe/docs/tables/stripe_radar_early_fraud_warnings.md new file mode 100644 index 00000000000000..b06e7cdc480445 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_radar_early_fraud_warnings.md @@ -0,0 +1,22 @@ +# Table: stripe_radar_early_fraud_warnings + +https://stripe.com/docs/api/radar_early_fraud_warnings + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|actionable|Bool| +|charge|JSON| +|created|Timestamp| +|fraud_type|String| +|livemode|Bool| +|object|String| +|payment_intent|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_refunds.md b/plugins/source/stripe/docs/tables/stripe_refunds.md new file mode 100644 index 00000000000000..f7975874e27bbb --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_refunds.md @@ -0,0 +1,34 @@ +# Table: stripe_refunds + +https://stripe.com/docs/api/refunds + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|balance_transaction|JSON| +|charge|JSON| +|currency|String| +|description|String| +|failure_balance_transaction|JSON| +|failure_reason|String| +|instructions_email|String| +|metadata|JSON| +|next_action|JSON| +|object|String| +|payment_intent|JSON| +|reason|String| +|receipt_number|String| +|source_transfer_reversal|JSON| +|status|String| +|transfer_reversal|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_reporting_report_runs.md b/plugins/source/stripe/docs/tables/stripe_reporting_report_runs.md new file mode 100644 index 00000000000000..db3e34260632ed --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_reporting_report_runs.md @@ -0,0 +1,25 @@ +# Table: stripe_reporting_report_runs + +https://stripe.com/docs/api/reporting_report_runs + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|error|String| +|livemode|Bool| +|object|String| +|parameters|JSON| +|report_type|String| +|result|JSON| +|status|String| +|succeeded_at|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_reporting_report_types.md b/plugins/source/stripe/docs/tables/stripe_reporting_report_types.md new file mode 100644 index 00000000000000..c596c4e5ee3cd2 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_reporting_report_types.md @@ -0,0 +1,23 @@ +# Table: stripe_reporting_report_types + +https://stripe.com/docs/api/reporting_report_types + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|data_available_end|Int| +|data_available_start|Int| +|default_columns|StringArray| +|livemode|Bool| +|name|String| +|object|String| +|updated|Int| +|version|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_reviews.md b/plugins/source/stripe/docs/tables/stripe_reviews.md new file mode 100644 index 00000000000000..388ed4b678edc3 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_reviews.md @@ -0,0 +1,29 @@ +# Table: stripe_reviews + +https://stripe.com/docs/api/reviews + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|billing_zip|String| +|charge|JSON| +|closed_reason|String| +|ip_address|String| +|ip_address_location|JSON| +|livemode|Bool| +|object|String| +|open|Bool| +|opened_reason|String| +|payment_intent|JSON| +|reason|String| +|session|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_shipping_rates.md b/plugins/source/stripe/docs/tables/stripe_shipping_rates.md new file mode 100644 index 00000000000000..7740c125256342 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_shipping_rates.md @@ -0,0 +1,27 @@ +# Table: stripe_shipping_rates + +https://stripe.com/docs/api/shipping_rates + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|delivery_estimate|JSON| +|display_name|String| +|fixed_amount|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|tax_behavior|String| +|tax_code|JSON| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_sigma_scheduled_query_runs.md b/plugins/source/stripe/docs/tables/stripe_sigma_scheduled_query_runs.md new file mode 100644 index 00000000000000..43b84891b65ed9 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_sigma_scheduled_query_runs.md @@ -0,0 +1,25 @@ +# Table: stripe_sigma_scheduled_query_runs + +https://stripe.com/docs/api/sigma_scheduled_query_runs + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created|Timestamp| +|data_load_time|Int| +|error|JSON| +|file|JSON| +|livemode|Bool| +|object|String| +|result_available_until|Int| +|sql|String| +|status|String| +|title|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_subscription_schedules.md b/plugins/source/stripe/docs/tables/stripe_subscription_schedules.md new file mode 100644 index 00000000000000..e21e2fc84054df --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_subscription_schedules.md @@ -0,0 +1,33 @@ +# Table: stripe_subscription_schedules + +https://stripe.com/docs/api/subscription_schedules + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|application|JSON| +|canceled_at|Int| +|completed_at|Int| +|current_phase|JSON| +|customer|JSON| +|default_settings|JSON| +|end_behavior|String| +|livemode|Bool| +|metadata|JSON| +|object|String| +|phases|JSON| +|released_at|Int| +|released_subscription|JSON| +|status|String| +|subscription|JSON| +|test_clock|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_subscriptions.md b/plugins/source/stripe/docs/tables/stripe_subscriptions.md new file mode 100644 index 00000000000000..42ef26c320a0a3 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_subscriptions.md @@ -0,0 +1,56 @@ +# Table: stripe_subscriptions + +https://stripe.com/docs/api/subscriptions + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|application|JSON| +|application_fee_percent|Float| +|automatic_tax|JSON| +|billing_cycle_anchor|Int| +|billing_thresholds|JSON| +|cancel_at|Int| +|cancel_at_period_end|Bool| +|canceled_at|Int| +|collection_method|String| +|currency|String| +|current_period_end|Int| +|current_period_start|Int| +|customer|JSON| +|days_until_due|Int| +|default_payment_method|JSON| +|default_source|JSON| +|default_tax_rates|JSON| +|description|String| +|discount|JSON| +|ended_at|Int| +|items|JSON| +|latest_invoice|JSON| +|livemode|Bool| +|metadata|JSON| +|next_pending_invoice_item_invoice|Int| +|object|String| +|on_behalf_of|JSON| +|pause_collection|JSON| +|payment_settings|JSON| +|pending_invoice_item_interval|JSON| +|pending_setup_intent|JSON| +|pending_update|JSON| +|schedule|JSON| +|start_date|Int| +|status|String| +|test_clock|JSON| +|transfer_data|JSON| +|trial_end|Int| +|trial_start|Int| \ No newline at end of file diff --git a/plugins/source/azure/docs/tables/azure_windowsesu_multiple_activation_keys.md b/plugins/source/stripe/docs/tables/stripe_tax_codes.md similarity index 63% rename from plugins/source/azure/docs/tables/azure_windowsesu_multiple_activation_keys.md rename to plugins/source/stripe/docs/tables/stripe_tax_codes.md index fefa33a975c463..8aa7fdd27d7f25 100644 --- a/plugins/source/azure/docs/tables/azure_windowsesu_multiple_activation_keys.md +++ b/plugins/source/stripe/docs/tables/stripe_tax_codes.md @@ -1,4 +1,6 @@ -# Table: azure_windowsesu_multiple_activation_keys +# Table: stripe_tax_codes + +https://stripe.com/docs/api/tax_codes The primary key for this table is **id**. @@ -10,10 +12,7 @@ The primary key for this table is **id**. |_cq_sync_time|Timestamp| |_cq_id|UUID| |_cq_parent_id|UUID| -|subscription_id|String| |id (PK)|String| -|location|String| -|properties|JSON| -|tags|JSON| +|description|String| |name|String| -|type|String| \ No newline at end of file +|object|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_tax_rates.md b/plugins/source/stripe/docs/tables/stripe_tax_rates.md new file mode 100644 index 00000000000000..a79114358ddfd6 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_tax_rates.md @@ -0,0 +1,29 @@ +# Table: stripe_tax_rates + +https://stripe.com/docs/api/tax_rates + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active|Bool| +|country|String| +|description|String| +|display_name|String| +|inclusive|Bool| +|jurisdiction|String| +|livemode|Bool| +|metadata|JSON| +|object|String| +|percentage|Float| +|state|String| +|tax_type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_terminal_configurations.md b/plugins/source/stripe/docs/tables/stripe_terminal_configurations.md new file mode 100644 index 00000000000000..7b9303cd8c011d --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_terminal_configurations.md @@ -0,0 +1,22 @@ +# Table: stripe_terminal_configurations + +https://stripe.com/docs/api/terminal_configurations + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|bbpos_wisepos_e|JSON| +|deleted|Bool| +|is_account_default|Bool| +|livemode|Bool| +|object|String| +|tipping|JSON| +|verifone_p400|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_terminal_locations.md b/plugins/source/stripe/docs/tables/stripe_terminal_locations.md new file mode 100644 index 00000000000000..e19815557c6be4 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_terminal_locations.md @@ -0,0 +1,22 @@ +# Table: stripe_terminal_locations + +https://stripe.com/docs/api/terminal_locations + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|address|JSON| +|configuration_overrides|String| +|deleted|Bool| +|display_name|String| +|livemode|Bool| +|metadata|JSON| +|object|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_terminal_readers.md b/plugins/source/stripe/docs/tables/stripe_terminal_readers.md new file mode 100644 index 00000000000000..0164ab413f74c2 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_terminal_readers.md @@ -0,0 +1,27 @@ +# Table: stripe_terminal_readers + +https://stripe.com/docs/api/terminal_readers + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|action|JSON| +|deleted|Bool| +|device_sw_version|String| +|device_type|String| +|ip_address|String| +|label|String| +|livemode|Bool| +|location|JSON| +|metadata|JSON| +|object|String| +|serial_number|String| +|status|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_topups.md b/plugins/source/stripe/docs/tables/stripe_topups.md new file mode 100644 index 00000000000000..fdfa45c7fbc48e --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_topups.md @@ -0,0 +1,32 @@ +# Table: stripe_topups + +https://stripe.com/docs/api/topups + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|balance_transaction|JSON| +|currency|String| +|description|String| +|expected_availability_date|Int| +|failure_code|String| +|failure_message|String| +|livemode|Bool| +|metadata|JSON| +|object|String| +|source|JSON| +|statement_descriptor|String| +|status|String| +|transfer_group|String| +|arrival_date|Int| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_transfers.md b/plugins/source/stripe/docs/tables/stripe_transfers.md new file mode 100644 index 00000000000000..1fe1a18db1e6ca --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_transfers.md @@ -0,0 +1,32 @@ +# Table: stripe_transfers + +https://stripe.com/docs/api/transfers + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|amount_reversed|Int| +|balance_transaction|JSON| +|currency|String| +|description|String| +|destination|JSON| +|destination_payment|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|reversals|JSON| +|reversed|Bool| +|source_transaction|JSON| +|source_type|String| +|transfer_group|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_credit_reversals.md b/plugins/source/stripe/docs/tables/stripe_treasury_credit_reversals.md new file mode 100644 index 00000000000000..5e64d9ddc31f3a --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_credit_reversals.md @@ -0,0 +1,32 @@ +# Table: stripe_treasury_credit_reversals + +https://stripe.com/docs/api/treasury_credit_reversals + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|created|Timestamp| +|currency|String| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|livemode|Bool| +|metadata|JSON| +|network|String| +|object|String| +|received_credit|String| +|status|String| +|status_transitions|JSON| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_debit_reversals.md b/plugins/source/stripe/docs/tables/stripe_treasury_debit_reversals.md new file mode 100644 index 00000000000000..d96bcf29652e95 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_debit_reversals.md @@ -0,0 +1,33 @@ +# Table: stripe_treasury_debit_reversals + +https://stripe.com/docs/api/treasury_debit_reversals + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|created|Timestamp| +|currency|String| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|linked_flows|JSON| +|livemode|Bool| +|metadata|JSON| +|network|String| +|object|String| +|received_debit|String| +|status|String| +|status_transitions|JSON| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_financial_accounts.md b/plugins/source/stripe/docs/tables/stripe_treasury_financial_accounts.md new file mode 100644 index 00000000000000..9f22d7885333d8 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_financial_accounts.md @@ -0,0 +1,43 @@ +# Table: stripe_treasury_financial_accounts + +https://stripe.com/docs/api/treasury_financial_accounts + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. +## Relations + +The following tables depend on stripe_treasury_financial_accounts: + - [stripe_treasury_credit_reversals](stripe_treasury_credit_reversals.md) + - [stripe_treasury_debit_reversals](stripe_treasury_debit_reversals.md) + - [stripe_treasury_inbound_transfers](stripe_treasury_inbound_transfers.md) + - [stripe_treasury_outbound_payments](stripe_treasury_outbound_payments.md) + - [stripe_treasury_outbound_transfers](stripe_treasury_outbound_transfers.md) + - [stripe_treasury_received_credits](stripe_treasury_received_credits.md) + - [stripe_treasury_received_debits](stripe_treasury_received_debits.md) + - [stripe_treasury_transaction_entries](stripe_treasury_transaction_entries.md) + - [stripe_treasury_transactions](stripe_treasury_transactions.md) + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|active_features|StringArray| +|balance|JSON| +|country|String| +|features|JSON| +|financial_addresses|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|pending_features|StringArray| +|platform_restrictions|JSON| +|restricted_features|StringArray| +|status|String| +|status_details|JSON| +|supported_currencies|StringArray| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_inbound_transfers.md b/plugins/source/stripe/docs/tables/stripe_treasury_inbound_transfers.md new file mode 100644 index 00000000000000..508c270d4a4df5 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_inbound_transfers.md @@ -0,0 +1,38 @@ +# Table: stripe_treasury_inbound_transfers + +https://stripe.com/docs/api/treasury_inbound_transfers + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|cancelable|Bool| +|created|Timestamp| +|currency|String| +|description|String| +|failure_details|JSON| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|linked_flows|JSON| +|livemode|Bool| +|metadata|JSON| +|object|String| +|origin_payment_method|String| +|origin_payment_method_details|JSON| +|returned|Bool| +|statement_descriptor|String| +|status|String| +|status_transitions|JSON| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_outbound_payments.md b/plugins/source/stripe/docs/tables/stripe_treasury_outbound_payments.md new file mode 100644 index 00000000000000..072a0d33402050 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_outbound_payments.md @@ -0,0 +1,39 @@ +# Table: stripe_treasury_outbound_payments + +https://stripe.com/docs/api/treasury_outbound_payments + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|cancelable|Bool| +|created|Timestamp| +|currency|String| +|customer|String| +|description|String| +|destination_payment_method|String| +|destination_payment_method_details|JSON| +|end_user_details|JSON| +|expected_arrival_date|Int| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|livemode|Bool| +|metadata|JSON| +|object|String| +|returned_details|JSON| +|statement_descriptor|String| +|status|String| +|status_transitions|JSON| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_outbound_transfers.md b/plugins/source/stripe/docs/tables/stripe_treasury_outbound_transfers.md new file mode 100644 index 00000000000000..7e577e8b0ee850 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_outbound_transfers.md @@ -0,0 +1,37 @@ +# Table: stripe_treasury_outbound_transfers + +https://stripe.com/docs/api/treasury_outbound_transfers + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|cancelable|Bool| +|created|Timestamp| +|currency|String| +|description|String| +|destination_payment_method|String| +|destination_payment_method_details|JSON| +|expected_arrival_date|Int| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|livemode|Bool| +|metadata|JSON| +|object|String| +|returned_details|JSON| +|statement_descriptor|String| +|status|String| +|status_transitions|JSON| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_received_credits.md b/plugins/source/stripe/docs/tables/stripe_treasury_received_credits.md new file mode 100644 index 00000000000000..d0243fe275605d --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_received_credits.md @@ -0,0 +1,34 @@ +# Table: stripe_treasury_received_credits + +https://stripe.com/docs/api/treasury_received_credits + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|created|Timestamp| +|currency|String| +|description|String| +|failure_code|String| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|initiating_payment_method_details|JSON| +|linked_flows|JSON| +|livemode|Bool| +|network|String| +|object|String| +|reversal_details|JSON| +|status|String| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_received_debits.md b/plugins/source/stripe/docs/tables/stripe_treasury_received_debits.md new file mode 100644 index 00000000000000..41d7165967cc43 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_received_debits.md @@ -0,0 +1,34 @@ +# Table: stripe_treasury_received_debits + +https://stripe.com/docs/api/treasury_received_debits + +The primary key for this table is **id**. + +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|amount|Int| +|created|Timestamp| +|currency|String| +|description|String| +|failure_code|String| +|financial_account|String| +|hosted_regulatory_receipt_url|String| +|initiating_payment_method_details|JSON| +|linked_flows|JSON| +|livemode|Bool| +|network|String| +|object|String| +|reversal_details|JSON| +|status|String| +|transaction|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_transaction_entries.md b/plugins/source/stripe/docs/tables/stripe_treasury_transaction_entries.md new file mode 100644 index 00000000000000..ce68f8b8b8aca2 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_transaction_entries.md @@ -0,0 +1,31 @@ +# Table: stripe_treasury_transaction_entries + +https://stripe.com/docs/api/treasury_transaction_entries + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|balance_impact|JSON| +|currency|String| +|effective_at|Int| +|financial_account|String| +|flow|String| +|flow_details|JSON| +|flow_type|String| +|livemode|Bool| +|object|String| +|transaction|JSON| +|type|String| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_treasury_transactions.md b/plugins/source/stripe/docs/tables/stripe_treasury_transactions.md new file mode 100644 index 00000000000000..882baeec1f3e98 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_treasury_transactions.md @@ -0,0 +1,33 @@ +# Table: stripe_treasury_transactions + +https://stripe.com/docs/api/treasury_transactions + +The primary key for this table is **id**. +It supports incremental syncs based on the **created** column. +## Relations + +This table depends on [stripe_treasury_financial_accounts](stripe_treasury_financial_accounts.md). + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|created (Incremental Key)|Timestamp| +|amount|Int| +|balance_impact|JSON| +|currency|String| +|description|String| +|entries|JSON| +|financial_account|String| +|flow|String| +|flow_details|JSON| +|flow_type|String| +|livemode|Bool| +|object|String| +|status|String| +|status_transitions|JSON| \ No newline at end of file diff --git a/plugins/source/stripe/docs/tables/stripe_webhook_endpoints.md b/plugins/source/stripe/docs/tables/stripe_webhook_endpoints.md new file mode 100644 index 00000000000000..17fec97213d4e1 --- /dev/null +++ b/plugins/source/stripe/docs/tables/stripe_webhook_endpoints.md @@ -0,0 +1,27 @@ +# Table: stripe_webhook_endpoints + +https://stripe.com/docs/api/webhook_endpoints + +The primary key for this table is **id**. + +## Columns + +| Name | Type | +| ------------- | ------------- | +|_cq_source_name|String| +|_cq_sync_time|Timestamp| +|_cq_id|UUID| +|_cq_parent_id|UUID| +|id (PK)|String| +|api_version|String| +|application|String| +|created|Timestamp| +|deleted|Bool| +|description|String| +|enabled_events|StringArray| +|livemode|Bool| +|metadata|JSON| +|object|String| +|secret|String| +|status|String| +|url|String| \ No newline at end of file diff --git a/plugins/source/stripe/go.mod b/plugins/source/stripe/go.mod new file mode 100644 index 00000000000000..a02b97186115db --- /dev/null +++ b/plugins/source/stripe/go.mod @@ -0,0 +1,47 @@ +module github.com/cloudquery/cloudquery/plugins/source/stripe + +go 1.19 + +require ( + github.com/cloudquery/plugin-sdk v1.27.0 + github.com/gertd/go-pluralize v0.2.1 + github.com/rs/zerolog v1.28.0 + github.com/stripe/stripe-go/v74 v74.4.0 + github.com/stripe/stripe-mock v0.148.0 + golang.org/x/time v0.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/getsentry/sentry-go v0.16.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/lestrrat-go/jspointer v0.0.0-20181205001929-82fadba7561c // indirect + github.com/lestrrat-go/jsref v0.0.0-20211028120858-c0bcbb5abf20 // indirect + github.com/lestrrat-go/jsschema v0.0.0-20181205002244-5c81c58ffcc3 // indirect + github.com/lestrrat-go/jsval v0.0.0-20181205002323-20277e9befc0 // indirect + github.com/lestrrat-go/option v1.0.1 // indirect + github.com/lestrrat-go/pdebug v0.0.0-20210111095411-35b07dbf089b // indirect + github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/thoas/go-funk v0.9.3 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/plugins/source/stripe/go.sum b/plugins/source/stripe/go.sum new file mode 100644 index 00000000000000..650f754202655e --- /dev/null +++ b/plugins/source/stripe/go.sum @@ -0,0 +1,502 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/avast/retry-go/v4 v4.3.1 h1:Mtg11F9PdAIMkMiio2RKcYauoVHjl2aB3zQJJlzD4cE= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/gertd/go-pluralize v0.2.1 h1:M3uASbVjMnTsPb0PNqg+E/24Vwigyo/tvyMTtAlLgiA= +github.com/gertd/go-pluralize v0.2.1/go.mod h1:rbYaKDbsXxmRfr8uygAEKhOWsjyrrqrkHVpZvoOp8zk= +github.com/getsentry/sentry-go v0.16.0 h1:owk+S+5XcgJLlGR/3+3s6N4d+uKwqYvh/eS0AIMjPWo= +github.com/getsentry/sentry-go v0.16.0/go.mod h1:ZXCloQLj0pG7mja5NK6NPf2V4A88YJ4pNlc2mOHwh6Y= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3 h1:hRcWZ7716+E1tkMSZJ/QeeC2dPGGB1R/4z4m9RsL8Qg= +github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.3/go.mod h1:54asssGY3Bohr5FRbew+bjfuQTT2WS9V7hW7gPqmcKM= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/lestrrat-go/jspointer v0.0.0-20181205001929-82fadba7561c h1:pGh5EFIfczeDHwgMHgfwjhZzL+8/E3uZF6T7vER/W8c= +github.com/lestrrat-go/jspointer v0.0.0-20181205001929-82fadba7561c/go.mod h1:xw2Gm4Mg+ST9s8fHR1VkUIyOJMJnSloRZlPQB+wyVpY= +github.com/lestrrat-go/jsref v0.0.0-20181205001954-1b590508f37d/go.mod h1:h+r25adx46+IvUSt/rTTvXNnCDnu3lRTkMPPR/GdCwk= +github.com/lestrrat-go/jsref v0.0.0-20211028120858-c0bcbb5abf20 h1:E1vlSQTLj+2EK0mrFGDc57u3QN7RybAUiGEOUAlYRd0= +github.com/lestrrat-go/jsref v0.0.0-20211028120858-c0bcbb5abf20/go.mod h1:A5HUnnciqLnCzBsUqvspKKUgIkA+i/4dSaqmKV/D2Pw= +github.com/lestrrat-go/jsschema v0.0.0-20181205002244-5c81c58ffcc3 h1:TSKrrGm89gmmVlrG34ZzCIOMNVk5kkSV1P88Dt38DiE= +github.com/lestrrat-go/jsschema v0.0.0-20181205002244-5c81c58ffcc3/go.mod h1:SVfIykmWQyFuRToBTKQ8AcveWeOunS2phYxA8hJ/6Gg= +github.com/lestrrat-go/jsval v0.0.0-20181205002323-20277e9befc0 h1:w4rIjeCV/gQpxtn3i1voyF6Hd7v1mRGIB63F7RZOk1U= +github.com/lestrrat-go/jsval v0.0.0-20181205002323-20277e9befc0/go.mod h1:hazjwMAn+trtmUnjvhIzSIZ0YS+2egAMonQMjDhcC2s= +github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= +github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= +github.com/lestrrat-go/pdebug v0.0.0-20180220043849-39f9a71bcabe/go.mod h1:zvUY6gZZVL2nu7NM+/3b51Z/hxyFZCZxV0hvfZ3NJlg= +github.com/lestrrat-go/pdebug v0.0.0-20210111095411-35b07dbf089b h1:2v0K4PeWeccG1wpznCE71PqO5scFzSj3jZGkQaVYEWg= +github.com/lestrrat-go/pdebug v0.0.0-20210111095411-35b07dbf089b/go.mod h1:RbVbom7RDVgpH5IqUPbhJ425z9iRIRH0tRWp+uxEjCE= +github.com/lestrrat-go/structinfo v0.0.0-20190212233437-acd51874663b/go.mod h1:s2U6PowV3/Jobkx/S9d0XiPwOzs6niW3DIouw+7nZC8= +github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb h1:DDg5u5lk2v8O8qxs8ecQkMUBj3tLW6wkSLzxxOyi1Ig= +github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb/go.mod h1:i+E8Uf04vf2QjOWyJdGY75vmG+4rxiZW2kIj1lTB5mo= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pkg/errors v0.8.1-0.20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/schollz/progressbar/v3 v3.12.2 h1:yLqqqpQNMxGxHY8uEshRihaHWwa0rf0yb7/Zrpgq2C0= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v0.0.0-20150620232711-089c7181b8c7/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stripe/stripe-go/v74 v74.4.0 h1:FVwJLgtXMzlrRP5mk9bdXvjtbsk8sFQ90r01Gl+uwfM= +github.com/stripe/stripe-go/v74 v74.4.0/go.mod h1:5PoXNp30AJ3tGq57ZcFuaMylzNi8KpwlrYAFmO1fHZw= +github.com/stripe/stripe-mock v0.148.0 h1:mQo8WqX4/5G+E4IA8V0dBQ4o4AWTWRonii+xfWp1kRk= +github.com/stripe/stripe-mock v0.148.0/go.mod h1:n/TuP1Hets25zYh/9Hhdup3DlXHd2pyWGYZyI+3H4MA= +github.com/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= +github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/plugins/source/stripe/main.go b/plugins/source/stripe/main.go new file mode 100644 index 00000000000000..7ed63368c9f0df --- /dev/null +++ b/plugins/source/stripe/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/plugin" + "github.com/cloudquery/plugin-sdk/serve" +) + +const sentryDSN = "https://4606a1601b52488889313375ba91df89@o1396617.ingest.sentry.io/4504441433751552" + +func main() { + serve.Source(plugin.Plugin(), serve.WithSourceSentryDSN(sentryDSN)) +} diff --git a/plugins/source/stripe/resources/plugin/plugin.go b/plugins/source/stripe/resources/plugin/plugin.go new file mode 100644 index 00000000000000..8409e751f6591e --- /dev/null +++ b/plugins/source/stripe/resources/plugin/plugin.go @@ -0,0 +1,19 @@ +package plugin + +import ( + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/plugins/source" +) + +var ( + Version = "development" +) + +func Plugin() *source.Plugin { + return source.NewPlugin( + "stripe", + Version, + tables(), + client.Configure, + ) +} diff --git a/plugins/source/stripe/resources/plugin/tables.go b/plugins/source/stripe/resources/plugin/tables.go new file mode 100644 index 00000000000000..770acc0fa14657 --- /dev/null +++ b/plugins/source/stripe/resources/plugin/tables.go @@ -0,0 +1,99 @@ +package plugin + +import ( + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/accounts" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/apple_pay_domains" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/application_fees" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/balance" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/billing_portal" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/charges" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/checkout" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/country_specs" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/coupons" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/credit_notes" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/customers" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/disputes" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/events" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/file_links" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/files" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/identity" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/invoices" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payment" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payouts" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/plans" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/prices" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/products" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/promotion_codes" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/quotes" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/radar" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/refunds" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/reporting" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/reviews" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/shipping_rates" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/sigma" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/subscription" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/tax" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/terminal" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/topups" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/transfers" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/treasury" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/webhook_endpoints" + "github.com/cloudquery/plugin-sdk/schema" +) + +func tables() []*schema.Table { + return []*schema.Table{ + accounts.Accounts(), + apple_pay_domains.ApplePayDomains(), + application_fees.ApplicationFees(), + balance.Balance(), + balance.BalanceTransactions(), + billing_portal.BillingPortalConfigurations(), + charges.Charges(), + checkout.CheckoutSessions(), + country_specs.CountrySpecs(), + coupons.Coupons(), + credit_notes.CreditNotes(), + customers.Customers(), + disputes.Disputes(), + events.Events(), + file_links.FileLinks(), + files.Files(), + identity.IdentityVerificationReports(), + invoices.Invoices(), + invoices.InvoiceItems(), + issuing.IssuingAuthorizations(), + issuing.IssuingCardholders(), + issuing.IssuingCards(), + issuing.IssuingDisputes(), + issuing.IssuingTransactions(), + payment.PaymentIntents(), + payment.PaymentLinks(), + payment.PaymentMethods(), + payouts.Payouts(), + plans.Plans(), + prices.Prices(), + products.Products(), + promotion_codes.PromotionCodes(), + quotes.Quotes(), + radar.RadarEarlyFraudWarnings(), + refunds.Refunds(), + reporting.ReportingReportRuns(), + reporting.ReportingReportTypes(), + reviews.Reviews(), + shipping_rates.ShippingRates(), + sigma.SigmaScheduledQueryRuns(), + subscription.Subscriptions(), + subscription.SubscriptionSchedules(), + tax.TaxCodes(), + tax.TaxRates(), + terminal.TerminalConfigurations(), + terminal.TerminalLocations(), + terminal.TerminalReaders(), + topups.Topups(), + transfers.Transfers(), + treasury.TreasuryFinancialAccounts(), + webhook_endpoints.WebhookEndpoints(), + } +} diff --git a/plugins/source/stripe/resources/services/accounts/accounts.go b/plugins/source/stripe/resources/services/accounts/accounts.go new file mode 100644 index 00000000000000..d907f0fc1db8e1 --- /dev/null +++ b/plugins/source/stripe/resources/services/accounts/accounts.go @@ -0,0 +1,81 @@ +package accounts + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Accounts() *schema.Table { + return &schema.Table{ + Name: "stripe_accounts", + Description: `https://stripe.com/docs/api/accounts`, + Transform: transformers.TransformWithStruct(&stripe.Account{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchAccounts, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + + Relations: []*schema.Table{ + Capabilities(), + }, + } +} + +func fetchAccounts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.AccountListParams{} + + const key = "accounts" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Accounts.List(lp) + for it.Next() { + data := it.Account() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/accounts/accounts_test.go b/plugins/source/stripe/resources/services/accounts/accounts_test.go new file mode 100644 index 00000000000000..6b95c725b5b372 --- /dev/null +++ b/plugins/source/stripe/resources/services/accounts/accounts_test.go @@ -0,0 +1,12 @@ +package accounts_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/accounts" +) + +func TestAccounts(t *testing.T) { + client.MockTestHelper(t, accounts.Accounts(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/accounts/capabilities.go b/plugins/source/stripe/resources/services/accounts/capabilities.go new file mode 100644 index 00000000000000..84ad91d5ffe114 --- /dev/null +++ b/plugins/source/stripe/resources/services/accounts/capabilities.go @@ -0,0 +1,47 @@ +package accounts + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Capabilities() *schema.Table { + return &schema.Table{ + Name: "stripe_capabilities", + Description: `https://stripe.com/docs/api/capabilities`, + Transform: transformers.TransformWithStruct(&stripe.Capability{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchCapabilities, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchCapabilities(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.Account) + + lp := &stripe.CapabilityListParams{ + Account: stripe.String(p.ID), + } + + it := cl.Services.Capabilities.List(lp) + for it.Next() { + res <- it.Capability() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains.go b/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains.go new file mode 100644 index 00000000000000..358e50dc5d9799 --- /dev/null +++ b/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains.go @@ -0,0 +1,43 @@ +package apple_pay_domains + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func ApplePayDomains() *schema.Table { + return &schema.Table{ + Name: "stripe_apple_pay_domains", + Description: `https://stripe.com/docs/api/apple_pay_domains`, + Transform: transformers.TransformWithStruct(&stripe.ApplePayDomain{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchApplePayDomains, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchApplePayDomains(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ApplePayDomainListParams{} + + it := cl.Services.ApplePayDomains.List(lp) + for it.Next() { + res <- it.ApplePayDomain() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains_test.go b/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains_test.go new file mode 100644 index 00000000000000..2a1794de7f45eb --- /dev/null +++ b/plugins/source/stripe/resources/services/apple_pay_domains/apple_pay_domains_test.go @@ -0,0 +1,12 @@ +package apple_pay_domains_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/apple_pay_domains" +) + +func TestApplePayDomains(t *testing.T) { + client.MockTestHelper(t, apple_pay_domains.ApplePayDomains(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/application_fees/application_fees.go b/plugins/source/stripe/resources/services/application_fees/application_fees.go new file mode 100644 index 00000000000000..9dcbd29378bc5f --- /dev/null +++ b/plugins/source/stripe/resources/services/application_fees/application_fees.go @@ -0,0 +1,81 @@ +package application_fees + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func ApplicationFees() *schema.Table { + return &schema.Table{ + Name: "stripe_application_fees", + Description: `https://stripe.com/docs/api/application_fees`, + Transform: transformers.TransformWithStruct(&stripe.ApplicationFee{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchApplicationFees, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + + Relations: []*schema.Table{ + FeeRefunds(), + }, + } +} + +func fetchApplicationFees(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ApplicationFeeListParams{} + + const key = "application_fees" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.ApplicationFees.List(lp) + for it.Next() { + data := it.ApplicationFee() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/application_fees/application_fees_test.go b/plugins/source/stripe/resources/services/application_fees/application_fees_test.go new file mode 100644 index 00000000000000..970d1bce55e09c --- /dev/null +++ b/plugins/source/stripe/resources/services/application_fees/application_fees_test.go @@ -0,0 +1,12 @@ +package application_fees_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/application_fees" +) + +func TestApplicationFees(t *testing.T) { + client.MockTestHelper(t, application_fees.ApplicationFees(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/application_fees/fee_refunds.go b/plugins/source/stripe/resources/services/application_fees/fee_refunds.go new file mode 100644 index 00000000000000..4c2ac4744d158a --- /dev/null +++ b/plugins/source/stripe/resources/services/application_fees/fee_refunds.go @@ -0,0 +1,47 @@ +package application_fees + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func FeeRefunds() *schema.Table { + return &schema.Table{ + Name: "stripe_fee_refunds", + Description: `https://stripe.com/docs/api/fee_refunds`, + Transform: transformers.TransformWithStruct(&stripe.FeeRefund{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchFeeRefunds, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchFeeRefunds(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.ApplicationFee) + + lp := &stripe.FeeRefundListParams{ + ID: stripe.String(p.ID), + } + + it := cl.Services.FeeRefunds.List(lp) + for it.Next() { + res <- it.FeeRefund() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/balance/balance.go b/plugins/source/stripe/resources/services/balance/balance.go new file mode 100644 index 00000000000000..0b35cba74e8507 --- /dev/null +++ b/plugins/source/stripe/resources/services/balance/balance.go @@ -0,0 +1,30 @@ +package balance + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Balance() *schema.Table { + return &schema.Table{ + Name: "stripe_balance", + Description: `https://stripe.com/docs/api/balance`, + Transform: transformers.TransformWithStruct(&stripe.Balance{}, client.SharedTransformers(transformers.WithSkipFields("APIResource"))...), + Resolver: fetchBalance, + } +} + +func fetchBalance(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + val, err := cl.Services.Balance.Get(&stripe.BalanceParams{}) + if err != nil { + return err + } + res <- val + return nil +} diff --git a/plugins/source/stripe/resources/services/balance/balance_test.go b/plugins/source/stripe/resources/services/balance/balance_test.go new file mode 100644 index 00000000000000..67e1c9324f49aa --- /dev/null +++ b/plugins/source/stripe/resources/services/balance/balance_test.go @@ -0,0 +1,12 @@ +package balance_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/balance" +) + +func TestBalance(t *testing.T) { + client.MockTestHelper(t, balance.Balance(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/balance/balance_transactions.go b/plugins/source/stripe/resources/services/balance/balance_transactions.go new file mode 100644 index 00000000000000..17a32b71a5e7e7 --- /dev/null +++ b/plugins/source/stripe/resources/services/balance/balance_transactions.go @@ -0,0 +1,77 @@ +package balance + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func BalanceTransactions() *schema.Table { + return &schema.Table{ + Name: "stripe_balance_transactions", + Description: `https://stripe.com/docs/api/balance_transactions`, + Transform: transformers.TransformWithStruct(&stripe.BalanceTransaction{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchBalanceTransactions, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchBalanceTransactions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.BalanceTransactionListParams{} + + const key = "balance_transactions" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.BalanceTransactions.List(lp) + for it.Next() { + data := it.BalanceTransaction() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/balance/balance_transactions_test.go b/plugins/source/stripe/resources/services/balance/balance_transactions_test.go new file mode 100644 index 00000000000000..705ba7994ecb01 --- /dev/null +++ b/plugins/source/stripe/resources/services/balance/balance_transactions_test.go @@ -0,0 +1,12 @@ +package balance_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/balance" +) + +func TestBalanceTransactions(t *testing.T) { + client.MockTestHelper(t, balance.BalanceTransactions(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations.go b/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations.go new file mode 100644 index 00000000000000..f6536afaed3314 --- /dev/null +++ b/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations.go @@ -0,0 +1,43 @@ +package billing_portal + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func BillingPortalConfigurations() *schema.Table { + return &schema.Table{ + Name: "stripe_billing_portal_configurations", + Description: `https://stripe.com/docs/api/billing_portal_configurations`, + Transform: transformers.TransformWithStruct(&stripe.BillingPortalConfiguration{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchBillingPortalConfigurations, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchBillingPortalConfigurations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.BillingPortalConfigurationListParams{} + + it := cl.Services.BillingPortalConfigurations.List(lp) + for it.Next() { + res <- it.BillingPortalConfiguration() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations_test.go b/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations_test.go new file mode 100644 index 00000000000000..9a3244898d259b --- /dev/null +++ b/plugins/source/stripe/resources/services/billing_portal/billing_portal_configurations_test.go @@ -0,0 +1,12 @@ +package billing_portal_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/billing_portal" +) + +func TestBillingPortalConfigurations(t *testing.T) { + client.MockTestHelper(t, billing_portal.BillingPortalConfigurations(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/charges/charges.go b/plugins/source/stripe/resources/services/charges/charges.go new file mode 100644 index 00000000000000..ca4f7ea484523e --- /dev/null +++ b/plugins/source/stripe/resources/services/charges/charges.go @@ -0,0 +1,77 @@ +package charges + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Charges() *schema.Table { + return &schema.Table{ + Name: "stripe_charges", + Description: `https://stripe.com/docs/api/charges`, + Transform: transformers.TransformWithStruct(&stripe.Charge{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("Destination", "Dispute", "Level3", "Source")))...), + Resolver: fetchCharges, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchCharges(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ChargeListParams{} + + const key = "charges" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Charges.List(lp) + for it.Next() { + data := it.Charge() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/charges/charges_test.go b/plugins/source/stripe/resources/services/charges/charges_test.go new file mode 100644 index 00000000000000..ab88fd1482be73 --- /dev/null +++ b/plugins/source/stripe/resources/services/charges/charges_test.go @@ -0,0 +1,12 @@ +package charges_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/charges" +) + +func TestCharges(t *testing.T) { + client.MockTestHelper(t, charges.Charges(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/checkout/checkout_sessions.go b/plugins/source/stripe/resources/services/checkout/checkout_sessions.go new file mode 100644 index 00000000000000..6598a7c2ae0ed0 --- /dev/null +++ b/plugins/source/stripe/resources/services/checkout/checkout_sessions.go @@ -0,0 +1,43 @@ +package checkout + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func CheckoutSessions() *schema.Table { + return &schema.Table{ + Name: "stripe_checkout_sessions", + Description: `https://stripe.com/docs/api/checkout_sessions`, + Transform: transformers.TransformWithStruct(&stripe.CheckoutSession{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchCheckoutSessions, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchCheckoutSessions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.CheckoutSessionListParams{} + + it := cl.Services.CheckoutSessions.List(lp) + for it.Next() { + res <- it.CheckoutSession() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/checkout/checkout_sessions_test.go b/plugins/source/stripe/resources/services/checkout/checkout_sessions_test.go new file mode 100644 index 00000000000000..6fdc6ebb76c1db --- /dev/null +++ b/plugins/source/stripe/resources/services/checkout/checkout_sessions_test.go @@ -0,0 +1,12 @@ +package checkout_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/checkout" +) + +func TestCheckoutSessions(t *testing.T) { + client.MockTestHelper(t, checkout.CheckoutSessions(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/country_specs/country_specs.go b/plugins/source/stripe/resources/services/country_specs/country_specs.go new file mode 100644 index 00000000000000..c359f05d22a999 --- /dev/null +++ b/plugins/source/stripe/resources/services/country_specs/country_specs.go @@ -0,0 +1,43 @@ +package country_specs + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func CountrySpecs() *schema.Table { + return &schema.Table{ + Name: "stripe_country_specs", + Description: `https://stripe.com/docs/api/country_specs`, + Transform: transformers.TransformWithStruct(&stripe.CountrySpec{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchCountrySpecs, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchCountrySpecs(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.CountrySpecListParams{} + + it := cl.Services.CountrySpecs.List(lp) + for it.Next() { + res <- it.CountrySpec() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/country_specs/country_specs_test.go b/plugins/source/stripe/resources/services/country_specs/country_specs_test.go new file mode 100644 index 00000000000000..6ed72869b18cb0 --- /dev/null +++ b/plugins/source/stripe/resources/services/country_specs/country_specs_test.go @@ -0,0 +1,12 @@ +package country_specs_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/country_specs" +) + +func TestCountrySpecs(t *testing.T) { + client.MockTestHelper(t, country_specs.CountrySpecs(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/coupons/coupons.go b/plugins/source/stripe/resources/services/coupons/coupons.go new file mode 100644 index 00000000000000..ac0da08af91e0b --- /dev/null +++ b/plugins/source/stripe/resources/services/coupons/coupons.go @@ -0,0 +1,77 @@ +package coupons + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Coupons() *schema.Table { + return &schema.Table{ + Name: "stripe_coupons", + Description: `https://stripe.com/docs/api/coupons`, + Transform: transformers.TransformWithStruct(&stripe.Coupon{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchCoupons, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchCoupons(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.CouponListParams{} + + const key = "coupons" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Coupons.List(lp) + for it.Next() { + data := it.Coupon() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/coupons/coupons_test.go b/plugins/source/stripe/resources/services/coupons/coupons_test.go new file mode 100644 index 00000000000000..32c47e3fcff0e0 --- /dev/null +++ b/plugins/source/stripe/resources/services/coupons/coupons_test.go @@ -0,0 +1,12 @@ +package coupons_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/coupons" +) + +func TestCoupons(t *testing.T) { + client.MockTestHelper(t, coupons.Coupons(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/credit_notes/credit_notes.go b/plugins/source/stripe/resources/services/credit_notes/credit_notes.go new file mode 100644 index 00000000000000..1b8adb52fe8f77 --- /dev/null +++ b/plugins/source/stripe/resources/services/credit_notes/credit_notes.go @@ -0,0 +1,43 @@ +package credit_notes + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func CreditNotes() *schema.Table { + return &schema.Table{ + Name: "stripe_credit_notes", + Description: `https://stripe.com/docs/api/credit_notes`, + Transform: transformers.TransformWithStruct(&stripe.CreditNote{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchCreditNotes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchCreditNotes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.CreditNoteListParams{} + + it := cl.Services.CreditNotes.List(lp) + for it.Next() { + res <- it.CreditNote() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/credit_notes/credit_notes_test.go b/plugins/source/stripe/resources/services/credit_notes/credit_notes_test.go new file mode 100644 index 00000000000000..095425e05391a6 --- /dev/null +++ b/plugins/source/stripe/resources/services/credit_notes/credit_notes_test.go @@ -0,0 +1,12 @@ +package credit_notes_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/credit_notes" +) + +func TestCreditNotes(t *testing.T) { + client.MockTestHelper(t, credit_notes.CreditNotes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/customers/customers.go b/plugins/source/stripe/resources/services/customers/customers.go new file mode 100644 index 00000000000000..c702dfb390fbe0 --- /dev/null +++ b/plugins/source/stripe/resources/services/customers/customers.go @@ -0,0 +1,77 @@ +package customers + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Customers() *schema.Table { + return &schema.Table{ + Name: "stripe_customers", + Description: `https://stripe.com/docs/api/customers`, + Transform: transformers.TransformWithStruct(&stripe.Customer{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("DefaultSource")))...), + Resolver: fetchCustomers, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchCustomers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.CustomerListParams{} + + const key = "customers" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Customers.List(lp) + for it.Next() { + data := it.Customer() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/customers/customers_test.go b/plugins/source/stripe/resources/services/customers/customers_test.go new file mode 100644 index 00000000000000..9d2b194dbbeb1e --- /dev/null +++ b/plugins/source/stripe/resources/services/customers/customers_test.go @@ -0,0 +1,12 @@ +package customers_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/customers" +) + +func TestCustomers(t *testing.T) { + client.MockTestHelper(t, customers.Customers(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/disputes/disputes.go b/plugins/source/stripe/resources/services/disputes/disputes.go new file mode 100644 index 00000000000000..b6c6ee1411bc11 --- /dev/null +++ b/plugins/source/stripe/resources/services/disputes/disputes.go @@ -0,0 +1,77 @@ +package disputes + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Disputes() *schema.Table { + return &schema.Table{ + Name: "stripe_disputes", + Description: `https://stripe.com/docs/api/disputes`, + Transform: transformers.TransformWithStruct(&stripe.Dispute{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchDisputes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchDisputes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.DisputeListParams{} + + const key = "disputes" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Disputes.List(lp) + for it.Next() { + data := it.Dispute() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/disputes/disputes_test.go b/plugins/source/stripe/resources/services/disputes/disputes_test.go new file mode 100644 index 00000000000000..6824bee8f81967 --- /dev/null +++ b/plugins/source/stripe/resources/services/disputes/disputes_test.go @@ -0,0 +1,12 @@ +package disputes_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/disputes" +) + +func TestDisputes(t *testing.T) { + client.MockTestHelper(t, disputes.Disputes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/events/events.go b/plugins/source/stripe/resources/services/events/events.go new file mode 100644 index 00000000000000..1f55c3a2a73480 --- /dev/null +++ b/plugins/source/stripe/resources/services/events/events.go @@ -0,0 +1,77 @@ +package events + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Events() *schema.Table { + return &schema.Table{ + Name: "stripe_events", + Description: `https://stripe.com/docs/api/events`, + Transform: transformers.TransformWithStruct(&stripe.Event{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchEvents, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchEvents(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.EventListParams{} + + const key = "events" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Events.List(lp) + for it.Next() { + data := it.Event() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/events/events_test.go b/plugins/source/stripe/resources/services/events/events_test.go new file mode 100644 index 00000000000000..92ed81823c4391 --- /dev/null +++ b/plugins/source/stripe/resources/services/events/events_test.go @@ -0,0 +1,12 @@ +package events_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/events" +) + +func TestEvents(t *testing.T) { + client.MockTestHelper(t, events.Events(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/file_links/file_links.go b/plugins/source/stripe/resources/services/file_links/file_links.go new file mode 100644 index 00000000000000..a6f3cca6d40fa5 --- /dev/null +++ b/plugins/source/stripe/resources/services/file_links/file_links.go @@ -0,0 +1,77 @@ +package file_links + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func FileLinks() *schema.Table { + return &schema.Table{ + Name: "stripe_file_links", + Description: `https://stripe.com/docs/api/file_links`, + Transform: transformers.TransformWithStruct(&stripe.FileLink{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchFileLinks, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchFileLinks(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.FileLinkListParams{} + + const key = "file_links" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.FileLinks.List(lp) + for it.Next() { + data := it.FileLink() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/file_links/file_links_test.go b/plugins/source/stripe/resources/services/file_links/file_links_test.go new file mode 100644 index 00000000000000..d4a6d3468a1506 --- /dev/null +++ b/plugins/source/stripe/resources/services/file_links/file_links_test.go @@ -0,0 +1,12 @@ +package file_links_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/file_links" +) + +func TestFileLinks(t *testing.T) { + client.MockTestHelper(t, file_links.FileLinks(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/files/files.go b/plugins/source/stripe/resources/services/files/files.go new file mode 100644 index 00000000000000..30eb8b3272c4d2 --- /dev/null +++ b/plugins/source/stripe/resources/services/files/files.go @@ -0,0 +1,77 @@ +package files + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Files() *schema.Table { + return &schema.Table{ + Name: "stripe_files", + Description: `https://stripe.com/docs/api/files`, + Transform: transformers.TransformWithStruct(&stripe.File{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchFiles, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchFiles(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.FileListParams{} + + const key = "files" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Files.List(lp) + for it.Next() { + data := it.File() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/files/files_test.go b/plugins/source/stripe/resources/services/files/files_test.go new file mode 100644 index 00000000000000..47d9d53b1049a2 --- /dev/null +++ b/plugins/source/stripe/resources/services/files/files_test.go @@ -0,0 +1,12 @@ +package files_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/files" +) + +func TestFiles(t *testing.T) { + client.MockTestHelper(t, files.Files(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/identity/identity_verification_reports.go b/plugins/source/stripe/resources/services/identity/identity_verification_reports.go new file mode 100644 index 00000000000000..dc2659cf1fc032 --- /dev/null +++ b/plugins/source/stripe/resources/services/identity/identity_verification_reports.go @@ -0,0 +1,77 @@ +package identity + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IdentityVerificationReports() *schema.Table { + return &schema.Table{ + Name: "stripe_identity_verification_reports", + Description: `https://stripe.com/docs/api/identity_verification_reports`, + Transform: transformers.TransformWithStruct(&stripe.IdentityVerificationReport{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIdentityVerificationReports, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIdentityVerificationReports(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IdentityVerificationReportListParams{} + + const key = "identity_verification_reports" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IdentityVerificationReports.List(lp) + for it.Next() { + data := it.IdentityVerificationReport() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/identity/identity_verification_reports_test.go b/plugins/source/stripe/resources/services/identity/identity_verification_reports_test.go new file mode 100644 index 00000000000000..998ab4486b7b27 --- /dev/null +++ b/plugins/source/stripe/resources/services/identity/identity_verification_reports_test.go @@ -0,0 +1,12 @@ +package identity_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/identity" +) + +func TestIdentityVerificationReports(t *testing.T) { + client.MockTestHelper(t, identity.IdentityVerificationReports(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/invoices/invoice_items.go b/plugins/source/stripe/resources/services/invoices/invoice_items.go new file mode 100644 index 00000000000000..d6a6337eadca11 --- /dev/null +++ b/plugins/source/stripe/resources/services/invoices/invoice_items.go @@ -0,0 +1,43 @@ +package invoices + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func InvoiceItems() *schema.Table { + return &schema.Table{ + Name: "stripe_invoice_items", + Description: `https://stripe.com/docs/api/invoiceitems`, + Transform: transformers.TransformWithStruct(&stripe.InvoiceItem{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("Plan")))...), + Resolver: fetchInvoiceItems, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchInvoiceItems(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.InvoiceItemListParams{} + + it := cl.Services.InvoiceItems.List(lp) + for it.Next() { + res <- it.InvoiceItem() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/invoices/invoice_items_test.go b/plugins/source/stripe/resources/services/invoices/invoice_items_test.go new file mode 100644 index 00000000000000..95b4220411b336 --- /dev/null +++ b/plugins/source/stripe/resources/services/invoices/invoice_items_test.go @@ -0,0 +1,12 @@ +package invoices_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/invoices" +) + +func TestInvoiceItems(t *testing.T) { + client.MockTestHelper(t, invoices.InvoiceItems(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/invoices/invoices.go b/plugins/source/stripe/resources/services/invoices/invoices.go new file mode 100644 index 00000000000000..55f7abfbe8631f --- /dev/null +++ b/plugins/source/stripe/resources/services/invoices/invoices.go @@ -0,0 +1,77 @@ +package invoices + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Invoices() *schema.Table { + return &schema.Table{ + Name: "stripe_invoices", + Description: `https://stripe.com/docs/api/invoices`, + Transform: transformers.TransformWithStruct(&stripe.Invoice{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("DefaultSource")))...), + Resolver: fetchInvoices, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchInvoices(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.InvoiceListParams{} + + const key = "invoices" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Invoices.List(lp) + for it.Next() { + data := it.Invoice() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/invoices/invoices_test.go b/plugins/source/stripe/resources/services/invoices/invoices_test.go new file mode 100644 index 00000000000000..2a43e63c102139 --- /dev/null +++ b/plugins/source/stripe/resources/services/invoices/invoices_test.go @@ -0,0 +1,12 @@ +package invoices_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/invoices" +) + +func TestInvoices(t *testing.T) { + client.MockTestHelper(t, invoices.Invoices(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_authorizations.go b/plugins/source/stripe/resources/services/issuing/issuing_authorizations.go new file mode 100644 index 00000000000000..f457edf9767ee1 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_authorizations.go @@ -0,0 +1,77 @@ +package issuing + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IssuingAuthorizations() *schema.Table { + return &schema.Table{ + Name: "stripe_issuing_authorizations", + Description: `https://stripe.com/docs/api/issuing_authorizations`, + Transform: transformers.TransformWithStruct(&stripe.IssuingAuthorization{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIssuingAuthorizations, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIssuingAuthorizations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IssuingAuthorizationListParams{} + + const key = "issuing_authorizations" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IssuingAuthorizations.List(lp) + for it.Next() { + data := it.IssuingAuthorization() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_authorizations_test.go b/plugins/source/stripe/resources/services/issuing/issuing_authorizations_test.go new file mode 100644 index 00000000000000..65098a993d0487 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_authorizations_test.go @@ -0,0 +1,12 @@ +package issuing_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" +) + +func TestIssuingAuthorizations(t *testing.T) { + client.MockTestHelper(t, issuing.IssuingAuthorizations(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_cardholders.go b/plugins/source/stripe/resources/services/issuing/issuing_cardholders.go new file mode 100644 index 00000000000000..82dadca9464d15 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_cardholders.go @@ -0,0 +1,77 @@ +package issuing + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IssuingCardholders() *schema.Table { + return &schema.Table{ + Name: "stripe_issuing_cardholders", + Description: `https://stripe.com/docs/api/issuing_cardholders`, + Transform: transformers.TransformWithStruct(&stripe.IssuingCardholder{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIssuingCardholders, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIssuingCardholders(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IssuingCardholderListParams{} + + const key = "issuing_cardholders" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IssuingCardholders.List(lp) + for it.Next() { + data := it.IssuingCardholder() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_cardholders_test.go b/plugins/source/stripe/resources/services/issuing/issuing_cardholders_test.go new file mode 100644 index 00000000000000..1bffbefb47e465 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_cardholders_test.go @@ -0,0 +1,12 @@ +package issuing_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" +) + +func TestIssuingCardholders(t *testing.T) { + client.MockTestHelper(t, issuing.IssuingCardholders(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_cards.go b/plugins/source/stripe/resources/services/issuing/issuing_cards.go new file mode 100644 index 00000000000000..deee70564ba542 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_cards.go @@ -0,0 +1,77 @@ +package issuing + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IssuingCards() *schema.Table { + return &schema.Table{ + Name: "stripe_issuing_cards", + Description: `https://stripe.com/docs/api/issuing_cards`, + Transform: transformers.TransformWithStruct(&stripe.IssuingCard{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIssuingCards, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIssuingCards(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IssuingCardListParams{} + + const key = "issuing_cards" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IssuingCards.List(lp) + for it.Next() { + data := it.IssuingCard() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_cards_test.go b/plugins/source/stripe/resources/services/issuing/issuing_cards_test.go new file mode 100644 index 00000000000000..fb60aba28a997b --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_cards_test.go @@ -0,0 +1,12 @@ +package issuing_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" +) + +func TestIssuingCards(t *testing.T) { + client.MockTestHelper(t, issuing.IssuingCards(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_disputes.go b/plugins/source/stripe/resources/services/issuing/issuing_disputes.go new file mode 100644 index 00000000000000..f1e2a564c0a42d --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_disputes.go @@ -0,0 +1,77 @@ +package issuing + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IssuingDisputes() *schema.Table { + return &schema.Table{ + Name: "stripe_issuing_disputes", + Description: `https://stripe.com/docs/api/issuing_disputes`, + Transform: transformers.TransformWithStruct(&stripe.IssuingDispute{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIssuingDisputes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIssuingDisputes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IssuingDisputeListParams{} + + const key = "issuing_disputes" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IssuingDisputes.List(lp) + for it.Next() { + data := it.IssuingDispute() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_disputes_test.go b/plugins/source/stripe/resources/services/issuing/issuing_disputes_test.go new file mode 100644 index 00000000000000..56a5aabdfbd3e4 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_disputes_test.go @@ -0,0 +1,12 @@ +package issuing_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" +) + +func TestIssuingDisputes(t *testing.T) { + client.MockTestHelper(t, issuing.IssuingDisputes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_transactions.go b/plugins/source/stripe/resources/services/issuing/issuing_transactions.go new file mode 100644 index 00000000000000..5436a1f0a53ba6 --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_transactions.go @@ -0,0 +1,77 @@ +package issuing + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func IssuingTransactions() *schema.Table { + return &schema.Table{ + Name: "stripe_issuing_transactions", + Description: `https://stripe.com/docs/api/issuing_transactions`, + Transform: transformers.TransformWithStruct(&stripe.IssuingTransaction{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchIssuingTransactions, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchIssuingTransactions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.IssuingTransactionListParams{} + + const key = "issuing_transactions" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.IssuingTransactions.List(lp) + for it.Next() { + data := it.IssuingTransaction() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/issuing/issuing_transactions_test.go b/plugins/source/stripe/resources/services/issuing/issuing_transactions_test.go new file mode 100644 index 00000000000000..0afe98da5ea65f --- /dev/null +++ b/plugins/source/stripe/resources/services/issuing/issuing_transactions_test.go @@ -0,0 +1,12 @@ +package issuing_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/issuing" +) + +func TestIssuingTransactions(t *testing.T) { + client.MockTestHelper(t, issuing.IssuingTransactions(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/payment/payment_intents.go b/plugins/source/stripe/resources/services/payment/payment_intents.go new file mode 100644 index 00000000000000..c27873f78c2484 --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_intents.go @@ -0,0 +1,77 @@ +package payment + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func PaymentIntents() *schema.Table { + return &schema.Table{ + Name: "stripe_payment_intents", + Description: `https://stripe.com/docs/api/payment_intents`, + Transform: transformers.TransformWithStruct(&stripe.PaymentIntent{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("Source")))...), + Resolver: fetchPaymentIntents, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchPaymentIntents(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PaymentIntentListParams{} + + const key = "payment_intents" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.PaymentIntents.List(lp) + for it.Next() { + data := it.PaymentIntent() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/payment/payment_intents_test.go b/plugins/source/stripe/resources/services/payment/payment_intents_test.go new file mode 100644 index 00000000000000..8f831ca277cf55 --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_intents_test.go @@ -0,0 +1,12 @@ +package payment_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payment" +) + +func TestPaymentIntents(t *testing.T) { + client.MockTestHelper(t, payment.PaymentIntents(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/payment/payment_links.go b/plugins/source/stripe/resources/services/payment/payment_links.go new file mode 100644 index 00000000000000..607f0232943418 --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_links.go @@ -0,0 +1,43 @@ +package payment + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func PaymentLinks() *schema.Table { + return &schema.Table{ + Name: "stripe_payment_links", + Description: `https://stripe.com/docs/api/payment_links`, + Transform: transformers.TransformWithStruct(&stripe.PaymentLink{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPaymentLinks, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchPaymentLinks(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PaymentLinkListParams{} + + it := cl.Services.PaymentLinks.List(lp) + for it.Next() { + res <- it.PaymentLink() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/payment/payment_links_test.go b/plugins/source/stripe/resources/services/payment/payment_links_test.go new file mode 100644 index 00000000000000..ad0f77a4487849 --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_links_test.go @@ -0,0 +1,12 @@ +package payment_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payment" +) + +func TestPaymentLinks(t *testing.T) { + client.MockTestHelper(t, payment.PaymentLinks(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/payment/payment_methods.go b/plugins/source/stripe/resources/services/payment/payment_methods.go new file mode 100644 index 00000000000000..87c62f83264f33 --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_methods.go @@ -0,0 +1,43 @@ +package payment + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func PaymentMethods() *schema.Table { + return &schema.Table{ + Name: "stripe_payment_methods", + Description: `https://stripe.com/docs/api/payment_methods`, + Transform: transformers.TransformWithStruct(&stripe.PaymentMethod{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPaymentMethods, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchPaymentMethods(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PaymentMethodListParams{} + + it := cl.Services.PaymentMethods.List(lp) + for it.Next() { + res <- it.PaymentMethod() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/payment/payment_methods_test.go b/plugins/source/stripe/resources/services/payment/payment_methods_test.go new file mode 100644 index 00000000000000..80af70577c3afe --- /dev/null +++ b/plugins/source/stripe/resources/services/payment/payment_methods_test.go @@ -0,0 +1,12 @@ +package payment_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payment" +) + +func TestPaymentMethods(t *testing.T) { + client.MockTestHelper(t, payment.PaymentMethods(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/payouts/payouts.go b/plugins/source/stripe/resources/services/payouts/payouts.go new file mode 100644 index 00000000000000..839c52ea15f9bd --- /dev/null +++ b/plugins/source/stripe/resources/services/payouts/payouts.go @@ -0,0 +1,77 @@ +package payouts + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Payouts() *schema.Table { + return &schema.Table{ + Name: "stripe_payouts", + Description: `https://stripe.com/docs/api/payouts`, + Transform: transformers.TransformWithStruct(&stripe.Payout{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPayouts, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchPayouts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PayoutListParams{} + + const key = "payouts" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Payouts.List(lp) + for it.Next() { + data := it.Payout() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/payouts/payouts_test.go b/plugins/source/stripe/resources/services/payouts/payouts_test.go new file mode 100644 index 00000000000000..3ebadd65fe2672 --- /dev/null +++ b/plugins/source/stripe/resources/services/payouts/payouts_test.go @@ -0,0 +1,12 @@ +package payouts_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/payouts" +) + +func TestPayouts(t *testing.T) { + client.MockTestHelper(t, payouts.Payouts(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/plans/plans.go b/plugins/source/stripe/resources/services/plans/plans.go new file mode 100644 index 00000000000000..c97ca6fc9bd07a --- /dev/null +++ b/plugins/source/stripe/resources/services/plans/plans.go @@ -0,0 +1,77 @@ +package plans + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Plans() *schema.Table { + return &schema.Table{ + Name: "stripe_plans", + Description: `https://stripe.com/docs/api/plans`, + Transform: transformers.TransformWithStruct(&stripe.Plan{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPlans, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchPlans(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PlanListParams{} + + const key = "plans" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Plans.List(lp) + for it.Next() { + data := it.Plan() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/plans/plans_test.go b/plugins/source/stripe/resources/services/plans/plans_test.go new file mode 100644 index 00000000000000..ca7c046a574de6 --- /dev/null +++ b/plugins/source/stripe/resources/services/plans/plans_test.go @@ -0,0 +1,12 @@ +package plans_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/plans" +) + +func TestPlans(t *testing.T) { + client.MockTestHelper(t, plans.Plans(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/prices/prices.go b/plugins/source/stripe/resources/services/prices/prices.go new file mode 100644 index 00000000000000..4282aeb57be0cf --- /dev/null +++ b/plugins/source/stripe/resources/services/prices/prices.go @@ -0,0 +1,77 @@ +package prices + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Prices() *schema.Table { + return &schema.Table{ + Name: "stripe_prices", + Description: `https://stripe.com/docs/api/prices`, + Transform: transformers.TransformWithStruct(&stripe.Price{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPrices, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchPrices(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PriceListParams{} + + const key = "prices" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Prices.List(lp) + for it.Next() { + data := it.Price() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/prices/prices_test.go b/plugins/source/stripe/resources/services/prices/prices_test.go new file mode 100644 index 00000000000000..506522d4c01e6c --- /dev/null +++ b/plugins/source/stripe/resources/services/prices/prices_test.go @@ -0,0 +1,12 @@ +package prices_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/prices" +) + +func TestPrices(t *testing.T) { + client.MockTestHelper(t, prices.Prices(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/products/products.go b/plugins/source/stripe/resources/services/products/products.go new file mode 100644 index 00000000000000..4784bd00fd3db3 --- /dev/null +++ b/plugins/source/stripe/resources/services/products/products.go @@ -0,0 +1,77 @@ +package products + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Products() *schema.Table { + return &schema.Table{ + Name: "stripe_products", + Description: `https://stripe.com/docs/api/products`, + Transform: transformers.TransformWithStruct(&stripe.Product{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("Attributes", "DeactivateOn")))...), + Resolver: fetchProducts, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchProducts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ProductListParams{} + + const key = "products" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Products.List(lp) + for it.Next() { + data := it.Product() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/products/products_test.go b/plugins/source/stripe/resources/services/products/products_test.go new file mode 100644 index 00000000000000..07170210e8459f --- /dev/null +++ b/plugins/source/stripe/resources/services/products/products_test.go @@ -0,0 +1,12 @@ +package products_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/products" +) + +func TestProducts(t *testing.T) { + client.MockTestHelper(t, products.Products(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/promotion_codes/promotion_codes.go b/plugins/source/stripe/resources/services/promotion_codes/promotion_codes.go new file mode 100644 index 00000000000000..92ef86e600faad --- /dev/null +++ b/plugins/source/stripe/resources/services/promotion_codes/promotion_codes.go @@ -0,0 +1,77 @@ +package promotion_codes + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func PromotionCodes() *schema.Table { + return &schema.Table{ + Name: "stripe_promotion_codes", + Description: `https://stripe.com/docs/api/promotion_codes`, + Transform: transformers.TransformWithStruct(&stripe.PromotionCode{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchPromotionCodes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchPromotionCodes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.PromotionCodeListParams{} + + const key = "promotion_codes" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.PromotionCodes.List(lp) + for it.Next() { + data := it.PromotionCode() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/promotion_codes/promotion_codes_test.go b/plugins/source/stripe/resources/services/promotion_codes/promotion_codes_test.go new file mode 100644 index 00000000000000..9558264c8270d1 --- /dev/null +++ b/plugins/source/stripe/resources/services/promotion_codes/promotion_codes_test.go @@ -0,0 +1,12 @@ +package promotion_codes_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/promotion_codes" +) + +func TestPromotionCodes(t *testing.T) { + client.MockTestHelper(t, promotion_codes.PromotionCodes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/quotes/quotes.go b/plugins/source/stripe/resources/services/quotes/quotes.go new file mode 100644 index 00000000000000..52ad9ecd6a2308 --- /dev/null +++ b/plugins/source/stripe/resources/services/quotes/quotes.go @@ -0,0 +1,43 @@ +package quotes + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Quotes() *schema.Table { + return &schema.Table{ + Name: "stripe_quotes", + Description: `https://stripe.com/docs/api/quotes`, + Transform: transformers.TransformWithStruct(&stripe.Quote{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchQuotes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchQuotes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.QuoteListParams{} + + it := cl.Services.Quotes.List(lp) + for it.Next() { + res <- it.Quote() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/quotes/quotes_test.go b/plugins/source/stripe/resources/services/quotes/quotes_test.go new file mode 100644 index 00000000000000..d6d0894aee483b --- /dev/null +++ b/plugins/source/stripe/resources/services/quotes/quotes_test.go @@ -0,0 +1,12 @@ +package quotes_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/quotes" +) + +func TestQuotes(t *testing.T) { + client.MockTestHelper(t, quotes.Quotes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings.go b/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings.go new file mode 100644 index 00000000000000..6cc19173b210f3 --- /dev/null +++ b/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings.go @@ -0,0 +1,43 @@ +package radar + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func RadarEarlyFraudWarnings() *schema.Table { + return &schema.Table{ + Name: "stripe_radar_early_fraud_warnings", + Description: `https://stripe.com/docs/api/radar_early_fraud_warnings`, + Transform: transformers.TransformWithStruct(&stripe.RadarEarlyFraudWarning{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchRadarEarlyFraudWarnings, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchRadarEarlyFraudWarnings(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.RadarEarlyFraudWarningListParams{} + + it := cl.Services.RadarEarlyFraudWarnings.List(lp) + for it.Next() { + res <- it.RadarEarlyFraudWarning() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings_test.go b/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings_test.go new file mode 100644 index 00000000000000..3613d431679247 --- /dev/null +++ b/plugins/source/stripe/resources/services/radar/radar_early_fraud_warnings_test.go @@ -0,0 +1,12 @@ +package radar_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/radar" +) + +func TestRadarEarlyFraudWarnings(t *testing.T) { + client.MockTestHelper(t, radar.RadarEarlyFraudWarnings(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/refunds/refunds.go b/plugins/source/stripe/resources/services/refunds/refunds.go new file mode 100644 index 00000000000000..93588a0d55b204 --- /dev/null +++ b/plugins/source/stripe/resources/services/refunds/refunds.go @@ -0,0 +1,77 @@ +package refunds + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Refunds() *schema.Table { + return &schema.Table{ + Name: "stripe_refunds", + Description: `https://stripe.com/docs/api/refunds`, + Transform: transformers.TransformWithStruct(&stripe.Refund{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchRefunds, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchRefunds(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.RefundListParams{} + + const key = "refunds" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Refunds.List(lp) + for it.Next() { + data := it.Refund() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/refunds/refunds_test.go b/plugins/source/stripe/resources/services/refunds/refunds_test.go new file mode 100644 index 00000000000000..04ea59d8263e0d --- /dev/null +++ b/plugins/source/stripe/resources/services/refunds/refunds_test.go @@ -0,0 +1,12 @@ +package refunds_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/refunds" +) + +func TestRefunds(t *testing.T) { + client.MockTestHelper(t, refunds.Refunds(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/reporting/reporting_report_runs.go b/plugins/source/stripe/resources/services/reporting/reporting_report_runs.go new file mode 100644 index 00000000000000..dfefa1d577e2d9 --- /dev/null +++ b/plugins/source/stripe/resources/services/reporting/reporting_report_runs.go @@ -0,0 +1,77 @@ +package reporting + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func ReportingReportRuns() *schema.Table { + return &schema.Table{ + Name: "stripe_reporting_report_runs", + Description: `https://stripe.com/docs/api/reporting_report_runs`, + Transform: transformers.TransformWithStruct(&stripe.ReportingReportRun{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchReportingReportRuns, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchReportingReportRuns(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ReportingReportRunListParams{} + + const key = "reporting_report_runs" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.ReportingReportRuns.List(lp) + for it.Next() { + data := it.ReportingReportRun() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/reporting/reporting_report_runs_test.go b/plugins/source/stripe/resources/services/reporting/reporting_report_runs_test.go new file mode 100644 index 00000000000000..622e8d39deb6c5 --- /dev/null +++ b/plugins/source/stripe/resources/services/reporting/reporting_report_runs_test.go @@ -0,0 +1,12 @@ +package reporting_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/reporting" +) + +func TestReportingReportRuns(t *testing.T) { + client.MockTestHelper(t, reporting.ReportingReportRuns(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/reporting/reporting_report_types.go b/plugins/source/stripe/resources/services/reporting/reporting_report_types.go new file mode 100644 index 00000000000000..6608040d7091cf --- /dev/null +++ b/plugins/source/stripe/resources/services/reporting/reporting_report_types.go @@ -0,0 +1,43 @@ +package reporting + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func ReportingReportTypes() *schema.Table { + return &schema.Table{ + Name: "stripe_reporting_report_types", + Description: `https://stripe.com/docs/api/reporting_report_types`, + Transform: transformers.TransformWithStruct(&stripe.ReportingReportType{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchReportingReportTypes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchReportingReportTypes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ReportingReportTypeListParams{} + + it := cl.Services.ReportingReportTypes.List(lp) + for it.Next() { + res <- it.ReportingReportType() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/reporting/reporting_report_types_test.go b/plugins/source/stripe/resources/services/reporting/reporting_report_types_test.go new file mode 100644 index 00000000000000..c54f1fe6f91df5 --- /dev/null +++ b/plugins/source/stripe/resources/services/reporting/reporting_report_types_test.go @@ -0,0 +1,12 @@ +package reporting_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/reporting" +) + +func TestReportingReportTypes(t *testing.T) { + client.MockTestHelper(t, reporting.ReportingReportTypes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/reviews/reviews.go b/plugins/source/stripe/resources/services/reviews/reviews.go new file mode 100644 index 00000000000000..54a13f5434ea75 --- /dev/null +++ b/plugins/source/stripe/resources/services/reviews/reviews.go @@ -0,0 +1,77 @@ +package reviews + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Reviews() *schema.Table { + return &schema.Table{ + Name: "stripe_reviews", + Description: `https://stripe.com/docs/api/reviews`, + Transform: transformers.TransformWithStruct(&stripe.Review{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchReviews, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchReviews(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ReviewListParams{} + + const key = "reviews" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Reviews.List(lp) + for it.Next() { + data := it.Review() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/reviews/reviews_test.go b/plugins/source/stripe/resources/services/reviews/reviews_test.go new file mode 100644 index 00000000000000..08641735ae1d79 --- /dev/null +++ b/plugins/source/stripe/resources/services/reviews/reviews_test.go @@ -0,0 +1,12 @@ +package reviews_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/reviews" +) + +func TestReviews(t *testing.T) { + client.MockTestHelper(t, reviews.Reviews(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/shipping_rates/shipping_rates.go b/plugins/source/stripe/resources/services/shipping_rates/shipping_rates.go new file mode 100644 index 00000000000000..4d686e8bc61593 --- /dev/null +++ b/plugins/source/stripe/resources/services/shipping_rates/shipping_rates.go @@ -0,0 +1,77 @@ +package shipping_rates + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func ShippingRates() *schema.Table { + return &schema.Table{ + Name: "stripe_shipping_rates", + Description: `https://stripe.com/docs/api/shipping_rates`, + Transform: transformers.TransformWithStruct(&stripe.ShippingRate{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchShippingRates, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchShippingRates(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.ShippingRateListParams{} + + const key = "shipping_rates" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.ShippingRates.List(lp) + for it.Next() { + data := it.ShippingRate() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/shipping_rates/shipping_rates_test.go b/plugins/source/stripe/resources/services/shipping_rates/shipping_rates_test.go new file mode 100644 index 00000000000000..01da7dd7b82a27 --- /dev/null +++ b/plugins/source/stripe/resources/services/shipping_rates/shipping_rates_test.go @@ -0,0 +1,12 @@ +package shipping_rates_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/shipping_rates" +) + +func TestShippingRates(t *testing.T) { + client.MockTestHelper(t, shipping_rates.ShippingRates(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs.go b/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs.go new file mode 100644 index 00000000000000..a5aec8fe51f1c7 --- /dev/null +++ b/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs.go @@ -0,0 +1,43 @@ +package sigma + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func SigmaScheduledQueryRuns() *schema.Table { + return &schema.Table{ + Name: "stripe_sigma_scheduled_query_runs", + Description: `https://stripe.com/docs/api/sigma_scheduled_query_runs`, + Transform: transformers.TransformWithStruct(&stripe.SigmaScheduledQueryRun{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchSigmaScheduledQueryRuns, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchSigmaScheduledQueryRuns(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.SigmaScheduledQueryRunListParams{} + + it := cl.Services.SigmaScheduledQueryRuns.List(lp) + for it.Next() { + res <- it.SigmaScheduledQueryRun() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs_test.go b/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs_test.go new file mode 100644 index 00000000000000..ec0d0e02414a75 --- /dev/null +++ b/plugins/source/stripe/resources/services/sigma/sigma_scheduled_query_runs_test.go @@ -0,0 +1,12 @@ +package sigma_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/sigma" +) + +func TestSigmaScheduledQueryRuns(t *testing.T) { + client.MockTestHelper(t, sigma.SigmaScheduledQueryRuns(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/subscription/subscription_schedules.go b/plugins/source/stripe/resources/services/subscription/subscription_schedules.go new file mode 100644 index 00000000000000..328ad2cffd891b --- /dev/null +++ b/plugins/source/stripe/resources/services/subscription/subscription_schedules.go @@ -0,0 +1,77 @@ +package subscription + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func SubscriptionSchedules() *schema.Table { + return &schema.Table{ + Name: "stripe_subscription_schedules", + Description: `https://stripe.com/docs/api/subscription_schedules`, + Transform: transformers.TransformWithStruct(&stripe.SubscriptionSchedule{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchSubscriptionSchedules, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchSubscriptionSchedules(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.SubscriptionScheduleListParams{} + + const key = "subscription_schedules" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.SubscriptionSchedules.List(lp) + for it.Next() { + data := it.SubscriptionSchedule() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/subscription/subscription_schedules_test.go b/plugins/source/stripe/resources/services/subscription/subscription_schedules_test.go new file mode 100644 index 00000000000000..3b8219d93f5fd5 --- /dev/null +++ b/plugins/source/stripe/resources/services/subscription/subscription_schedules_test.go @@ -0,0 +1,12 @@ +package subscription_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/subscription" +) + +func TestSubscriptionSchedules(t *testing.T) { + client.MockTestHelper(t, subscription.SubscriptionSchedules(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/subscription/subscriptions.go b/plugins/source/stripe/resources/services/subscription/subscriptions.go new file mode 100644 index 00000000000000..19a7dbecefb266 --- /dev/null +++ b/plugins/source/stripe/resources/services/subscription/subscriptions.go @@ -0,0 +1,77 @@ +package subscription + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Subscriptions() *schema.Table { + return &schema.Table{ + Name: "stripe_subscriptions", + Description: `https://stripe.com/docs/api/subscriptions`, + Transform: transformers.TransformWithStruct(&stripe.Subscription{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("DefaultSource")))...), + Resolver: fetchSubscriptions, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchSubscriptions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.SubscriptionListParams{} + + const key = "subscriptions" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Subscriptions.List(lp) + for it.Next() { + data := it.Subscription() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/subscription/subscriptions_test.go b/plugins/source/stripe/resources/services/subscription/subscriptions_test.go new file mode 100644 index 00000000000000..8cfcab03aac6fb --- /dev/null +++ b/plugins/source/stripe/resources/services/subscription/subscriptions_test.go @@ -0,0 +1,12 @@ +package subscription_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/subscription" +) + +func TestSubscriptions(t *testing.T) { + client.MockTestHelper(t, subscription.Subscriptions(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/tax/tax_codes.go b/plugins/source/stripe/resources/services/tax/tax_codes.go new file mode 100644 index 00000000000000..eb9251bb5d4509 --- /dev/null +++ b/plugins/source/stripe/resources/services/tax/tax_codes.go @@ -0,0 +1,43 @@ +package tax + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TaxCodes() *schema.Table { + return &schema.Table{ + Name: "stripe_tax_codes", + Description: `https://stripe.com/docs/api/tax_codes`, + Transform: transformers.TransformWithStruct(&stripe.TaxCode{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTaxCodes, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTaxCodes(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TaxCodeListParams{} + + it := cl.Services.TaxCodes.List(lp) + for it.Next() { + res <- it.TaxCode() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/tax/tax_codes_test.go b/plugins/source/stripe/resources/services/tax/tax_codes_test.go new file mode 100644 index 00000000000000..2a35e2681a6b6e --- /dev/null +++ b/plugins/source/stripe/resources/services/tax/tax_codes_test.go @@ -0,0 +1,12 @@ +package tax_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/tax" +) + +func TestTaxCodes(t *testing.T) { + client.MockTestHelper(t, tax.TaxCodes(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/tax/tax_rates.go b/plugins/source/stripe/resources/services/tax/tax_rates.go new file mode 100644 index 00000000000000..20b2ddcda7778c --- /dev/null +++ b/plugins/source/stripe/resources/services/tax/tax_rates.go @@ -0,0 +1,77 @@ +package tax + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TaxRates() *schema.Table { + return &schema.Table{ + Name: "stripe_tax_rates", + Description: `https://stripe.com/docs/api/tax_rates`, + Transform: transformers.TransformWithStruct(&stripe.TaxRate{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTaxRates, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchTaxRates(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TaxRateListParams{} + + const key = "tax_rates" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.TaxRates.List(lp) + for it.Next() { + data := it.TaxRate() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/tax/tax_rates_test.go b/plugins/source/stripe/resources/services/tax/tax_rates_test.go new file mode 100644 index 00000000000000..8e75746c66ad6e --- /dev/null +++ b/plugins/source/stripe/resources/services/tax/tax_rates_test.go @@ -0,0 +1,12 @@ +package tax_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/tax" +) + +func TestTaxRates(t *testing.T) { + client.MockTestHelper(t, tax.TaxRates(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_configurations.go b/plugins/source/stripe/resources/services/terminal/terminal_configurations.go new file mode 100644 index 00000000000000..c0991ca2fdc1f3 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_configurations.go @@ -0,0 +1,43 @@ +package terminal + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TerminalConfigurations() *schema.Table { + return &schema.Table{ + Name: "stripe_terminal_configurations", + Description: `https://stripe.com/docs/api/terminal_configurations`, + Transform: transformers.TransformWithStruct(&stripe.TerminalConfiguration{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTerminalConfigurations, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTerminalConfigurations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TerminalConfigurationListParams{} + + it := cl.Services.TerminalConfigurations.List(lp) + for it.Next() { + res <- it.TerminalConfiguration() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_configurations_test.go b/plugins/source/stripe/resources/services/terminal/terminal_configurations_test.go new file mode 100644 index 00000000000000..bb576a089e1176 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_configurations_test.go @@ -0,0 +1,12 @@ +package terminal_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/terminal" +) + +func TestTerminalConfigurations(t *testing.T) { + client.MockTestHelper(t, terminal.TerminalConfigurations(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_locations.go b/plugins/source/stripe/resources/services/terminal/terminal_locations.go new file mode 100644 index 00000000000000..c1240f0cb90ae3 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_locations.go @@ -0,0 +1,43 @@ +package terminal + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TerminalLocations() *schema.Table { + return &schema.Table{ + Name: "stripe_terminal_locations", + Description: `https://stripe.com/docs/api/terminal_locations`, + Transform: transformers.TransformWithStruct(&stripe.TerminalLocation{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTerminalLocations, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTerminalLocations(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TerminalLocationListParams{} + + it := cl.Services.TerminalLocations.List(lp) + for it.Next() { + res <- it.TerminalLocation() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_locations_test.go b/plugins/source/stripe/resources/services/terminal/terminal_locations_test.go new file mode 100644 index 00000000000000..1da4e97b7926c0 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_locations_test.go @@ -0,0 +1,12 @@ +package terminal_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/terminal" +) + +func TestTerminalLocations(t *testing.T) { + client.MockTestHelper(t, terminal.TerminalLocations(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_readers.go b/plugins/source/stripe/resources/services/terminal/terminal_readers.go new file mode 100644 index 00000000000000..5e1659fb8f6e72 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_readers.go @@ -0,0 +1,43 @@ +package terminal + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TerminalReaders() *schema.Table { + return &schema.Table{ + Name: "stripe_terminal_readers", + Description: `https://stripe.com/docs/api/terminal_readers`, + Transform: transformers.TransformWithStruct(&stripe.TerminalReader{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTerminalReaders, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTerminalReaders(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TerminalReaderListParams{} + + it := cl.Services.TerminalReaders.List(lp) + for it.Next() { + res <- it.TerminalReader() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/terminal/terminal_readers_test.go b/plugins/source/stripe/resources/services/terminal/terminal_readers_test.go new file mode 100644 index 00000000000000..1a8d512dd1a282 --- /dev/null +++ b/plugins/source/stripe/resources/services/terminal/terminal_readers_test.go @@ -0,0 +1,12 @@ +package terminal_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/terminal" +) + +func TestTerminalReaders(t *testing.T) { + client.MockTestHelper(t, terminal.TerminalReaders(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/topups/topups.go b/plugins/source/stripe/resources/services/topups/topups.go new file mode 100644 index 00000000000000..f507f94d5e5532 --- /dev/null +++ b/plugins/source/stripe/resources/services/topups/topups.go @@ -0,0 +1,77 @@ +package topups + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Topups() *schema.Table { + return &schema.Table{ + Name: "stripe_topups", + Description: `https://stripe.com/docs/api/topups`, + Transform: transformers.TransformWithStruct(&stripe.Topup{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"), transformers.WithIgnoreInTestsTransformer(client.CreateIgnoreInTestsTransformer("Source")))...), + Resolver: fetchTopups, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchTopups(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TopupListParams{} + + const key = "topups" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Topups.List(lp) + for it.Next() { + data := it.Topup() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/topups/topups_test.go b/plugins/source/stripe/resources/services/topups/topups_test.go new file mode 100644 index 00000000000000..9a26c250a327ab --- /dev/null +++ b/plugins/source/stripe/resources/services/topups/topups_test.go @@ -0,0 +1,12 @@ +package topups_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/topups" +) + +func TestTopups(t *testing.T) { + client.MockTestHelper(t, topups.Topups(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/transfers/transfers.go b/plugins/source/stripe/resources/services/transfers/transfers.go new file mode 100644 index 00000000000000..c5dd321dfdf892 --- /dev/null +++ b/plugins/source/stripe/resources/services/transfers/transfers.go @@ -0,0 +1,77 @@ +package transfers + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func Transfers() *schema.Table { + return &schema.Table{ + Name: "stripe_transfers", + Description: `https://stripe.com/docs/api/transfers`, + Transform: transformers.TransformWithStruct(&stripe.Transfer{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTransfers, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchTransfers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TransferListParams{} + + const key = "transfers" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.Transfers.List(lp) + for it.Next() { + data := it.Transfer() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/transfers/transfers_test.go b/plugins/source/stripe/resources/services/transfers/transfers_test.go new file mode 100644 index 00000000000000..9676545fd17c6e --- /dev/null +++ b/plugins/source/stripe/resources/services/transfers/transfers_test.go @@ -0,0 +1,12 @@ +package transfers_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/transfers" +) + +func TestTransfers(t *testing.T) { + client.MockTestHelper(t, transfers.Transfers(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_credit_reversals.go b/plugins/source/stripe/resources/services/treasury/treasury_credit_reversals.go new file mode 100644 index 00000000000000..9894c88de4e4c5 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_credit_reversals.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryCreditReversals() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_credit_reversals", + Description: `https://stripe.com/docs/api/treasury_credit_reversals`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryCreditReversal{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryCreditReversals, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryCreditReversals(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryCreditReversalListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryCreditReversals.List(lp) + for it.Next() { + res <- it.TreasuryCreditReversal() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_debit_reversals.go b/plugins/source/stripe/resources/services/treasury/treasury_debit_reversals.go new file mode 100644 index 00000000000000..f3425c5969552a --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_debit_reversals.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryDebitReversals() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_debit_reversals", + Description: `https://stripe.com/docs/api/treasury_debit_reversals`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryDebitReversal{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryDebitReversals, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryDebitReversals(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryDebitReversalListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryDebitReversals.List(lp) + for it.Next() { + res <- it.TreasuryDebitReversal() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts.go b/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts.go new file mode 100644 index 00000000000000..63ab90bcb25802 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts.go @@ -0,0 +1,89 @@ +package treasury + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryFinancialAccounts() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_financial_accounts", + Description: `https://stripe.com/docs/api/treasury_financial_accounts`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryFinancialAccount{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryFinancialAccounts, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + + Relations: []*schema.Table{ + TreasuryCreditReversals(), + TreasuryDebitReversals(), + TreasuryInboundTransfers(), + TreasuryOutboundPayments(), + TreasuryOutboundTransfers(), + TreasuryReceivedCredits(), + TreasuryReceivedDebits(), + TreasuryTransactionEntries(), + TreasuryTransactions(), + }, + } +} + +func fetchTreasuryFinancialAccounts(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.TreasuryFinancialAccountListParams{} + + const key = "treasury_financial_accounts" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.TreasuryFinancialAccounts.List(lp) + for it.Next() { + data := it.TreasuryFinancialAccount() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts_test.go b/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts_test.go new file mode 100644 index 00000000000000..f5f74865d481ed --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_financial_accounts_test.go @@ -0,0 +1,12 @@ +package treasury_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/treasury" +) + +func TestTreasuryFinancialAccounts(t *testing.T) { + client.MockTestHelper(t, treasury.TreasuryFinancialAccounts(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_inbound_transfers.go b/plugins/source/stripe/resources/services/treasury/treasury_inbound_transfers.go new file mode 100644 index 00000000000000..8bb9d4e7c0e122 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_inbound_transfers.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryInboundTransfers() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_inbound_transfers", + Description: `https://stripe.com/docs/api/treasury_inbound_transfers`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryInboundTransfer{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryInboundTransfers, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryInboundTransfers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryInboundTransferListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryInboundTransfers.List(lp) + for it.Next() { + res <- it.TreasuryInboundTransfer() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_outbound_payments.go b/plugins/source/stripe/resources/services/treasury/treasury_outbound_payments.go new file mode 100644 index 00000000000000..1cfbc75f9865cb --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_outbound_payments.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryOutboundPayments() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_outbound_payments", + Description: `https://stripe.com/docs/api/treasury_outbound_payments`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryOutboundPayment{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryOutboundPayments, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryOutboundPayments(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryOutboundPaymentListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryOutboundPayments.List(lp) + for it.Next() { + res <- it.TreasuryOutboundPayment() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_outbound_transfers.go b/plugins/source/stripe/resources/services/treasury/treasury_outbound_transfers.go new file mode 100644 index 00000000000000..501dc660197147 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_outbound_transfers.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryOutboundTransfers() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_outbound_transfers", + Description: `https://stripe.com/docs/api/treasury_outbound_transfers`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryOutboundTransfer{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryOutboundTransfers, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryOutboundTransfers(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryOutboundTransferListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryOutboundTransfers.List(lp) + for it.Next() { + res <- it.TreasuryOutboundTransfer() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_received_credits.go b/plugins/source/stripe/resources/services/treasury/treasury_received_credits.go new file mode 100644 index 00000000000000..ee45d04ba56c37 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_received_credits.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryReceivedCredits() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_received_credits", + Description: `https://stripe.com/docs/api/treasury_received_credits`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryReceivedCredit{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryReceivedCredits, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryReceivedCredits(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryReceivedCreditListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryReceivedCredits.List(lp) + for it.Next() { + res <- it.TreasuryReceivedCredit() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_received_debits.go b/plugins/source/stripe/resources/services/treasury/treasury_received_debits.go new file mode 100644 index 00000000000000..06397029f9d065 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_received_debits.go @@ -0,0 +1,47 @@ +package treasury + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryReceivedDebits() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_received_debits", + Description: `https://stripe.com/docs/api/treasury_received_debits`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryReceivedDebit{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryReceivedDebits, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchTreasuryReceivedDebits(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryReceivedDebitListParams{ + FinancialAccount: stripe.String(p.ID), + } + + it := cl.Services.TreasuryReceivedDebits.List(lp) + for it.Next() { + res <- it.TreasuryReceivedDebit() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_transaction_entries.go b/plugins/source/stripe/resources/services/treasury/treasury_transaction_entries.go new file mode 100644 index 00000000000000..b2ffff845163e5 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_transaction_entries.go @@ -0,0 +1,81 @@ +package treasury + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryTransactionEntries() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_transaction_entries", + Description: `https://stripe.com/docs/api/treasury_transaction_entries`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryTransactionEntry{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryTransactionEntries, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchTreasuryTransactionEntries(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryTransactionEntryListParams{ + FinancialAccount: stripe.String(p.ID), + } + + const key = "treasury_transaction_entries" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.TreasuryTransactionEntries.List(lp) + for it.Next() { + data := it.TreasuryTransactionEntry() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/treasury/treasury_transactions.go b/plugins/source/stripe/resources/services/treasury/treasury_transactions.go new file mode 100644 index 00000000000000..51d0b4ba589303 --- /dev/null +++ b/plugins/source/stripe/resources/services/treasury/treasury_transactions.go @@ -0,0 +1,81 @@ +package treasury + +import ( + "context" + + "fmt" + "strconv" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func TreasuryTransactions() *schema.Table { + return &schema.Table{ + Name: "stripe_treasury_transactions", + Description: `https://stripe.com/docs/api/treasury_transactions`, + Transform: transformers.TransformWithStruct(&stripe.TreasuryTransaction{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchTreasuryTransactions, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + { + Name: "created", + Type: schema.TypeTimestamp, + Resolver: schema.PathResolver("Created"), + CreationOptions: schema.ColumnCreationOptions{ + IncrementalKey: true, + }, + }, + }, + IsIncremental: true, + } +} + +func fetchTreasuryTransactions(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + p := parent.Item.(*stripe.TreasuryFinancialAccount) + + lp := &stripe.TreasuryTransactionListParams{ + FinancialAccount: stripe.String(p.ID), + } + + const key = "treasury_transactions" + + if cl.Backend != nil { + value, err := cl.Backend.Get(ctx, key, cl.ID()) + if err != nil { + return fmt.Errorf("failed to retrieve state from backend: %w", err) + } + if value != "" { + vi, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("retrieved invalid state value: %q %w", value, err) + } + lp.Created = &vi + } + } + + it := cl.Services.TreasuryTransactions.List(lp) + for it.Next() { + data := it.TreasuryTransaction() + lp.Created = client.MaxInt64(lp.Created, &data.Created) + res <- data + } + + err := it.Err() + if cl.Backend != nil && err == nil && lp.Created != nil { + return cl.Backend.Set(ctx, key, cl.ID(), strconv.FormatInt(*lp.Created, 10)) + } + return err +} diff --git a/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints.go b/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints.go new file mode 100644 index 00000000000000..ca85dc48768a3f --- /dev/null +++ b/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints.go @@ -0,0 +1,43 @@ +package webhook_endpoints + +import ( + "context" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/transformers" + "github.com/stripe/stripe-go/v74" +) + +func WebhookEndpoints() *schema.Table { + return &schema.Table{ + Name: "stripe_webhook_endpoints", + Description: `https://stripe.com/docs/api/webhook_endpoints`, + Transform: transformers.TransformWithStruct(&stripe.WebhookEndpoint{}, client.SharedTransformers(transformers.WithSkipFields("APIResource", "ID"))...), + Resolver: fetchWebhookEndpoints, + + Columns: []schema.Column{ + { + Name: "id", + Type: schema.TypeString, + Resolver: schema.PathResolver("ID"), + CreationOptions: schema.ColumnCreationOptions{ + PrimaryKey: true, + }, + }, + }, + } +} + +func fetchWebhookEndpoints(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- any) error { + cl := meta.(*client.Client) + + lp := &stripe.WebhookEndpointListParams{} + + it := cl.Services.WebhookEndpoints.List(lp) + for it.Next() { + res <- it.WebhookEndpoint() + } + + return it.Err() +} diff --git a/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints_test.go b/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints_test.go new file mode 100644 index 00000000000000..b96645d42ee96f --- /dev/null +++ b/plugins/source/stripe/resources/services/webhook_endpoints/webhook_endpoints_test.go @@ -0,0 +1,12 @@ +package webhook_endpoints_test + +import ( + "testing" + + "github.com/cloudquery/cloudquery/plugins/source/stripe/client" + "github.com/cloudquery/cloudquery/plugins/source/stripe/resources/services/webhook_endpoints" +) + +func TestWebhookEndpoints(t *testing.T) { + client.MockTestHelper(t, webhook_endpoints.WebhookEndpoints(), client.TestOptions{}) +} diff --git a/plugins/source/stripe/resources/testdata/.gitkeep b/plugins/source/stripe/resources/testdata/.gitkeep new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/plugins/source/tailscale/CHANGELOG.md b/plugins/source/tailscale/CHANGELOG.md index fb804ec1337101..80603204b6464b 100644 --- a/plugins/source/tailscale/CHANGELOG.md +++ b/plugins/source/tailscale/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.2.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-tailscale-v1.1.0...plugins-source-tailscale-v1.2.0) (2023-01-10) + + +### Features + +* **tailscale:** Migrate codegen to transformations ([#6430](https://github.com/cloudquery/cloudquery/issues/6430)) ([dfe5db2](https://github.com/cloudquery/cloudquery/commit/dfe5db25c19dcaaded9b625399d8282d53fcd973)) + + +### Bug Fixes + +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.17.2 ([#6260](https://github.com/cloudquery/cloudquery/issues/6260)) ([805972a](https://github.com/cloudquery/cloudquery/commit/805972aa67ce54e3358501c6b7ee5d85e5f65cac)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](https://github.com/cloudquery/cloudquery/issues/6339)) ([158365a](https://github.com/cloudquery/cloudquery/commit/158365a78dfa4389074f716a0f581f18fedc1080)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](https://github.com/cloudquery/cloudquery/issues/6363)) ([ae6967c](https://github.com/cloudquery/cloudquery/commit/ae6967c22002c554a083f444eb611ac3e6d2698f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](https://github.com/cloudquery/cloudquery/issues/6376)) ([d6187ec](https://github.com/cloudquery/cloudquery/commit/d6187ec584f13be4fe9362dd393385b19d386113)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](https://github.com/cloudquery/cloudquery/issues/6382)) ([5baea40](https://github.com/cloudquery/cloudquery/commit/5baea40d2aec4e807db839c928be2e037d572bef)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](https://github.com/cloudquery/cloudquery/issues/6516)) ([b7e4e73](https://github.com/cloudquery/cloudquery/commit/b7e4e737a5f4d8f254960426ea8ba555d8f9b944)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](https://github.com/cloudquery/cloudquery/issues/6522)) ([ce24f1d](https://github.com/cloudquery/cloudquery/commit/ce24f1d64394cbb5ab07dcaa4af66c53f77f700f)) +* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](https://github.com/cloudquery/cloudquery/issues/6553)) ([392b848](https://github.com/cloudquery/cloudquery/commit/392b848b3124f9cf28f6234fdb9a43d671069879)) + ## [1.1.0](https://github.com/cloudquery/cloudquery/compare/plugins-source-tailscale-v1.0.2...plugins-source-tailscale-v1.1.0) (2023-01-03) diff --git a/plugins/source/tailscale/client/client.go b/plugins/source/tailscale/client/client.go index b91e50244b2f60..8e16fcd9dbcb4f 100644 --- a/plugins/source/tailscale/client/client.go +++ b/plugins/source/tailscale/client/client.go @@ -27,7 +27,7 @@ func (c *Client) Logger() *zerolog.Logger { return &c.logger } -func Configure(_ context.Context, logger zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(_ context.Context, logger zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { tsSpec := new(Spec) err := spec.UnmarshalSpec(tsSpec) if err != nil { diff --git a/plugins/source/tailscale/client/testing.go b/plugins/source/tailscale/client/testing.go index f9684a6280b9ef..50ab488adca9cd 100644 --- a/plugins/source/tailscale/client/testing.go +++ b/plugins/source/tailscale/client/testing.go @@ -24,7 +24,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createService func(*httpr ts := httptest.NewUnstartedServer(mux) defer ts.Close() - newTestExecutionClient := func(_ context.Context, logger zerolog.Logger, _ specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(_ context.Context, logger zerolog.Logger, _ specs.Source, _ source.Options) (schema.ClientMeta, error) { err := createService(mux) if err != nil { return nil, fmt.Errorf("failed to createService: %w", err) diff --git a/plugins/source/tailscale/go.mod b/plugins/source/tailscale/go.mod index bd8eed4fad92a2..24b86c9e5eece1 100644 --- a/plugins/source/tailscale/go.mod +++ b/plugins/source/tailscale/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/tailscale go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/julienschmidt/httprouter v1.3.0 github.com/rs/zerolog v1.28.0 github.com/tailscale/tailscale-client-go v1.8.0 diff --git a/plugins/source/tailscale/go.sum b/plugins/source/tailscale/go.sum index 681dfcc559a1b5..b3eda9f059d49c 100644 --- a/plugins/source/tailscale/go.sum +++ b/plugins/source/tailscale/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/terraform/client/client.go b/plugins/source/terraform/client/client.go index ff487683a543c6..96a00c7a213892 100644 --- a/plugins/source/terraform/client/client.go +++ b/plugins/source/terraform/client/client.go @@ -34,7 +34,7 @@ func (c *Client) ID() string { return c.CurrentBackend } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { tfSpec := &Spec{} if err := s.UnmarshalSpec(tfSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal terraform spec: %w", err) diff --git a/plugins/source/terraform/client/testing.go b/plugins/source/terraform/client/testing.go index 4dc65f93739ca0..6418eefa282ce2 100644 --- a/plugins/source/terraform/client/testing.go +++ b/plugins/source/terraform/client/testing.go @@ -30,7 +30,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var tfSpec Spec if err := spec.UnmarshalSpec(&tfSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal terraform spec: %w", err) diff --git a/plugins/source/terraform/go.mod b/plugins/source/terraform/go.mod index 5fce2a0ef27c13..5ba366c781ca90 100644 --- a/plugins/source/terraform/go.mod +++ b/plugins/source/terraform/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.47 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 github.com/aws/aws-sdk-go-v2/service/sts v1.18.0 - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/golang/mock v1.6.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/source/terraform/go.sum b/plugins/source/terraform/go.sum index c590320f9d6c23..cfe63177691b08 100644 --- a/plugins/source/terraform/go.sum +++ b/plugins/source/terraform/go.sum @@ -78,8 +78,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -247,6 +247,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/source/test/client/client.go b/plugins/source/test/client/client.go index 42bb86b00ad2d4..e0425fafc08884 100644 --- a/plugins/source/test/client/client.go +++ b/plugins/source/test/client/client.go @@ -21,6 +21,6 @@ func (*TestClient) ID() string { return "TestClient" } -func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { return &TestClient{}, nil } diff --git a/plugins/source/test/go.mod b/plugins/source/test/go.mod index 239158731b29e6..87ff3022e506d9 100644 --- a/plugins/source/test/go.mod +++ b/plugins/source/test/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/test go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/source/test/go.sum b/plugins/source/test/go.sum index ce244f243952ec..8787fd966e9ece 100644 --- a/plugins/source/test/go.sum +++ b/plugins/source/test/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -201,6 +201,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/plugins/source/vercel/client/client.go b/plugins/source/vercel/client/client.go index 816dec80654117..af1090b7cc1772 100644 --- a/plugins/source/vercel/client/client.go +++ b/plugins/source/vercel/client/client.go @@ -58,13 +58,13 @@ func (c *Client) WithTeamID(teamID string) schema.ClientMeta { } } -func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { +func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ source.Options) (schema.ClientMeta, error) { veSpec := &Spec{} if err := s.UnmarshalSpec(veSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal vercel spec: %w", err) } - services, err := getServiceClient(veSpec, "") + services, err := getServiceClient(logger.With().Str("source", "stripe-client").Logger(), veSpec, "") if err != nil { return nil, err } @@ -79,7 +79,7 @@ func Configure(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ... return &cl, nil } -func getServiceClient(spec *Spec, teamID string) (*vercel.Client, error) { +func getServiceClient(logger zerolog.Logger, spec *Spec, teamID string) (*vercel.Client, error) { if spec.AccessToken == "" { return nil, errors.New("no access token provided") } @@ -89,13 +89,27 @@ func getServiceClient(spec *Spec, teamID string) (*vercel.Client, error) { if spec.Timeout < 1 { spec.Timeout = 5 } + if spec.PageSize < 1 { + spec.PageSize = 100 + } + if spec.MaxRetries < 1 { + spec.MaxRetries = 10 + } + if spec.MaxWait < 1 { + spec.MaxWait = 300 + } - return vercel.New(&http.Client{ - Timeout: time.Duration(spec.Timeout) * time.Second, - }, + return vercel.New( + logger, + &http.Client{ + Timeout: time.Duration(spec.Timeout) * time.Second, + }, spec.EndpointURL, spec.AccessToken, teamID, + spec.MaxRetries, + spec.MaxWait, + spec.PageSize, ), nil } diff --git a/plugins/source/vercel/client/spec.go b/plugins/source/vercel/client/spec.go index d33b44e5373e0b..7abed0877968af 100644 --- a/plugins/source/vercel/client/spec.go +++ b/plugins/source/vercel/client/spec.go @@ -6,4 +6,7 @@ type Spec struct { EndpointURL string `json:"endpoint_url,omitempty"` Timeout int64 `json:"timeout_secs,omitempty"` + PageSize int64 `json:"page_size,omitempty"` + MaxRetries int64 `json:"max_retries,omitempty"` + MaxWait int64 `json:"max_wait_secs,omitempty"` } diff --git a/plugins/source/vercel/client/testing.go b/plugins/source/vercel/client/testing.go index ac9a19fd4b6128..1276566760e407 100644 --- a/plugins/source/vercel/client/testing.go +++ b/plugins/source/vercel/client/testing.go @@ -72,7 +72,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.StampMicro}, ).Level(zerolog.DebugLevel).With().Timestamp().Logger() - newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + newTestExecutionClient := func(ctx context.Context, _ zerolog.Logger, spec specs.Source, _ source.Options) (schema.ClientMeta, error) { var veSpec Spec if err := spec.UnmarshalSpec(&veSpec); err != nil { return nil, fmt.Errorf("failed to unmarshal vercel spec: %w", err) @@ -83,7 +83,7 @@ func MockTestHelper(t *testing.T, table *schema.Table, createServices func(*mux. return nil, err } - services := vercel.New(mockClient, h.URL, testToken, veSpec.TeamIDs[0]) + services := vercel.New(logger.With().Str("source", "stripe-client").Logger(), mockClient, h.URL, testToken, veSpec.TeamIDs[0], 5, 10, 100) c := New(logger, spec, veSpec, services, veSpec.TeamIDs) return &c, nil diff --git a/plugins/source/vercel/docs/tables/README.md b/plugins/source/vercel/docs/tables/README.md index 5d56aa8c4a66ca..2cd05a7c0ba709 100644 --- a/plugins/source/vercel/docs/tables/README.md +++ b/plugins/source/vercel/docs/tables/README.md @@ -2,11 +2,11 @@ ## Tables +- [vercel_deployments](vercel_deployments.md) + - [vercel_deployment_checks](vercel_deployment_checks.md) - [vercel_domains](vercel_domains.md) - [vercel_domain_records](vercel_domain_records.md) -- [vercel_teams](vercel_teams.md) - - [vercel_team_members](vercel_team_members.md) - [vercel_projects](vercel_projects.md) - [vercel_project_envs](vercel_project_envs.md) -- [vercel_deployments](vercel_deployments.md) - - [vercel_deployment_checks](vercel_deployment_checks.md) \ No newline at end of file +- [vercel_teams](vercel_teams.md) + - [vercel_team_members](vercel_team_members.md) \ No newline at end of file diff --git a/plugins/source/vercel/go.mod b/plugins/source/vercel/go.mod index 9b8f7c48a2200d..b31f82862d7247 100644 --- a/plugins/source/vercel/go.mod +++ b/plugins/source/vercel/go.mod @@ -3,7 +3,7 @@ module github.com/cloudquery/cloudquery/plugins/source/vercel go 1.19 require ( - github.com/cloudquery/plugin-sdk v1.24.1 + github.com/cloudquery/plugin-sdk v1.27.0 github.com/gorilla/mux v1.8.0 github.com/rs/zerolog v1.28.0 ) diff --git a/plugins/source/vercel/go.sum b/plugins/source/vercel/go.sum index 1d2f239d710f71..143e543c2a5bac 100644 --- a/plugins/source/vercel/go.sum +++ b/plugins/source/vercel/go.sum @@ -40,8 +40,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudquery/plugin-sdk v1.24.1 h1:h5ZMsnkveav0Hl8M9GcA/19uaOItMRDpTOsx8SyKE3k= -github.com/cloudquery/plugin-sdk v1.24.1/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= +github.com/cloudquery/plugin-sdk v1.27.0 h1:DXuvnBt1gOB98umBZU6jltZEV6oxfsdEBIAbQXFcIx4= +github.com/cloudquery/plugin-sdk v1.27.0/go.mod h1:teMPyCON3uPdMsHvzpSiOg+IK2sOR5Tf9dYLreoURzI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= diff --git a/plugins/source/vercel/internal/vercel/vercel.go b/plugins/source/vercel/internal/vercel/vercel.go index af30ed7c09a3d3..6df837d3f24d1a 100644 --- a/plugins/source/vercel/internal/vercel/vercel.go +++ b/plugins/source/vercel/internal/vercel/vercel.go @@ -9,13 +9,20 @@ import ( "net/url" "strconv" "time" + + "github.com/rs/zerolog" ) type Client struct { + logger zerolog.Logger hc HTTPDoer baseURL string token string teamID string + + maxRetries int64 + maxWait int64 // in seconds + pageSize int64 } type Paginator struct { @@ -28,12 +35,17 @@ type HTTPDoer interface { Do(req *http.Request) (*http.Response, error) } -func New(hc HTTPDoer, baseURL, token, teamID string) *Client { +func New(logger zerolog.Logger, hc HTTPDoer, baseURL, token, teamID string, maxRetries, maxWait, pageSize int64) *Client { return &Client{ + logger: logger, hc: hc, baseURL: baseURL, token: token, teamID: teamID, + + maxRetries: maxRetries, + maxWait: maxWait, + pageSize: pageSize, } } @@ -59,7 +71,7 @@ func (v *Client) Request(ctx context.Context, path string, until *int64, fill an func (v *Client) request(ctx context.Context, path string, until *int64) (io.ReadCloser, error) { u := v.baseURL + path uv := url.Values{} - uv.Set("limit", "100") // Maximum limit + uv.Set("limit", strconv.FormatInt(v.pageSize, 10)) if until != nil { uv.Set("until", strconv.FormatInt(*until, 10)) } @@ -67,35 +79,54 @@ func (v *Client) request(ctx context.Context, path string, until *int64) (io.Rea uv.Set("teamId", v.teamID) } - req, err := http.NewRequestWithContext(ctx, http.MethodGet, u+"?"+uv.Encode(), nil) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", "Bearer "+v.token) - res, err := v.hc.Do(req) - if err != nil { - return nil, err - } + retries := int64(0) + for { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, u+"?"+uv.Encode(), nil) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Authorization", "Bearer "+v.token) + res, err := v.hc.Do(req) + if err != nil { + return nil, err + } - if res.StatusCode != http.StatusOK { - defer res.Body.Close() + if res.StatusCode == http.StatusOK { + return res.Body, nil + } - if res.StatusCode == http.StatusTooManyRequests { - val := res.Header.Get("X-Ratelimit-Reset") - if val != "" { - t, err := strconv.ParseInt(val, 10, 64) - if err == nil && t > 0 { - ts := time.Unix(t, 0) - val = ts.Format(time.RFC3339) + fmt.Sprintf(" (in %s)", time.Until(ts).Round(time.Second)) - } + _ = res.Body.Close() + retries++ + if retries > v.maxRetries { + break + } - return nil, fmt.Errorf("request to %s failed: %s. Rate limit will reset at: %s", path, res.Status, val) + val := res.Header.Get("X-Ratelimit-Reset") + rateErr := fmt.Errorf("request to %s failed: %s", path, res.Status) + if val == "" || res.StatusCode != http.StatusTooManyRequests { + return nil, rateErr + } + + t, err := strconv.ParseInt(val, 10, 64) + if err == nil && t > 0 { + ts := time.Unix(t, 0) + secsLeft := time.Until(ts).Round(time.Second) + if secsLeft > 0 && secsLeft < time.Duration(v.maxWait)*time.Second { + v.logger.Info().Dur("wait", secsLeft).Msg("waiting for rate limit reset") + select { + case <-ctx.Done(): + return nil, rateErr + case <-time.After(secsLeft): + } + continue // next retry } + + val = ts.Format(time.RFC3339) + fmt.Sprintf(" (in %s)", secsLeft) } - return nil, fmt.Errorf("request to %s failed: %s", path, res.Status) + return nil, fmt.Errorf("request to %s failed: %s. Rate limit will reset at: %s", path, res.Status, val) } - return res.Body, nil + return nil, fmt.Errorf("exceeded max retries") } diff --git a/release-please-config.json b/release-please-config.json index bd2a8ad310414a..d3907fdd11fd53 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -3,6 +3,7 @@ "release-type": "go", "packages": { "cli": { "component": "cli" }, + "scaffold": { "component": "scaffold" }, "plugins/source/aws": { "component": "plugins-source-aws" }, "plugins/source/azure": { "component": "plugins-source-azure" }, "plugins/source/azuredevops": { "component": "plugins-source-azuredevops" }, @@ -19,6 +20,7 @@ "plugins/source/heroku": { "component": "plugins-source-heroku" }, "plugins/source/k8s": { "component": "plugins-source-k8s" }, "plugins/source/okta": { "component": "plugins-source-okta" }, + "plugins/source/oracle": {"component": "plugins-source-oracle"}, "plugins/source/salesforce": { "component": "plugins-source-salesforce" }, "plugins/source/slack": { "component": "plugins-source-slack" }, "plugins/source/snyk": { "component": "plugins-source-snyk" }, diff --git a/scaffold/.gitignore b/scaffold/.gitignore new file mode 100644 index 00000000000000..04e6a6f389cb1a --- /dev/null +++ b/scaffold/.gitignore @@ -0,0 +1 @@ +scaffold \ No newline at end of file diff --git a/scaffold/.goreleaser.prerelease.yaml b/scaffold/.goreleaser.prerelease.yaml new file mode 100644 index 00000000000000..dfdca6b12b6e2a --- /dev/null +++ b/scaffold/.goreleaser.prerelease.yaml @@ -0,0 +1,49 @@ +project_name: scaffold + +monorepo: + tag_prefix: scaffold- + dir: scaffold + +before: + hooks: + - cmd: go mod download + dir: ./scaffold +builds: + - flags: + - -buildmode=exe + env: + - GOGC=off + - CGO_ENABLED=0 + - GO111MODULE=on + main: ./main.go + ldflags: + - -s -w -X github.com/cloudquery/cloudquery/scaffold/cmd.Version={{.Version}} + goos: + - windows + - linux + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + binary: cq-scaffold +archives: + - + name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}" + format: binary + - + id: homebrew + name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}" + format: zip +checksum: + name_template: 'checksums.txt' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +release: + prerelease: auto \ No newline at end of file diff --git a/scaffold/.goreleaser.yaml b/scaffold/.goreleaser.yaml new file mode 100644 index 00000000000000..a8f9df38dd0e9d --- /dev/null +++ b/scaffold/.goreleaser.yaml @@ -0,0 +1,33 @@ +project_name: scaffold + +monorepo: + tag_prefix: scaffold- + dir: scaffold + +includes: + - from_file: + # Relative to the directory Go Releaser is run from (which is the root of the repository) + # Include everything from pre-release (build & publish to GitHub), plus publish to docker and Homebrew + path: ./scaffold/.goreleaser.prerelease.yaml + +brews: + - + ids: + - homebrew + name: scaffold + tap: + owner: cloudquery + name: homebrew-tap + url_template: "https://github.com/cloudquery/cloudquery/releases/download/{{ .PrefixedTag }}/{{ .ArtifactName }}" + homepage: "https://cloudquery.io" + description: "Scaffold CloudQuery source and destination plugins" + - + ids: + - homebrew + name: scaffold@{{.Version}} + tap: + owner: cloudquery + name: homebrew-tap + url_template: "https://github.com/cloudquery/cloudquery/releases/download/{{ .PrefixedTag }}/{{ .ArtifactName }}" + homepage: "https://cloudquery.io" + description: "Scaffold CloudQuery source and destination plugins" \ No newline at end of file diff --git a/scaffold/CHANGELOG.md b/scaffold/CHANGELOG.md new file mode 100644 index 00000000000000..5376605ce13702 --- /dev/null +++ b/scaffold/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## 1.0.0 (2023-01-15) + + +### Features + +* Add scaffold CLI ([#6789](https://github.com/cloudquery/cloudquery/issues/6789)) ([7fad312](https://github.com/cloudquery/cloudquery/commit/7fad312104967dbaddeb746d83282bc6e04a7eed)) + + +### Bug Fixes + +* **scaffold:** Use org and name for plugin name instead of `test` ([#6802](https://github.com/cloudquery/cloudquery/issues/6802)) ([c5e10fc](https://github.com/cloudquery/cloudquery/commit/c5e10fcc298429ec0049e5b22f0f5f12c63182da)) diff --git a/scaffold/Makefile b/scaffold/Makefile new file mode 100644 index 00000000000000..1815c4eff45776 --- /dev/null +++ b/scaffold/Makefile @@ -0,0 +1,9 @@ +.PHONY: lint +lint: + golangci-lint run --timeout 10m --verbose + +.PHONY: test +test: + go test -race ./... + + diff --git a/scaffold/README.md b/scaffold/README.md new file mode 100644 index 00000000000000..fd2698c662c1c7 --- /dev/null +++ b/scaffold/README.md @@ -0,0 +1,3 @@ +# Scaffold CLI + +This CLI helps scaffold (bootstrap) new source or destination plugins. \ No newline at end of file diff --git a/scaffold/cmd/root.go b/scaffold/cmd/root.go new file mode 100644 index 00000000000000..27f45d893e4aeb --- /dev/null +++ b/scaffold/cmd/root.go @@ -0,0 +1,37 @@ +package cmd + +import ( + "github.com/spf13/cobra" +) + +var ( + Version = "development" + rootShort = "CloudQuery Scaffold CLI" + rootLong = `CloudQuery Scaffold CLI + +Open source data integration at scale. + +Find more information at: + https://www.cloudquery.io` +) + +func NewCmdRoot() *cobra.Command { + cmd := &cobra.Command{ + Use: "scaffold", + Short: rootShort, + Long: rootLong, + Version: Version, + PersistentPreRunE: func(cmd *cobra.Command, args []string) error { + return nil + }, + } + + cmd.SetHelpCommand(&cobra.Command{Hidden: true}) + cmd.AddCommand( + newCmdScaffoldSource(), + ) + cmd.CompletionOptions.HiddenDefaultCmd = true + cmd.DisableAutoGenTag = true + + return cmd +} diff --git a/scaffold/cmd/source.go b/scaffold/cmd/source.go new file mode 100644 index 00000000000000..f974fe14c0ffad --- /dev/null +++ b/scaffold/cmd/source.go @@ -0,0 +1,97 @@ +package cmd + +import ( + "embed" + "fmt" + "go/format" + "os" + "path" + "strings" + "text/template" + + "github.com/spf13/cobra" +) + +const ( + scaffoldSourceShort = "Create an empty source plugin project" +) + +func newCmdScaffoldSource() *cobra.Command { + var outputDir string + cmd := &cobra.Command{ + Use: "source [org] [name]", + Short: scaffoldSourceShort, + Args: cobra.MatchAll(cobra.ExactArgs(2)), + RunE: func(cmd *cobra.Command, args []string) error { + if outputDir == "" { + outputDir = "cq-source-" + args[1] + } + return runScaffoldSource(args[0], args[1], outputDir) + }, + } + cmd.Flags().StringVar(&outputDir, "output", "", "output directory") + return cmd +} + +var scaffoldTemplates = map[string]string{ + "release.yaml.tpl": ".github/workflows/release.yaml", + ".goreleaser.yaml.tpl": ".goreleaser.yaml", + "go.mod.tpl": "go.mod", + "main.go.tpl": "main.go", + "README.md.tpl": "README.md", + "client.go.tpl": "client/client.go", + "spec.go.tpl": "client/spec.go", + "plugin.go.tpl": "plugin/plugin.go", + "table.go.tpl": "resources/table.go", +} + +//go:embed templates/source/* +var sourceFS embed.FS + +type scaffoldData struct { + Org string + Name string +} + +func runScaffoldSource(org string, name string, outputDir string) error { + tpl, err := template.New("source").ParseFS(sourceFS, + "templates/source/.github/workflows/*.tpl", + "templates/source/*.tpl", + "templates/source/plugin/*.tpl", + "templates/source/client/*.tpl", + "templates/source/resources/*.tpl", + ) + if err != nil { + return fmt.Errorf("failed to parse templates: %w", err) + } + + data := scaffoldData{ + Org: org, + Name: name, + } + for templatePath, filePath := range scaffoldTemplates { + var sb strings.Builder + if err := tpl.ExecuteTemplate(&sb, templatePath, data); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + content := []byte(sb.String()) + fullPath := outputDir + "/" + filePath + baseDir := path.Dir(fullPath) + if err := os.MkdirAll(baseDir, 0755); err != nil { + return fmt.Errorf("failed to create directory %s: %w", baseDir, err) + } + if strings.HasSuffix(filePath, ".go") { + formattedContent, err := format.Source(content) + if err != nil { + // we still write the file even if it's not formatted for easy debugging + _ = os.WriteFile(outputDir+"/"+filePath, content, 0644) + return fmt.Errorf("failed to format source %s: %w", filePath, err) + } + content = formattedContent + } + if err := os.WriteFile(outputDir+"/"+filePath, content, 0644); err != nil { + return fmt.Errorf("failed to write file: %w", err) + } + } + return nil +} diff --git a/scaffold/cmd/source_test.go b/scaffold/cmd/source_test.go new file mode 100644 index 00000000000000..8ef9289c7cfb8b --- /dev/null +++ b/scaffold/cmd/source_test.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "os/exec" + "testing" +) + +func TestSource(t *testing.T) { + tmpDir := t.TempDir() + cmd := NewCmdRoot() + cmd.SetArgs([]string{"source", "test-org", "test", "--output", tmpDir}) + if err := cmd.Execute(); err != nil { + t.Error(err) + } + goModTidy := exec.Command("go", "mod", "tidy") + goModTidy.Dir = tmpDir + if out, err := goModTidy.CombinedOutput(); err != nil { + t.Error(string(out) + err.Error()) + } + goBuild := exec.Command("go", "build", ".") + goBuild.Dir = tmpDir + if out, err := goBuild.CombinedOutput(); err != nil { + t.Error(string(out) + err.Error()) + } +} diff --git a/scaffold/cmd/templates/source/.github/workflows/release.yaml.tpl b/scaffold/cmd/templates/source/.github/workflows/release.yaml.tpl new file mode 100644 index 00000000000000..a1b130f6397619 --- /dev/null +++ b/scaffold/cmd/templates/source/.github/workflows/release.yaml.tpl @@ -0,0 +1,38 @@ +name: release +on: + push: + tags: + - 'v*.*.*' +env: + CGO_ENABLED: 0 + +jobs: + release-binary: + runs-on: ubuntu-latest + steps: + # This fails for invalid semver strings + - name: Parse semver string + id: semver_parser + uses: booxmedialtd/ws-action-parse-semver@966a26512c94239a00aa10b1b0c196906f7e1909 + with: + input_string: ${{"{{"}}github.ref_name{{"}}"}} + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + - name: Run GoReleaser Dry-Run + uses: goreleaser/goreleaser-action@v3 + with: + version: latest + args: release --rm-dist --skip-validate --skip-publish --skip-sign + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + version: latest + args: release --rm-dist --skip-sign + env: + GITHUB_TOKEN: ${{"{{"}} secrets.GITHUB_TOKEN {{"}}"}} diff --git a/scaffold/cmd/templates/source/.goreleaser.yaml.tpl b/scaffold/cmd/templates/source/.goreleaser.yaml.tpl new file mode 100644 index 00000000000000..1ae28b341df09e --- /dev/null +++ b/scaffold/cmd/templates/source/.goreleaser.yaml.tpl @@ -0,0 +1,35 @@ +before: + hooks: + - go mod download +builds: + - flags: + - -buildmode=exe + env: + - CGO_ENABLED=0 + - GO111MODULE=on + ldflags: + - -s -w -X github.com/{{.Org}}/cq-source-{{.Name}}/plugin.Version={{"{{"}}.Version{{"}}"}} + goos: + - windows + - linux + - darwin + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 +archives: + - name_template: "{{"{{"}} .Binary {{"}}"}}_{{"{{"}} .Os {{"}}"}}_{{"{{"}} .Arch {{"}}"}}" + format: zip +checksum: + name_template: "checksums.txt" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + +release: + prerelease: auto diff --git a/scaffold/cmd/templates/source/README.md.tpl b/scaffold/cmd/templates/source/README.md.tpl new file mode 100644 index 00000000000000..3af66399a8ff89 --- /dev/null +++ b/scaffold/cmd/templates/source/README.md.tpl @@ -0,0 +1 @@ +# CloudQuery {{.Name}} Source Plugin diff --git a/scaffold/cmd/templates/source/client/client.go.tpl b/scaffold/cmd/templates/source/client/client.go.tpl new file mode 100644 index 00000000000000..3d81efe628b3c1 --- /dev/null +++ b/scaffold/cmd/templates/source/client/client.go.tpl @@ -0,0 +1,32 @@ +package client + +import ( + "context" + "fmt" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/cloudquery/plugin-sdk/specs" + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/rs/zerolog" +) + +type Client struct { + Logger zerolog.Logger +} + +func (c *Client) ID() string { + // TODO: Change to either your plugin name or a unique dynamic identifier + return "ID" +} + +func New(ctx context.Context, logger zerolog.Logger, s specs.Source, _ ...source.Option) (schema.ClientMeta, error) { + var pluginSpec Spec + + if err := s.UnmarshalSpec(&pluginSpec); err != nil { + return nil, fmt.Errorf("failed to unmarshal plugin spec: %w", err) + } + // TODO: Add your client initialization here + + return &Client{ + Logger: logger, + }, nil +} diff --git a/scaffold/cmd/templates/source/client/spec.go.tpl b/scaffold/cmd/templates/source/client/spec.go.tpl new file mode 100644 index 00000000000000..482c722236cd1d --- /dev/null +++ b/scaffold/cmd/templates/source/client/spec.go.tpl @@ -0,0 +1,5 @@ +package client + +type Spec struct { + // plugin spec goes here +} diff --git a/scaffold/cmd/templates/source/go.mod.tpl b/scaffold/cmd/templates/source/go.mod.tpl new file mode 100644 index 00000000000000..1d971d36160b9f --- /dev/null +++ b/scaffold/cmd/templates/source/go.mod.tpl @@ -0,0 +1,8 @@ +module github.com/{{.Org}}/cq-source-{{.Name}} + +go 1.19 + +require ( + github.com/cloudquery/plugin-sdk v1.25.0 + github.com/rs/zerolog v1.28.0 +) diff --git a/scaffold/cmd/templates/source/main.go.tpl b/scaffold/cmd/templates/source/main.go.tpl new file mode 100644 index 00000000000000..7bf51bbd8b8948 --- /dev/null +++ b/scaffold/cmd/templates/source/main.go.tpl @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/cloudquery/plugin-sdk/serve" + "github.com/{{.Org}}/cq-source-{{.Name}}/plugin" +) + +func main() { + serve.Source(plugin.Plugin()) +} diff --git a/scaffold/cmd/templates/source/plugin/plugin.go.tpl b/scaffold/cmd/templates/source/plugin/plugin.go.tpl new file mode 100644 index 00000000000000..045ed80c9faf4b --- /dev/null +++ b/scaffold/cmd/templates/source/plugin/plugin.go.tpl @@ -0,0 +1,23 @@ +package plugin + +import ( + "github.com/cloudquery/plugin-sdk/plugins/source" + "github.com/{{.Org}}/cq-source-{{.Name}}/client" + "github.com/cloudquery/plugin-sdk/schema" + "github.com/{{.Org}}/cq-source-{{.Name}}/resources" +) + +var ( + Version = "development" +) + +func Plugin() *source.Plugin { + return source.NewPlugin( + "{{.Org}}-{{.Name}}", + Version, + schema.Tables{ + resources.SampleTable(), + }, + client.New, + ) +} diff --git a/scaffold/cmd/templates/source/resources/table.go.tpl b/scaffold/cmd/templates/source/resources/table.go.tpl new file mode 100644 index 00000000000000..e1861d1137d544 --- /dev/null +++ b/scaffold/cmd/templates/source/resources/table.go.tpl @@ -0,0 +1,24 @@ +package resources + +import ( + "context" + "fmt" + "github.com/cloudquery/plugin-sdk/schema" +) + +func SampleTable() *schema.Table { + return &schema.Table{ + Name: "{{.Name}}_sample_table", + Resolver: fetchSampleTable, + Columns: []schema.Column{ + { + Name: "column", + Type: schema.TypeString, + }, + }, + } +} + +func fetchSampleTable(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan <- interface{}) error { + return fmt.Errorf("not implemented") +} diff --git a/scaffold/go.mod b/scaffold/go.mod new file mode 100644 index 00000000000000..06453ee39e7f18 --- /dev/null +++ b/scaffold/go.mod @@ -0,0 +1,10 @@ +module github.com/cloudquery/cloudquery/scaffold + +go 1.19 + +require github.com/spf13/cobra v1.6.1 + +require ( + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect +) diff --git a/scaffold/go.sum b/scaffold/go.sum new file mode 100644 index 00000000000000..442875a4e6f8e2 --- /dev/null +++ b/scaffold/go.sum @@ -0,0 +1,10 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/scaffold/main.go b/scaffold/main.go new file mode 100644 index 00000000000000..d675030e862b8b --- /dev/null +++ b/scaffold/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "os" + + "github.com/cloudquery/cloudquery/scaffold/cmd" +) + +func main() { + if err := cmd.NewCmdRoot().Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} diff --git a/scripts/table_diff/changes/changes.go b/scripts/table_diff/changes/changes.go index b45d54481fec88..51049e1fa40813 100644 --- a/scripts/table_diff/changes/changes.go +++ b/scripts/table_diff/changes/changes.go @@ -20,9 +20,24 @@ type change struct { Breaking bool `json:"breaking"` } +type columnType int + +const ( + columnTypePK columnType = 1 << iota + columnTypeIncremental +) + type column struct { - dataType string - pk bool + dataType string + columnType columnType +} + +func (c column) pk() bool { + return c.columnType&columnTypePK != 0 +} + +func (c column) incremental() bool { + return c.columnType&columnTypeIncremental != 0 } func backtickStrings(strings ...string) []interface{} { @@ -33,10 +48,10 @@ func backtickStrings(strings ...string) []interface{} { return backticked } -func parseColumnChange(line string) (name string, dataType string, pk bool) { +func parseColumnChange(line string) (name string, dataType string, columnType columnType) { match := columnRegex.FindStringSubmatch(line) if match == nil { - return "", "", false + return "", "", columnType } result := make(map[string]string) for i, name := range columnRegex.SubexpNames() { @@ -44,8 +59,14 @@ func parseColumnChange(line string) (name string, dataType string, pk bool) { result[name] = match[i] } } - cleanName := strings.TrimSuffix(result["name"], " (PK)") - return cleanName, result["dataType"], result["name"] != cleanName + if strings.Contains(result["name"], " (PK)") { + columnType |= columnTypePK + } + if strings.Contains(result["name"], " (Incremental Key)") { + columnType |= columnTypeIncremental + } + cleanName := strings.Split(result["name"], " (")[0] + return cleanName, result["dataType"], columnType } func parsePKChange(line string) (names []string) { @@ -75,11 +96,11 @@ func getColumnChanges(file *gitdiff.File, table string) (changes []change) { } continue } - name, dataType, pk := parseColumnChange(line.Line) + name, dataType, columnType := parseColumnChange(line.Line) if name == "" || dataType == "" { continue } - column := column{dataType: dataType, pk: pk} + column := column{dataType: dataType, columnType: columnType} switch line.Op { case gitdiff.OpAdd: addedColumns[name] = column @@ -90,7 +111,7 @@ func getColumnChanges(file *gitdiff.File, table string) (changes []change) { } for deletedName, deletedColumn := range deletedColumns { if addedColumn, ok := addedColumns[deletedName]; ok { - if deletedColumn.dataType == addedColumn.dataType && deletedColumn.pk == addedColumn.pk { + if deletedColumn.dataType == addedColumn.dataType && deletedColumn.columnType == addedColumn.columnType { changes = append(changes, change{ Text: fmt.Sprintf("Table %s: column order changed for %s", backtickStrings(table, deletedName)...), Breaking: false, @@ -105,19 +126,33 @@ func getColumnChanges(file *gitdiff.File, table string) (changes []change) { }) } - if addedColumn.pk && !deletedColumn.pk { + if addedColumn.pk() && !deletedColumn.pk() { changes = append(changes, change{ Text: fmt.Sprintf("Table %s: primary key constraint added to column %s", backtickStrings(table, deletedName)...), Breaking: false, }) } - if !addedColumn.pk && deletedColumn.pk { + if !addedColumn.pk() && deletedColumn.pk() { changes = append(changes, change{ Text: fmt.Sprintf("Table %s: primary key constraint removed from column %s", backtickStrings(table, deletedName)...), Breaking: false, }) } + + if addedColumn.incremental() && !deletedColumn.incremental() { + changes = append(changes, change{ + Text: fmt.Sprintf("Table %s: column %s added to cursor for incremental syncs", backtickStrings(table, deletedName)...), + Breaking: true, + }) + } + + if !addedColumn.incremental() && deletedColumn.incremental() { + changes = append(changes, change{ + Text: fmt.Sprintf("Table %s: column %s removed from cursor for incremental syncs", backtickStrings(table, deletedName)...), + Breaking: true, + }) + } } else { changes = append(changes, change{ Text: fmt.Sprintf("Table %s: column removed %s from table", backtickStrings(table, deletedName)...), @@ -128,12 +163,15 @@ func getColumnChanges(file *gitdiff.File, table string) (changes []change) { for addedName, addedColumn := range addedColumns { if _, ok := deletedColumns[addedName]; !ok { name := addedName - if addedColumn.pk { - name = fmt.Sprintf("%s (PK)", name) + if addedColumn.pk() { + name += " (PK)" + } + if addedColumn.incremental() { + name += " (Incremental Key)" } changes = append(changes, change{ Text: fmt.Sprintf("Table %s: column added with name %s and type %s", backtickStrings(table, name, addedColumn.dataType)...), - Breaking: addedColumn.pk, + Breaking: addedColumn.pk(), }) } } diff --git a/scripts/table_diff/changes/changes_test.go b/scripts/table_diff/changes/changes_test.go index 1d4cbebf6e192b..7a34a3f2fd18f3 100644 --- a/scripts/table_diff/changes/changes_test.go +++ b/scripts/table_diff/changes/changes_test.go @@ -27,22 +27,24 @@ func Test_parseColumnChange(t *testing.T) { line string } tests := []struct { - name string - args args - wantName string - wantDataType string - wantPk bool + name string + args args + wantName string + wantDataType string + wantColumnType columnType }{ {name: "Should parse name and data type when change is a column", args: args{line: "|name|String|"}, wantName: "name", wantDataType: "String"}, - {name: "Should parse name, pk and data type when a column is a primary key", args: args{line: "|name (PK)|String|"}, wantName: "name", wantDataType: "String", wantPk: true}, + {name: "Should parse name, pk and data type when a column is a primary key", args: args{line: "|name (PK)|String|"}, wantName: "name", wantDataType: "String", wantColumnType: columnTypePK}, {name: "Should return empty strings when change is not a column", args: args{line: "# Table: azure_appservice_site_auth_settings"}, wantName: "", wantDataType: ""}, + {name: "Should parse name, incremental key and data type when a column is an incremental key", args: args{line: "|updated_at (Incremental Key)|Timestamp|"}, wantName: "updated_at", wantDataType: "Timestamp", wantColumnType: columnTypeIncremental}, + {name: "Should parse name, pk and incremental key", args: args{line: "|updated_at (PK) (Incremental Key)|Timestamp|"}, wantName: "updated_at", wantDataType: "Timestamp", wantColumnType: columnTypeIncremental | columnTypePK}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - gotName, gotDataType, pk := parseColumnChange(tt.args.line) + gotName, gotDataType, columnType := parseColumnChange(tt.args.line) require.Equal(t, tt.wantName, gotName) require.Equal(t, tt.wantDataType, gotDataType) - require.Equal(t, tt.wantPk, pk) + require.Equal(t, tt.wantColumnType, columnType) }) } } @@ -311,6 +313,40 @@ func Test_getChanges(t *testing.T) { }, }, }, + { + name: "Should handle incremental column changes", + diffDataFile: "testdata/pr_6707_diff.txt", + wantChanges: []change{ + { + Text: "Table `shopify_abandoned_checkouts`: column `updated_at` added to cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_customers`: column `created_at` removed from cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_customers`: column `updated_at` added to cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_orders`: column `created_at` added to cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_orders`: column `updated_at` added to cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_price_rules`: column `updated_at` added to cursor for incremental syncs", + Breaking: true, + }, + { + Text: "Table `shopify_products`: column `updated_at` added to cursor for incremental syncs", + Breaking: true, + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/scripts/table_diff/changes/testdata/pr_6707_diff.txt b/scripts/table_diff/changes/testdata/pr_6707_diff.txt new file mode 100644 index 00000000000000..ca163f405fb1b5 --- /dev/null +++ b/scripts/table_diff/changes/testdata/pr_6707_diff.txt @@ -0,0 +1,168 @@ +diff --git a/plugins/source/shopify/docs/tables/README.md b/plugins/source/shopify/docs/tables/README.md +index 90f49ef7b93e..073ec3283a8b 100644 +--- a/plugins/source/shopify/docs/tables/README.md ++++ b/plugins/source/shopify/docs/tables/README.md +@@ -2,11 +2,11 @@ + + ## Tables + +-- [shopify_abandoned_checkouts](shopify_abandoned_checkouts.md) +-- [shopify_customers](shopify_customers.md) +-- [shopify_orders](shopify_orders.md) +-- [shopify_price_rules](shopify_price_rules.md) ++- [shopify_abandoned_checkouts](shopify_abandoned_checkouts.md) (Incremental) ++- [shopify_customers](shopify_customers.md) (Incremental) ++- [shopify_orders](shopify_orders.md) (Incremental) ++- [shopify_price_rules](shopify_price_rules.md) (Incremental) + - [shopify_price_rule_discount_codes](shopify_price_rule_discount_codes.md) +-- [shopify_products](shopify_products.md) ++- [shopify_products](shopify_products.md) (Incremental) + - [shopify_product_images](shopify_product_images.md) + - [shopify_product_variants](shopify_product_variants.md) +\ No newline at end of file +diff --git a/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md b/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md +index 4092c203dfb9..020483280d38 100644 +--- a/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md ++++ b/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md +@@ -1,6 +1,7 @@ + # Table: shopify_abandoned_checkouts + + The primary key for this table is **id**. ++It supports incremental syncs based on the **updated_at** column. + + ## Columns + +@@ -11,13 +12,13 @@ The primary key for this table is **id**. + |_cq_id|UUID| + |_cq_parent_id|UUID| + |id (PK)|Int| ++|updated_at (Incremental Key)|Timestamp| + |token|String| + |cart_token|String| + |email|String| + |gateway|String| + |buyer_accepts_marketing|Bool| + |created_at|Timestamp| +-|updated_at|Timestamp| + |landing_site|String| + |note_attributes|JSON| + |referring_site|String| +diff --git a/plugins/source/shopify/docs/tables/shopify_customers.md b/plugins/source/shopify/docs/tables/shopify_customers.md +index 0ce10bdad5de..251540eee487 100644 +--- a/plugins/source/shopify/docs/tables/shopify_customers.md ++++ b/plugins/source/shopify/docs/tables/shopify_customers.md +@@ -1,6 +1,7 @@ + # Table: shopify_customers + + The primary key for this table is **id**. ++It supports incremental syncs based on the **updated_at** column. + + ## Columns + +@@ -11,10 +12,10 @@ The primary key for this table is **id**. + |_cq_id|UUID| + |_cq_parent_id|UUID| + |id (PK)|Int| ++|updated_at (Incremental Key)|Timestamp| + |email|String| + |accepts_marketing|Bool| +-|created_at (Incremental Key)|Timestamp| +-|updated_at|Timestamp| ++|created_at|Timestamp| + |first_name|String| + |last_name|String| + |orders_count|Int| +diff --git a/plugins/source/shopify/docs/tables/shopify_orders.md b/plugins/source/shopify/docs/tables/shopify_orders.md +index 3ecd8e46f25f..a266bd04e1a2 100644 +--- a/plugins/source/shopify/docs/tables/shopify_orders.md ++++ b/plugins/source/shopify/docs/tables/shopify_orders.md +@@ -1,6 +1,7 @@ + # Table: shopify_orders + + The primary key for this table is **id**. ++It supports incremental syncs based on the (**created_at**, **updated_at**) columns. + + ## Columns + +@@ -11,6 +12,8 @@ The primary key for this table is **id**. + |_cq_id|UUID| + |_cq_parent_id|UUID| + |id (PK)|Int| ++|created_at (Incremental Key)|Timestamp| ++|updated_at (Incremental Key)|Timestamp| + |admin_graphql_api_id|String| + |app_id|Int| + |browser_ip|String| +@@ -22,7 +25,6 @@ The primary key for this table is **id**. + |closed_at|Timestamp| + |confirmed|Bool| + |contact_email|String| +-|created_at|Timestamp| + |currency|String| + |current_subtotal_price|String| + |current_total_discounts|String| +@@ -61,7 +63,6 @@ The primary key for this table is **id**. + |total_tax|String| + |total_tip_received|String| + |total_weight|Int| +-|updated_at|Timestamp| + |user_id|Int| + |customer|JSON| + |discount_applications|JSON| +diff --git a/plugins/source/shopify/docs/tables/shopify_price_rules.md b/plugins/source/shopify/docs/tables/shopify_price_rules.md +index 8b614b64f60c..e38136881b03 100644 +--- a/plugins/source/shopify/docs/tables/shopify_price_rules.md ++++ b/plugins/source/shopify/docs/tables/shopify_price_rules.md +@@ -1,7 +1,7 @@ + # Table: shopify_price_rules + + The primary key for this table is **id**. +- ++It supports incremental syncs based on the **updated_at** column. + ## Relations + + The following tables depend on shopify_price_rules: +@@ -16,6 +16,7 @@ The following tables depend on shopify_price_rules: + |_cq_id|UUID| + |_cq_parent_id|UUID| + |id (PK)|Int| ++|updated_at (Incremental Key)|Timestamp| + |value_type|String| + |value|String| + |customer_selection|String| +@@ -27,7 +28,6 @@ The following tables depend on shopify_price_rules: + |starts_at|Timestamp| + |ends_at|Timestamp| + |created_at|Timestamp| +-|updated_at|Timestamp| + |entitled_product_ids|JSON| + |entitled_variant_ids|JSON| + |entitled_collection_ids|JSON| +diff --git a/plugins/source/shopify/docs/tables/shopify_products.md b/plugins/source/shopify/docs/tables/shopify_products.md +index 4894f78c142e..a93f66000cfb 100644 +--- a/plugins/source/shopify/docs/tables/shopify_products.md ++++ b/plugins/source/shopify/docs/tables/shopify_products.md +@@ -1,7 +1,7 @@ + # Table: shopify_products + + The primary key for this table is **id**. +- ++It supports incremental syncs based on the **updated_at** column. + ## Relations + + The following tables depend on shopify_products: +@@ -17,13 +17,13 @@ The following tables depend on shopify_products: + |_cq_id|UUID| + |_cq_parent_id|UUID| + |id (PK)|Int| ++|updated_at (Incremental Key)|Timestamp| + |title|String| + |body_html|String| + |vendor|String| + |product_type|String| + |created_at|Timestamp| + |handle|String| +-|updated_at|Timestamp| + |published_at|Timestamp| + |template_suffix|String| + |status|String| \ No newline at end of file diff --git a/website/pages/blog/analysing-gcp-cost-with-bigquery-and-cq.md b/website/pages/blog/analysing-gcp-cost-with-bigquery-and-cq.md index db3fcf8a22c8e4..782ccc581fae50 100644 --- a/website/pages/blog/analysing-gcp-cost-with-bigquery-and-cq.md +++ b/website/pages/blog/analysing-gcp-cost-with-bigquery-and-cq.md @@ -104,7 +104,7 @@ And you can run the same by replacing `Intel Broadwell` with `AMD Rome` and/or a In this short blog post we just shared a sample of what you can do by combining cost data with your infrastructure state/metadata synced by CloudQuery to BigQuery. The number of use cases around cost (aka "FinOps" :) ) is really infinite and it all depends on what you are trying to achieve and optimize for. CloudQuery with BigQuery is a powerful tool for analysis which ensures cheap storage and fast querying on large amount of data. -We hope you enjoyed this tutorial and found it useful. If you have any questions or feedback, please reach out to us on [Discord](https://discord.gg/8qZ7Y4Z) or [Twitter](https://twitter.com/cloudqueryio). +We hope you enjoyed this tutorial and found it useful. If you have any questions or feedback, please reach out to us on [Discord](https://www.cloudquery.io/discord) or [Twitter](https://twitter.com/cloudqueryio). diff --git a/website/pages/blog/azure-cost-optimization-with-cloudquery.md b/website/pages/blog/azure-cost-optimization-with-cloudquery.md index 8926d6f0960b73..019fcfbe6ee9b9 100644 --- a/website/pages/blog/azure-cost-optimization-with-cloudquery.md +++ b/website/pages/blog/azure-cost-optimization-with-cloudquery.md @@ -99,7 +99,7 @@ We need to run one more thing before we can start correlating away though. ## The Azure Resources View -The `azure_resources` view is useful for seeing all your Azure resources in one place or finding a specific resource, by id or name. It's a view, so it's not synced to the database, but we can create it by running the queries provided [here](https://github.com/cloudquery/cq-provider-azure/blob/main/views/resource.sql). First query will drop the view if it exists, and the second query will create it. Run these queries in your PostgreSQL database. +The `azure_resources` view is useful for seeing all your Azure resources in one place or finding a specific resource, by id or name. It's a view, so it's not synced to the database, but we can create it by running the queries provided [here](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/views/resource.sql). First query will drop the view if it exists, and the second query will create it. Run these queries in your PostgreSQL database. ## Correlating the data @@ -163,4 +163,4 @@ FROM cost_by_res c JOIN azure_resources r ON LOWER(r.full_id)=LOWER(c.res_id); In this blog post we just shared an example of what you can do by combining cost data with your infrastructure state/metadata synced by CloudQuery. The number of use cases around cost (aka "FinOps" :) ) is really infinite and it all depends on what you are trying to achieve and optimize for. -We hope you enjoyed this tutorial and found it useful. If you have any questions or feedback, please reach out to us on [Discord](https://discord.gg/8qZ7Y4Z) or [Twitter](https://twitter.com/cloudqueryio). +We hope you enjoyed this tutorial and found it useful. If you have any questions or feedback, please reach out to us on [Discord](https://www.cloudquery.io/discord) or [Twitter](https://twitter.com/cloudqueryio). diff --git a/website/pages/docs/advanced-topics/_meta.json b/website/pages/docs/advanced-topics/_meta.json index 4bcc3a4b637404..f0c02f375de1c2 100644 --- a/website/pages/docs/advanced-topics/_meta.json +++ b/website/pages/docs/advanced-topics/_meta.json @@ -6,5 +6,6 @@ "proxy-configuration": "Proxy Configuration", "rate-limiting": "Rate Limiting", "running-cloudquery-in-parallel": "Running CloudQuery in Parallel", - "security": "Security" + "security": "Security", + "managing-incremental-tables": "Managing Incremental Tables" } diff --git a/website/pages/docs/advanced-topics/managing-incremental-tables.md b/website/pages/docs/advanced-topics/managing-incremental-tables.md new file mode 100644 index 00000000000000..f5d7dfc1708a88 --- /dev/null +++ b/website/pages/docs/advanced-topics/managing-incremental-tables.md @@ -0,0 +1,17 @@ +# Managing Incremental Tables + +Incremental tables are tables that fetch only the data that changed since the last sync. Tables that support this mode are marked as "incremental" in plugin table documentation. + +When a sync runs on an incremental table, the table will first fetch the last known cursor state from the state backend, then resume syncing from that point. Incremental tables guarantee at-least-once delivery, which means that there should never be gaps in the data as a result of the cursor state being used, but there may be duplicates. If the destination uses `overwrite` or `overwrite-delete-stale` write mode, these duplicates will be handled automatically. But if the destination uses `append` mode, care will need to be taken to either exclude the duplicates at query time or to run a deduplication process on the destination. + +In order to resume from a previous position, incremental tables store some state, known as the **cursor**. When using the CloudQuery CLI, the cursor state is stored in a **backend**. Currently, only one backend is supported: a local backend that writes state to the local filesystem as JSON files. + +## Local Backend + +The local backend stores cursor state as JSON files on the local filesystem. The default location is the `.cq/state` directory, but this can be configured by using the `path` option inside the `backend_spec` section of the [source plugin configuration](/docs/reference/source-spec#backend_spec). + +When syncing incremental tables with the local backend, special care needs to be taken to ensure that the state is preserved between syncs. For example, if you are running CloudQuery in a Docker container, you will need to mount the state directory as a volume so that it is persisted between container restarts. Otherwise, incremental tables will not be able to benefit from stored cursors and will need to re-sync all data on every run. + +## Other Backends + +While the CloudQuery CLI currently only supports the local backend, we intend on adding support for more backends in the near future. If you would like to see support for a Redis backend added, please 👍 [this issue](https://github.com/cloudquery/cloudquery/issues/6630) (or volunteer to implement it!). Or if there is another state backend you'd like to use, feel free to [open an issue on GitHub](https://github.com/cloudquery/cloudquery/issues). \ No newline at end of file diff --git a/website/pages/docs/core-concepts/_meta.json b/website/pages/docs/core-concepts/_meta.json index daef90b03fedad..91f2d90a964d67 100644 --- a/website/pages/docs/core-concepts/_meta.json +++ b/website/pages/docs/core-concepts/_meta.json @@ -1,5 +1,6 @@ { "plugins": "Plugins", + "syncs": "Syncs", "configuration": "Configuration", "policies": "Policies" } diff --git a/website/pages/docs/core-concepts/policies.md b/website/pages/docs/core-concepts/policies.md index e71a7fb754325c..7ce27f53940cd9 100644 --- a/website/pages/docs/core-concepts/policies.md +++ b/website/pages/docs/core-concepts/policies.md @@ -1,7 +1,3 @@ ---- -title: Policies ---- - # Policies CloudQuery uses standard SQL to create security, compliance and cost policies that you can visualize and monitor with your current BI stack such as [Grafana](https://grafana.com/), [Apache Superset](https://superset.apache.org/), [QuickSight](https://aws.amazon.com/quicksight/), [PowerBI](https://powerbi.microsoft.com/en-au/), etc… diff --git a/website/pages/docs/core-concepts/syncs.md b/website/pages/docs/core-concepts/syncs.md new file mode 100644 index 00000000000000..508c878d7f7d1a --- /dev/null +++ b/website/pages/docs/core-concepts/syncs.md @@ -0,0 +1,19 @@ +# Syncs + +When you run `cloudquery sync `, the CloudQuery CLI fetches data from all the source plugins matched by the config and delivers it to the matched destination plugins. This might mean fetching data from AWS, GCP and Azure and delivering it to PostgreSQL, or it could mean fetching data from AWS, Cloudflare and Datadog and delivering it to BigQuery, Kafka and Neo4j. It all depends on the configuration provided, and there is a near-endless array of possible combinations that grows every time a new source or destination is created. (Configuration is described in the [Configuration section](/docs/core-concepts/configuration).) + +Data is synced to the destination in a streaming fashion. This means that as soon as data is received for a source plugin resource, it is delivered to the destination plugin. Destination plugins may batch writes for performance reasons, but generally data will be delivered to the destination as the sync progresses. + +## Table Sync Modes + +Table syncs come in two flavors: `full` and `incremental`. A single `cloudquery sync` command invocation can combine both these types, and which type is used for a particular table depends on the table definition. + +## Full Table Syncs + +This is the normal mode of operation for most tables. For tables in this mode, a snapshot of all data is fetched from the corresponding APIs on every sync. Depending on the destination write mode, the data is then appended (`write_mode`: `append`), overwritten while keeping stale rows from previous syncs (`write_mode`: `overwrite`) or overwritten and rows from previous syncs deleted at the end of the sync (`write_mode`: `overwrite-delete-stale`). + +## Incremental Table Syncs + +Some APIs lend themselves to being synced incrementally. Rather than fetch all past data on every sync, an incremental table will only fetch data that has changed since the last sync. This is done by storing some metadata in a state **backend**. The metadata is known as a **cursor**, and it marks where the last sync ended, so that the next sync can resume from the same point. Incremental syncs can be vastly more efficient than full syncs, especially for tables with large amounts of data. This is because only the data that's changed since the last sync needs to be retrieved, and in many cases this is a small subset of the overall dataset. + +Incremental tables are always clearly marked as "incremental" in plugin table documentation, along with an indication of which columns are used for the value of the cursor. Because they use state, incremental tables require a little more management. For more details, see [Managing Incremental Tables](/docs/advanced-topics/managing-incremental-tables) under the Advanced Topics section. diff --git a/website/pages/docs/plugins/destinations/azblob/overview.md b/website/pages/docs/plugins/destinations/azblob/overview.md index e38e9e1f00b91e..e33187dcbdaa9e 100644 --- a/website/pages/docs/plugins/destinations/azblob/overview.md +++ b/website/pages/docs/plugins/destinations/azblob/overview.md @@ -10,11 +10,11 @@ This destination plugin lets you sync data from a CloudQuery source to remote Az ## Authentication -Authenitcation is similar to Azure CLI. See also [azure source plugin](../../sources/azure/overview#authentication) for more information. +Authentication is similar to Azure CLI. See also [azure source plugin](../../sources/azure/overview#authentication) for more information. ## Example -This example configures a Azure blob storage destination, to create CSV files in `https://cqdestinationazblob.blob.core.windows.net/test/path/to/files`. Note that the Azure blob storage plugin only supports `append` write-mode. +This example configures an Azure blob storage destination, to create CSV files in `https://cqdestinationazblob.blob.core.windows.net/test/path/to/files`. Note that the Azure blob storage plugin only supports `append` write-mode. The (top level) spec section is described in the [Destination Spec Reference](/docs/reference/destination-spec). @@ -25,7 +25,8 @@ spec: path: "cloudquery/azblob" version: "VERSION_DESTINATION_AZBLOB" write_mode: "append" # this plugin only supports 'append' mode - + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: storage_account: "cqdestinationazblob" container: "test" @@ -33,9 +34,11 @@ spec: format: "csv" ``` +The Azure blob destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ## Azure Blob Spec -This is the (nested) spec used by the CSV destination Plugin. +This is the (nested) spec used by the Azure blob destination Plugin. - `storage_account` (string) (required) diff --git a/website/pages/docs/plugins/destinations/bigquery/overview.md b/website/pages/docs/plugins/destinations/bigquery/overview.md index 274e81497429a8..c4a80e25cec05c 100644 --- a/website/pages/docs/plugins/destinations/bigquery/overview.md +++ b/website/pages/docs/plugins/destinations/bigquery/overview.md @@ -31,12 +31,16 @@ spec: path: cloudquery/bigquery version: "VERSION_DESTINATION_BIGQUERY" write_mode: "append" + # batch_size: 1000 # optional + # batch_size_bytes: 5242880 # optional spec: project_id: ${PROJECT_ID} dataset_id: ${DATASET_ID} ``` -Note that the BigQuery plugin only supports the `append` write mode. +The BigQuery destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + +Note that the BigQuery plugin only supports the `append` write mode. ## Authentication diff --git a/website/pages/docs/plugins/destinations/gcs/overview.md b/website/pages/docs/plugins/destinations/gcs/overview.md index 675f871a9f523e..fa2fc6e4f99e2e 100644 --- a/website/pages/docs/plugins/destinations/gcs/overview.md +++ b/website/pages/docs/plugins/destinations/gcs/overview.md @@ -22,13 +22,16 @@ spec: path: "cloudquery/gcs" version: "VERSION_DESTINATION_GCS" write_mode: "append" # gcs only supports 'append' mode - + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: bucket: "bucket_name" path: "path/to/files" format: "csv" ``` +The GCS destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ## GCS Spec This is the (nested) spec used by the CSV destination Plugin. diff --git a/website/pages/docs/plugins/destinations/mongodb/overview.md b/website/pages/docs/plugins/destinations/mongodb/overview.md index 46b16361e0561a..75c9915e3c7302 100644 --- a/website/pages/docs/plugins/destinations/mongodb/overview.md +++ b/website/pages/docs/plugins/destinations/mongodb/overview.md @@ -25,6 +25,8 @@ spec: registry: "github" path: "cloudquery/mongodb" version: "VERSION_DESTINATION_MONGODB" + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: connection_string: "mongodb://localhost:27017" database: "your_mongo_database_name" @@ -34,6 +36,8 @@ spec: Make sure to use [environment variable substitution](/docs/advanced-topics/environment-variable-substitution) in production instead of committing the credentials to the configuration file directly. +The MongoDB destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ### MongoDB Spec This is the (nested) spec used by the MongoDB destination Plugin. diff --git a/website/pages/docs/plugins/destinations/neo4j/overview.md b/website/pages/docs/plugins/destinations/neo4j/overview.md index 7c3e150209b477..aa9908e8e76287 100644 --- a/website/pages/docs/plugins/destinations/neo4j/overview.md +++ b/website/pages/docs/plugins/destinations/neo4j/overview.md @@ -27,7 +27,8 @@ spec: registry: "github" path: "cloudquery/neo4j" version: "VERSION_DESTINATION_NEO4J" - + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: connection_string: "bolt://localhost:7687" username: "${USERNAME}" @@ -38,6 +39,8 @@ spec: Make sure you use environment variable expansion in production instead of committing the credentials to the configuration file directly. +The Neo4j destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ### Plugin Spec This is the (nested) spec used by the Neo4j destination Plugin. diff --git a/website/pages/docs/plugins/destinations/s3/overview.md b/website/pages/docs/plugins/destinations/s3/overview.md index eca2ef4929ffb8..aa010691ec5b56 100644 --- a/website/pages/docs/plugins/destinations/s3/overview.md +++ b/website/pages/docs/plugins/destinations/s3/overview.md @@ -26,13 +26,16 @@ spec: path: "cloudquery/s3" version: "VERSION_DESTINATION_S3" write_mode: "append" # s3 only supports 'append' mode - + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: bucket: "bucket_name" path: "path/to/files" format: "csv" ``` +The S3 destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ## S3 Spec This is the (nested) spec used by the CSV destination Plugin. diff --git a/website/pages/docs/plugins/destinations/snowflake/overview.md b/website/pages/docs/plugins/destinations/snowflake/overview.md index 0d2b5e20404f06..404025e06fbf6e 100644 --- a/website/pages/docs/plugins/destinations/snowflake/overview.md +++ b/website/pages/docs/plugins/destinations/snowflake/overview.md @@ -24,10 +24,14 @@ spec: path: cloudquery/snowflake version: "VERSION_DESTINATION_SNOWFLAKE" write_mode: "append" + # batch_size: 10000 # optional + # batch_size_bytes: 5242880 # optional spec: connection_string: ${SNOWFLAKE_CONNECTION_STRING} ``` +The Snowflake destination utilizes batching, and supports [`batch_size`](/docs/reference/destination-spec#batch_size) and [`batch_size_bytes`](/docs/reference/destination-spec#batch_size_bytes). + ## Snowflake Spec This is the top level spec used by the Snowflake destination plugin. diff --git a/website/pages/docs/plugins/sources/_meta.json b/website/pages/docs/plugins/sources/_meta.json index 4d768c981c8b74..18998e094c07a7 100644 --- a/website/pages/docs/plugins/sources/_meta.json +++ b/website/pages/docs/plugins/sources/_meta.json @@ -2,6 +2,7 @@ "overview": "Overview", "aws": "AWS", "azure": "Azure", + "azuredevops": "Azure DevOps", "cloudflare": "Cloudflare", "datadog": "Datadog", "digitalocean": "DigitalOcean", @@ -14,10 +15,12 @@ "heroku": "Heroku", "k8s": "Kubernetes", "okta": "Okta", + "oracle": "Oracle", "salesforce": "Salesforce", "shopify": "Shopify", "slack": "Slack", "snyk": "Snyk", + "stripe": "Stripe", "pagerduty": "PagerDuty", "tailscale": "Tailscale", "terraform": "Terraform", diff --git a/website/pages/docs/plugins/sources/aws/tables.md b/website/pages/docs/plugins/sources/aws/tables.md index 0db3d16bff13a8..9ca78bac0f89ff 100644 --- a/website/pages/docs/plugins/sources/aws/tables.md +++ b/website/pages/docs/plugins/sources/aws/tables.md @@ -3,8 +3,8 @@ ## Tables - [aws_accessanalyzer_analyzers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzers.md) - - [aws_accessanalyzer_analyzer_findings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzer_findings.md) - [aws_accessanalyzer_analyzer_archive_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzer_archive_rules.md) + - [aws_accessanalyzer_analyzer_findings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_accessanalyzer_analyzer_findings.md) - [aws_account_alternate_contacts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_account_alternate_contacts.md) - [aws_account_contacts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_account_contacts.md) - [aws_acm_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_acm_certificates.md) @@ -44,8 +44,8 @@ - [aws_apprunner_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_connections.md) - [aws_apprunner_observability_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_observability_configurations.md) - [aws_apprunner_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_services.md) - - [aws_apprunner_operations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_operations.md) - [aws_apprunner_custom_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_custom_domains.md) + - [aws_apprunner_operations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_operations.md) - [aws_apprunner_vpc_connectors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_vpc_connectors.md) - [aws_apprunner_vpc_ingress_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_apprunner_vpc_ingress_connections.md) - [aws_appstream_app_blocks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_appstream_app_blocks.md) @@ -65,13 +65,13 @@ - [aws_athena_data_catalog_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_data_catalog_databases.md) - [aws_athena_data_catalog_database_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_data_catalog_database_tables.md) - [aws_athena_work_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_work_groups.md) + - [aws_athena_work_group_named_queries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_work_group_named_queries.md) - [aws_athena_work_group_prepared_statements](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_work_group_prepared_statements.md) - [aws_athena_work_group_query_executions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_work_group_query_executions.md) - - [aws_athena_work_group_named_queries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_athena_work_group_named_queries.md) -- [aws_autoscaling_launch_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_launch_configurations.md) - [aws_autoscaling_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_groups.md) - - [aws_autoscaling_group_scaling_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_group_scaling_policies.md) - [aws_autoscaling_group_lifecycle_hooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_group_lifecycle_hooks.md) + - [aws_autoscaling_group_scaling_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_group_scaling_policies.md) +- [aws_autoscaling_launch_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_launch_configurations.md) - [aws_autoscaling_scheduled_actions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_autoscaling_scheduled_actions.md) - [aws_backup_global_settings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_backup_global_settings.md) - [aws_backup_plans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_backup_plans.md) @@ -83,26 +83,27 @@ - [aws_cloudformation_stack_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudformation_stack_resources.md) - [aws_cloudfront_cache_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudfront_cache_policies.md) - [aws_cloudfront_distributions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudfront_distributions.md) -- [aws_cloudhsmv2_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudhsmv2_clusters.md) - [aws_cloudhsmv2_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudhsmv2_backups.md) +- [aws_cloudhsmv2_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudhsmv2_clusters.md) - [aws_cloudtrail_trails](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudtrail_trails.md) - [aws_cloudtrail_trail_event_selectors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudtrail_trail_event_selectors.md) -- [aws_cloudwatchlogs_resource_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_resource_policies.md) -- [aws_cloudwatchlogs_metric_filters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_metric_filters.md) -- [aws_cloudwatchlogs_log_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_log_groups.md) - [aws_cloudwatch_alarms](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatch_alarms.md) +- [aws_cloudwatchlogs_log_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_log_groups.md) +- [aws_cloudwatchlogs_metric_filters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_metric_filters.md) +- [aws_cloudwatchlogs_resource_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cloudwatchlogs_resource_policies.md) - [aws_codebuild_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_codebuild_projects.md) -- [aws_codepipeline_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_codepipeline_webhooks.md) - [aws_codepipeline_pipelines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_codepipeline_pipelines.md) +- [aws_codepipeline_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_codepipeline_webhooks.md) - [aws_cognito_identity_pools](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cognito_identity_pools.md) - [aws_cognito_user_pools](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cognito_user_pools.md) - [aws_cognito_user_pool_identity_providers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_cognito_user_pool_identity_providers.md) +- [aws_config_config_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_config_rules.md) + - [aws_config_config_rule_compliances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md) - [aws_config_configuration_recorders](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_configuration_recorders.md) - [aws_config_conformance_packs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_conformance_packs.md) - [aws_config_conformance_pack_rule_compliances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_conformance_pack_rule_compliances.md) -- [aws_config_config_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_config_rules.md) - - [aws_config_config_rule_compliances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_config_config_rule_compliances.md) - [aws_dax_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dax_clusters.md) +- [aws_db_proxies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_db_proxies.md) - [aws_directconnect_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_directconnect_connections.md) - [aws_directconnect_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_directconnect_gateways.md) - [aws_directconnect_gateway_associations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_directconnect_gateway_associations.md) @@ -111,23 +112,23 @@ - [aws_directconnect_virtual_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_directconnect_virtual_gateways.md) - [aws_directconnect_virtual_interfaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_directconnect_virtual_interfaces.md) - [aws_dms_replication_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dms_replication_instances.md) +- [aws_docdb_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_certificates.md) +- [aws_docdb_cluster_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_cluster_parameter_groups.md) - [aws_docdb_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_clusters.md) - [aws_docdb_cluster_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_cluster_snapshots.md) - [aws_docdb_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_instances.md) -- [aws_docdb_cluster_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_cluster_parameter_groups.md) -- [aws_docdb_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_certificates.md) - [aws_docdb_engine_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_engine_versions.md) - [aws_docdb_cluster_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_cluster_parameters.md) - [aws_docdb_orderable_db_instance_options](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_orderable_db_instance_options.md) -- [aws_docdb_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_subnet_groups.md) -- [aws_docdb_global_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_global_clusters.md) -- [aws_docdb_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_events.md) -- [aws_docdb_event_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_event_subscriptions.md) - [aws_docdb_event_categories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_event_categories.md) +- [aws_docdb_event_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_event_subscriptions.md) +- [aws_docdb_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_events.md) +- [aws_docdb_global_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_global_clusters.md) - [aws_docdb_pending_maintenance_actions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_pending_maintenance_actions.md) +- [aws_docdb_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_docdb_subnet_groups.md) - [aws_dynamodb_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dynamodb_tables.md) - - [aws_dynamodb_table_replica_auto_scalings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dynamodb_table_replica_auto_scalings.md) - [aws_dynamodb_table_continuous_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dynamodb_table_continuous_backups.md) + - [aws_dynamodb_table_replica_auto_scalings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_dynamodb_table_replica_auto_scalings.md) - [aws_ec2_byoip_cidrs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_byoip_cidrs.md) - [aws_ec2_customer_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_customer_gateways.md) - [aws_ec2_ebs_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_ebs_snapshots.md) @@ -138,14 +139,13 @@ - [aws_ec2_hosts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_hosts.md) - [aws_ec2_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_images.md) - [aws_ec2_instance_statuses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_instance_statuses.md) -- [aws_ec2_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_instances.md) - [aws_ec2_instance_types](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_instance_types.md) +- [aws_ec2_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_instances.md) - [aws_ec2_internet_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_internet_gateways.md) - [aws_ec2_key_pairs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_key_pairs.md) - [aws_ec2_nat_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_nat_gateways.md) - [aws_ec2_network_acls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_network_acls.md) - [aws_ec2_network_interfaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_network_interfaces.md) -- [aws_regions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_regions.md) - [aws_ec2_regional_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_regional_configs.md) - [aws_ec2_reserved_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_reserved_instances.md) - [aws_ec2_route_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_route_tables.md) @@ -153,27 +153,27 @@ - [aws_ec2_subnets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_subnets.md) - [aws_ec2_transit_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md) - [aws_ec2_transit_gateway_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_attachments.md) + - [aws_ec2_transit_gateway_multicast_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_multicast_domains.md) + - [aws_ec2_transit_gateway_peering_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_peering_attachments.md) - [aws_ec2_transit_gateway_route_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_route_tables.md) - [aws_ec2_transit_gateway_vpc_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_vpc_attachments.md) - - [aws_ec2_transit_gateway_peering_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_peering_attachments.md) - - [aws_ec2_transit_gateway_multicast_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_transit_gateway_multicast_domains.md) - [aws_ec2_vpc_endpoint_service_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpc_endpoint_service_configurations.md) - [aws_ec2_vpc_endpoint_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpc_endpoint_services.md) - [aws_ec2_vpc_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpc_endpoints.md) - [aws_ec2_vpc_peering_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpc_peering_connections.md) - [aws_ec2_vpcs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpcs.md) - [aws_ec2_vpn_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ec2_vpn_gateways.md) -- [aws_ecrpublic_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecrpublic_repositories.md) - - [aws_ecrpublic_repository_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecrpublic_repository_images.md) - [aws_ecr_registries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecr_registries.md) - [aws_ecr_registry_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecr_registry_policies.md) - [aws_ecr_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecr_repositories.md) - [aws_ecr_repository_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecr_repository_images.md) - [aws_ecr_repository_image_scan_findings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecr_repository_image_scan_findings.md) +- [aws_ecrpublic_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecrpublic_repositories.md) + - [aws_ecrpublic_repository_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecrpublic_repository_images.md) - [aws_ecs_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_clusters.md) - - [aws_ecs_cluster_tasks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_cluster_tasks.md) - - [aws_ecs_cluster_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_cluster_services.md) - [aws_ecs_cluster_container_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_cluster_container_instances.md) + - [aws_ecs_cluster_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_cluster_services.md) + - [aws_ecs_cluster_tasks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_cluster_tasks.md) - [aws_ecs_task_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ecs_task_definitions.md) - [aws_efs_filesystems](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_efs_filesystems.md) - [aws_eks_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eks_clusters.md) @@ -182,18 +182,18 @@ - [aws_elasticache_global_replication_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_global_replication_groups.md) - [aws_elasticache_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_parameter_groups.md) - [aws_elasticache_replication_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_replication_groups.md) -- [aws_elasticache_reserved_cache_nodes_offerings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_reserved_cache_nodes_offerings.md) - [aws_elasticache_reserved_cache_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_reserved_cache_nodes.md) +- [aws_elasticache_reserved_cache_nodes_offerings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_reserved_cache_nodes_offerings.md) - [aws_elasticache_service_updates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_service_updates.md) - [aws_elasticache_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_snapshots.md) +- [aws_elasticache_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_subnet_groups.md) - [aws_elasticache_user_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_user_groups.md) - [aws_elasticache_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_users.md) -- [aws_elasticache_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticache_subnet_groups.md) - [aws_elasticbeanstalk_application_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_application_versions.md) - [aws_elasticbeanstalk_applications](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_applications.md) - [aws_elasticbeanstalk_environments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_environments.md) - - [aws_elasticbeanstalk_configuration_settings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_configuration_settings.md) - [aws_elasticbeanstalk_configuration_options](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_configuration_options.md) + - [aws_elasticbeanstalk_configuration_settings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticbeanstalk_configuration_settings.md) - [aws_elasticsearch_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticsearch_domains.md) - [aws_elasticsearch_packages](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticsearch_packages.md) - [aws_elasticsearch_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elasticsearch_versions.md) @@ -211,14 +211,14 @@ - [aws_elbv2_target_group_target_health_descriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_elbv2_target_group_target_health_descriptions.md) - [aws_emr_block_public_access_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_emr_block_public_access_configs.md) - [aws_emr_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_emr_clusters.md) -- [aws_eventbridge_event_buses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_event_buses.md) - - [aws_eventbridge_event_bus_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_event_bus_rules.md) - [aws_eventbridge_api_destinations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_api_destinations.md) - [aws_eventbridge_archives](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_archives.md) - [aws_eventbridge_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_connections.md) +- [aws_eventbridge_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_endpoints.md) +- [aws_eventbridge_event_buses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_event_buses.md) + - [aws_eventbridge_event_bus_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_event_bus_rules.md) - [aws_eventbridge_event_sources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_event_sources.md) - [aws_eventbridge_replays](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_replays.md) -- [aws_eventbridge_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_eventbridge_endpoints.md) - [aws_firehose_delivery_streams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_firehose_delivery_streams.md) - [aws_frauddetector_batch_imports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_frauddetector_batch_imports.md) - [aws_frauddetector_batch_predictions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_frauddetector_batch_predictions.md) @@ -240,11 +240,11 @@ - [aws_fsx_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_fsx_snapshots.md) - [aws_fsx_storage_virtual_machines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_fsx_storage_virtual_machines.md) - [aws_fsx_volumes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_fsx_volumes.md) +- [aws_glacier_data_retrieval_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md) - [aws_glacier_vaults](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_vaults.md) - [aws_glacier_vault_access_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_vault_access_policies.md) - [aws_glacier_vault_lock_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_vault_lock_policies.md) - [aws_glacier_vault_notifications](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_vault_notifications.md) -- [aws_glacier_data_retrieval_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glacier_data_retrieval_policies.md) - [aws_glue_classifiers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glue_classifiers.md) - [aws_glue_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glue_connections.md) - [aws_glue_crawlers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_glue_crawlers.md) @@ -277,11 +277,11 @@ - [aws_iam_saml_identity_providers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_saml_identity_providers.md) - [aws_iam_server_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_server_certificates.md) - [aws_iam_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_users.md) + - [aws_iam_ssh_public_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_ssh_public_keys.md) - [aws_iam_user_access_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_user_access_keys.md) - - [aws_iam_user_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_user_groups.md) - [aws_iam_user_attached_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_user_attached_policies.md) + - [aws_iam_user_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_user_groups.md) - [aws_iam_user_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_user_policies.md) - - [aws_iam_ssh_public_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_ssh_public_keys.md) - [aws_iam_virtual_mfa_devices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iam_virtual_mfa_devices.md) - [aws_identitystore_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_identitystore_groups.md) - [aws_identitystore_group_memberships](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_identitystore_group_memberships.md) @@ -300,8 +300,8 @@ - [aws_iot_things](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iot_things.md) - [aws_iot_topic_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_iot_topic_rules.md) - [aws_kafka_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kafka_clusters.md) - - [aws_kafka_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kafka_nodes.md) - [aws_kafka_cluster_operations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kafka_cluster_operations.md) + - [aws_kafka_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kafka_nodes.md) - [aws_kafka_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kafka_configurations.md) - [aws_kinesis_streams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kinesis_streams.md) - [aws_kms_aliases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kms_aliases.md) @@ -309,11 +309,11 @@ - [aws_kms_key_grants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kms_key_grants.md) - [aws_kms_key_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_kms_key_policies.md) - [aws_lambda_functions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_functions.md) - - [aws_lambda_function_event_invoke_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_aliases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_aliases.md) - - [aws_lambda_function_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_versions.md) - [aws_lambda_function_concurrency_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_concurrency_configs.md) + - [aws_lambda_function_event_invoke_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_event_invoke_configs.md) - [aws_lambda_function_event_source_mappings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_event_source_mappings.md) + - [aws_lambda_function_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_function_versions.md) - [aws_lambda_layers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_layers.md) - [aws_lambda_layer_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_layer_versions.md) - [aws_lambda_layer_version_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lambda_layer_version_policies.md) @@ -327,9 +327,9 @@ - [aws_lightsail_container_service_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_container_service_images.md) - [aws_lightsail_database_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_database_snapshots.md) - [aws_lightsail_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_databases.md) - - [aws_lightsail_database_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_database_parameters.md) - [aws_lightsail_database_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_database_events.md) - [aws_lightsail_database_log_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_database_log_events.md) + - [aws_lightsail_database_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_database_parameters.md) - [aws_lightsail_disks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_disks.md) - [aws_lightsail_disk_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_disk_snapshots.md) - [aws_lightsail_distributions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_lightsail_distributions.md) @@ -350,12 +350,13 @@ - [aws_neptune_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_clusters.md) - [aws_neptune_db_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_db_parameter_groups.md) - [aws_neptune_db_parameter_group_db_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_db_parameter_group_db_parameters.md) -- [aws_neptune_global_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_global_clusters.md) - [aws_neptune_event_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_event_subscriptions.md) +- [aws_neptune_global_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_global_clusters.md) - [aws_neptune_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_instances.md) - [aws_neptune_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_neptune_subnet_groups.md) -- [aws_organizations_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_organizations_accounts.md) +- [aws_organization_resource_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_organization_resource_policies.md) - [aws_organizations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_organizations.md) +- [aws_organizations_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_organizations_accounts.md) - [aws_qldb_ledgers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_qldb_ledgers.md) - [aws_qldb_ledger_journal_kinesis_streams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_qldb_ledger_journal_kinesis_streams.md) - [aws_qldb_ledger_journal_s3_exports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_qldb_ledger_journal_s3_exports.md) @@ -370,15 +371,13 @@ - [aws_quicksight_templates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_quicksight_templates.md) - [aws_quicksight_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_quicksight_users.md) - [aws_ram_principals](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_principals.md) -- [aws_ram_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resources.md) -- [aws_ram_resource_shares](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_shares.md) - - [aws_ram_resource_share_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_share_permissions.md) - [aws_ram_resource_share_associations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_share_associations.md) - [aws_ram_resource_share_invitations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_share_invitations.md) +- [aws_ram_resource_shares](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_shares.md) + - [aws_ram_resource_share_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_share_permissions.md) - [aws_ram_resource_types](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resource_types.md) +- [aws_ram_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ram_resources.md) - [aws_rds_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_certificates.md) -- [aws_rds_engine_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_engine_versions.md) - - [aws_rds_cluster_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_cluster_parameters.md) - [aws_rds_cluster_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_cluster_parameter_groups.md) - [aws_rds_cluster_parameter_group_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_cluster_parameter_group_parameters.md) - [aws_rds_cluster_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_cluster_snapshots.md) @@ -387,15 +386,18 @@ - [aws_rds_db_parameter_group_db_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_db_parameter_group_db_parameters.md) - [aws_rds_db_security_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_db_security_groups.md) - [aws_rds_db_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_db_snapshots.md) +- [aws_rds_engine_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_engine_versions.md) + - [aws_rds_cluster_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_cluster_parameters.md) - [aws_rds_event_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_event_subscriptions.md) - [aws_rds_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_instances.md) - [aws_rds_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_rds_subnet_groups.md) - [aws_redshift_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_clusters.md) - - [aws_redshift_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_snapshots.md) - [aws_redshift_cluster_parameter_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_cluster_parameter_groups.md) - [aws_redshift_cluster_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_cluster_parameters.md) + - [aws_redshift_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_snapshots.md) - [aws_redshift_event_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_event_subscriptions.md) - [aws_redshift_subnet_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_redshift_subnet_groups.md) +- [aws_regions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_regions.md) - [aws_resourcegroups_resource_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_resourcegroups_resource_groups.md) - [aws_route53_delegation_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_route53_delegation_sets.md) - [aws_route53_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_route53_domains.md) @@ -408,14 +410,15 @@ - [aws_route53_traffic_policy_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_route53_traffic_policy_versions.md) - [aws_s3_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_accounts.md) - [aws_s3_buckets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_buckets.md) + - [aws_s3_bucket_cors_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_cors_rules.md) - [aws_s3_bucket_encryption_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_encryption_rules.md) - - [aws_s3_bucket_lifecycles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_lifecycles.md) - [aws_s3_bucket_grants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md) - - [aws_s3_bucket_cors_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_cors_rules.md) + - [aws_s3_bucket_lifecycles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_s3_bucket_lifecycles.md) - [aws_sagemaker_endpoint_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sagemaker_endpoint_configurations.md) - [aws_sagemaker_models](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sagemaker_models.md) - [aws_sagemaker_notebook_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sagemaker_notebook_instances.md) - [aws_sagemaker_training_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sagemaker_training_jobs.md) +- [aws_savingsplans_plans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_savingsplans_plans.md) - [aws_scheduler_schedule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_scheduler_schedule_groups.md) - [aws_scheduler_schedules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_scheduler_schedules.md) - [aws_secretsmanager_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_secretsmanager_secrets.md) @@ -438,15 +441,15 @@ - [aws_sns_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sns_subscriptions.md) - [aws_sns_topics](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sns_topics.md) - [aws_sqs_queues](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_sqs_queues.md) +- [aws_ssm_associations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_associations.md) +- [aws_ssm_compliance_summary_items](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_compliance_summary_items.md) - [aws_ssm_documents](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_documents.md) - [aws_ssm_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_instances.md) - [aws_ssm_instance_compliance_items](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_instance_compliance_items.md) - [aws_ssm_instance_patches](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_instance_patches.md) -- [aws_ssm_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_parameters.md) -- [aws_ssm_compliance_summary_items](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_compliance_summary_items.md) -- [aws_ssm_associations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_associations.md) - [aws_ssm_inventories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_inventories.md) - [aws_ssm_inventory_schemas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_inventory_schemas.md) +- [aws_ssm_parameters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_parameters.md) - [aws_ssm_patch_baselines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssm_patch_baselines.md) - [aws_ssoadmin_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssoadmin_instances.md) - [aws_ssoadmin_permission_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_ssoadmin_permission_sets.md) @@ -455,21 +458,22 @@ - [aws_timestream_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_timestream_databases.md) - [aws_timestream_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_timestream_tables.md) - [aws_transfer_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_transfer_servers.md) -- [aws_wafregional_rate_based_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rate_based_rules.md) -- [aws_wafregional_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rule_groups.md) -- [aws_wafregional_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rules.md) -- [aws_wafregional_web_acls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_web_acls.md) - [aws_waf_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_waf_rule_groups.md) - [aws_waf_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_waf_rules.md) - [aws_waf_subscribed_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_waf_subscribed_rule_groups.md) - [aws_waf_web_acls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_waf_web_acls.md) +- [aws_wafregional_rate_based_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rate_based_rules.md) +- [aws_wafregional_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rule_groups.md) +- [aws_wafregional_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_rules.md) +- [aws_wafregional_web_acls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafregional_web_acls.md) - [aws_wafv2_ipsets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafv2_ipsets.md) - [aws_wafv2_managed_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafv2_managed_rule_groups.md) - [aws_wafv2_regex_pattern_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafv2_regex_pattern_sets.md) - [aws_wafv2_rule_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafv2_rule_groups.md) - [aws_wafv2_web_acls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_wafv2_web_acls.md) -- [aws_workspaces_workspaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_workspaces_workspaces.md) - [aws_workspaces_directories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_workspaces_directories.md) +- [aws_workspaces_workspaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_workspaces_workspaces.md) - [aws_xray_encryption_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_xray_encryption_configs.md) - [aws_xray_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_xray_groups.md) +- [aws_xray_resource_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_xray_resource_policies.md) - [aws_xray_sampling_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/aws_xray_sampling_rules.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/azure/tables.md b/website/pages/docs/plugins/sources/azure/tables.md index f8deaa1f91bdbf..ab7797d381b5a7 100644 --- a/website/pages/docs/plugins/sources/azure/tables.md +++ b/website/pages/docs/plugins/sources/azure/tables.md @@ -25,6 +25,7 @@ - [azure_authorization_classic_administrators](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_authorization_classic_administrators.md) - [azure_authorization_provider_operations_metadata](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_authorization_provider_operations_metadata.md) - [azure_authorization_role_assignments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_authorization_role_assignments.md) +- [azure_authorization_role_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_authorization_role_definitions.md) - [azure_automation_account](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_automation_account.md) - [azure_azurearcdata_postgres_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_azurearcdata_postgres_instances.md) - [azure_azurearcdata_sql_managed_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_azurearcdata_sql_managed_instances.md) @@ -37,6 +38,10 @@ - [azure_botservice_bots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_botservice_bots.md) - [azure_cdn_edge_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_edge_nodes.md) - [azure_cdn_managed_rule_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_managed_rule_sets.md) +- [azure_cdn_profiles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_profiles.md) + - [azure_cdn_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_endpoints.md) + - [azure_cdn_rule_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_rule_sets.md) + - [azure_cdn_security_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_security_policies.md) - [azure_cognitiveservices_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cognitiveservices_accounts.md) - [azure_cognitiveservices_deleted_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cognitiveservices_deleted_accounts.md) - [azure_compute_cloud_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_cloud_services.md) @@ -46,8 +51,11 @@ - [azure_compute_galleries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_galleries.md) - [azure_compute_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_images.md) - [azure_compute_restore_point_collections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_restore_point_collections.md) +- [azure_compute_skus](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_skus.md) - [azure_compute_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_snapshots.md) - [azure_compute_virtual_machine_scale_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md) + - [azure_compute_virtual_machine_scale_set_vms](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_set_vms.md) +- [azure_compute_virtual_machines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machines.md) - [azure_confluent_marketplace_agreements](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_confluent_marketplace_agreements.md) - [azure_connectedvmware_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_connectedvmware_clusters.md) - [azure_connectedvmware_datastores](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_connectedvmware_datastores.md) @@ -61,8 +69,13 @@ - [azure_containerregistry_registries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_containerregistry_registries.md) - [azure_containerservice_managed_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_containerservice_managed_clusters.md) - [azure_containerservice_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_containerservice_snapshots.md) +- [azure_cosmos_database_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_database_accounts.md) + - [azure_cosmos_mongo_db_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_mongo_db_databases.md) + - [azure_cosmos_sql_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_sql_databases.md) - [azure_cosmos_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_locations.md) - [azure_cosmos_restorable_database_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_restorable_database_accounts.md) +- [azure_costmanagement_views](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_costmanagement_views.md) + - [azure_costmanagement_view_queries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_costmanagement_view_queries.md) - [azure_customerinsights_hubs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_customerinsights_hubs.md) - [azure_dashboard_grafana](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_dashboard_grafana.md) - [azure_databox_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_databox_jobs.md) @@ -91,13 +104,23 @@ - [azure_healthcareapis_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_healthcareapis_services.md) - [azure_hybridcompute_private_link_scopes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_hybridcompute_private_link_scopes.md) - [azure_hybriddatamanager_data_managers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_hybriddatamanager_data_managers.md) +- [azure_keyvault_keyvault](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault.md) + - [azure_keyvault_keyvault_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_keys.md) + - [azure_keyvault_keyvault_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_secrets.md) +- [azure_keyvault_keyvault_managed_hsms](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_managed_hsms.md) - [azure_kusto_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_kusto_clusters.md) +- [azure_logic_workflows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_logic_workflows.md) - [azure_maintenance_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_maintenance_configurations.md) - [azure_maintenance_public_maintenance_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_maintenance_public_maintenance_configurations.md) +- [azure_mariadb_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mariadb_servers.md) + - [azure_mariadb_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mariadb_server_configurations.md) - [azure_marketplace_private_store](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_marketplace_private_store.md) - [azure_monitor_log_profiles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_monitor_log_profiles.md) - [azure_monitor_private_link_scopes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_monitor_private_link_scopes.md) +- [azure_monitor_tenant_activity_log_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_monitor_tenant_activity_log_alerts.md) - [azure_monitor_tenant_activity_logs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_monitor_tenant_activity_logs.md) +- [azure_mysql_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mysql_servers.md) + - [azure_mysql_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mysql_server_configurations.md) - [azure_mysqlflexibleservers_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mysqlflexibleservers_servers.md) - [azure_network_application_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_application_gateways.md) - [azure_network_application_security_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_application_security_groups.md) @@ -109,13 +132,14 @@ - [azure_network_ddos_protection_plans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_ddos_protection_plans.md) - [azure_network_dscp_configuration](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_dscp_configuration.md) - [azure_network_express_route_circuits](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_circuits.md) +- [azure_network_express_route_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_gateways.md) - [azure_network_express_route_ports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_ports.md) - [azure_network_express_route_ports_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_ports_locations.md) - [azure_network_express_route_service_providers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_service_providers.md) - [azure_network_firewall_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_firewall_policies.md) +- [azure_network_interfaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_interfaces.md) - [azure_network_ip_allocations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_ip_allocations.md) - [azure_network_ip_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_ip_groups.md) -- [azure_network_interfaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_interfaces.md) - [azure_network_load_balancers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_load_balancers.md) - [azure_network_nat_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_nat_gateways.md) - [azure_network_profiles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_profiles.md) @@ -127,15 +151,15 @@ - [azure_network_security_partner_providers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_security_partner_providers.md) - [azure_network_service_endpoint_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_service_endpoint_policies.md) - [azure_network_subscription_network_manager_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_subscription_network_manager_connections.md) -- [azure_network_vpn_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_gateways.md) -- [azure_network_vpn_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_server_configurations.md) -- [azure_network_vpn_sites](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_sites.md) - [azure_network_virtual_appliances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_appliances.md) - [azure_network_virtual_hubs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_hubs.md) - [azure_network_virtual_network_taps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_network_taps.md) - [azure_network_virtual_networks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_networks.md) - [azure_network_virtual_routers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_routers.md) - [azure_network_virtual_wans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_virtual_wans.md) +- [azure_network_vpn_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_gateways.md) +- [azure_network_vpn_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_server_configurations.md) +- [azure_network_vpn_sites](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_vpn_sites.md) - [azure_network_watchers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_watchers.md) - [azure_network_web_application_firewall_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_web_application_firewall_policies.md) - [azure_networkfunction_azure_traffic_collectors_by_subscription](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_networkfunction_azure_traffic_collectors_by_subscription.md) @@ -146,6 +170,11 @@ - [azure_peering_service_countries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_peering_service_countries.md) - [azure_peering_service_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_peering_service_locations.md) - [azure_peering_service_providers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_peering_service_providers.md) +- [azure_policy_assignments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_assignments.md) +- [azure_policy_data_policy_manifests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_data_policy_manifests.md) +- [azure_policy_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_definitions.md) +- [azure_policy_exemptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_exemptions.md) +- [azure_policy_set_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_set_definitions.md) - [azure_portal_list_tenant_configuration_violations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_portal_list_tenant_configuration_violations.md) - [azure_portal_tenant_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_portal_tenant_configurations.md) - [azure_postgresql_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_postgresql_servers.md) @@ -155,15 +184,13 @@ - [azure_privatedns_private_zones](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_privatedns_private_zones.md) - [azure_providerhub_provider_registrations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_providerhub_provider_registrations.md) - [azure_redhatopenshift_open_shift_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_redhatopenshift_open_shift_clusters.md) +- [azure_redis_caches](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_redis_caches.md) - [azure_relay_namespaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_relay_namespaces.md) - [azure_reservations_reservation](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_reservations_reservation.md) - [azure_reservations_reservation_order](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_reservations_reservation_order.md) -- [azure_policy_assignments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_assignments.md) -- [azure_policy_data_policy_manifests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_data_policy_manifests.md) -- [azure_policy_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_definitions.md) -- [azure_policy_exemptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_exemptions.md) -- [azure_policy_set_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_policy_set_definitions.md) +- [azure_resources_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_resources_resources.md) - [azure_saas_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_saas_resources.md) +- [azure_search_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_search_services.md) - [azure_security_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_alerts.md) - [azure_security_alerts_suppression_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_alerts_suppression_rules.md) - [azure_security_allowed_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_allowed_connections.md) @@ -177,6 +204,7 @@ - [azure_security_governance_rule](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_governance_rule.md) - [azure_security_jit_network_access_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_jit_network_access_policies.md) - [azure_security_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_locations.md) +- [azure_security_pricings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_pricings.md) - [azure_security_regulatory_compliance_standards](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_regulatory_compliance_standards.md) - [azure_security_secure_score_control_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_secure_score_control_definitions.md) - [azure_security_secure_score_controls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_secure_score_controls.md) @@ -192,45 +220,17 @@ - [azure_sql_virtual_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_sql_virtual_clusters.md) - [azure_sqlvirtualmachine_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_sqlvirtualmachine_groups.md) - [azure_sqlvirtualmachine_sql_virtual_machines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_sqlvirtualmachine_sql_virtual_machines.md) +- [azure_storage_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_accounts.md) + - [azure_storage_blob_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_blob_services.md) + - [azure_storage_containers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_containers.md) + - [azure_storage_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_tables.md) - [azure_storagecache_caches](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storagecache_caches.md) - [azure_streamanalytics_streaming_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_streamanalytics_streaming_jobs.md) +- [azure_subscription_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_subscription_subscriptions.md) +- [azure_subscription_tenants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_subscription_tenants.md) - [azure_support_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_support_services.md) - [azure_support_tickets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_support_tickets.md) - [azure_synapse_private_link_hubs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_synapse_private_link_hubs.md) - [azure_synapse_workspaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_synapse_workspaces.md) -- [azure_windowsesu_multiple_activation_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_windowsesu_multiple_activation_keys.md) - [azure_windowsiot_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_windowsiot_services.md) -- [azure_workloads_monitors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_workloads_monitors.md) -- [azure_authorization_role_definitions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_authorization_role_definitions.md) -- [azure_cdn_profiles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_profiles.md) - - [azure_cdn_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_endpoints.md) - - [azure_cdn_rule_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_rule_sets.md) - - [azure_cdn_security_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cdn_security_policies.md) -- [azure_compute_virtual_machines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machines.md) -- [azure_compute_skus](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_skus.md) -- [azure_cosmos_database_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_database_accounts.md) - - [azure_cosmos_mongo_db_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_mongo_db_databases.md) - - [azure_cosmos_sql_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_cosmos_sql_databases.md) -- [azure_costmanagement_views](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_costmanagement_views.md) - - [azure_costmanagement_view_queries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_costmanagement_view_queries.md) -- [azure_keyvault_keyvault](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault.md) - - [azure_keyvault_keyvault_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_keys.md) - - [azure_keyvault_keyvault_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_secrets.md) -- [azure_keyvault_keyvault_managed_hsms](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_keyvault_keyvault_managed_hsms.md) -- [azure_logic_workflows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_logic_workflows.md) -- [azure_mariadb_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mariadb_servers.md) - - [azure_mariadb_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mariadb_server_configurations.md) -- [azure_monitor_tenant_activity_log_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_monitor_tenant_activity_log_alerts.md) -- [azure_mysql_servers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mysql_servers.md) - - [azure_mysql_server_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_mysql_server_configurations.md) -- [azure_network_express_route_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_network_express_route_gateways.md) -- [azure_security_pricings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_security_pricings.md) -- [azure_storage_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_accounts.md) - - [azure_storage_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_tables.md) - - [azure_storage_containers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_containers.md) - - [azure_storage_blob_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_storage_blob_services.md) -- [azure_subscription_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_subscription_subscriptions.md) -- [azure_redis_caches](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_redis_caches.md) -- [azure_resources_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_resources_resources.md) -- [azure_subscription_tenants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_subscription_tenants.md) -- [azure_search_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_search_services.md) \ No newline at end of file +- [azure_workloads_monitors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_workloads_monitors.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/azuredevops/_meta.json b/website/pages/docs/plugins/sources/azuredevops/_meta.json new file mode 100644 index 00000000000000..d2ba90ccfb4341 --- /dev/null +++ b/website/pages/docs/plugins/sources/azuredevops/_meta.json @@ -0,0 +1,4 @@ +{ + "overview": "Overview", + "tables": "Tables" +} diff --git a/website/pages/docs/plugins/sources/azuredevops/overview.md b/website/pages/docs/plugins/sources/azuredevops/overview.md new file mode 100644 index 00000000000000..4d2d8d8df09645 --- /dev/null +++ b/website/pages/docs/plugins/sources/azuredevops/overview.md @@ -0,0 +1,42 @@ +# Azure DevOps Source Plugin + +import { getLatestVersion } from "../../../../../utils/versions"; +import { Badge } from "../../../../../components/Badge"; + + + +The CloudQuery Azure DevOps plugin reads information from your Azure DevOps account and loads it into any supported CloudQuery destination (e.g. PostgreSQL, Snowflake, BigQuery). + +## Configuration + +This example syncs from Azure DevOps to a Postgres destination. The (top level) source spec section is described in the [Source Spec Reference](/docs/reference/source-spec). + +```yaml +kind: source +# Common source-plugin configuration +spec: + name: azuredevops + path: cloudquery/azuredevops + version: "VERSION_SOURCE_AZUREDEVOPS" + tables: ["*"] + destinations: ["postgresql"] + + # Azure DevOps specific configuration + spec: + personal_access_token: "${AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN}" + organization_url: "${AZURE_DEVOPS_ORGANIZATION_URL}" +``` + +For more information on downloading, installing and running the CloudQuery CLI, see the [Quickstart guide](/docs/quickstart). + +## Azure DevOps Spec + +This is the (nested) spec used by the Azure DevOps source plugin. + +- `personal_access_token` (string, required): + + An API token to access Azure DevOps resources. This can be obtained by [creating an API token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows#create-a-pat). It's recommended to allow only read access to the resources you need to sync. + +- `organization_url` ([]string, required): + + The Azure DevOps organization URL. Should be in the format `https://dev.azure.com/{organization}`. \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/azuredevops/tables.md b/website/pages/docs/plugins/sources/azuredevops/tables.md new file mode 100644 index 00000000000000..70e98254b80c49 --- /dev/null +++ b/website/pages/docs/plugins/sources/azuredevops/tables.md @@ -0,0 +1,5 @@ +# Source Plugin: azuredevops + +## Tables + +- [azuredevops_core_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azuredevops/docs/tables/azuredevops_core_projects.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/cloudflare/tables.md b/website/pages/docs/plugins/sources/cloudflare/tables.md index 4920d440de6e75..cbae1239463acf 100644 --- a/website/pages/docs/plugins/sources/cloudflare/tables.md +++ b/website/pages/docs/plugins/sources/cloudflare/tables.md @@ -9,10 +9,10 @@ - [cloudflare_dns_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_dns_records.md) - [cloudflare_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_images.md) - [cloudflare_ips](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_ips.md) +- [cloudflare_waf_overrides](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_waf_overrides.md) - [cloudflare_waf_packages](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_waf_packages.md) - [cloudflare_waf_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_waf_groups.md) - [cloudflare_waf_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_waf_rules.md) -- [cloudflare_waf_overrides](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_waf_overrides.md) - [cloudflare_worker_meta_data](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_worker_meta_data.md) - [cloudflare_worker_cron_triggers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_worker_cron_triggers.md) - [cloudflare_workers_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/cloudflare/docs/tables/cloudflare_workers_secrets.md) diff --git a/website/pages/docs/plugins/sources/datadog/tables.md b/website/pages/docs/plugins/sources/datadog/tables.md index 9f4324490ae470..398db0c4321634 100644 --- a/website/pages/docs/plugins/sources/datadog/tables.md +++ b/website/pages/docs/plugins/sources/datadog/tables.md @@ -5,17 +5,17 @@ - [datadog_dashboard_lists](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_dashboard_lists.md) - [datadog_dashboards](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_dashboards.md) - [datadog_downtimes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_downtimes.md) +- [datadog_global_variables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_global_variables.md) - [datadog_hosts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_hosts.md) - [datadog_incidents](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_incidents.md) - [datadog_incident_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_incident_attachments.md) - [datadog_monitors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_monitors.md) - [datadog_monitor_downtimes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_monitor_downtimes.md) - [datadog_notebooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_notebooks.md) +- [datadog_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_permissions.md) - [datadog_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_roles.md) - [datadog_role_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_role_permissions.md) - [datadog_role_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_role_users.md) -- [datadog_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_permissions.md) -- [datadog_global_variables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_global_variables.md) - [datadog_synthetics](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_synthetics.md) - [datadog_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_users.md) - [datadog_user_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/datadog/docs/tables/datadog_user_permissions.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/digitalocean/tables.md b/website/pages/docs/plugins/sources/digitalocean/tables.md index 9cf81db42bd107..b4ef854db7863a 100644 --- a/website/pages/docs/plugins/sources/digitalocean/tables.md +++ b/website/pages/docs/plugins/sources/digitalocean/tables.md @@ -3,25 +3,25 @@ ## Tables - [digitalocean_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_accounts.md) -- [digitalocean_cdns](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_cdns.md) -- [digitalocean_billing_history](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_billing_history.md) -- [digitalocean_monitoring_alert_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_monitoring_alert_policies.md) - [digitalocean_balances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_balances.md) +- [digitalocean_billing_history](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_billing_history.md) +- [digitalocean_cdns](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_cdns.md) - [digitalocean_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_certificates.md) - [digitalocean_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_databases.md) + - [digitalocean_database_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_database_backups.md) - [digitalocean_database_firewall_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_database_firewall_rules.md) - [digitalocean_database_replicas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_database_replicas.md) - - [digitalocean_database_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_database_backups.md) +- [digitalocean_domain_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md) - [digitalocean_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_domains.md) - [digitalocean_domain_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md) -- [digitalocean_domain_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_domain_records.md) +- [digitalocean_droplet_neighbors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md) - [digitalocean_droplets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_droplets.md) - [digitalocean_droplet_neighbors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md) -- [digitalocean_droplet_neighbors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_droplet_neighbors.md) - [digitalocean_firewalls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_firewalls.md) - [digitalocean_floating_ips](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_floating_ips.md) - [digitalocean_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_images.md) - [digitalocean_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_keys.md) +- [digitalocean_monitoring_alert_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_monitoring_alert_policies.md) - [digitalocean_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_projects.md) - [digitalocean_project_resources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_project_resources.md) - [digitalocean_registries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/digitalocean/docs/tables/digitalocean_registries.md) diff --git a/website/pages/docs/plugins/sources/fastly/tables.md b/website/pages/docs/plugins/sources/fastly/tables.md index 5052488e4c77b4..40b21cdcfc640f 100644 --- a/website/pages/docs/plugins/sources/fastly/tables.md +++ b/website/pages/docs/plugins/sources/fastly/tables.md @@ -2,13 +2,13 @@ ## Tables -- [fastly_account_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_account_users.md) - [fastly_account_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_account_events.md) +- [fastly_account_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_account_users.md) - [fastly_auth_tokens](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_auth_tokens.md) - [fastly_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_services.md) - [fastly_service_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_versions.md) - - [fastly_service_health_checks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_health_checks.md) - - [fastly_service_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_domains.md) - [fastly_service_backends](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_backends.md) + - [fastly_service_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_domains.md) + - [fastly_service_health_checks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_service_health_checks.md) - [fastly_stats_regions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_stats_regions.md) - [fastly_stats_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/fastly/docs/tables/fastly_stats_services.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/gandi/tables.md b/website/pages/docs/plugins/sources/gandi/tables.md index 7378e02537e651..ef0fc2a7e3cc68 100644 --- a/website/pages/docs/plugins/sources/gandi/tables.md +++ b/website/pages/docs/plugins/sources/gandi/tables.md @@ -2,13 +2,13 @@ ## Tables -- [gandi_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_certificates.md) - [gandi_certificate_packages](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_certificate_packages.md) +- [gandi_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_certificates.md) - [gandi_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domains.md) + - [gandi_domain_dnssec_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_dnssec_keys.md) + - [gandi_domain_glue_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_glue_records.md) - [gandi_domain_livedns](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_livedns.md) - [gandi_domain_web_redirections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_web_redirections.md) - - [gandi_domain_glue_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_glue_records.md) - - [gandi_domain_dnssec_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_domain_dnssec_keys.md) - [gandi_livedns_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_livedns_domains.md) - [gandi_livedns_domain_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_livedns_domain_snapshots.md) - [gandi_simplehosting_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/gandi_simplehosting_instances.md) diff --git a/website/pages/docs/plugins/sources/gcp/policies.md b/website/pages/docs/plugins/sources/gcp/policies.md index 46b68f15fb959d..c6f5398d08ed0e 100644 --- a/website/pages/docs/plugins/sources/gcp/policies.md +++ b/website/pages/docs/plugins/sources/gcp/policies.md @@ -31,6 +31,7 @@ tables: - gcp_kms_crypto_keys - gcp_kms_keyring_crypto_keys - gcp_kms_keyrings + - gcp_kms_locations - gcp_log_metric_filters - gcp_logging_metrics - gcp_logging_sinks diff --git a/website/pages/docs/plugins/sources/gcp/tables.md b/website/pages/docs/plugins/sources/gcp/tables.md index cc99c98422dd41..860c5e5f04855d 100644 --- a/website/pages/docs/plugins/sources/gcp/tables.md +++ b/website/pages/docs/plugins/sources/gcp/tables.md @@ -2,47 +2,47 @@ ## Tables -- [gcp_aiplatform_job_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_job_locations.md) - - [gcp_aiplatform_batch_prediction_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_batch_prediction_jobs.md) - - [gcp_aiplatform_custom_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_custom_jobs.md) - - [gcp_aiplatform_data_labeling_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_data_labeling_jobs.md) - - [gcp_aiplatform_hyperparameter_tuning_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_hyperparameter_tuning_jobs.md) - - [gcp_aiplatform_model_deployment_monitoring_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_model_deployment_monitoring_jobs.md) - [gcp_aiplatform_dataset_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_dataset_locations.md) - [gcp_aiplatform_datasets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_datasets.md) - [gcp_aiplatform_endpoint_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_endpoint_locations.md) - [gcp_aiplatform_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_endpoints.md) - [gcp_aiplatform_featurestore_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_featurestore_locations.md) - [gcp_aiplatform_featurestores](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_featurestores.md) -- [gcp_aiplatform_indexendpoint_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_indexendpoint_locations.md) - - [gcp_aiplatform_index_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_index_endpoints.md) - [gcp_aiplatform_index_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_index_locations.md) - [gcp_aiplatform_indexes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_indexes.md) +- [gcp_aiplatform_indexendpoint_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_indexendpoint_locations.md) + - [gcp_aiplatform_index_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_index_endpoints.md) +- [gcp_aiplatform_job_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_job_locations.md) + - [gcp_aiplatform_batch_prediction_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_batch_prediction_jobs.md) + - [gcp_aiplatform_custom_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_custom_jobs.md) + - [gcp_aiplatform_data_labeling_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_data_labeling_jobs.md) + - [gcp_aiplatform_hyperparameter_tuning_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_hyperparameter_tuning_jobs.md) + - [gcp_aiplatform_model_deployment_monitoring_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_model_deployment_monitoring_jobs.md) - [gcp_aiplatform_metadata_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_metadata_locations.md) - [gcp_aiplatform_metadata_stores](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_metadata_stores.md) - [gcp_aiplatform_model_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_model_locations.md) - [gcp_aiplatform_models](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_models.md) +- [gcp_aiplatform_operations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_operations.md) - [gcp_aiplatform_pipeline_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_pipeline_locations.md) - [gcp_aiplatform_pipeline_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_pipeline_jobs.md) - [gcp_aiplatform_training_pipelines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_training_pipelines.md) - [gcp_aiplatform_specialistpool_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_specialistpool_locations.md) - [gcp_aiplatform_specialist_pools](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_specialist_pools.md) -- [gcp_aiplatform_vizier_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_vizier_locations.md) - - [gcp_aiplatform_studies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_studies.md) - [gcp_aiplatform_tensorboard_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_tensorboard_locations.md) - [gcp_aiplatform_tensorboards](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_tensorboards.md) -- [gcp_aiplatform_operations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_operations.md) +- [gcp_aiplatform_vizier_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_vizier_locations.md) + - [gcp_aiplatform_studies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_aiplatform_studies.md) - [gcp_apigateway_apis](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_apigateway_apis.md) - [gcp_apigateway_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_apigateway_gateways.md) - [gcp_apikeys_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_apikeys_keys.md) - [gcp_appengine_apps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_apps.md) -- [gcp_appengine_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_services.md) - - [gcp_appengine_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_versions.md) - - [gcp_appengine_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_instances.md) - [gcp_appengine_authorized_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_authorized_certificates.md) - [gcp_appengine_authorized_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_authorized_domains.md) - [gcp_appengine_domain_mappings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_domain_mappings.md) - [gcp_appengine_firewall_ingress_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_firewall_ingress_rules.md) +- [gcp_appengine_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_services.md) + - [gcp_appengine_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_versions.md) + - [gcp_appengine_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_appengine_instances.md) - [gcp_artifactregistry_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_artifactregistry_locations.md) - [gcp_artifactregistry_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_artifactregistry_repositories.md) - [gcp_artifactregistry_docker_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_artifactregistry_docker_images.md) @@ -79,56 +79,65 @@ - [gcp_certificatemanager_certificate_map_entries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_certificatemanager_certificate_map_entries.md) - [gcp_certificatemanager_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_certificatemanager_certificates.md) - [gcp_certificatemanager_dns_authorizations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_certificatemanager_dns_authorizations.md) -- [gcp_clouddeploy_targets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_targets.md) - [gcp_clouddeploy_delivery_pipelines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_delivery_pipelines.md) - [gcp_clouddeploy_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_releases.md) - [gcp_clouddeploy_rollouts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_rollouts.md) - [gcp_clouddeploy_job_runs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_job_runs.md) +- [gcp_clouddeploy_targets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouddeploy_targets.md) - [gcp_clouderrorreporting_error_group_stats](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouderrorreporting_error_group_stats.md) - [gcp_clouderrorreporting_error_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_clouderrorreporting_error_events.md) - [gcp_cloudiot_device_registries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudiot_device_registries.md) - [gcp_cloudiot_devices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudiot_devices.md) - [gcp_cloudiot_device_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudiot_device_configs.md) - [gcp_cloudiot_device_states](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudiot_device_states.md) +- [gcp_cloudscheduler_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudscheduler_locations.md) + - [gcp_cloudscheduler_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudscheduler_jobs.md) +- [gcp_cloudsupport_cases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_cloudsupport_cases.md) - [gcp_compute_addresses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_addresses.md) - [gcp_compute_autoscalers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_autoscalers.md) - [gcp_compute_backend_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_backend_services.md) - [gcp_compute_disk_types](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_disk_types.md) - [gcp_compute_disks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_disks.md) +- [gcp_compute_firewalls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_firewalls.md) - [gcp_compute_forwarding_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_forwarding_rules.md) +- [gcp_compute_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_images.md) +- [gcp_compute_instance_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_instance_groups.md) - [gcp_compute_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_instances.md) +- [gcp_compute_interconnects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_interconnects.md) +- [gcp_compute_networks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_networks.md) +- [gcp_compute_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_projects.md) - [gcp_compute_ssl_certificates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_ssl_certificates.md) +- [gcp_compute_ssl_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_ssl_policies.md) - [gcp_compute_subnetworks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_subnetworks.md) - [gcp_compute_target_http_proxies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_target_http_proxies.md) +- [gcp_compute_target_ssl_proxies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_target_ssl_proxies.md) - [gcp_compute_url_maps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_url_maps.md) - [gcp_compute_vpn_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_vpn_gateways.md) -- [gcp_compute_instance_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_instance_groups.md) -- [gcp_compute_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_images.md) -- [gcp_compute_firewalls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_firewalls.md) -- [gcp_compute_networks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_networks.md) -- [gcp_compute_ssl_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_ssl_policies.md) -- [gcp_compute_interconnects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_interconnects.md) -- [gcp_compute_target_ssl_proxies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_target_ssl_proxies.md) -- [gcp_compute_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_compute_projects.md) - [gcp_container_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_container_clusters.md) - [gcp_containeranalysis_occurrences](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_containeranalysis_occurrences.md) -- [gcp_dns_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_dns_policies.md) - [gcp_dns_managed_zones](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_dns_managed_zones.md) +- [gcp_dns_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_dns_policies.md) - [gcp_domains_registrations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_domains_registrations.md) - [gcp_functions_functions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_functions_functions.md) +- [gcp_iam_deny_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_iam_deny_policies.md) - [gcp_iam_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_iam_roles.md) - [gcp_iam_service_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_iam_service_accounts.md) - [gcp_iam_service_account_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_iam_service_account_keys.md) -- [gcp_iam_deny_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_iam_deny_policies.md) -- [gcp_kms_keyrings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md) - - [gcp_kms_crypto_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md) +- [gcp_kms_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_locations.md) + - [gcp_kms_ekm_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_ekm_connections.md) + - [gcp_kms_keyrings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_keyrings.md) + - [gcp_kms_crypto_keys](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_crypto_keys.md) + - [gcp_kms_crypto_key_versions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_crypto_key_versions.md) + - [gcp_kms_import_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_kms_import_jobs.md) +- [gcp_livestream_channels](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_livestream_channels.md) +- [gcp_livestream_inputs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_livestream_inputs.md) - [gcp_logging_metrics](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_logging_metrics.md) - [gcp_logging_sinks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_logging_sinks.md) - [gcp_monitoring_alert_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_monitoring_alert_policies.md) - [gcp_redis_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_redis_instances.md) - [gcp_resourcemanager_folders](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md) -- [gcp_resourcemanager_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md) - [gcp_resourcemanager_project_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_resourcemanager_project_policies.md) +- [gcp_resourcemanager_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md) - [gcp_run_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_run_locations.md) - [gcp_run_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_run_services.md) - [gcp_secretmanager_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_secretmanager_secrets.md) @@ -137,4 +146,23 @@ - [gcp_sql_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_sql_users.md) - [gcp_storage_buckets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_storage_buckets.md) - [gcp_storage_bucket_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_storage_bucket_policies.md) +- [gcp_translate_glossaries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_translate_glossaries.md) +- [gcp_videotranscoder_job_templates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_videotranscoder_job_templates.md) +- [gcp_videotranscoder_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_videotranscoder_jobs.md) +- [gcp_vision_products](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vision_products.md) + - [gcp_vision_product_reference_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vision_product_reference_images.md) +- [gcp_vmmigration_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_groups.md) +- [gcp_vmmigration_sources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_sources.md) + - [gcp_vmmigration_source_datacenter_connectors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_source_datacenter_connectors.md) + - [gcp_vmmigration_source_migrating_vms](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vms.md) + - [gcp_vmmigration_source_migrating_vm_clone_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_clone_jobs.md) + - [gcp_vmmigration_source_migrating_vm_cutover_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_source_migrating_vm_cutover_jobs.md) + - [gcp_vmmigration_source_utilization_reports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_source_utilization_reports.md) +- [gcp_vmmigration_target_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vmmigration_target_projects.md) +- [gcp_vpcaccess_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vpcaccess_locations.md) + - [gcp_vpcaccess_connectors](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_vpcaccess_connectors.md) +- [gcp_websecurityscanner_scan_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_configs.md) + - [gcp_websecurityscanner_scan_config_scan_runs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_runs.md) + - [gcp_websecurityscanner_scan_config_scan_run_crawled_urls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_crawled_urls.md) + - [gcp_websecurityscanner_scan_config_scan_run_findings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_websecurityscanner_scan_config_scan_run_findings.md) - [gcp_workflows_workflows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gcp/docs/tables/gcp_workflows_workflows.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/github/tables.md b/website/pages/docs/plugins/sources/github/tables.md index 03edc22c70dba6..00d00e72e0e510 100644 --- a/website/pages/docs/plugins/sources/github/tables.md +++ b/website/pages/docs/plugins/sources/github/tables.md @@ -2,24 +2,24 @@ ## Tables -- [github_workflows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_workflows.md) - [github_billing_action](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_billing_action.md) -- [github_billing_storage](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_billing_storage.md) - [github_billing_package](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_billing_package.md) +- [github_billing_storage](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_billing_storage.md) - [github_external_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_external_groups.md) -- [github_issues](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_issues.md) - [github_hooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_hooks.md) - [github_hook_deliveries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_hook_deliveries.md) - [github_installations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_installations.md) +- [github_issues](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_issues.md) - [github_organizations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_organizations.md) - [github_organization_dependabot_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_organization_dependabot_alerts.md) - [github_organization_dependabot_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_organization_dependabot_secrets.md) - [github_organization_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_organization_members.md) - [github_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_repositories.md) - - [github_repository_dependabot_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_repository_dependabot_alerts.md) - - [github_repository_dependabot_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_repository_dependabot_secrets.md) - [github_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_releases.md) - [github_release_assets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_release_assets.md) + - [github_repository_dependabot_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_repository_dependabot_alerts.md) + - [github_repository_dependabot_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_repository_dependabot_secrets.md) - [github_teams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_teams.md) - [github_team_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_team_members.md) - - [github_team_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_team_repositories.md) \ No newline at end of file + - [github_team_repositories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_team_repositories.md) +- [github_workflows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/github/docs/tables/github_workflows.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/gitlab/configuration.md b/website/pages/docs/plugins/sources/gitlab/configuration.md index 8724da9312ac92..ad6b4bbf565d88 100644 --- a/website/pages/docs/plugins/sources/gitlab/configuration.md +++ b/website/pages/docs/plugins/sources/gitlab/configuration.md @@ -28,5 +28,5 @@ This is the (nested) spec used by the GitLab source plugin: - `access_token` (string, required): An access token for your GitLab server. Instructions on how to generate an access token [here](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token). -- `base_url` (string, required): - URL for your GitLab server. \ No newline at end of file +- `base_url` (string, optional): + URL for your self hosted GitLab server. Leave empty for GitLab SaaS. Not all tables are supported for GitLab SaaS. \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/gitlab/tables.md b/website/pages/docs/plugins/sources/gitlab/tables.md index 2f60d1787ceacc..7d920cb0ea026f 100644 --- a/website/pages/docs/plugins/sources/gitlab/tables.md +++ b/website/pages/docs/plugins/sources/gitlab/tables.md @@ -5,7 +5,7 @@ - [gitlab_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_groups.md) - [gitlab_group_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_group_members.md) - [gitlab_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_projects.md) - - [gitlab_projects_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_projects_releases.md) - [gitlab_project_branches](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_project_branches.md) + - [gitlab_projects_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_projects_releases.md) - [gitlab_settings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_settings.md) - [gitlab_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gitlab/docs/tables/gitlab_users.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/hackernews/overview.md b/website/pages/docs/plugins/sources/hackernews/overview.md index c92cda2ae25934..555ac56d6a4777 100644 --- a/website/pages/docs/plugins/sources/hackernews/overview.md +++ b/website/pages/docs/plugins/sources/hackernews/overview.md @@ -30,4 +30,98 @@ spec: The number of items to fetch concurrently. Defaults to 100. - `start_time` (string, optional): - A date-time string in RFC3339 format. For example, `"2023-01-01T00:00:00Z"` will sync all items created on or after January 1, 2023. If not specified, the plugin will fetch all items. Note that because this is an incremental table, a previous cursor position will take precedence over this setting, unless the given start time is after the last cursor position. \ No newline at end of file + A date-time string in RFC3339 format. For example, `"2023-01-01T00:00:00Z"` will sync all items created on or after January 1, 2023. If not specified, the plugin will fetch all items. Note that because this is an incremental table, a previous cursor position will take precedence over this setting, unless the given start time is after the last cursor position. + +## Example Queries + +### Compare the number of mentions for two terms + +```sql +SELECT 'data engineer' AS NAME, + count(*) AS mentions +FROM hackernews_items +WHERE title ilike '%data engineer%' +OR text ilike '%data engineer%' +UNION +SELECT 'software engineer' AS NAME, + count(*) AS mentions +FROM hackernews_items +WHERE title ilike '%software engineer%' +OR text ilike '%software engineer%'; +``` + +```text ++-------------------+----------+ +| name | mentions | +|-------------------+----------| +| data engineer | 1415 | +| software engineer | 14411 | ++-------------------+----------+ +``` + +### List the top stories for a given domain in 2022 + +```sql +SELECT h.url, + h.score +FROM hackernews_items h +WHERE h.url ilike '%xkcd.com%' +AND h.time BETWEEN date '2022-01-01' AND date '2023-01-01' +ORDER BY h.score DESC limit 5 +``` + +```text ++-------------------------------+-------+ +| url | score | +|-------------------------------+-------| +| https://what-if.xkcd.com/158/ | 387 | +| https://xkcd.com/2617/ | 361 | +| https://xkcd.com/ | 100 | +| https://xkcd.com/2682/ | 77 | +| https://what-if.xkcd.com/161/ | 54 | ++-------------------------------+-------+ +``` + +### List the top 3 users by number of comments in 2022 + +```sql +SELECT h.by AS USER, + count(*) AS comments +FROM hackernews_items h +WHERE h.by != '' +AND h.type = 'comment' +AND h.time BETWEEN date '2022-01-01' AND date '2023-01-01' +GROUP BY h.by +ORDER BY comments DESC limit 3; +``` + +```text ++---------+----------+ +| user | comments | +|---------+----------| +| bombcar | 7307 | +| dang | 6688 | +| pjmlp | 6450 | ++---------+----------+ +``` + +### List recently posted remote-friendly YC startup jobs + +```sql +SELECT h.time, + h.title +FROM hackernews_items h +WHERE h.type ='job' +AND h.title ilike '%remote%' +ORDER BY h.time DESC limit 3; +``` + +```text ++---------------------+---------------------------------------------------------------------+ +| time | title | +|---------------------+---------------------------------------------------------------------| +| 2023-01-09 17:00:05 | Kable (YC W22) Is Hiring Lead Engineer (Remote/US) | +| 2023-01-07 12:04:59 | Svix (YC W21) Is Hiring (Remote) – Enterprise-Ready Webhook Service | +| 2022-12-29 21:01:08 | Hive (YC S14) is hiring devs #3-10 in 2023 (Canada remote) | ++---------------------+---------------------------------------------------------------------+ +``` \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/heroku/tables.md b/website/pages/docs/plugins/sources/heroku/tables.md index 5f84e92d943c8c..cbcaffc5a2990c 100644 --- a/website/pages/docs/plugins/sources/heroku/tables.md +++ b/website/pages/docs/plugins/sources/heroku/tables.md @@ -3,29 +3,29 @@ ## Tables - [heroku_account_features](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_account_features.md) -- [heroku_add_ons](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_ons.md) - [heroku_add_on_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_attachments.md) - [heroku_add_on_configs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_configs.md) - [heroku_add_on_region_capabilities](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_region_capabilities.md) - [heroku_add_on_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_services.md) -- [heroku_add_on_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_webhooks.md) - [heroku_add_on_webhook_deliveries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_webhook_deliveries.md) - [heroku_add_on_webhook_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_webhook_events.md) -- [heroku_apps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_apps.md) +- [heroku_add_on_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_on_webhooks.md) +- [heroku_add_ons](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_add_ons.md) - [heroku_app_features](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_features.md) - [heroku_app_transfers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_transfers.md) -- [heroku_app_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_webhooks.md) - [heroku_app_webhook_deliveries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_webhook_deliveries.md) - [heroku_app_webhook_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_webhook_events.md) -- [heroku_builds](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_builds.md) +- [heroku_app_webhooks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_app_webhooks.md) +- [heroku_apps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_apps.md) - [heroku_buildpack_installations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_buildpack_installations.md) +- [heroku_builds](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_builds.md) - [heroku_collaborators](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_collaborators.md) - [heroku_credits](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_credits.md) - [heroku_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_domains.md) -- [heroku_dynos](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_dynos.md) - [heroku_dyno_sizes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_dyno_sizes.md) -- [heroku_enterprise_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_enterprise_accounts.md) +- [heroku_dynos](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_dynos.md) - [heroku_enterprise_account_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_enterprise_account_members.md) +- [heroku_enterprise_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_enterprise_accounts.md) - [heroku_formations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_formations.md) - [heroku_inbound_rulesets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_inbound_rulesets.md) - [heroku_invoices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_invoices.md) @@ -36,22 +36,22 @@ - [heroku_outbound_rulesets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_outbound_rulesets.md) - [heroku_peerings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_peerings.md) - [heroku_permission_entities](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_permission_entities.md) -- [heroku_pipelines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipelines.md) - [heroku_pipeline_builds](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipeline_builds.md) - [heroku_pipeline_couplings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipeline_couplings.md) - [heroku_pipeline_deployments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipeline_deployments.md) - [heroku_pipeline_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipeline_releases.md) +- [heroku_pipelines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_pipelines.md) - [heroku_regions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_regions.md) - [heroku_releases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_releases.md) - [heroku_review_apps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_review_apps.md) -- [heroku_spaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_spaces.md) - [heroku_space_app_accesses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_space_app_accesses.md) +- [heroku_spaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_spaces.md) - [heroku_stacks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_stacks.md) - [heroku_team_app_permissions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_app_permissions.md) - [heroku_team_features](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_features.md) -- [heroku_teams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_teams.md) - [heroku_team_invitations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_invitations.md) - [heroku_team_invoices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_invoices.md) - [heroku_team_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_members.md) - [heroku_team_spaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_team_spaces.md) +- [heroku_teams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_teams.md) - [heroku_vpn_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/heroku/docs/tables/heroku_vpn_connections.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/k8s/tables.md b/website/pages/docs/plugins/sources/k8s/tables.md index 7f9006b4893474..6d306598b30dd8 100644 --- a/website/pages/docs/plugins/sources/k8s/tables.md +++ b/website/pages/docs/plugins/sources/k8s/tables.md @@ -2,7 +2,6 @@ ## Tables -- [k8s_discovery_endpoint_slices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_discovery_endpoint_slices.md) - [k8s_admissionregistration_mutating_webhook_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_admissionregistration_mutating_webhook_configurations.md) - [k8s_admissionregistration_validating_webhook_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_admissionregistration_validating_webhook_configurations.md) - [k8s_apps_daemon_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_apps_daemon_sets.md) @@ -10,8 +9,8 @@ - [k8s_apps_replica_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_apps_replica_sets.md) - [k8s_apps_stateful_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_apps_stateful_sets.md) - [k8s_autoscaling_hpas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_autoscaling_hpas.md) -- [k8s_batch_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_batch_jobs.md) - [k8s_batch_cron_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_batch_cron_jobs.md) +- [k8s_batch_jobs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_batch_jobs.md) - [k8s_certificates_signing_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_certificates_signing_requests.md) - [k8s_coordination_leases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_coordination_leases.md) - [k8s_core_component_statuses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_component_statuses.md) @@ -21,22 +20,23 @@ - [k8s_core_limit_ranges](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_limit_ranges.md) - [k8s_core_namespaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_namespaces.md) - [k8s_core_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_nodes.md) -- [k8s_core_pvs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_pvs.md) -- [k8s_core_pvcs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_pvcs.md) - [k8s_core_pods](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_pods.md) +- [k8s_core_pvcs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_pvcs.md) +- [k8s_core_pvs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_pvs.md) - [k8s_core_replication_controllers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_replication_controllers.md) - [k8s_core_resource_quotas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_resource_quotas.md) - [k8s_core_secrets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_secrets.md) -- [k8s_core_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_services.md) - [k8s_core_service_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_service_accounts.md) +- [k8s_core_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_core_services.md) +- [k8s_discovery_endpoint_slices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_discovery_endpoint_slices.md) +- [k8s_networking_ingress_classes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_networking_ingress_classes.md) - [k8s_networking_ingresses](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_networking_ingresses.md) - [k8s_networking_network_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_networking_network_policies.md) -- [k8s_networking_ingress_classes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_networking_ingress_classes.md) - [k8s_nodes_runtime_classes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_nodes_runtime_classes.md) -- [k8s_rbac_cluster_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_cluster_roles.md) - [k8s_rbac_cluster_role_bindings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_cluster_role_bindings.md) -- [k8s_rbac_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_roles.md) +- [k8s_rbac_cluster_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_cluster_roles.md) - [k8s_rbac_role_bindings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_role_bindings.md) +- [k8s_rbac_roles](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_rbac_roles.md) - [k8s_storage_csi_drivers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_storage_csi_drivers.md) - [k8s_storage_csi_nodes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_storage_csi_nodes.md) - [k8s_storage_csi_storage_capacities](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/k8s/docs/tables/k8s_storage_csi_storage_capacities.md) diff --git a/website/pages/docs/plugins/sources/okta/tables.md b/website/pages/docs/plugins/sources/okta/tables.md index ed85dbf7dc4120..d81ec88e4c4deb 100644 --- a/website/pages/docs/plugins/sources/okta/tables.md +++ b/website/pages/docs/plugins/sources/okta/tables.md @@ -2,9 +2,9 @@ ## Tables -- [okta_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_users.md) -- [okta_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_groups.md) - - [okta_group_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_group_users.md) - [okta_applications](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_applications.md) + - [okta_application_group_assignments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_application_group_assignments.md) - [okta_application_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_application_users.md) - - [okta_application_group_assignments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_application_group_assignments.md) \ No newline at end of file +- [okta_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_groups.md) + - [okta_group_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_group_users.md) +- [okta_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/okta/docs/tables/okta_users.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/oracle/_meta.json b/website/pages/docs/plugins/sources/oracle/_meta.json new file mode 100644 index 00000000000000..d6fbf18fe2b1a6 --- /dev/null +++ b/website/pages/docs/plugins/sources/oracle/_meta.json @@ -0,0 +1,4 @@ +{ + "overview": "Overview", + "tables": "Tables" +} \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/oracle/overview.md b/website/pages/docs/plugins/sources/oracle/overview.md new file mode 100644 index 00000000000000..adbb1ab1556bbf --- /dev/null +++ b/website/pages/docs/plugins/sources/oracle/overview.md @@ -0,0 +1,46 @@ +# Oracle Source Plugin + +import { getLatestVersion } from "../../../../../utils/versions"; +import { Badge } from "../../../../../components/Badge"; +import { Callout } from 'nextra-theme-docs'; + + + +The CloudQuery Oracle plugin extracts Oracle Cloud Infrastructure resources (`oci`). It is based on [the OCI Go SDK](https://github.com/oracle/oci-go-sdk) and the [Oracle Cloud REST API](https://docs.oracle.com/en-us/iaas/api/#/). + +## Authentication + +In order for CloudQuery to sync resources from your Oracle Cloud setup, you will need to authenticate with your Oracle Cloud account. +CloudQuery supports the same authentication methods as the OCI Go SDK, and uses the "default" configuration provider. You can read about how to create an Oracle Cloud configuration file in https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm. + +An example configuration file (e.g. in `~/.oci/config`) looks like this: + +```ini +[DEFAULT] +user=ocid1.user.oc1.. +fingerprint= +key_file=~/.oci/oci_api_key.pem +tenancy=ocid1.tenancy.oc1.. +region=us-ashburn-1 +``` + + +Note that CloudQuery will `sync` information from all regions - not only the region specified in the `oci` config. + + +## Configuration + +In order to get started with the Oracle plugin, you need to create a YAML file in your CloudQuery configuration directory (e.g. named `oracle.yml`). + +The following example sets up the Oracle plugin, and connects it to a postgresql destination: + +```yaml +kind: source +spec: + name: "oracle" + path: cloudquery/oracle + version: "VERSION_SOURCE_ORACLE" + destinations: ["postgresql"] + tables: ["*"] + spec: +``` \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/oracle/tables.md b/website/pages/docs/plugins/sources/oracle/tables.md new file mode 100644 index 00000000000000..e44c70c56a0a54 --- /dev/null +++ b/website/pages/docs/plugins/sources/oracle/tables.md @@ -0,0 +1,82 @@ +# Source Plugin: oracle + +## Tables + +- [oracle_blockstorage_boot_volume_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_backups.md) +- [oracle_blockstorage_boot_volume_replicas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volume_replicas.md) +- [oracle_blockstorage_boot_volumes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_boot_volumes.md) +- [oracle_blockstorage_volume_backup_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backup_policies.md) +- [oracle_blockstorage_volume_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_backups.md) +- [oracle_blockstorage_volume_group_backups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_group_backups.md) +- [oracle_blockstorage_volume_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_volume_groups.md) +- [oracle_blockstorage_volumes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_blockstorage_volumes.md) +- [oracle_compute_compute_capacity_reservations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_compute_capacity_reservations.md) +- [oracle_compute_console_histories](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_console_histories.md) +- [oracle_compute_dedicated_vm_hosts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_dedicated_vm_hosts.md) +- [oracle_compute_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_images.md) +- [oracle_compute_instance_console_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_instance_console_connections.md) +- [oracle_compute_instances](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_instances.md) +- [oracle_compute_vnic_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_compute_vnic_attachments.md) +- [oracle_database_autonomous_container_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_autonomous_container_databases.md) +- [oracle_database_autonomous_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_autonomous_databases.md) +- [oracle_database_autonomous_exadata_infrastructures](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_autonomous_exadata_infrastructures.md) +- [oracle_database_autonomous_vm_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_autonomous_vm_clusters.md) +- [oracle_database_backup_destination](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_backup_destination.md) +- [oracle_database_cloud_autonomous_vm_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_cloud_autonomous_vm_clusters.md) +- [oracle_database_cloud_exadata_infrastructures](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_cloud_exadata_infrastructures.md) +- [oracle_database_cloud_vm_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_cloud_vm_clusters.md) +- [oracle_database_exadata_infrastructures](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_exadata_infrastructures.md) +- [oracle_database_external_container_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_external_container_databases.md) +- [oracle_database_external_non_container_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_external_non_container_databases.md) +- [oracle_database_external_pluggable_databases](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_external_pluggable_databases.md) +- [oracle_database_key_stores](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_key_stores.md) +- [oracle_database_vm_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_database_vm_clusters.md) +- [oracle_filestorage_export_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_export_sets.md) +- [oracle_filestorage_exports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_exports.md) +- [oracle_filestorage_file_systems](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_file_systems.md) +- [oracle_filestorage_mount_targets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_mount_targets.md) +- [oracle_filestorage_replication_targets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_replication_targets.md) +- [oracle_filestorage_replications](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_filestorage_replications.md) +- [oracle_identity_compartments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_compartments.md) +- [oracle_identity_cost_tracking_tags](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_cost_tracking_tags.md) +- [oracle_identity_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_domains.md) +- [oracle_identity_dynamic_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_dynamic_groups.md) +- [oracle_identity_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_groups.md) +- [oracle_identity_iam_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_iam_work_requests.md) +- [oracle_identity_network_sources](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_network_sources.md) +- [oracle_identity_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_policies.md) +- [oracle_identity_tag_namespaces](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_tag_namespaces.md) +- [oracle_identity_tagging_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_tagging_work_requests.md) +- [oracle_identity_users](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_users.md) +- [oracle_identity_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_identity_work_requests.md) +- [oracle_loadbalancer_load_balancers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_loadbalancer_load_balancers.md) +- [oracle_networkfirewall_network_firewall_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewall_policies.md) +- [oracle_networkfirewall_network_firewalls](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_networkfirewall_network_firewalls.md) +- [oracle_networkfirewall_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_networkfirewall_work_requests.md) +- [oracle_networkloadbalancer_network_load_balancers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_network_load_balancers.md) +- [oracle_networkloadbalancer_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_networkloadbalancer_work_requests.md) +- [oracle_objectstorage_buckets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_objectstorage_buckets.md) +- [oracle_objectstorage_work_requests](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_objectstorage_work_requests.md) +- [oracle_virtualnetwork_byoip_ranges](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_byoip_ranges.md) +- [oracle_virtualnetwork_capture_filters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_capture_filters.md) +- [oracle_virtualnetwork_cpes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cpes.md) +- [oracle_virtualnetwork_cross_connect_groups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connect_groups.md) +- [oracle_virtualnetwork_cross_connects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_cross_connects.md) +- [oracle_virtualnetwork_dhcp_options](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_dhcp_options.md) +- [oracle_virtualnetwork_drg_attachments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drg_attachments.md) +- [oracle_virtualnetwork_drgs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_drgs.md) +- [oracle_virtualnetwork_fast_connect_provider_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_fast_connect_provider_services.md) +- [oracle_virtualnetwork_internet_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_internet_gateways.md) +- [oracle_virtualnetwork_ip_sec_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_ip_sec_connections.md) +- [oracle_virtualnetwork_local_peering_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_local_peering_gateways.md) +- [oracle_virtualnetwork_nat_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_nat_gateways.md) +- [oracle_virtualnetwork_public_ip_pools](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_public_ip_pools.md) +- [oracle_virtualnetwork_remote_peering_connections](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_remote_peering_connections.md) +- [oracle_virtualnetwork_route_tables](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_route_tables.md) +- [oracle_virtualnetwork_security_lists](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_security_lists.md) +- [oracle_virtualnetwork_service_gateways](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_service_gateways.md) +- [oracle_virtualnetwork_subnets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_subnets.md) +- [oracle_virtualnetwork_vcns](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vcns.md) +- [oracle_virtualnetwork_virtual_circuits](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_virtual_circuits.md) +- [oracle_virtualnetwork_vlans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vlans.md) +- [oracle_virtualnetwork_vtaps](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/oracle/docs/tables/oracle_virtualnetwork_vtaps.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/overview.mdx b/website/pages/docs/plugins/sources/overview.mdx index 696a4d0e0b84aa..b1cd57d2af9827 100644 --- a/website/pages/docs/plugins/sources/overview.mdx +++ b/website/pages/docs/plugins/sources/overview.mdx @@ -27,6 +27,7 @@ Official source plugins follow [release stages](#source-plugin-release-stages). { name: "Heroku", stage:"Preview" }, { name: "k8s", stage:"Preview" }, { name: "Okta", stage:"Preview" }, + { name: "Oracle", stage:"Preview"}, { name: "Terraform", stage:"Preview" }, { name: "Cloudflare", stage:"Preview" }, { name: "Gandi", stage:"Preview" }, @@ -34,10 +35,12 @@ Official source plugins follow [release stages](#source-plugin-release-stages). { name: "Salesforce", stage:"Preview" }, { name: "Slack", stage:"Preview" }, { name: "Shopify", stage:"Preview" }, + { name: "Stripe", stage:"Preview" }, { name: "PagerDuty", stage:"Preview"}, { name: "Tailscale", stage:"Preview" }, { name: "Vercel", stage:"Preview" }, { name: "Snyk", stage:"Preview" }, + { name: "Azure DevOps", stage:"Preview", id: `azuredevops` }, ] } /> diff --git a/website/pages/docs/plugins/sources/pagerduty/tables.md b/website/pages/docs/plugins/sources/pagerduty/tables.md index 59bc188e1e2a0b..07b835ce1aa1dd 100644 --- a/website/pages/docs/plugins/sources/pagerduty/tables.md +++ b/website/pages/docs/plugins/sources/pagerduty/tables.md @@ -3,14 +3,14 @@ ## Tables - [pagerduty_addons](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_addons.md) -- [pagerduty_incidents](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md) - - [pagerduty_incident_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_alerts.md) - - [pagerduty_incident_notes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_notes.md) - - [pagerduty_incident_log_entries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_log_entries.md) - [pagerduty_business_services](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_business_services.md) - [pagerduty_escalation_policies](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_escalation_policies.md) - [pagerduty_extension_schemas](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_extension_schemas.md) - [pagerduty_extensions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_extensions.md) +- [pagerduty_incidents](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incidents.md) + - [pagerduty_incident_alerts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_alerts.md) + - [pagerduty_incident_log_entries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_log_entries.md) + - [pagerduty_incident_notes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_incident_notes.md) - [pagerduty_maintenance_windows](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_maintenance_windows.md) - [pagerduty_priorities](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_priorities.md) - [pagerduty_rulesets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/pagerduty/docs/tables/pagerduty_rulesets.md) diff --git a/website/pages/docs/plugins/sources/shopify/tables.md b/website/pages/docs/plugins/sources/shopify/tables.md index d99549eb650948..61e662aca4d385 100644 --- a/website/pages/docs/plugins/sources/shopify/tables.md +++ b/website/pages/docs/plugins/sources/shopify/tables.md @@ -2,11 +2,11 @@ ## Tables +- [shopify_abandoned_checkouts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md) - [shopify_customers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_customers.md) - [shopify_orders](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_orders.md) -- [shopify_products](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_products.md) - - [shopify_product_variants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_product_variants.md) - - [shopify_product_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_product_images.md) - [shopify_price_rules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_price_rules.md) - [shopify_price_rule_discount_codes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_price_rule_discount_codes.md) -- [shopify_abandoned_checkouts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_abandoned_checkouts.md) \ No newline at end of file +- [shopify_products](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_products.md) + - [shopify_product_images](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_product_images.md) + - [shopify_product_variants](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/shopify/docs/tables/shopify_product_variants.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/snyk/configuration.md b/website/pages/docs/plugins/sources/snyk/configuration.md index 37fc4643b7df60..9a713b8b96e3f3 100644 --- a/website/pages/docs/plugins/sources/snyk/configuration.md +++ b/website/pages/docs/plugins/sources/snyk/configuration.md @@ -28,7 +28,7 @@ spec: This is the (nested) spec used by the Snyk source plugin. -- `api_key` (string, required. Default: `SNYK_API_KEY` environment variable): +- `api_key` (string, required): An API key to access Snyk resources. See [Authentication for API](https://docs.snyk.io/snyk-api-info/authentication-for-api) for more information. diff --git a/website/pages/docs/plugins/sources/stripe/_meta.json b/website/pages/docs/plugins/sources/stripe/_meta.json new file mode 100644 index 00000000000000..d2ba90ccfb4341 --- /dev/null +++ b/website/pages/docs/plugins/sources/stripe/_meta.json @@ -0,0 +1,4 @@ +{ + "overview": "Overview", + "tables": "Tables" +} diff --git a/website/pages/docs/plugins/sources/stripe/overview.md b/website/pages/docs/plugins/sources/stripe/overview.md new file mode 100644 index 00000000000000..fc501bf8f83a60 --- /dev/null +++ b/website/pages/docs/plugins/sources/stripe/overview.md @@ -0,0 +1,56 @@ +# Stripe Source Plugin + +import { getLatestVersion } from "../../../../../utils/versions"; +import { Badge } from "../../../../../components/Badge"; + + + +The CloudQuery Stripe plugin pulls data from Stripe and loads it into any supported CloudQuery destination (e.g. PostgreSQL). + +## Authentication + +In order to fetch information from Stripe, `cloudquery` needs to be authenticated using a [secret API key](https://stripe.com/docs/keys) from your Stripe account. You can view and manage your API keys in [the Stripe Dashboard](https://stripe.com/login?redirect=/account/apikeys). + +## Incremental Syncing + +The Stripe plugin supports incremental syncing. This means that only new data will be fetched from Stripe and loaded into your destination for supported tables (support depending on API endpoint). This is done by keeping track of the last item fetched and only fetching data that has been created since then. +To enable this, `backend` option must be set in the spec (as shown below). This is documented in the [Managing Incremental Tables](/docs/advanced-topics/managing-incremental-tables) section. + +### Example + +This example syncs from Stripe to a Postgres destination. The (top level) source spec section is described in the [Source Spec Reference](/docs/reference/source-spec). Incremental syncing is enabled and will be saved to a `.cq/state/` directory by default. + +```yaml +kind: source +# Common source-plugin configuration +spec: + name: stripe + path: cloudquery/stripe + version: "VERSION_SOURCE_STRIPE" + tables: ["*"] + destinations: ["postgresql"] + skip_tables: + - stripe_issuing* # Needs sign-up at https://stripe.com/issuing + - stripe_treasury* # Needs sign-up at https://stripe.com/treasury + - stripe_sigma_scheduled_query_runs # Live keys only + backend: local + # Stripe specific configuration + spec: + api_key: "" +``` + +## Configuration Reference + +This is the (nested) spec used by the Stripe source plugin: + +- `api_key` (string, required): + Your secret API key from the Stripe Dashboard. + +- `rate_limit` (integer, optional. Default: varies): + Used to override number of requests allowed per second. Defaults to 90 req/sec for production environment keys, otherwise 20 req/sec. + +- `max_retries` (integer, optional. Default: 2): + Number of retries if a request was rate limited at the API endpoint. + +- `stripe_debug` (boolean, optional. Default: false): + Enables verbose logging on the Stripe client. diff --git a/website/pages/docs/plugins/sources/stripe/tables.md b/website/pages/docs/plugins/sources/stripe/tables.md new file mode 100644 index 00000000000000..8cacf832079ff7 --- /dev/null +++ b/website/pages/docs/plugins/sources/stripe/tables.md @@ -0,0 +1,66 @@ +# Source Plugin: stripe + +## Tables + +- [stripe_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_accounts.md) (Incremental) + - [stripe_capabilities](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_capabilities.md) +- [stripe_apple_pay_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_apple_pay_domains.md) +- [stripe_application_fees](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_application_fees.md) (Incremental) + - [stripe_fee_refunds](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_fee_refunds.md) +- [stripe_balance](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_balance.md) +- [stripe_balance_transactions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_balance_transactions.md) (Incremental) +- [stripe_billing_portal_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_billing_portal_configurations.md) +- [stripe_charges](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_charges.md) (Incremental) +- [stripe_checkout_sessions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_checkout_sessions.md) +- [stripe_country_specs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_country_specs.md) +- [stripe_coupons](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_coupons.md) (Incremental) +- [stripe_credit_notes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_credit_notes.md) +- [stripe_customers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_customers.md) (Incremental) +- [stripe_disputes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_disputes.md) (Incremental) +- [stripe_events](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_events.md) (Incremental) +- [stripe_file_links](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_file_links.md) (Incremental) +- [stripe_files](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_files.md) (Incremental) +- [stripe_identity_verification_reports](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_identity_verification_reports.md) (Incremental) +- [stripe_invoice_items](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_invoice_items.md) +- [stripe_invoices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_invoices.md) (Incremental) +- [stripe_issuing_authorizations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_issuing_authorizations.md) (Incremental) +- [stripe_issuing_cardholders](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_issuing_cardholders.md) (Incremental) +- [stripe_issuing_cards](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_issuing_cards.md) (Incremental) +- [stripe_issuing_disputes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_issuing_disputes.md) (Incremental) +- [stripe_issuing_transactions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_issuing_transactions.md) (Incremental) +- [stripe_payment_intents](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_payment_intents.md) (Incremental) +- [stripe_payment_links](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_payment_links.md) +- [stripe_payment_methods](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_payment_methods.md) +- [stripe_payouts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_payouts.md) (Incremental) +- [stripe_plans](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_plans.md) (Incremental) +- [stripe_prices](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_prices.md) (Incremental) +- [stripe_products](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_products.md) (Incremental) +- [stripe_promotion_codes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_promotion_codes.md) (Incremental) +- [stripe_quotes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_quotes.md) +- [stripe_radar_early_fraud_warnings](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_radar_early_fraud_warnings.md) +- [stripe_refunds](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_refunds.md) (Incremental) +- [stripe_reporting_report_runs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_reporting_report_runs.md) (Incremental) +- [stripe_reporting_report_types](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_reporting_report_types.md) +- [stripe_reviews](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_reviews.md) (Incremental) +- [stripe_shipping_rates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_shipping_rates.md) (Incremental) +- [stripe_sigma_scheduled_query_runs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_sigma_scheduled_query_runs.md) +- [stripe_subscription_schedules](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_subscription_schedules.md) (Incremental) +- [stripe_subscriptions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_subscriptions.md) (Incremental) +- [stripe_tax_codes](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_tax_codes.md) +- [stripe_tax_rates](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_tax_rates.md) (Incremental) +- [stripe_terminal_configurations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_terminal_configurations.md) +- [stripe_terminal_locations](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_terminal_locations.md) +- [stripe_terminal_readers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_terminal_readers.md) +- [stripe_topups](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_topups.md) (Incremental) +- [stripe_transfers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_transfers.md) (Incremental) +- [stripe_treasury_financial_accounts](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_financial_accounts.md) (Incremental) + - [stripe_treasury_credit_reversals](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_credit_reversals.md) + - [stripe_treasury_debit_reversals](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_debit_reversals.md) + - [stripe_treasury_inbound_transfers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_inbound_transfers.md) + - [stripe_treasury_outbound_payments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_outbound_payments.md) + - [stripe_treasury_outbound_transfers](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_outbound_transfers.md) + - [stripe_treasury_received_credits](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_received_credits.md) + - [stripe_treasury_received_debits](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_received_debits.md) + - [stripe_treasury_transaction_entries](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_transaction_entries.md) (Incremental) + - [stripe_treasury_transactions](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_treasury_transactions.md) (Incremental) +- [stripe_webhook_endpoints](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/stripe/docs/tables/stripe_webhook_endpoints.md) \ No newline at end of file diff --git a/website/pages/docs/plugins/sources/vercel/configuration.md b/website/pages/docs/plugins/sources/vercel/configuration.md index 88fba58964a9a2..f3de9ebb5e566d 100644 --- a/website/pages/docs/plugins/sources/vercel/configuration.md +++ b/website/pages/docs/plugins/sources/vercel/configuration.md @@ -40,3 +40,12 @@ This is the (nested) spec used by the Vercel source plugin: - `timeout_secs` (integer in seconds, optional. Default: 5): Timeout for requests against the Vercel REST API. + +- `max_retries` (integer in seconds, optional. Default: 10): + Maximum number of retries for requests against the Vercel REST API. + +- `max_wait_secs` (integer in seconds, optional. Default: 300): + Maximum wait time between rate limited API requests. The plugin waits until the rate limit resets. If there's a need to wait longer than this time, the request will fail. + +- `page_size` (integer, optional. Default: 100): + Number of items to request in each API call. This is a tradeoff between the number of API calls and the number of items per API call, which might take too long. The maximum allowed value is 100. diff --git a/website/pages/docs/plugins/sources/vercel/tables.md b/website/pages/docs/plugins/sources/vercel/tables.md index 734959f4ac726b..415329288e5a9b 100644 --- a/website/pages/docs/plugins/sources/vercel/tables.md +++ b/website/pages/docs/plugins/sources/vercel/tables.md @@ -2,11 +2,11 @@ ## Tables +- [vercel_deployments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_deployments.md) + - [vercel_deployment_checks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_deployment_checks.md) - [vercel_domains](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_domains.md) - [vercel_domain_records](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_domain_records.md) -- [vercel_teams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_teams.md) - - [vercel_team_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_team_members.md) - [vercel_projects](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_projects.md) - [vercel_project_envs](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_project_envs.md) -- [vercel_deployments](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_deployments.md) - - [vercel_deployment_checks](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_deployment_checks.md) \ No newline at end of file +- [vercel_teams](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_teams.md) + - [vercel_team_members](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/vercel/docs/tables/vercel_team_members.md) \ No newline at end of file diff --git a/website/pages/docs/reference/destination-spec.md b/website/pages/docs/reference/destination-spec.md index fbcda873abe1b5..dde8b203cfb101 100644 --- a/website/pages/docs/reference/destination-spec.md +++ b/website/pages/docs/reference/destination-spec.md @@ -67,7 +67,15 @@ Specifies the update method to use when inserting rows. The exact semantics depe (`int`, optional) -The number of resources to insert in a single batch. Only relevant for plugins that utilize batching. Each plugin has its own default value. +The number of resources to insert in a single batch. Only applies to plugins that utilize batching. This setting works in conjunction with `batch_size_bytes`, and batches are written whenever either `batch_size` or `batch_size_bytes` is reached. Every plugin has its own default value for `batch_size`. + +{/**/} +### batch_size_bytes +{/**/} + +(`int`, optional) + +The max number of bytes to use for a single batch. Only applies to plugins that utilize batching. This setting works in conjunction with `batch_size`, and batches are written whenever either `batch_size` or `batch_size_bytes` is reached. Every plugin has its own default value for `batch_size_bytes`. Note that the size in bytes is calculated based on the size of data in memory, not the serialized data, and it is best to choose a `batch_size_bytes` significantly lower than any hard limits. ### spec diff --git a/website/pages/docs/reference/source-spec.md b/website/pages/docs/reference/source-spec.md index 34716df2b357b7..c863ca17af6402 100644 --- a/website/pages/docs/reference/source-spec.md +++ b/website/pages/docs/reference/source-spec.md @@ -84,8 +84,20 @@ A best effort maximum number of Go routines to use. Lower this number to reduce The scheduler to use when determining the priority of resources to sync. Currently, the only supported values are `dfs` (depth-first search) and `round-robin`. This is an experimental feature, and may be removed in the future. For more information about this, see [performance tuning](/docs/advanced-topics/performance-tuning). +### backend + +(`string`, optional, default: `local`, introduced in CLI `v2.1.0`) + +The backend to use for storing the state of incremental tables. Currently, the only supported value is `local` (store the state in the local filesystem). For more information, see [managing incremental tables](/docs/advanced-topics/managing-incremental-tables). + +### backend_spec + +(`object`, optional, introduced in CLI `v2.1.0`) + +The backend spec is specific to the backend used. For the `local` backend, the only option is `path`, which specifies the name of the directory to use when storing metadata files. + ### spec (`object`, optional) -Plugin specific configurations. Visit [source plugins](/docs/plugins/sources/overview) documentation for more information. +Plugin-specific configurations. Visit [source plugins](/docs/plugins/sources/overview) documentation for more information. diff --git a/website/pages/docs/support.md b/website/pages/docs/support.md index 4d762189fbf784..9a2941bc20e604 100644 --- a/website/pages/docs/support.md +++ b/website/pages/docs/support.md @@ -6,7 +6,7 @@ Several levels and channels of support are available. Community support is free and available to everyone. -[Join our Discord](https://discord.gg/8qZ7Y4Z) to ask questions and get help from both us and the community. +[Join our Discord](https://www.cloudquery.io/discord) to ask questions and get help from both us and the community. [GitHub Issues](https://github.com/cloudquery/cloudquery/issues) for bug reports, feature requests, and questions. diff --git a/website/pages/how-to-guides/attack-surface-management-with-graph.md b/website/pages/how-to-guides/attack-surface-management-with-graph.md new file mode 100644 index 00000000000000..75e4531b4cce01 --- /dev/null +++ b/website/pages/how-to-guides/attack-surface-management-with-graph.md @@ -0,0 +1,276 @@ +--- +title: How to use CloudQuery for Attack Surface Management and Graph Visualization +tag: tutorial +description: >- + How to use CloudQuery for Attack Surface Management (ASM) and Graph Visualization with Neo4j +author: jsonkao +--- + +import { HowToGuideHeader } from "../../components/HowToGuideHeader" + + + +In this guide, we will demonstrate how to set up CloudQuery for customizable Attack Surface Management (ASM) and how to get started with utilizing graph visualization to execute security queries. With cloud infrastructure and security, graph visualization can be used effectively to understand relationships between assets, attack paths, and attack surface to aid with Attack Surface Management and improving security posture of your organization. + +Once we're done with the post, you'll be able to create and build your own Attack Surface Management and Graph Visualization queries and relationships in Neo4j similar to the example graph of AWS IAM Users, their permissions, and IAM user access keys. We'll show how to build the queries and relationships for the below graph visualization and other examples. + +![Example visualization of IAM Users](/images/how-to-guides/attack-surface-management-with-graph/graph-users.png) + +## Walkthrough + +### Prerequisites + +In this guide, we will use Neo4j as a destination and AWS as a source. For more information on how to set those up, see our documentation on [Neo4j](/docs/plugins/destinations/neo4j/overview) and [AWS](/docs/plugins/sources/aws/overview). + +For the example queries, we'll be using AWS Identity and Access Management (IAM) Users and Amazon Relational Database Service (RDS) along with some common infrastructure associated with those resources that include IAM User Access Keys, IAM Managed and Inline Policies, IAM Groups, Amazon Virtual Private Cloud (VPC), Amazon VPC Security Groups, and Internet Gateways. Our demo environment will have those sample resources already created and the graph visualizations will look different than results from your walkthrough. + +Refer to Neo4j's installation documentation (https://neo4j.com/docs/operations-manual/current/installation/) for help setting up Neo4j. For this walkthrough, make sure a local instance of Neo4j is up and running. Also make sure to install [Awesome Procedures on Cypher (APOC)](https://neo4j.com/labs/apoc/) for Neo4j as we'll be using useful functionality in APOC to assist with our attack surface management use cases. + + +### Step 1: Install or Deploy CloudQuery + +To get started with CloudQuery, check out our [quickstart guide](/docs/quickstart) and [AWS source plugin](/docs/plugins/sources/aws/overview) for how to configure CloudQuery and run it locally on your machine. + +### Step 2: Sync Data from CloudQuery to Neo4j + +The following command will sync data from AWS as a source to Neo4J as a destination: + +`cloudquery sync aws-neo.yml neo4j.yml` + +For more information on configuration files, see [AWS source configuration](/docs/plugins/sources/aws/configuration) and [Neo4j destination configuration](/docs/plugins/destinations/neo4j/overview) + +The configuration we're running locally looks like this: + +Example aws-neo.yml source configuration file: +```yaml +kind: source +spec: + name: "aws" + path: "cloudquery/aws" + version: "v9.2.0" + destinations: ["neo4j"] + tables: ["*"] + spec: + regions: + - us-east-1 + accounts: + - id: "123412341234" #Your AWS Account Number here + - local_profile: "test-neo4j-example" +``` + +Example neo4j.yml destination configuration file: +```yaml + kind: destination + spec: + name: "neo4j" + registry: "github" + path: "cloudquery/neo4j" + version: "v1.0.1" + spec: + connection_string: "bolt://localhost:7687" + username: "${USERNAME}" + password: "${PASSWORD}" +``` + +You should see a `sync completed successfully` message. CloudQuery has now synced your AWS data to Neo4j. + +### Step 3: Test Out Neo4j + +If running Neo4j locally, navigate to `http://localhost:7474/browser/` for the Neo4j browser. + +Let's start with a simple query to find all our IAM Roles. + +`MATCH (n:aws_iam_roles) RETURN n` + +![IAM Roles](/images/how-to-guides/attack-surface-management-with-graph/iam-roles.png) + +### Step 4: Run Custom ASM Queries and Create Relationships in Neo4j + +#### Example 1: IAM User Access Keys and their linked permissions + +Let's start with IAM User Access Keys. With this query, we'll look for the 4 distinct ways with identity policies an IAM User can be granted permissions and link those to the IAM Users and to the IAM User Access Keys. In this example, we've already created the following resources in AWS: IAM Users, IAM Groups, Inline Policies for both Groups and Users, Managed Policies for both Groups and Users, and IAM User Access Keys. + +An IAM User can be granted permissions from: +* Direct Inline Policies of the IAM User +* Directly Attached Managed Policies to the IAM User +* Inline Policies via IAM Group Membership +* Attached Managed Policies via IAM Group Membership + +By running the following command, we create a relationship between IAM User nodes and IAM User Access Key nodes. + +```sql +MATCH + (a:aws_iam_user_access_keys), + (b:aws_iam_users) +WHERE a.`_cq_parent_id` = b.`_cq_id` +CREATE (b)-[r:has_access_keys]->(a) +RETURN type(r) +``` + +Next, let's create a relationship between IAM Users and IAM Groups. In AWS, IAM Users can be members of IAM Groups and inherit their IAM policies. + +```sql +MATCH + (iamusers:aws_iam_users), + (usergroups:aws_iam_user_groups), + (iamgroups:aws_iam_groups) +WHERE iamusers.arn = usergroups.user_arn and iamgroups.arn = usergroups.arn +CREATE (iamusers)-[r:is_a_member_of]->(iamgroups) +RETURN type(r) +``` + +Now, we'll create relationships between IAM Users and all IAM User inline policies. + +```sql +MATCH + (iamusers:aws_iam_users), + (inlinep:aws_iam_user_policies) +WHERE iamusers.arn = inlinep.user_arn +CREATE (iamusers)-[r:has_inline_policy]->(inlinep) +RETURN type(r) +``` + +Now, we'll create relationships between IAM Users and directly attached managed policies. + +```sql +MATCH + (iamusers:aws_iam_users), + (attachp:aws_iam_user_attached_policies) +WHERE iamusers.arn = inlinep.user_arn +CREATE (iamusers)-[r:has_attached_policy]->(attachp) +RETURN type(r) +``` + +Next, we'll create relationships between IAM Groups and their inline policies. + +```sql +MATCH + (iamgroups:aws_iam_groups), + (groupinline:aws_iam_group_policies) +WHERE iamgroups.arn = groupinline.group_arn +CREATE (iamgroups)-[r:has_inline_policy]->(groupinline) +RETURN type(r) +``` + +Lastly, we'll create relationships between IAM Groups and their attached managed policies. + +```sql +MATCH + (n:aws_iam_groups), + (policies:aws_iam_policies) +UNWIND (keys(apoc.convert.fromJsonMap(n.policies))) as y +WITH y, policies, n +WHERE y = policies.arn +CREATE (n)-[r:has_attached_policy]->(policies) +RETURN type(r) +``` + +After all these relationships have been created, we can run a `MATCH (n:aws_iam_users) return n` to return all IAM Users. + +In the UI, feel free to play around with node labels, colors, and expansion of nodes and relationships. + +In our sample environment, we have 3 IAM Users. The following image shows the following and their relationships: +* IAM User Access Keys in green. +* IAM Managed Policies and Inline Policies in red. +* IAM Users in gray. +* IAM Groups in blue. + +We'll use the following query to show our IAM Users: `MATCH (n:aws_iam_users) return n`: + +![Sample Graph of IAM Users](/images/how-to-guides/attack-surface-management-with-graph/graph-users.png) + +#### Example 2: Data in RDS + +In this example, we will focus on Relational Databases (AWS RDS) and their data. This will include network connectivity such as VPCs, Internet Gateways, and Security Groups. We will also look at possible data access and encryption via KMS Keys, their KMS Key Policies, and KMS Key Grants. In this example, we've already created the following resources in AWS: RDS Databases, KMS Keys, KMS Key Policies, KMS Key Grants, an AWS VPC, Security Groups, and an Internet Gateway. + + +Let's first create relationships between RDS instances and their encryption from KMS Keys. + +```sql +MATCH + (rdsinstances:aws_rds_instances), + (kmskeys:aws_kms_keys) +WHERE rdsinstances.kms_key_id = kmskeys.arn +CREATE (rdsinstances)-[r:is_encrypted_by_key]->(kmskeys) +RETURN type(r) +``` + +Let's connect KMS Keys with all their Key Grants and the [access that the Key Grants may permit](/blog/aws-kms-key-grants-deep-dive) to those KMS Keys and data. + +```sql +MATCH + (keygrants:aws_kms_key_grants), + (kmskeys:aws_kms_keys) +WHERE keygrants.key_arn = kmskeys.arn +CREATE (kmskeys)-[r:has_kms_key_grant]->(keygrants) +RETURN type(r) +``` + +Let's now link Security Groups to the RDS instances. + +```sql +MATCH + (rds_is:aws_rds_instances), + (sgs:aws_ec2_security_groups) +UNWIND (apoc.convert.fromJsonList(rds_is.vpc_security_groups)) as secgroups +WITH secgroups, rds_is, sgs +WHERE + secgroups['VpcSecurityGroupId'] + = sgs.group_id +CREATE (rds_is)-[r:uses_security_group]->(sgs) +RETURN type(r) +``` + +In the next cypher query, we will connect KMS Keys with their KMS Key Policies. + +```sql +MATCH + (keypolicies:aws_kms_key_policies), + (keys:aws_kms_keys) +WHERE keypolicies.key_arn = keys.arn +CREATE (keys)-[r:has_key_policy]->(keypolicies) +RETURN type(r) +``` + +Now, we'll create relationships between RDS Instances and the VPC networks they belong to. + +```sql +MATCH + (rds_is:aws_rds_instances), + (vpcs:aws_ec2_vpcs) +WHERE apoc.convert.fromJsonMap(rds_is.db_subnet_group)['VpcId'] = vpcs.vpc_id +CREATE (rds_is)-[r:is_in_vpc]->(vpcs) +return type(r) +``` + +Lastly, we'll create relationships between Internet Gateways and their VPCs. In this cypher query, we use `[0]` to pull the first item in the list. Internet Gateways can only be attached to 1 VPC, so this will return the only attachment in the attachment properties of the Internet Gateway resource. + +```sql +MATCH + (igws:aws_ec2_internet_gateways), + (vpcs:aws_ec2_vpcs) +WHERE apoc.convert.fromJsonList(igws.attachments)[0]['VpcId'] = vpcs.vpc_id +CREATE (vpcs)-[r:has_internet_gateway]->(igws) +return type(r) +``` + +We've now created relationships for encryption and networking for our RDS instances. +In our sample environment, we have 4 RDS Instances. The following image shows the following and their relationships: +* RDS Instances in yellow. +* VPCs in blue. +* Security Groups in green. +* Internet Gateways in light blue. +* KMS Keys in orange. +* KMS Key Policies in light pink. +* KMS Key Grants in dark pink. + +To display our graph, the nodes, and relationships, we will use `MATCH (n:aws_rds_instances) return n;` to return a graph visualization of our data. + + +![Sample Graph of RDS Instances](/images/how-to-guides/attack-surface-management-with-graph/graph-instances.png) + +## Summary + +We have demonstrated how to get started with Attack Surface Management (ASM) and graph visualization with Neo4j along with some starter queries regarding databases, data, and AWS Identity and Access Management. Now you should be able to customize and create more queries, relationships, and utilize CloudQuery to help improve the security posture of your organization! + +If you have use cases, custom queries, and examples from using CloudQuery, we would love to hear from you! Reach out to us on [GitHub](https://github.com/cloudquery/cloudquery) or [Discord](https://cloudquery.io/discord)! \ No newline at end of file diff --git a/website/pages/how-to-guides/cloud-asset-inventory-cloudquery-aws-quicksight.md b/website/pages/how-to-guides/cloud-asset-inventory-cloudquery-aws-quicksight.md index d1c86c33837acd..fb576872730215 100644 --- a/website/pages/how-to-guides/cloud-asset-inventory-cloudquery-aws-quicksight.md +++ b/website/pages/how-to-guides/cloud-asset-inventory-cloudquery-aws-quicksight.md @@ -28,7 +28,7 @@ In this guide, we will walk you through how to set up CloudQuery to build your c ## Walkthrough -### Step 1: **Install or Deploy CloudQuery** +### Step 1: Install or Deploy CloudQuery If it’s your first time using CloudQuery we suggest you first run it locally to get familiar with the tool, take a look at our [quickstart guide](/docs/quickstart) and [AWS source plugin](/docs/plugins/sources/aws/overview). @@ -44,7 +44,7 @@ Click Create New Dataset and choose PostgresSQL (In this tutorial we will connec ### Step 3: Visualize the Data! -Choose the table you want to visualize, in this case we will choose the`aws_resources` view which you need to [create](https://www.cloudquery.io/blog/aws-resources-view) to visualize all resources across all accounts and regions. +Choose the table you want to visualize, in this case we will choose the`aws_resources` view which you need to create. To create or update the view, run [this query](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/views/resources.sql) (part of the CloudQuery AWS Source plugin source code) on your database. This will allow you to visualize all resources across all accounts and regions. ![](/images/blog/cloud-asset-inventory-cloudquery-aws-quicksight/2.png) diff --git a/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-instances.png b/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-instances.png new file mode 100644 index 00000000000000..6ce5850520fb47 Binary files /dev/null and b/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-instances.png differ diff --git a/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-users.png b/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-users.png new file mode 100644 index 00000000000000..6ea3b8930833ca Binary files /dev/null and b/website/public/images/how-to-guides/attack-surface-management-with-graph/graph-users.png differ diff --git a/website/public/images/how-to-guides/attack-surface-management-with-graph/iam-roles.png b/website/public/images/how-to-guides/attack-surface-management-with-graph/iam-roles.png new file mode 100644 index 00000000000000..4be51e48a848ba Binary files /dev/null and b/website/public/images/how-to-guides/attack-surface-management-with-graph/iam-roles.png differ diff --git a/website/versions/cli.json b/website/versions/cli.json index e22fbace607fe7..f482866b072936 100644 --- a/website/versions/cli.json +++ b/website/versions/cli.json @@ -1 +1 @@ -{ "latest": "cli-v2.0.31" } +{ "latest": "cli-v2.1.0" } diff --git a/website/versions/destination-azblob.json b/website/versions/destination-azblob.json index 1479994684f0f7..ce384562ebe6d9 100644 --- a/website/versions/destination-azblob.json +++ b/website/versions/destination-azblob.json @@ -1 +1 @@ -{ "latest": "plugins-destination-azblob-v1.0.1" } +{ "latest": "plugins-destination-azblob-v1.0.3" } diff --git a/website/versions/destination-bigquery.json b/website/versions/destination-bigquery.json index 7f9c32efcee065..772f80b4f0009d 100644 --- a/website/versions/destination-bigquery.json +++ b/website/versions/destination-bigquery.json @@ -1 +1 @@ -{ "latest": "plugins-destination-bigquery-v2.0.3" } +{ "latest": "plugins-destination-bigquery-v2.1.0" } diff --git a/website/versions/destination-file.json b/website/versions/destination-file.json index 132ff4585d56de..dc5eccd127381f 100644 --- a/website/versions/destination-file.json +++ b/website/versions/destination-file.json @@ -1 +1 @@ -{ "latest": "plugins-destination-file-v1.0.2" } +{ "latest": "plugins-destination-file-v1.0.4" } diff --git a/website/versions/destination-gcs.json b/website/versions/destination-gcs.json index f5228d548eea75..c03e3bb942e1f6 100644 --- a/website/versions/destination-gcs.json +++ b/website/versions/destination-gcs.json @@ -1 +1 @@ -{ "latest": "plugins-destination-gcs-v1.0.2" } +{ "latest": "plugins-destination-gcs-v1.0.4" } diff --git a/website/versions/destination-kafka.json b/website/versions/destination-kafka.json index 2a9219c466e177..c013ff76f3708e 100644 --- a/website/versions/destination-kafka.json +++ b/website/versions/destination-kafka.json @@ -1 +1 @@ -{ "latest": "plugins-destination-kafka-v1.0.0" } +{ "latest": "plugins-destination-kafka-v1.0.2" } diff --git a/website/versions/destination-mongodb.json b/website/versions/destination-mongodb.json index ef6c3f6dcc8eb4..da480da9006ade 100644 --- a/website/versions/destination-mongodb.json +++ b/website/versions/destination-mongodb.json @@ -1 +1 @@ -{ "latest": "plugins-destination-mongodb-v1.0.4" } +{ "latest": "plugins-destination-mongodb-v1.0.5" } diff --git a/website/versions/destination-neo4j.json b/website/versions/destination-neo4j.json index 6a45a382b8920f..e2ea08e11c3dce 100644 --- a/website/versions/destination-neo4j.json +++ b/website/versions/destination-neo4j.json @@ -1 +1 @@ -{ "latest": "plugins-destination-neo4j-v1.0.1" } +{ "latest": "plugins-destination-neo4j-v1.0.2" } diff --git a/website/versions/destination-postgresql.json b/website/versions/destination-postgresql.json index 9d4c7d3f438d3a..e120341fe2cc6f 100644 --- a/website/versions/destination-postgresql.json +++ b/website/versions/destination-postgresql.json @@ -1 +1 @@ -{ "latest": "plugins-destination-postgresql-v2.0.4" } +{ "latest": "plugins-destination-postgresql-v2.0.5" } diff --git a/website/versions/destination-s3.json b/website/versions/destination-s3.json index 6b914c2d14de3f..2b047ae49935f0 100644 --- a/website/versions/destination-s3.json +++ b/website/versions/destination-s3.json @@ -1 +1 @@ -{ "latest": "plugins-destination-s3-v1.0.2" } +{ "latest": "plugins-destination-s3-v1.0.4" } diff --git a/website/versions/destination-snowflake.json b/website/versions/destination-snowflake.json index 73e09754db6366..ee2ace39734135 100644 --- a/website/versions/destination-snowflake.json +++ b/website/versions/destination-snowflake.json @@ -1 +1 @@ -{ "latest": "plugins-destination-snowflake-v1.1.4" } +{ "latest": "plugins-destination-snowflake-v1.1.6" } diff --git a/website/versions/destination-sqlite.json b/website/versions/destination-sqlite.json index 0fd9b510ef2c53..6bd10ef8f5610b 100644 --- a/website/versions/destination-sqlite.json +++ b/website/versions/destination-sqlite.json @@ -1 +1 @@ -{ "latest": "plugins-destination-sqlite-v1.1.3" } +{ "latest": "plugins-destination-sqlite-v1.1.5" } diff --git a/website/versions/destination-test.json b/website/versions/destination-test.json index 9deb828315a6f2..d00b02eb75f250 100644 --- a/website/versions/destination-test.json +++ b/website/versions/destination-test.json @@ -1 +1 @@ -{ "latest": "plugins-destination-test-v1.3.13" } +{ "latest": "plugins-destination-test-v1.3.14" } diff --git a/website/versions/scaffold.json b/website/versions/scaffold.json new file mode 100644 index 00000000000000..010c071855fa99 --- /dev/null +++ b/website/versions/scaffold.json @@ -0,0 +1 @@ +{ "latest": "scaffold-v1.0.0" } diff --git a/website/versions/source-aws.json b/website/versions/source-aws.json index 841f226271f796..ebb96b0053b9b8 100644 --- a/website/versions/source-aws.json +++ b/website/versions/source-aws.json @@ -1 +1 @@ -{ "latest": "plugins-source-aws-v10.0.0" } +{ "latest": "plugins-source-aws-v11.0.1" } diff --git a/website/versions/source-azure.json b/website/versions/source-azure.json index 14b9952a0c72e8..c0dc86e15fd930 100644 --- a/website/versions/source-azure.json +++ b/website/versions/source-azure.json @@ -1 +1 @@ -{ "latest": "plugins-source-azure-v3.1.0" } +{ "latest": "plugins-source-azure-v3.3.0" } diff --git a/website/versions/source-azuredevops.json b/website/versions/source-azuredevops.json index 4c194ca3569c9d..2fbf6e5e68c583 100644 --- a/website/versions/source-azuredevops.json +++ b/website/versions/source-azuredevops.json @@ -1 +1 @@ -{ "latest": "plugins-source-azuredevops-v1.0.1" } +{ "latest": "plugins-source-azuredevops-v1.1.0" } diff --git a/website/versions/source-cloudflare.json b/website/versions/source-cloudflare.json index 34578ab8e51a88..1e8c651e0cb33f 100644 --- a/website/versions/source-cloudflare.json +++ b/website/versions/source-cloudflare.json @@ -1 +1 @@ -{ "latest": "plugins-source-cloudflare-v3.0.0" } +{ "latest": "plugins-source-cloudflare-v3.1.0" } diff --git a/website/versions/source-crowdstrike.json b/website/versions/source-crowdstrike.json index 0670ab888a2267..32bdd68f458030 100644 --- a/website/versions/source-crowdstrike.json +++ b/website/versions/source-crowdstrike.json @@ -1 +1 @@ -{ "latest": "plugins-source-crowdstrike-v1.0.2" } +{ "latest": "plugins-source-crowdstrike-v1.1.0" } diff --git a/website/versions/source-datadog.json b/website/versions/source-datadog.json index eef2cc31c2ed12..3856012ea97882 100644 --- a/website/versions/source-datadog.json +++ b/website/versions/source-datadog.json @@ -1 +1 @@ -{ "latest": "plugins-source-datadog-v1.0.5" } +{ "latest": "plugins-source-datadog-v1.1.0" } diff --git a/website/versions/source-fastly.json b/website/versions/source-fastly.json index 8487450c5e6184..6eb9f5ad1edcf7 100644 --- a/website/versions/source-fastly.json +++ b/website/versions/source-fastly.json @@ -1 +1 @@ -{ "latest": "plugins-source-fastly-v1.0.1" } +{ "latest": "plugins-source-fastly-v1.1.0" } diff --git a/website/versions/source-gandi.json b/website/versions/source-gandi.json index 9b4ee30983c43c..174bf1949c8bab 100644 --- a/website/versions/source-gandi.json +++ b/website/versions/source-gandi.json @@ -1 +1 @@ -{ "latest": "plugins-source-gandi-v1.1.4" } +{ "latest": "plugins-source-gandi-v1.1.5" } diff --git a/website/versions/source-gcp.json b/website/versions/source-gcp.json index c911fb4af918e4..02f15a589ebfa7 100644 --- a/website/versions/source-gcp.json +++ b/website/versions/source-gcp.json @@ -1 +1 @@ -{ "latest": "plugins-source-gcp-v7.0.0" } +{ "latest": "plugins-source-gcp-v7.1.1" } diff --git a/website/versions/source-github.json b/website/versions/source-github.json index cac161831590d8..945c24b9e7439b 100644 --- a/website/versions/source-github.json +++ b/website/versions/source-github.json @@ -1 +1 @@ -{ "latest": "plugins-source-github-v2.0.0" } +{ "latest": "plugins-source-github-v2.1.1" } diff --git a/website/versions/source-gitlab.json b/website/versions/source-gitlab.json index f0bdc920fe5094..c5e7a94872edf0 100644 --- a/website/versions/source-gitlab.json +++ b/website/versions/source-gitlab.json @@ -1 +1 @@ -{ "latest": "plugins-source-gitlab-v1.1.0" } +{ "latest": "plugins-source-gitlab-v2.0.0" } diff --git a/website/versions/source-hackernews.json b/website/versions/source-hackernews.json new file mode 100644 index 00000000000000..be517affb888e7 --- /dev/null +++ b/website/versions/source-hackernews.json @@ -0,0 +1 @@ +{ "latest": "plugins-source-hackernews-v1.1.1" } diff --git a/website/versions/source-heroku.json b/website/versions/source-heroku.json index d2559b99216687..464f1b6565a5f2 100644 --- a/website/versions/source-heroku.json +++ b/website/versions/source-heroku.json @@ -1 +1 @@ -{ "latest": "plugins-source-heroku-v3.1.4" } +{ "latest": "plugins-source-heroku-v3.1.5" } diff --git a/website/versions/source-k8s.json b/website/versions/source-k8s.json index 87f704692bdce7..14777af8c86945 100644 --- a/website/versions/source-k8s.json +++ b/website/versions/source-k8s.json @@ -1 +1 @@ -{ "latest": "plugins-source-k8s-v2.5.4" } +{ "latest": "plugins-source-k8s-v3.0.0" } diff --git a/website/versions/source-okta.json b/website/versions/source-okta.json index 1111453bc18c41..55cb7852b5f403 100644 --- a/website/versions/source-okta.json +++ b/website/versions/source-okta.json @@ -1 +1 @@ -{ "latest": "plugins-source-okta-v2.0.2" } +{ "latest": "plugins-source-okta-v2.1.0" } diff --git a/website/versions/source-oracle.json b/website/versions/source-oracle.json new file mode 100644 index 00000000000000..8fe4d306105663 --- /dev/null +++ b/website/versions/source-oracle.json @@ -0,0 +1 @@ +{ "latest": "plugins-source-oracle-v1.0.0" } diff --git a/website/versions/source-pagerduty.json b/website/versions/source-pagerduty.json index cae4abaa83dc14..b8d19762772291 100644 --- a/website/versions/source-pagerduty.json +++ b/website/versions/source-pagerduty.json @@ -1 +1 @@ -{ "latest": "plugins-source-pagerduty-v1.1.2" } +{ "latest": "plugins-source-pagerduty-v1.2.0" } diff --git a/website/versions/source-salesforce.json b/website/versions/source-salesforce.json index ec2199d728a8cd..983e9f97ef56a6 100644 --- a/website/versions/source-salesforce.json +++ b/website/versions/source-salesforce.json @@ -1 +1 @@ -{ "latest": "plugins-source-salesforce-v1.0.1" } +{ "latest": "plugins-source-salesforce-v1.0.2" } diff --git a/website/versions/source-slack.json b/website/versions/source-slack.json index 83722049419d4f..e56f46c4a13eae 100644 --- a/website/versions/source-slack.json +++ b/website/versions/source-slack.json @@ -1 +1 @@ -{ "latest": "plugins-source-slack-v1.0.2" } +{ "latest": "plugins-source-slack-v1.1.0" } diff --git a/website/versions/source-snyk.json b/website/versions/source-snyk.json index 8668d8d7c26f1d..2d2506d59022bf 100644 --- a/website/versions/source-snyk.json +++ b/website/versions/source-snyk.json @@ -1 +1 @@ -{ "latest": "plugins-source-snyk-v1.0.1" } +{ "latest": "plugins-source-snyk-v1.1.0" } diff --git a/website/versions/source-tailscale.json b/website/versions/source-tailscale.json index 263723052325e0..0d0d8a206437df 100644 --- a/website/versions/source-tailscale.json +++ b/website/versions/source-tailscale.json @@ -1 +1 @@ -{ "latest": "plugins-source-tailscale-v1.1.0" } +{ "latest": "plugins-source-tailscale-v1.2.0" } diff --git a/website/versions/source-terraform.json b/website/versions/source-terraform.json index ddebd115787f23..de1c41198205a5 100644 --- a/website/versions/source-terraform.json +++ b/website/versions/source-terraform.json @@ -1 +1 @@ -{ "latest": "plugins-source-terraform-v1.3.4" } +{ "latest": "plugins-source-terraform-v1.3.5" } diff --git a/website/versions/source-test.json b/website/versions/source-test.json index 04333f75134e46..7310c5d21b2f3d 100644 --- a/website/versions/source-test.json +++ b/website/versions/source-test.json @@ -1 +1 @@ -{ "latest": "plugins-source-test-v1.3.27" } +{ "latest": "plugins-source-test-v1.3.28" } diff --git a/website/versions/source-vercel.json b/website/versions/source-vercel.json index 986de1115bbc62..81b1d108c4cace 100644 --- a/website/versions/source-vercel.json +++ b/website/versions/source-vercel.json @@ -1 +1 @@ -{ "latest": "plugins-source-vercel-v1.0.3" } +{ "latest": "plugins-source-vercel-v1.0.4" }