From 8446590e56e5c5d31f1e5c7e9a63aad8b64a83c7 Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Wed, 21 Dec 2022 21:12:35 -0600 Subject: [PATCH] Remove deprecated and unused gRPC APIs Signed-off-by: Chris Doherty --- .github/mergify.yml | 2 - .github/workflows/ci.yaml | 12 - .github/workflows/tags.yaml | 8 - .gitignore | 1 - CONTRIBUTING.md | 64 - Makefile | 255 ++- OWNERS.md | 3 - README.md | 2 +- buf.lock | 2 +- ci-checks.sh | 4 - client/main.go | 30 - cmd/tink-cli/.gitignore | 2 - cmd/tink-cli/Dockerfile | 8 - cmd/tink-cli/cmd/completion.go | 60 - cmd/tink-cli/cmd/delete/delete.go | 86 - cmd/tink-cli/cmd/delete/delete_test.go | 98 - cmd/tink-cli/cmd/delete/doc.go | 4 - cmd/tink-cli/cmd/docs.go | 46 - cmd/tink-cli/cmd/docs_test.go | 150 -- cmd/tink-cli/cmd/get/doc.go | 5 - cmd/tink-cli/cmd/get/get.go | 144 -- cmd/tink-cli/cmd/get/get_test.go | 248 --- cmd/tink-cli/cmd/hardware.go | 34 - cmd/tink-cli/cmd/hardware/commands.go | 54 - cmd/tink-cli/cmd/hardware/delete.go | 26 - cmd/tink-cli/cmd/hardware/get.go | 67 - cmd/tink-cli/cmd/hardware/get_test.go | 112 - cmd/tink-cli/cmd/hardware/id.go | 40 - cmd/tink-cli/cmd/hardware/ip.go | 48 - cmd/tink-cli/cmd/hardware/list.go | 62 - cmd/tink-cli/cmd/hardware/mac.go | 45 - cmd/tink-cli/cmd/hardware/push.go | 104 - cmd/tink-cli/cmd/hardware_test.go | 154 -- cmd/tink-cli/cmd/internal/clientctx/key.go | 21 - cmd/tink-cli/cmd/root.go | 94 - cmd/tink-cli/cmd/template.go | 39 - cmd/tink-cli/cmd/template/create.go | 85 - cmd/tink-cli/cmd/template/delete.go | 28 - cmd/tink-cli/cmd/template/get.go | 114 - cmd/tink-cli/cmd/template/get_test.go | 87 - cmd/tink-cli/cmd/template/list.go | 94 - cmd/tink-cli/cmd/template/update.go | 102 - cmd/tink-cli/cmd/template_test.go | 144 -- cmd/tink-cli/cmd/workflow.go | 41 - cmd/tink-cli/cmd/workflow/commands.go | 14 - cmd/tink-cli/cmd/workflow/create.go | 50 - cmd/tink-cli/cmd/workflow/data.go | 70 - cmd/tink-cli/cmd/workflow/delete.go | 24 - cmd/tink-cli/cmd/workflow/events.go | 67 - cmd/tink-cli/cmd/workflow/get.go | 109 - cmd/tink-cli/cmd/workflow/list.go | 92 - cmd/tink-cli/cmd/workflow/state.go | 66 - cmd/tink-cli/cmd/workflow_test.go | 172 -- cmd/tink-cli/main.go | 24 - cmd/tink-cli/sample.tmpl | 23 - cmd/tink-server/internal/postgres_setup.go | 36 - cmd/tink-server/main.go | 47 +- cmd/tink-worker/worker/worker.go | 125 +- db/db.go | 118 -- db/db_test.go | 84 - db/hardware.go | 190 -- db/hardware_test.go | 574 ----- db/migration/202009171251-init-database.go | 84 - ...10071530-init-events-table-and-triggers.go | 120 -- db/migration/202010221010-add-unique-index.go | 12 - ...-template-with-same-name-are-acceptable.go | 12 - ...d-partial-unique-constraint-on-template.go | 12 - ...2020121691335-update-events-primary-key.go | 24 - .../2021032610300-drop-events-system.go | 25 - db/migration/migration.go | 25 - db/migration/migration_test.go | 72 - db/mock/hardware.go | 35 - db/mock/mock.go | 30 - db/mock/template.go | 71 - db/mock/workflow.go | 85 - db/template.go | 202 -- db/template_test.go | 380 ---- db/testdata/hardware.json | 69 - db/testdata/hardware_2.json | 69 - db/testdata/template_happy_path_1.yaml | 19 - db/workflow.go | 764 ------- db/workflow_test.go | 409 ---- docker-compose.yaml | 125 -- go.mod | 133 +- go.sum | 1865 ++++------------- grpc-server/grpc_server_test.go | 173 -- internal/tests/frozen_time.go | 7 +- kube.mk | 66 - lint.mk | 92 - pkg/convert/template.go | 63 - pkg/convert/template_test.go | 215 -- pkg/convert/workflow.go | 45 - pkg/convert/workflow_test.go | 148 +- pkg/hardware_wrapper.go | 96 - protos/.gitignore | 1 - protos/hardware/gen.go | 3 - protos/hardware/hardware.pb.go | 1258 ----------- protos/hardware/hardware.proto | 269 --- protos/hardware/hardware_grpc.pb.go | 394 ---- protos/hardware/mock.go | 687 ------ protos/packet/packet.pb.go | 1623 -------------- protos/packet/packet.proto | 116 - protos/template/gen.go | 3 - protos/template/mock.go | 577 ----- protos/template/template.pb.go | 612 ------ protos/template/template.proto | 134 -- protos/template/template_grpc.pb.go | 297 --- protos/workflow/gen.go | 3 - protos/workflow/mock.go | 1072 ---------- protos/workflow/workflow.pb.go | 1539 ++++---------- protos/workflow/workflow.proto | 267 +-- protos/workflow/workflow_grpc.pb.go | 511 +---- rules.mk | 96 - server/dbserver.go | 66 - server/dbserver_hardware.go | 327 --- server/dbserver_hardware_test.go | 179 -- server/dbserver_template.go | 167 -- server/dbserver_template_test.go | 381 ---- server/dbserver_worker_workflow.go | 235 --- server/dbserver_worker_workflow_test.go | 1375 ------------ server/dbserver_workflow.go | 295 --- server/dbserver_workflow_test.go | 295 --- server/kubernetes_api_workflow.go | 18 +- server/kubernetes_unimplemented.go | 55 - tools.go | 15 - 125 files changed, 1111 insertions(+), 22020 deletions(-) delete mode 100644 OWNERS.md delete mode 100644 cmd/tink-cli/.gitignore delete mode 100644 cmd/tink-cli/Dockerfile delete mode 100644 cmd/tink-cli/cmd/completion.go delete mode 100644 cmd/tink-cli/cmd/delete/delete.go delete mode 100644 cmd/tink-cli/cmd/delete/delete_test.go delete mode 100644 cmd/tink-cli/cmd/delete/doc.go delete mode 100644 cmd/tink-cli/cmd/docs.go delete mode 100644 cmd/tink-cli/cmd/docs_test.go delete mode 100644 cmd/tink-cli/cmd/get/doc.go delete mode 100644 cmd/tink-cli/cmd/get/get.go delete mode 100644 cmd/tink-cli/cmd/get/get_test.go delete mode 100644 cmd/tink-cli/cmd/hardware.go delete mode 100644 cmd/tink-cli/cmd/hardware/commands.go delete mode 100644 cmd/tink-cli/cmd/hardware/delete.go delete mode 100644 cmd/tink-cli/cmd/hardware/get.go delete mode 100644 cmd/tink-cli/cmd/hardware/get_test.go delete mode 100644 cmd/tink-cli/cmd/hardware/id.go delete mode 100644 cmd/tink-cli/cmd/hardware/ip.go delete mode 100644 cmd/tink-cli/cmd/hardware/list.go delete mode 100644 cmd/tink-cli/cmd/hardware/mac.go delete mode 100644 cmd/tink-cli/cmd/hardware/push.go delete mode 100644 cmd/tink-cli/cmd/hardware_test.go delete mode 100644 cmd/tink-cli/cmd/internal/clientctx/key.go delete mode 100644 cmd/tink-cli/cmd/root.go delete mode 100644 cmd/tink-cli/cmd/template.go delete mode 100644 cmd/tink-cli/cmd/template/create.go delete mode 100644 cmd/tink-cli/cmd/template/delete.go delete mode 100644 cmd/tink-cli/cmd/template/get.go delete mode 100644 cmd/tink-cli/cmd/template/get_test.go delete mode 100644 cmd/tink-cli/cmd/template/list.go delete mode 100644 cmd/tink-cli/cmd/template/update.go delete mode 100644 cmd/tink-cli/cmd/template_test.go delete mode 100644 cmd/tink-cli/cmd/workflow.go delete mode 100644 cmd/tink-cli/cmd/workflow/commands.go delete mode 100644 cmd/tink-cli/cmd/workflow/create.go delete mode 100644 cmd/tink-cli/cmd/workflow/data.go delete mode 100644 cmd/tink-cli/cmd/workflow/delete.go delete mode 100644 cmd/tink-cli/cmd/workflow/events.go delete mode 100644 cmd/tink-cli/cmd/workflow/get.go delete mode 100644 cmd/tink-cli/cmd/workflow/list.go delete mode 100644 cmd/tink-cli/cmd/workflow/state.go delete mode 100644 cmd/tink-cli/cmd/workflow_test.go delete mode 100644 cmd/tink-cli/main.go delete mode 100644 cmd/tink-cli/sample.tmpl delete mode 100644 cmd/tink-server/internal/postgres_setup.go delete mode 100644 db/db.go delete mode 100644 db/db_test.go delete mode 100644 db/hardware.go delete mode 100644 db/hardware_test.go delete mode 100644 db/migration/202009171251-init-database.go delete mode 100644 db/migration/202010071530-init-events-table-and-triggers.go delete mode 100644 db/migration/202010221010-add-unique-index.go delete mode 100644 db/migration/202012041103-template-with-same-name-are-acceptable.go delete mode 100644 db/migration/202012091055-add-partial-unique-constraint-on-template.go delete mode 100644 db/migration/2020121691335-update-events-primary-key.go delete mode 100644 db/migration/2021032610300-drop-events-system.go delete mode 100644 db/migration/migration.go delete mode 100644 db/migration/migration_test.go delete mode 100644 db/mock/hardware.go delete mode 100644 db/mock/mock.go delete mode 100644 db/mock/template.go delete mode 100644 db/mock/workflow.go delete mode 100644 db/template.go delete mode 100644 db/template_test.go delete mode 100644 db/testdata/hardware.json delete mode 100644 db/testdata/hardware_2.json delete mode 100644 db/testdata/template_happy_path_1.yaml delete mode 100644 db/workflow.go delete mode 100644 db/workflow_test.go delete mode 100644 docker-compose.yaml delete mode 100644 grpc-server/grpc_server_test.go delete mode 100644 kube.mk delete mode 100644 lint.mk delete mode 100644 pkg/convert/template.go delete mode 100644 pkg/convert/template_test.go delete mode 100644 pkg/hardware_wrapper.go delete mode 100644 protos/.gitignore delete mode 100644 protos/hardware/gen.go delete mode 100644 protos/hardware/hardware.pb.go delete mode 100644 protos/hardware/hardware.proto delete mode 100644 protos/hardware/hardware_grpc.pb.go delete mode 100644 protos/hardware/mock.go delete mode 100644 protos/packet/packet.pb.go delete mode 100644 protos/packet/packet.proto delete mode 100644 protos/template/gen.go delete mode 100644 protos/template/mock.go delete mode 100644 protos/template/template.pb.go delete mode 100644 protos/template/template.proto delete mode 100644 protos/template/template_grpc.pb.go delete mode 100644 protos/workflow/gen.go delete mode 100644 protos/workflow/mock.go delete mode 100644 rules.mk delete mode 100644 server/dbserver.go delete mode 100644 server/dbserver_hardware.go delete mode 100644 server/dbserver_hardware_test.go delete mode 100644 server/dbserver_template.go delete mode 100644 server/dbserver_template_test.go delete mode 100644 server/dbserver_worker_workflow.go delete mode 100644 server/dbserver_worker_workflow_test.go delete mode 100644 server/dbserver_workflow.go delete mode 100644 server/dbserver_workflow_test.go delete mode 100644 server/kubernetes_unimplemented.go delete mode 100644 tools.go diff --git a/.github/mergify.yml b/.github/mergify.yml index 407f64882..dea005066 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -3,7 +3,6 @@ queue_rules: conditions: # Conditions to get out of the queue (= merged) - check-success=DCO - - check-success~=docker-images.*tink-cli - check-success~=docker-images.*tink-server - check-success~=docker-images.*tink-worker @@ -15,7 +14,6 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - "#review-requested=0" - check-success=DCO - - check-success~=docker-images.*tink-cli - check-success~=docker-images.*tink-server - check-success~=docker-images.*tink-worker - check-success=crosscompile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index babad23d4..fd81c41e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,9 +67,6 @@ jobs: - name: Fetch Nix Packages run: nix-shell --run 'true' - - name: Install gofumpt for ci-checks.sh - run: make bin/gofumpt - - run: PATH=$PWD/bin/:$PATH ./ci-checks.sh crosscompile: runs-on: ubuntu-latest @@ -88,12 +85,6 @@ jobs: - run: make crosscompile -j$(nproc) - - name: Upload tink-cli binaries - uses: actions/upload-artifact@v2 - with: - name: tink-cli - path: cmd/tink-cli/tink-cli-* - - name: Upload tink-server binaries uses: actions/upload-artifact@v2 with: @@ -124,9 +115,6 @@ jobs: strategy: matrix: include: - - repository: quay.io/tinkerbell/tink-cli - binary: tink-cli - - repository: quay.io/tinkerbell/tink binary: tink-server diff --git a/.github/workflows/tags.yaml b/.github/workflows/tags.yaml index 2454bae94..b84dfcf74 100644 --- a/.github/workflows/tags.yaml +++ b/.github/workflows/tags.yaml @@ -59,14 +59,6 @@ jobs: DST_REG_USER: ${{ secrets.QUAY_USERNAME }} DST_REG_PASS: ${{ secrets.QUAY_PASSWORD }} - - name: Copy the tink-cli image using skopeo - run: skopeo copy --all --dest-creds="${DST_REG_USER}":"${DST_REG_PASS}" docker://"${SRC_IMAGE}" docker://"${DST_IMAGE}" - env: - SRC_IMAGE: ${{ env.REGISTRY }}/tinkerbell/tink-cli:${{ env.FROM_TAG }} - DST_IMAGE: ${{ env.REGISTRY }}/tinkerbell/tink-cli:${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} - DST_REG_USER: ${{ secrets.QUAY_USERNAME }} - DST_REG_PASS: ${{ secrets.QUAY_PASSWORD }} - - name: Create Release id: create_release uses: actions/create-release@v1 diff --git a/.gitignore b/.gitignore index 2bd4849d9..b06fe0235 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ bin/ certs/ -cmd/tink-cli/tink-cli cmd/tink-controller/tink-controller cmd/tink-server/tink-server cmd/tink-worker/tink-worker diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76d7d1411..cb57ee4ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,74 +112,19 @@ This is a nonexhaustive list important packages that happen to cover most of the The `cmd` package is home for three core binaries for Tinkerbell: -- `tink-cli` - the CLI for interacting with the `tink-server` - `tink-server` - the tink API server - `tink-worker` - responsible for executing the workload -``` -. -├── cmd -│   ├── tink-cli -│   │   └── cmd -│   │   ├── delete -│   │   ├── get -│   │   ├── hardware -│   │   ├── template -│   │   └── workflow -│   ├── tink-server -│   └── tink-worker -│   ├── cmd -│   └── internal -``` - -### db - -The `db` holds everything you need to deal with the database. -We use [PostgreSQL](https://www.postgresql.org/) as the data store. -The package contains database migrations, and an API to interact with database. - -``` -. -├── db -│   ├── migration -│   ├── mock -│   └── testdata -``` - ### deploy The `deploy` directory contains all the essentials to setup Tinkerbell stack. You can setup a local stack with `docker-compose` or Vagrant. -``` -. -├── deploy -│   ├── db -│   ├── registry -│   ├── tls -│   └── vagrant -│   └── scripts -``` - ### grpc-server The `grpc-server` exposes a gRPC API that connects everything together. It has a base server that implements the API. -``` -. -├── grpc-server -│   ├── grpc_server.go -│   ├── hardware.go -│   ├── hardware_test.go -│   ├── template.go -│   ├── template_test.go -│   ├── tinkerbell.go -│   ├── tinkerbell_test.go -│   ├── workflow.go -│   └── workflow_test.go -``` - ### protos The `protos` package contains all the protobuf files used by the gRPC server. @@ -189,15 +134,6 @@ CI will ensure generated files are up to date. [buf]: https://buf.build/ -``` -. -├── protos -│   ├── hardware -│   ├── packet -│   ├── template -│   └── workflow -``` - ### environment variables Tink Server, CLI, and Worker environment variables are documented [here](docs/ENVVARS.md). diff --git a/Makefile b/Makefile index 9360030d7..027cfaa95 100644 --- a/Makefile +++ b/Makefile @@ -3,23 +3,260 @@ help: ## Print this help all: cli server worker ## Build all binaries for host OS and CPU --include rules.mk --include lint.mk --include kube.mk +# Only use the recipes defined in these makefiles +MAKEFLAGS += --no-builtin-rules +.SUFFIXES: +# Delete target files if there's an error +# This avoids a failure to then skip building on next run if the output is created by shell redirection for example +# Not really necessary for now, but just good to have already if it becomes necessary later. +.DELETE_ON_ERROR: +# Treat the whole recipe as a one shell script/invocation instead of one-per-line +.ONESHELL: +# Use bash instead of plain sh +SHELL := bash +.SHELLFLAGS := -o pipefail -euc + +## Tools + +GO := go +BUF := $(GO) run github.com/bufbuild/buf/cmd/buf@v1.11.0 +CONTROLLER_GEN := $(GO) run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10 +GOFUMPT := $(GO) run mvdan.cc/gofumpt@v0.4 +KUSTOMIZE := $(GO) run sigs.k8s.io/kustomize/kustomize/v4@latestv4.5 + +#### + +binaries := cmd/tink-controller/tink-controller cmd/tink-server/tink-server cmd/tink-worker/tink-worker cmd/virtual-worker/virtual-worker +version := $(shell git rev-parse --short HEAD) +tag := $(shell git tag --points-at HEAD | head -n 1) +ifneq (,$(tag)) +version := $(tag)-$(version) +endif +LDFLAGS := -ldflags "-X main.version=$(version)" +export CGO_ENABLED := 0 + +.PHONY: server cli worker virtual-worker test $(binaries) +controller: cmd/tink-controller/tink-controller +server: cmd/tink-server/tink-server +worker : cmd/tink-worker/tink-worker +virtual-worker : cmd/virtual-worker/virtual-worker + +crossbinaries := $(addsuffix -linux-,$(binaries)) +crossbinaries := $(crossbinaries:=amd64) $(crossbinaries:=arm64) + +.PHONY: crosscompile $(crossbinaries) +%-amd64: FLAGS=GOOS=linux GOARCH=amd64 +%-arm64: FLAGS=GOOS=linux GOARCH=arm64 +$(binaries) $(crossbinaries): + $(FLAGS) $(GO) build $(LDFLAGS) -o $@ ./$(@D) + +.PHONY: tink-controller-image tink-server-image tink-worker-image virtual-worker-image +tink-controller-image: cmd/tink-controller/tink-controller-linux-amd64 + docker build -t tink-controller cmd/tink-controller/ +tink-server-image: cmd/tink-server/tink-server-linux-amd64 + docker build -t tink-server cmd/tink-server/ +tink-worker-image: cmd/tink-worker/tink-worker-linux-amd64 + docker build -t tink-worker cmd/tink-worker/ +virtual-worker-image: cmd/virtual-worker/virtual-worker-linux-amd64 + docker build -t virtual-worker cmd/virtual-worker/ + +ifeq ($(origin GOBIN), undefined) +GOBIN := ${PWD}/bin +export GOBIN +PATH := ${GOBIN}:${PATH} +export PATH +endif + +# These need changing to a `go run` command and placed in the Tools section of the Makefile +.PHONY: tools ## Install all required tools for use with this Makefile. +tools: + $(GO) install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0 + $(GO) install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 + $(GO) install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20220304125252-9ee63fc65a97 + $(GO) install sigs.k8s.io/kustomize/kustomize/v4@v4.5.4 + +.PHONY: pbfiles +pbfiles: buf.gen.yaml buf.lock $(shell git ls-files 'protos/*/*.proto') tools + $(BUF) mod update + $(BUF) generate + $(GOFUMPT) -w protos/*/*.pb.* + +.PHONY: check-pbfiles +check-pbfiles: pbfiles + @git diff --no-ext-diff --quiet --exit-code -- protos/*/*.pb.* || ( + echo "Protobuf files need to be regenerated!"; + git diff --no-ext-diff --exit-code -- protos/*/*.pb.* + ) + +e2etest-setup: tools + setup-envtest use + +## -------------------------------------- +## Generate +## -------------------------------------- + +.PHONY: generate +generate: generate-go generate-manifests # Generate code, manifests etc. + +.PHONY: generate-go +generate-go: # Generate Go code. + $(CONTROLLER_GEN) object:headerFile="hack/boilerplate/boilerplate.generatego.txt" paths="./pkg/apis/..." + $(GOFUMPT) -w ./pkg/apis + +.PHONY: generate-manifests +generate-manifests: generate-crds generate-rbacs generate-server-rbacs # Generate manifests e.g. CRD, RBAC etc. + +.PHONY: generate-crds +generate-crds: + $(CONTROLLER_GEN) \ + paths=./pkg/apis/... \ + crd:crdVersions=v1 \ + rbac:roleName=manager-role \ + output:crd:dir=./config/crd/bases \ + output:webhook:dir=./config/webhook \ + webhook + +.PHONY: generate-rbacs +generate-rbacs: + $(CONTROLLER_GEN) \ + paths=./pkg/controllers/... \ + output:rbac:dir=./config/rbac/ \ + rbac:roleName=manager-role + +.PHONY: generate-server-rbacs +generate-server-rbacs: + $(CONTROLLER_GEN) \ + paths=./server/... \ + output:rbac:dir=./config/server-rbac \ + rbac:roleName=server-role + +TINK_SERVER_IMAGE ?= quay.io/tinkerbell/tink-server +TINK_SERVER_TAG ?= latest + +TINK_CONTROLLER_IMAGE ?= quay.io/tinkerbell/tink-controller +TINK_CONTROLLER_TAG ?= latest + +NAMESPACE ?= tink-system + +out/release/default/kustomization.yaml: config/default/kustomization.yaml + rm -rf out/ + mkdir -p out/ + cp -a config/ out/release/ + +out/release/tink.yaml: bin/kustomize generate-manifests out/release/default/kustomization.yaml + ( + cd out/release/default && \ + $(KUSTOMIZE) edit set image server=$(TINK_SERVER_IMAGE):$(TINK_CONTROLLER_TAG) controller=$(TINK_CONTROLLER_IMAGE):$(TINK_CONTROLLER_TAG) && \ + $(KUSTOMIZE) edit set namespace $(NAMESPACE) \ + ) + $(KUSTOMIZE) build out/release/default -o $@ + prettier --write $@ + +release-manifests: out/release/tink.yaml ## Builds the manifests to publish with a release. crosscompile: $(crossbinaries) ## Build all binaries for Linux and all supported CPU arches -images: tink-cli-image tink-server-image tink-worker-image virtual-worker-image ## Build all docker images +images: tink-server-image tink-worker-image virtual-worker-image ## Build all docker images run: crosscompile run-stack ## Builds and runs the Tink stack (tink, db, cli) via docker-compose test: e2etest-setup ## Run tests - source <(setup-envtest use -p env) && go test -coverprofile=coverage.txt ./... + source <(setup-envtest use -p env) && $(GO) test -coverprofile=coverage.txt ./... verify: lint check-generated ## Verify code style, is lint free, freshness ... $(GOFUMPT) -s -d . -generated: pbfiles protomocks generate-manifests ## Generate dynamically created files -check-generated: check-pbfiles check-protomocks ## Check if generated files are up to date - -tools: ${toolsBins} ## Build Go based build tools +generated: pbfiles generate-manifests ## Generate dynamically created files +check-generated: check-pbfiles ## Check if generated files are up to date .PHONY: all check-generated crosscompile generated help images run test tools verify + +# BEGIN: lint-install --dockerfile=warn -makefile=lint.mk . +# http://github.com/tinkerbell/lint-install + +.PHONY: lint +lint: _lint + +LINT_ARCH := $(shell uname -m) +LINT_OS := $(shell uname) +LINT_OS_LOWER := $(shell echo $(LINT_OS) | tr '[:upper:]' '[:lower:]') +LINT_ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) + +# shellcheck and hadolint lack arm64 native binaries: rely on x86-64 emulation +ifeq ($(LINT_OS),Darwin) + ifeq ($(LINT_ARCH),arm64) + LINT_ARCH=x86_64 + endif +endif + +LINTERS := +FIXERS := + +SHELLCHECK_VERSION ?= v0.8.0 +SHELLCHECK_BIN := out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH) +$(SHELLCHECK_BIN): + mkdir -p out/linters + curl -sSfL -o $@.tar.xz https://github.com/koalaman/shellcheck/releases/download/$(SHELLCHECK_VERSION)/shellcheck-$(SHELLCHECK_VERSION).$(LINT_OS_LOWER).$(LINT_ARCH).tar.xz \ + || echo "Unable to fetch shellcheck for $(LINT_OS)/$(LINT_ARCH): falling back to locally install" + test -f $@.tar.xz \ + && tar -C out/linters -xJf $@.tar.xz \ + && mv out/linters/shellcheck-$(SHELLCHECK_VERSION)/shellcheck $@ \ + || printf "#!/usr/bin/env shellcheck\n" > $@ + chmod u+x $@ + +LINTERS += shellcheck-lint +shellcheck-lint: $(SHELLCHECK_BIN) + $(SHELLCHECK_BIN) $(shell find . -name "*.sh") + +FIXERS += shellcheck-fix +shellcheck-fix: $(SHELLCHECK_BIN) + $(SHELLCHECK_BIN) $(shell find . -name "*.sh") -f diff | { read -t 1 line || exit 0; { echo "$$line" && cat; } | git apply -p2; } + +HADOLINT_VERSION ?= v2.8.0 +HADOLINT_BIN := out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) +$(HADOLINT_BIN): + mkdir -p out/linters + curl -sSfL -o $@.dl https://github.com/hadolint/hadolint/releases/download/$(HADOLINT_VERSION)/hadolint-$(LINT_OS)-$(LINT_ARCH) \ + || echo "Unable to fetch hadolint for $(LINT_OS)/$(LINT_ARCH), falling back to local install" + test -f $@.dl && mv $(HADOLINT_BIN).dl $@ || printf "#!/usr/bin/env hadolint\n" > $@ + chmod u+x $@ + +LINTERS += hadolint-lint +hadolint-lint: $(HADOLINT_BIN) + $(HADOLINT_BIN) --no-fail $(shell find . -name "*Dockerfile") + +GOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml +GOLANGCI_LINT_VERSION ?= v1.49.0 +GOLANGCI_LINT_BIN := out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH) +$(GOLANGCI_LINT_BIN): + mkdir -p out/linters + rm -rf out/linters/golangci-lint-* + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b out/linters $(GOLANGCI_LINT_VERSION) + mv out/linters/golangci-lint $@ + +LINTERS += golangci-lint-lint +golangci-lint-lint: $(GOLANGCI_LINT_BIN) + $(GOLANGCI_LINT_BIN) run + +FIXERS += golangci-lint-fix +golangci-lint-fix: $(GOLANGCI_LINT_BIN) + $(GOLANGCI_LINT_BIN) run --fix + +YAMLLINT_VERSION ?= 1.26.3 +YAMLLINT_ROOT := out/linters/yamllint-$(YAMLLINT_VERSION) +YAMLLINT_BIN := $(YAMLLINT_ROOT)/dist/bin/yamllint +$(YAMLLINT_BIN): + mkdir -p out/linters + rm -rf out/linters/yamllint-* + curl -sSfL https://github.com/adrienverge/yamllint/archive/refs/tags/v$(YAMLLINT_VERSION).tar.gz | tar -C out/linters -zxf - + cd $(YAMLLINT_ROOT) && pip3 install --target dist . || pip install --target dist . + +LINTERS += yamllint-lint +yamllint-lint: $(YAMLLINT_BIN) + PYTHONPATH=$(YAMLLINT_ROOT)/dist $(YAMLLINT_ROOT)/dist/bin/yamllint . + +.PHONY: _lint $(LINTERS) +_lint: $(LINTERS) + +.PHONY: fix $(FIXERS) +fix: $(FIXERS) + +# END: lint-install --dockerfile=warn -makefile=lint.mk . diff --git a/OWNERS.md b/OWNERS.md deleted file mode 100644 index 5c11a226d..000000000 --- a/OWNERS.md +++ /dev/null @@ -1,3 +0,0 @@ -#OWNERS - -Please see [https://github.com/tinkerbell/.github/blob/main/OWNERS.md](https://github.com/tinkerbell/.github/blob/main/OWNERS.md). diff --git a/README.md b/README.md index a8023f953..7c93007a7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The Tinkerbell stack consists of several microservices, and a gRPC API: ### Tink -[Tink][1] is the short-hand name for the tink-server, tink-worker, and tink-cli. +[Tink][1] is the short-hand name for the tink-server and tink-worker. `tink-worker` and `tink-server` communicate over gRPC, and are responsible for processing workflows. The CLI is the user-interactive piece for creating workflows and their building blocks, templates and hardware data. diff --git a/buf.lock b/buf.lock index 2e09afb0d..19abf63fb 100644 --- a/buf.lock +++ b/buf.lock @@ -4,4 +4,4 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 8d7204855ec14631a499bd7393ce1970 + commit: 75b4300737fb4efca0831636be94e517 diff --git a/ci-checks.sh b/ci-checks.sh index c793c1123..ed5dde6f5 100755 --- a/ci-checks.sh +++ b/ci-checks.sh @@ -28,10 +28,6 @@ if ! nixfmt shell.nix; then failed=1 fi -if ! git ls-files '*.go' | xargs -I% sh -c 'sed -i "/^import (/,/^)/ { /^\s*$/ d }" % && gofumpt -w -s %'; then - failed=1 -fi - if ! git diff | (! grep .); then failed=1 fi diff --git a/client/main.go b/client/main.go index d917bbac2..42758c7fa 100644 --- a/client/main.go +++ b/client/main.go @@ -3,8 +3,6 @@ package client import ( "github.com/packethost/pkg/env" "github.com/pkg/errors" - "github.com/tinkerbell/tink/protos/hardware" - "github.com/tinkerbell/tink/protos/template" "github.com/tinkerbell/tink/protos/workflow" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "google.golang.org/grpc" @@ -14,25 +12,19 @@ import ( // gRPC clients. var ( - TemplateClient template.TemplateServiceClient WorkflowClient workflow.WorkflowServiceClient - HardwareClient hardware.HardwareServiceClient ) // FullClient aggregates all the gRPC clients available from Tinkerbell Server. type FullClient struct { - TemplateClient template.TemplateServiceClient WorkflowClient workflow.WorkflowServiceClient - HardwareClient hardware.HardwareServiceClient } // NewFullClient returns a FullClient. A structure that contains all the // clients made available from tink-server. func NewFullClient(conn grpc.ClientConnInterface) *FullClient { return &FullClient{ - TemplateClient: template.NewTemplateServiceClient(conn), WorkflowClient: workflow.NewWorkflowServiceClient(conn), - HardwareClient: hardware.NewHardwareServiceClient(conn), } } @@ -72,30 +64,10 @@ func Setup() error { if err != nil { return err } - TemplateClient = template.NewTemplateServiceClient(conn) WorkflowClient = workflow.NewWorkflowServiceClient(conn) - HardwareClient = hardware.NewHardwareServiceClient(conn) return nil } -// TinkHardwareClient creates a new hardware client. -func TinkHardwareClient() (hardware.HardwareServiceClient, error) { - conn, err := GetConnection() - if err != nil { - return nil, err - } - return hardware.NewHardwareServiceClient(conn), nil -} - -// TinkTemplateClient creates a new hardware client. -func TinkTemplateClient() (template.TemplateServiceClient, error) { - conn, err := GetConnection() - if err != nil { - return nil, err - } - return template.NewTemplateServiceClient(conn), nil -} - // TinkWorkflowClient creates a new workflow client. func TinkWorkflowClient() (workflow.WorkflowServiceClient, error) { conn, err := GetConnection() @@ -112,8 +84,6 @@ func TinkFullClient() (FullClient, error) { return FullClient{}, err } return FullClient{ - HardwareClient: hardware.NewHardwareServiceClient(conn), - TemplateClient: template.NewTemplateServiceClient(conn), WorkflowClient: workflow.NewWorkflowServiceClient(conn), }, nil } diff --git a/cmd/tink-cli/.gitignore b/cmd/tink-cli/.gitignore deleted file mode 100644 index 834cfc04a..000000000 --- a/cmd/tink-cli/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tink-cli -tink-cli-* diff --git a/cmd/tink-cli/Dockerfile b/cmd/tink-cli/Dockerfile deleted file mode 100644 index aa3c0f6e9..000000000 --- a/cmd/tink-cli/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM alpine:3.15 -CMD sleep infinity - -ARG TARGETARCH -ARG TARGETVARIANT - -RUN apk add --no-cache --update --upgrade bash ca-certificates -COPY tink-cli-linux-${TARGETARCH:-amd64}${TARGETVARIANT} /usr/bin/tink diff --git a/cmd/tink-cli/cmd/completion.go b/cmd/tink-cli/cmd/completion.go deleted file mode 100644 index 5e8356b7d..000000000 --- a/cmd/tink-cli/cmd/completion.go +++ /dev/null @@ -1,60 +0,0 @@ -package cmd - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" -) - -// completionCmd returns the completion command that, when run, generates a -// bash or zsh completion script for the CLI. -func completionCmd(_ string) *cobra.Command { - return &cobra.Command{ - Use: "completion [bash|zsh|fish|powershell]", - Short: "Generate completion script", - Long: `To load completions: - Bash: - $ source <(tink-cli completion bash) - Bash (3.2.x): - $ eval "$(tink-cli completion bash)" - # To load completions for each session, execute once: - Linux: - $ tink-cli completion bash > /etc/bash_completion.d/tink-cli - MacOS: - $ tink-cli completion bash > /usr/local/etc/bash_completion.d/tink-cli - Zsh: - $ source <(tink-cli completion zsh) - # To load completions for each session, execute once: - $ tink-cli completion zsh > "${fpath[1]}/_tink-cli" - Fish: - $ tink-cli completion fish | source - # To load completions for each session, execute once: - $ tink-cli completion fish > ~/.config/fish/completions/tink-cli.fish - `, - Hidden: true, - ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, - Args: cobra.ExactValidArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - switch args[0] { - case "bash": - return cmd.Root().GenBashCompletion(os.Stdout) - case "zsh": - return cmd.Root().GenZshCompletion(os.Stdout) - case "fish": - return cmd.Root().GenFishCompletion(os.Stdout, true) - case "powershell": - return cmd.Root().GenPowerShellCompletion(os.Stdout) - } - // ValidArgs make this error response dead-code - return fmt.Errorf("unknown shell: %q", args[0]) - }, - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - return nil - }, - } -} - -func init() { - rootCmd.AddCommand(completionCmd(rootCmd.CalledAs())) -} diff --git a/cmd/tink-cli/cmd/delete/delete.go b/cmd/tink-cli/cmd/delete/delete.go deleted file mode 100644 index aea616bab..000000000 --- a/cmd/tink-cli/cmd/delete/delete.go +++ /dev/null @@ -1,86 +0,0 @@ -package delete //nolint:predeclared // package name delete has same name as predeclared identifier - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type Options struct { - // DeleteByID is used to delete a resource - DeleteByID func(context.Context, *client.FullClient, string) (interface{}, error) -} - -const shortDescr = "delete one or more resources" - -const longDescr = `Deletes one or more resources and prints the status of -the deleted resource. - -# Delete template resource (success) -tink template delete 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 -Deleted 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 - -# Delete template resource (not found) -tink template delete 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 -Error 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 not found - -# Delete template resources (one not found) -tink template delete 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 e4115856-4358-429d-a8f6-9e1b7d794b72 -Deleted 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 -Error e4115856-4358-429d-a8f6-9e1b7d794b72 not found - -# Delete resources and extract resource ID with awk -tink template delete 8ae1cc24-6a9c-11eb-a0fc-0242ac120005 e4115856-4358-429d-a8f6-9e1b7d794b72 | awk {print $2} > result -cat result -8ae1cc24-6a9c-11eb-a0fc-0242ac120005 -e4115856-4358-429d-a8f6-9e1b7d794b72 -` - -const exampleDescr = `# Delete template resource -tink template delete [id] - -# Delete hardware resource -tink hardware delete [id] - -# Delete workflow resource -tink workflow delete [id] - -# Delete multiple workflow resources -tink workflow delete [id_1] [id_2] [id_3] -` - -func NewDeleteCommand(opt Options) *cobra.Command { - cmd := &cobra.Command{ - Use: "delete", - Short: shortDescr, - Long: longDescr, - Example: exampleDescr, - DisableFlagsInUseLine: true, - RunE: func(cmd *cobra.Command, args []string) error { - if opt.DeleteByID == nil { - return errors.New("option DeleteByID is not implemented for this resource yet. Please have a look at the issue in GitHub or open a new one") - } - - client := clientctx.Get(cmd.Context()) - for _, requestedID := range args { - _, err := opt.DeleteByID(cmd.Context(), client, requestedID) - if err != nil { - if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound { - fmt.Fprintf(cmd.ErrOrStderr(), "Error\t%s\tnot found\n", requestedID) - continue - } - return err - } - fmt.Fprintf(cmd.OutOrStdout(), "Deleted\t%s\n", requestedID) - } - return nil - }, - } - return cmd -} diff --git a/cmd/tink-cli/cmd/delete/delete_test.go b/cmd/tink-cli/cmd/delete/delete_test.go deleted file mode 100644 index ce11bbe2c..000000000 --- a/cmd/tink-cli/cmd/delete/delete_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package delete //nolint:predeclared // package name delete has same name as predeclared identifier - -import ( - "bytes" - "context" - "io" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func TestNewDeleteCommand(t *testing.T) { - table := []struct { - name string - expectedOutput string - args []string - opt Options - }{ - { - name: "happy-path", - expectedOutput: "Deleted\tbeeb5c79\n", - args: []string{"beeb5c79"}, - opt: Options{ - DeleteByID: func(c context.Context, fc *client.FullClient, s string) (interface{}, error) { - return struct{}{}, nil - }, - }, - }, - { - name: "happy-path-multiple-resources", - expectedOutput: "Deleted\tbeeb5c79\nDeleted\t14810952\nDeleted\te7a91fe9\n", - args: []string{"beeb5c79", "14810952", "e7a91fe9"}, - opt: Options{ - DeleteByID: func(c context.Context, fc *client.FullClient, s string) (interface{}, error) { - return struct{}{}, nil - }, - }, - }, - { - name: "resource-not-found", - expectedOutput: "Error\tbeeb5c79\tnot found\n", - args: []string{"beeb5c79"}, - opt: Options{ - DeleteByID: func(c context.Context, fc *client.FullClient, s string) (interface{}, error) { - return struct{}{}, status.Error(codes.NotFound, "") - }, - }, - }, - { - name: "multiple-resources-not-found", - expectedOutput: "Error\tbeeb5c79\tnot found\nError\t14810952\tnot found\n", - args: []string{"beeb5c79", "14810952"}, - opt: Options{ - DeleteByID: func(c context.Context, fc *client.FullClient, s string) (interface{}, error) { - return struct{}{}, status.Error(codes.NotFound, "") - }, - }, - }, - { - name: "only-one-resource-of-two-was-deleted", - expectedOutput: "Deleted\tbeeb5c79\nError\t14810952\tnot found\n", - args: []string{"beeb5c79", "14810952"}, - opt: Options{ - DeleteByID: func(c context.Context, fc *client.FullClient, s string) (interface{}, error) { - if s == "beeb5c79" { - return struct{}{}, nil - } - return struct{}{}, status.Error(codes.NotFound, "") - }, - }, - }, - } - - for _, test := range table { - t.Run(test.name, func(t *testing.T) { - stdout := bytes.NewBufferString("") - cmd := NewDeleteCommand(test.opt) - cmd.SetOut(stdout) - cmd.SetErr(stdout) - cmd.SetArgs(test.args) - err := cmd.ExecuteContext(clientctx.Set(context.Background(), &client.FullClient{})) - if err != nil { - t.Error(err) - } - out, err := io.ReadAll(stdout) - if err != nil { - t.Error(err) - } - if diff := cmp.Diff(string(out), test.expectedOutput); diff != "" { - t.Fatal(diff) - } - }) - } -} diff --git a/cmd/tink-cli/cmd/delete/doc.go b/cmd/tink-cli/cmd/delete/doc.go deleted file mode 100644 index 8a9006466..000000000 --- a/cmd/tink-cli/cmd/delete/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package delete provides a reusable implementation of the Delete command -// for the tink cli. The Delete command deletes resources. It is designed -// to be extendible and usable across resources. -package delete //nolint:predeclared // package name delete has same name as predeclared identifier diff --git a/cmd/tink-cli/cmd/docs.go b/cmd/tink-cli/cmd/docs.go deleted file mode 100644 index 0504396be..000000000 --- a/cmd/tink-cli/cmd/docs.go +++ /dev/null @@ -1,46 +0,0 @@ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" -) - -var docsPath string - -// docsCmd returns the generate command that, when run, generates -// documentation. -func docsCmd(name string) *cobra.Command { - cmd := &cobra.Command{ - Use: "docs [markdown|man]", - Short: "Generate documentation", - Hidden: true, - ValidArgs: []string{"markdown", "man"}, - Args: cobra.ExactValidArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - format := args[0] - - switch format { - case "markdown": - return doc.GenMarkdownTree(cmd.Parent(), docsPath) - case "man": - header := &doc.GenManHeader{Title: name} - return doc.GenManTree(cmd.Parent(), header, docsPath) - } - // ValidArgs make this error response dead-code - return fmt.Errorf("unknown format: %q", format) - }, - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - return nil - }, - } - cmd.Flags().StringVarP(&docsPath, "path", "p", "", "Path where documentation will be generated") - return cmd -} - -func init() { - docsCmd := docsCmd(rootCmd.CalledAs()) - - rootCmd.AddCommand(docsCmd) -} diff --git a/cmd/tink-cli/cmd/docs_test.go b/cmd/tink-cli/cmd/docs_test.go deleted file mode 100644 index c1ab826ed..000000000 --- a/cmd/tink-cli/cmd/docs_test.go +++ /dev/null @@ -1,150 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package cmd - -import ( - "bytes" - "os" - "path" - "strings" - "testing" - - "github.com/spf13/cobra" -) - -const ( - testCommand = "tink-cli" -) - -func Test_docsCmd(t *testing.T) { - subCommand := "docs" - type args struct { - name string - } - tests := []struct { - name string - args args - want *cobra.Command - cmdFunc func(*testing.T, *cobra.Command) - }{ - { - name: "NoArgs", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - root.SetArgs([]string{subCommand}) - if err := root.Execute(); err == nil { - t.Error("expected an error") - } - }, - }, - { - name: "Help", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "--help"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "markdown") { - t.Error("expected help to include markdown") - } - }, - }, - { - name: "Markdown", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - t.Helper() - - dir, err := os.MkdirTemp("", "tink-test-*") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) - - root := c.Root() - root.SetArgs([]string{subCommand, "markdown", "--path", dir}) - - if err := root.Execute(); err != nil { - t.Error(err) - } - - expectFile := testCommand + ".md" - _, err = os.Stat(path.Join(dir, expectFile)) - - if os.IsNotExist(err) { - t.Errorf("expected to create %s: %s", expectFile, err) - } - - if err != nil { - t.Error(err) - } - }, - }, - { - name: "Man", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - t.Helper() - - dir, err := os.MkdirTemp("", "tink-test-*") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) - - root := c.Root() - root.SetArgs([]string{subCommand, "man", "--path", dir}) - - if err := root.Execute(); err != nil { - t.Error(err) - } - - expectFile := testCommand + ".1" - _, err = os.Stat(path.Join(dir, expectFile)) - - if os.IsNotExist(err) { - t.Errorf("expected to create %s: %s", expectFile, err) - } - - if err != nil { - t.Error(err) - } - }, - }, - { - name: "BadFormat", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - t.Helper() - - root := c.Root() - root.SetArgs([]string{subCommand, "invalid"}) - if err := root.Execute(); err == nil { - t.Error("expected error") - } - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - rootCmd := &cobra.Command{ - Use: testCommand, - Run: func(_ *cobra.Command, _ []string) {}, - Version: "test", - } - cmd := docsCmd(tt.args.name) - rootCmd.AddCommand(cmd) - tt.cmdFunc(t, cmd) - }) - } -} diff --git a/cmd/tink-cli/cmd/get/doc.go b/cmd/tink-cli/cmd/get/doc.go deleted file mode 100644 index 452d92b1f..000000000 --- a/cmd/tink-cli/cmd/get/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// Get is a reusable implementation of the Get command for the tink cli. The -// Get command lists and filters resources. It supports different kind of -// visualisation and it is designed to be extendible and usable across -// resources. -package get diff --git a/cmd/tink-cli/cmd/get/get.go b/cmd/tink-cli/cmd/get/get.go deleted file mode 100644 index 0c4b8f7d5..000000000 --- a/cmd/tink-cli/cmd/get/get.go +++ /dev/null @@ -1,144 +0,0 @@ -package get - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/google/uuid" - "github.com/jedib0t/go-pretty/table" - "github.com/pkg/errors" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" -) - -type Options struct { - // Headers is the list of headers you want to print as part of the list - Headers []string - // RetrieveData reaches out to Tinkerbell and it gets the required data - RetrieveData func(context.Context, *client.FullClient) ([]interface{}, error) - // RetrieveByID is used when a get command has a list of arguments - RetrieveByID func(context.Context, *client.FullClient, string) (interface{}, error) - // RetrieveByName is used when a get command has a list of arguments - RetrieveByName func(context.Context, *client.FullClient, string) (interface{}, error) - // PopulateTable populates a table with the data retrieved with the RetrieveData function. - PopulateTable func([]interface{}, table.Writer) error - - // Format specifies the format you want the list of resources printed - // out. By default it is table but it can be JSON ar CSV. - Format string - // NoHeaders does not print the header line - NoHeaders bool -} - -const shortDescr = `display one or many resources` - -const longDescr = `Prints a table containing the most important information about a specific -resource. You can specify the kind of output you want to receive. It can be -table, csv or json. -` - -const exampleDescr = `# List all hardware in table output format. -tink hardware get - -# List all workflow in csv output format. -tink template get --format csv - -# List a single template in json output format. -tink workflow get --format json [id] -` - -func NewGetCommand(opt Options) *cobra.Command { - cmd := &cobra.Command{ - Use: "get", - Short: shortDescr, - Long: longDescr, - Example: exampleDescr, - DisableFlagsInUseLine: true, - RunE: func(cmd *cobra.Command, args []string) error { - var err error - var data []interface{} - - t := table.NewWriter() - t.SetOutputMirror(cmd.OutOrStdout()) - - client := clientctx.Get(cmd.Context()) - if len(args) != 0 { - data, err = retrieveMulti(cmd.Context(), opt, client, args) - } else { - if opt.RetrieveData == nil { - return errors.New("get-all-data is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one") - } - data, err = opt.RetrieveData(cmd.Context(), client) - } - if err != nil { - return err - } - - if !opt.NoHeaders { - header := table.Row{} - for _, h := range opt.Headers { - header = append(header, h) - } - t.AppendHeader(header) - } - - // TODO(gianarb): Technically this is not needed for - // all the output formats but for now that's fine - if err := opt.PopulateTable(data, t); err != nil { - return err - } - - switch opt.Format { - case "json": - // TODO(gianarb): the table library we use do - // not support JSON right now. I am not even - // sure I like tables! So complicated... - b, err := json.Marshal(struct { - Data interface{} `json:"data"` - }{Data: data}) - if err != nil { - return err - } - fmt.Fprint(cmd.OutOrStdout(), string(b)) - case "csv": - t.RenderCSV() - default: - t.Render() - } - return nil - }, - } - cmd.PersistentFlags().StringVarP(&opt.Format, "format", "", "table", "The format you expect the list to be printed out. Currently supported format are table, JSON and CSV") - cmd.PersistentFlags().BoolVar(&opt.NoHeaders, "no-headers", false, "Table contains an header with the columns' name. You can disable it from being printed out") - return cmd -} - -func retrieveMulti(ctx context.Context, opt Options, fc *client.FullClient, args []string) ([]interface{}, error) { - var data []interface{} - for _, arg := range args { - var retriever func(context.Context, *client.FullClient, string) (interface{}, error) - if _, err := uuid.Parse(arg); err != nil { - // arg is invalid UUID, search for arg in `name` field of db - if opt.RetrieveByName == nil { - return nil, errors.New("get by Name is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one") - } - retriever = opt.RetrieveByName - } else { - // arg is a valid UUID, search for arg in `id` field of db - if opt.RetrieveByID == nil { - return nil, errors.New("get by ID is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one") - } - retriever = opt.RetrieveByID - } - - s, err := retriever(ctx, fc, arg) - if err != nil { - continue - } - data = append(data, s) - } - - return data, nil -} diff --git a/cmd/tink-cli/cmd/get/get_test.go b/cmd/tink-cli/cmd/get/get_test.go deleted file mode 100644 index 6448a8991..000000000 --- a/cmd/tink-cli/cmd/get/get_test.go +++ /dev/null @@ -1,248 +0,0 @@ -package get - -import ( - "bytes" - "context" - "fmt" - "io" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/jedib0t/go-pretty/table" - "github.com/pkg/errors" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" -) - -func TestNewGetCommand(t *testing.T) { - tests := []struct { - Name string - ExpectStdout string - ExpectError error - Args []string - Opt Options - Skip string - Run func(t *testing.T, cmd *cobra.Command, stdout, stderr io.Reader) - }{ - { - Name: "happy-path", - ExpectStdout: `+------+-------+ -| NAME | ID | -+------+-------+ -| 10 | hello | -+------+-------+ -`, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveData: func(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - data := []interface{}{ - []string{"10", "hello"}, - } - return data, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "get-by-id", - Args: []string{"e0ffbf50-ae7c-4c92-bc7f-34e0de25a989"}, - ExpectStdout: `+-------+--------------------------------------+ -| NAME | ID | -+-------+--------------------------------------+ -| hello | e0ffbf50-ae7c-4c92-bc7f-34e0de25a989 | -+-------+--------------------------------------+ -`, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveByID: func(ctx context.Context, cl *client.FullClient, arg string) (interface{}, error) { - if arg != "e0ffbf50-ae7c-4c92-bc7f-34e0de25a989" { - t.Errorf("expected e0ffbf50-ae7c-4c92-bc7f-34e0de25a989 as arg got %s", arg) - } - return []string{"hello", "e0ffbf50-ae7c-4c92-bc7f-34e0de25a989"}, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "get-by-id but no retriever", - Args: []string{"e0ffbf50-ae7c-4c92-bc7f-34e0de25a989"}, - ExpectError: errors.New("get by ID is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one"), - }, - { - Name: "get-by-name", - Args: []string{"hello"}, - ExpectStdout: `+-------+--------------------------------------+ -| NAME | ID | -+-------+--------------------------------------+ -| hello | e0ffbf50-ae7c-4c92-bc7f-34e0de25a989 | -+-------+--------------------------------------+ -`, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveByName: func(ctx context.Context, cl *client.FullClient, arg string) (interface{}, error) { - if arg != "hello" { - t.Errorf("expected hello as arg got %s", arg) - } - return []string{"hello", "e0ffbf50-ae7c-4c92-bc7f-34e0de25a989"}, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "get-by-name but no retriever", - Args: []string{"hello"}, - ExpectError: errors.New("get by Name is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one"), - }, - { - Name: "happy-path-no-headers", - ExpectStdout: `+----+-------+ -| 10 | hello | -+----+-------+ -`, - Args: []string{"--no-headers"}, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveData: func(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - data := []interface{}{ - []string{"10", "hello"}, - } - return data, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "happy-path-json", - ExpectStdout: `{"data":[["10","hello"]]}`, - Args: []string{"--format", "json"}, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveData: func(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - data := []interface{}{ - []string{"10", "hello"}, - } - return data, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "happy-path-json-no-headers", - Skip: "The JSON format is rusty and custom because the table library we use does not support JSON right now. This feature is not implemented.", - }, - { - Name: "happy-path-csv-no-headers", - ExpectStdout: `10,hello -`, - Args: []string{"--format", "csv", "--no-headers"}, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveData: func(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - data := []interface{}{ - []string{"10", "hello"}, - } - return data, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "happy-path-csv", - ExpectStdout: `name,id -10,hello -`, - Args: []string{"--format", "csv"}, - Opt: Options{ - Headers: []string{"name", "id"}, - RetrieveData: func(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - data := []interface{}{ - []string{"10", "hello"}, - } - return data, nil - }, - PopulateTable: func(data []interface{}, w table.Writer) error { - for _, v := range data { - if vv, ok := v.([]string); ok { - w.AppendRow(table.Row{vv[0], vv[1]}) - } - } - return nil - }, - }, - }, - { - Name: "no opts", - ExpectError: errors.New("get-all-data is not implemented for this resource yet, please have a look at the issue in GitHub or open a new one"), - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - if s.Skip != "" { - t.Skip(s.Skip) - } - stdout := &bytes.Buffer{} - cmd := NewGetCommand(s.Opt) - cmd.SilenceErrors = true - cmd.SetOut(stdout) - cmd.SetArgs(s.Args) - err := cmd.ExecuteContext(clientctx.Set(context.Background(), &client.FullClient{})) - if fmt.Sprint(err) != fmt.Sprint(s.ExpectError) { - t.Errorf("unexpected error: want=%v, got=%v", s.ExpectError, err) - } - out, err := io.ReadAll(stdout) - if err != nil { - t.Error(err) - } - if s.ExpectError != nil { - s.ExpectStdout = cmd.UsageString() + "\n" - } - if diff := cmp.Diff(string(out), s.ExpectStdout); diff != "" { - t.Fatal(diff) - } - }) - } -} diff --git a/cmd/tink-cli/cmd/hardware.go b/cmd/tink-cli/cmd/hardware.go deleted file mode 100644 index 86459c75d..000000000 --- a/cmd/tink-cli/cmd/hardware.go +++ /dev/null @@ -1,34 +0,0 @@ -package cmd - -import ( - "fmt" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/hardware" -) - -func NewHardwareCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "hardware", - Short: "tink hardware client", - Example: "tink hardware [command]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires arguments", c.UseLine()) - } - return nil - }, - } - - cmd.AddCommand(get.NewGetCommand(hardware.NewGetOptions())) - cmd.AddCommand(delete.NewDeleteCommand(hardware.NewDeleteOptions())) - cmd.AddCommand(hardware.NewGetByIDCmd()) - cmd.AddCommand(hardware.NewGetByIPCmd()) - cmd.AddCommand(hardware.NewListCmd()) - cmd.AddCommand(hardware.NewGetByMACCmd()) - cmd.AddCommand(hardware.NewPushCmd()) - - return cmd -} diff --git a/cmd/tink-cli/cmd/hardware/commands.go b/cmd/tink-cli/cmd/hardware/commands.go deleted file mode 100644 index 5d8f3101a..000000000 --- a/cmd/tink-cli/cmd/hardware/commands.go +++ /dev/null @@ -1,54 +0,0 @@ -package hardware - -import ( - "encoding/json" - "fmt" - "log" - "os" - - "github.com/google/uuid" - "github.com/jedib0t/go-pretty/table" - "github.com/pkg/errors" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/pkg" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -// SubCommands holds the sub commands for template command -// Example: tinkerbell template [subcommand]. -var SubCommands []*cobra.Command - -func verifyUUIDs(args []string) error { - if len(args) < 1 { - return errors.New("requires at least one id") - } - for _, arg := range args { - if _, err := uuid.Parse(arg); err != nil { - return fmt.Errorf("invalid uuid: %s", arg) - } - } - return nil -} - -func printOutput(data bool, hw *hwpb.Hardware, input string) { - t := table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{"Field Name", "Value"}) - if !data { - for _, iface := range hw.GetNetwork().GetInterfaces() { - if iface.Dhcp.Ip.Address == input || iface.Dhcp.Mac == input { - t.AppendRow(table.Row{"ID", hw.Id}) - t.AppendRow(table.Row{"MAC Address", iface.Dhcp.Mac}) - t.AppendRow(table.Row{"IP Address", iface.Dhcp.Ip.Address}) - t.AppendRow(table.Row{"Hostname", iface.Dhcp.Hostname}) - } - } - t.Render() - } else { - hwData, err := json.Marshal(pkg.HardwareWrapper{Hardware: hw}) - if err != nil { - log.Fatal("Failed to marshal hardware data: ", err) - } - log.Println(string(hwData)) - } -} diff --git a/cmd/tink-cli/cmd/hardware/delete.go b/cmd/tink-cli/cmd/hardware/delete.go deleted file mode 100644 index 083b63049..000000000 --- a/cmd/tink-cli/cmd/hardware/delete.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2018 packet.net - -package hardware - -import ( - "context" - - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -type deleteHardware struct { - delete.Options -} - -func (h *deleteHardware) DeleteByID(ctx context.Context, cl *client.FullClient, requestedID string) (interface{}, error) { - return cl.HardwareClient.Delete(ctx, &hwpb.DeleteRequest{Id: requestedID}) -} - -func NewDeleteOptions() delete.Options { - h := deleteHardware{} - return delete.Options{ - DeleteByID: h.DeleteByID, - } -} diff --git a/cmd/tink-cli/cmd/hardware/get.go b/cmd/tink-cli/cmd/hardware/get.go deleted file mode 100644 index c3db3b24e..000000000 --- a/cmd/tink-cli/cmd/hardware/get.go +++ /dev/null @@ -1,67 +0,0 @@ -package hardware - -import ( - "context" - "errors" - "io" - - "github.com/jedib0t/go-pretty/table" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -type getHardware struct { - get.Options -} - -func NewGetOptions() get.Options { - gh := getHardware{} - opt := get.Options{ - Headers: []string{"ID", "MAC Address", "IP address", "Hostname"}, - PopulateTable: gh.PopulateTable, - RetrieveData: gh.RetrieveData, - RetrieveByID: gh.RetrieveByID, - } - return opt -} - -func (h *getHardware) RetrieveByID(ctx context.Context, cl *client.FullClient, requiredID string) (interface{}, error) { - return cl.HardwareClient.ByID(ctx, &hwpb.GetRequest{Id: requiredID}) -} - -func (h *getHardware) RetrieveData(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - list, err := cl.HardwareClient.All(ctx, &hwpb.Empty{}) - if err != nil { - return nil, err - } - data := []interface{}{} - var hw *hwpb.Hardware - for hw, err = list.Recv(); err == nil && hw != nil; hw, err = list.Recv() { - data = append(data, hw) - } - if err != nil && !errors.Is(err, io.EOF) { - return nil, err - } - return data, nil -} - -func (h *getHardware) PopulateTable(data []interface{}, t table.Writer) error { - for _, v := range data { - if hw, ok := v.(*hwpb.Hardware); ok { - // TODO(gianarb): I think we should - // print it better. The hardware is one - // even if if has more than one - // interface. - for _, iface := range hw.GetNetwork().GetInterfaces() { - t.AppendRow(table.Row{ - hw.Id, - iface.Dhcp.Mac, - iface.Dhcp.Ip.Address, - iface.Dhcp.Hostname, - }) - } - } - } - return nil -} diff --git a/cmd/tink-cli/cmd/hardware/get_test.go b/cmd/tink-cli/cmd/hardware/get_test.go deleted file mode 100644 index 3947eb425..000000000 --- a/cmd/tink-cli/cmd/hardware/get_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package hardware - -import ( - "bytes" - "context" - "io" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" - hardware_proto "github.com/tinkerbell/tink/protos/hardware" - "google.golang.org/grpc" -) - -func TestGetHardware(t *testing.T) { - table := []struct { - counter int - Name string - ReturnedHardwares []*hardware_proto.Hardware - Args []string - ExpectedStdout string - }{ - { - Name: "happy-path", - ReturnedHardwares: []*hardware_proto.Hardware{ - { - Network: &hardware_proto.Hardware_Network{ - Interfaces: []*hardware_proto.Hardware_Network_Interface{ - { - Dhcp: &hardware_proto.Hardware_DHCP{ - Mac: "cb:26:ad:28:5a:72", - Ip: &hardware_proto.Hardware_DHCP_IP{ - Address: "192.168.12.12", - }, - Hostname: "unittest-golang", - }, - }, - }, - }, - Id: "1234-test", - }, - }, - ExpectedStdout: `+-----------+-------------------+---------------+-----------------+ -| ID | MAC ADDRESS | IP ADDRESS | HOSTNAME | -+-----------+-------------------+---------------+-----------------+ -| 1234-test | cb:26:ad:28:5a:72 | 192.168.12.12 | unittest-golang | -+-----------+-------------------+---------------+-----------------+ -`, - }, - { - Name: "get-json", - Args: []string{"--format", "json"}, - ReturnedHardwares: []*hardware_proto.Hardware{ - { - Network: &hardware_proto.Hardware_Network{ - Interfaces: []*hardware_proto.Hardware_Network_Interface{ - { - Dhcp: &hardware_proto.Hardware_DHCP{ - Mac: "cb:26:ad:28:5a:72", - Ip: &hardware_proto.Hardware_DHCP_IP{ - Address: "192.168.12.12", - }, - Hostname: "unittest-golang", - }, - }, - }, - }, - Id: "1234-test", - }, - }, - ExpectedStdout: `{"data":[{"network":{"interfaces":[{"dhcp":{"mac":"cb:26:ad:28:5a:72","hostname":"unittest-golang","ip":{"address":"192.168.12.12"}}}]},"id":"1234-test"}]}`, - }, - } - - for _, s := range table { - t.Run(s.Name, func(t *testing.T) { - cl := &client.FullClient{ - HardwareClient: &hardware_proto.HardwareServiceClientMock{ - AllFunc: func(ctx context.Context, in *hardware_proto.Empty, opts ...grpc.CallOption) (hardware_proto.HardwareService_AllClient, error) { - return &hardware_proto.HardwareService_AllClientMock{ - RecvFunc: func() (*hardware_proto.Hardware, error) { - s.counter++ - if s.counter > len(s.ReturnedHardwares) { - return nil, io.EOF - } - return s.ReturnedHardwares[s.counter-1], nil - }, - }, nil - }, - }, - } - stdout := bytes.NewBufferString("") - g := NewGetOptions() - cmd := get.NewGetCommand(g) - cmd.SetOut(stdout) - cmd.SetArgs(s.Args) - err := cmd.ExecuteContext(clientctx.Set(context.Background(), cl)) - if err != nil { - t.Error(err) - } - out, err := io.ReadAll(stdout) - if err != nil { - t.Error(err) - } - if diff := cmp.Diff(string(out), s.ExpectedStdout); diff != "" { - t.Error(diff) - } - }) - } -} diff --git a/cmd/tink-cli/cmd/hardware/id.go b/cmd/tink-cli/cmd/hardware/id.go deleted file mode 100644 index b84a7ca9d..000000000 --- a/cmd/tink-cli/cmd/hardware/id.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright © 2018 packet.net - -package hardware - -import ( - "context" - "encoding/json" - "fmt" - "log" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/pkg" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -// idCmd represents the id command. -func NewGetByIDCmd() *cobra.Command { - return &cobra.Command{ - Use: "id", - Short: "get hardware by id", - Example: "tink hardware id 224ee6ab-ad62-4070-a900-ed816444cec0 cb76ae54-93e9-401c-a5b2-d455bb3800b1", - Args: func(_ *cobra.Command, args []string) error { - return verifyUUIDs(args) - }, - Run: func(cmd *cobra.Command, args []string) { - for _, id := range args { - hw, err := client.HardwareClient.ByID(context.Background(), &hwpb.GetRequest{Id: id}) - if err != nil { - log.Fatal(err) - } - b, err := json.Marshal(pkg.HardwareWrapper{Hardware: hw}) - if err != nil { - log.Fatal(err) - } - fmt.Println(string(b)) - } - }, - } -} diff --git a/cmd/tink-cli/cmd/hardware/ip.go b/cmd/tink-cli/cmd/hardware/ip.go deleted file mode 100644 index 8ba480ecc..000000000 --- a/cmd/tink-cli/cmd/hardware/ip.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2018 packet.net - -package hardware - -import ( - "context" - "fmt" - "log" - "net" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -var data bool - -// ipCmd represents the ip command. -func NewGetByIPCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "ip", - Short: "get hardware by any associated ip", - Example: "tink hardware ip 10.0.0.2 10.0.0.3", - Args: func(_ *cobra.Command, args []string) error { - for _, arg := range args { - if net.ParseIP(arg) == nil { - return fmt.Errorf("invalid ip: %s", arg) - } - } - return nil - }, - Run: func(cmd *cobra.Command, args []string) { - for _, ip := range args { - hw, err := client.HardwareClient.ByIP(context.Background(), &hwpb.GetRequest{Ip: ip}) - if err != nil { - log.Fatal(err) - } - if hw.GetId() == "" { - log.Fatal("IP address not found in the database ", ip) - } - printOutput(data, hw, ip) - } - }, - } - flags := cmd.Flags() - flags.BoolVarP(&data, "details", "d", false, "provide the complete hardware details in json format") - return cmd -} diff --git a/cmd/tink-cli/cmd/hardware/list.go b/cmd/tink-cli/cmd/hardware/list.go deleted file mode 100644 index 0fca67c1f..000000000 --- a/cmd/tink-cli/cmd/hardware/list.go +++ /dev/null @@ -1,62 +0,0 @@ -package hardware - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "os" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -var ( - quiet bool - t table.Writer -) - -func NewListCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "list", - Short: "list all known hardware", - Run: func(cmd *cobra.Command, args []string) { - if quiet { - listHardware() - return - } - t = table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{"ID", "MAC Address", "IP address", "Hostname"}) - listHardware() - t.Render() - }, - } - flags := cmd.Flags() - flags.BoolVarP(&quiet, "quiet", "q", false, "only display hardware IDs") - return cmd -} - -func listHardware() { - list, err := client.HardwareClient.All(context.Background(), &hwpb.Empty{}) - if err != nil { - log.Fatal(err) - } - - var hw *hwpb.Hardware - for hw, err = list.Recv(); err == nil && hw != nil; hw, err = list.Recv() { - for _, iface := range hw.GetNetwork().GetInterfaces() { - if quiet { - fmt.Println(hw.Id) - } else { - t.AppendRow(table.Row{hw.Id, iface.Dhcp.Mac, iface.Dhcp.Ip.Address, iface.Dhcp.Hostname}) - } - } - } - if err != nil && !errors.Is(err, io.EOF) { - log.Fatal(err) - } -} diff --git a/cmd/tink-cli/cmd/hardware/mac.go b/cmd/tink-cli/cmd/hardware/mac.go deleted file mode 100644 index 00a49663f..000000000 --- a/cmd/tink-cli/cmd/hardware/mac.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright © 2018 packet.net - -package hardware - -import ( - "context" - "fmt" - "log" - "net" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -func NewGetByMACCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "mac", - Short: "get hardware by any associated mac", - Example: "tink hardware mac 00:00:00:00:00:01 00:00:00:00:00:02", - Args: func(_ *cobra.Command, args []string) error { - for _, arg := range args { - if _, err := net.ParseMAC(arg); err != nil { - return fmt.Errorf("invalid mac: %s", arg) - } - } - return nil - }, - Run: func(cmd *cobra.Command, args []string) { - for _, mac := range args { - hw, err := client.HardwareClient.ByMAC(context.Background(), &hwpb.GetRequest{Mac: mac}) - if err != nil { - log.Fatal(err) - } - if hw.GetId() == "" { - log.Fatal("MAC address not found in the database ", mac) - } - printOutput(data, hw, mac) - } - }, - } - flags := cmd.Flags() - flags.BoolVarP(&data, "details", "d", false, "provide the complete hardware details in json format") - return cmd -} diff --git a/cmd/tink-cli/cmd/hardware/push.go b/cmd/tink-cli/cmd/hardware/push.go deleted file mode 100644 index bb94ebefb..000000000 --- a/cmd/tink-cli/cmd/hardware/push.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright © 2018 packet.net - -package hardware - -import ( - "context" - "encoding/json" - "fmt" - "io" - "log" - "os" - "path/filepath" - "strings" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/pkg" - hwpb "github.com/tinkerbell/tink/protos/hardware" -) - -var ( - file string - sFile = "file" -) - -// pushCmd represents the push command. -func NewPushCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "push", - Short: "push new hardware to tink", - Example: `cat /tmp/data.json | tink hardware push -tink hardware push --file /tmp/data.json`, - PreRunE: func(c *cobra.Command, args []string) error { - if !isInputFromPipe() { - path, _ := c.Flags().GetString(sFile) - if path == "" { - return fmt.Errorf("either pipe the data or provide the required '--file' flag") - } - } - return nil - }, - Run: func(cmd *cobra.Command, args []string) { - var data string - var err error - - if isInputFromPipe() { - data = readDataFromStdin() - } else { - data, err = readDataFromFile() - if err != nil { - log.Fatalf("read data from file failed: %v", err) - } - } - s := struct { - ID string - }{} - if json.NewDecoder(strings.NewReader(data)).Decode(&s) != nil { - log.Fatalf("invalid json: %s", data) - } else if s.ID == "" { - log.Fatalf("invalid json, ID is required: %s", data) - } - - var hw pkg.HardwareWrapper - err = json.Unmarshal([]byte(data), &hw) - if err != nil { - log.Fatal(err) - } - if _, err := client.HardwareClient.Push(context.Background(), &hwpb.PushRequest{Data: hw.Hardware}); err != nil { - log.Fatal(err) - } - log.Println("Hardware data pushed successfully") - }, - } - flags := cmd.PersistentFlags() - flags.StringVarP(&file, "file", "", "", "hardware data file") - return cmd -} - -func isInputFromPipe() bool { - fileInfo, _ := os.Stdin.Stat() - return fileInfo.Mode()&os.ModeCharDevice == 0 -} - -func readDataFromStdin() string { - data, err := io.ReadAll(os.Stdin) - if err != nil { - return "" - } - return string(data) -} - -func readDataFromFile() (string, error) { - f, err := os.Open(filepath.Clean(file)) - if err != nil { - return "", err - } - defer f.Close() - - data, err := io.ReadAll(f) - if err != nil { - return "", err - } - return string(data), nil -} diff --git a/cmd/tink-cli/cmd/hardware_test.go b/cmd/tink-cli/cmd/hardware_test.go deleted file mode 100644 index b4db321d2..000000000 --- a/cmd/tink-cli/cmd/hardware_test.go +++ /dev/null @@ -1,154 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package cmd - -import ( - "bytes" - "fmt" - "strings" - "testing" - - "github.com/spf13/cobra" -) - -func Test_NewHardwareCommand(t *testing.T) { - subCommand := "hardware" - type args struct { - name string - } - tests := []struct { - name string - args args - want *cobra.Command - cmdFunc func(*testing.T, *cobra.Command) - }{ - { - name: "NoArgs", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - t.Helper() - root := c.Root() - root.SetArgs([]string{subCommand}) - if err := root.Execute(); err != nil { - t.Logf("%+v", root.Args) - t.Error("expected an error") - } - }, - }, - { - name: "ID", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "id", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get hardware by id") { - t.Error("expected output should include get hardware by id") - } - }, - }, - { - name: "List", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "list", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "list all known hardware") { - t.Error("expected output should include list all known hardware") - } - }, - }, - { - name: "IP", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "ip", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get hardware by any associated ip") { - t.Error("expected output should include get hardware by any associated ip") - } - }, - }, - { - name: "MAC", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "mac", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get hardware by any associated mac") { - t.Error("expected output should include get hardware by any associated mac") - } - }, - }, - { - name: "Delete", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "delete", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "Deletes one or more resources" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - { - name: "Push", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "push", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "push new hardware to tink") { - t.Error("expected output should include push new hardware to tink") - } - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - rootCmd := &cobra.Command{ - Use: testCommand, - Run: func(_ *cobra.Command, _ []string) {}, - Version: "test", - } - rootCmd.AddCommand(NewHardwareCommand()) - tt.cmdFunc(t, rootCmd) - }) - } -} diff --git a/cmd/tink-cli/cmd/internal/clientctx/key.go b/cmd/tink-cli/cmd/internal/clientctx/key.go deleted file mode 100644 index 559e2d41e..000000000 --- a/cmd/tink-cli/cmd/internal/clientctx/key.go +++ /dev/null @@ -1,21 +0,0 @@ -package clientctx - -import ( - "context" - - "github.com/tinkerbell/tink/client" -) - -type key struct{} - -func Set(ctx context.Context, c *client.FullClient) context.Context { - return context.WithValue(ctx, key{}, c) -} - -func Get(ctx context.Context) *client.FullClient { - c, ok := ctx.Value(key{}).(*client.FullClient) - if !ok { - return nil - } - return c -} diff --git a/cmd/tink-cli/cmd/root.go b/cmd/tink-cli/cmd/root.go deleted file mode 100644 index fb4f5626b..000000000 --- a/cmd/tink-cli/cmd/root.go +++ /dev/null @@ -1,94 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - "os" - "strings" - - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "github.com/spf13/viper" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" - "github.com/tinkerbell/tink/protos/hardware" - "github.com/tinkerbell/tink/protos/template" - "github.com/tinkerbell/tink/protos/workflow" -) - -// rootCmd represents the base command when called without any subcommands. -var rootCmd = &cobra.Command{ - Use: "tink", - Short: "tinkerbell CLI", - DisableAutoGenTag: true, - PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { - // we have to connect to tink server here and not any earlier because cobra - // would not have run yet and thus hasn't parsed the cli flags which would - // override env or config file - conn, err := client.NewClientConn( - viper.GetString("tinkerbell-grpc-authority"), - viper.GetBool("tinkerbell-tls"), - ) - if err != nil { - return err - } - client.HardwareClient = hardware.NewHardwareServiceClient(conn) - client.TemplateClient = template.NewTemplateServiceClient(conn) - client.WorkflowClient = workflow.NewWorkflowServiceClient(conn) - fullClient = client.FullClient{ - HardwareClient: client.HardwareClient, - TemplateClient: client.TemplateClient, - WorkflowClient: client.WorkflowClient, - } - - return nil - }, -} - -// gets passed into to subcommands as a pointer in the context.Context. -var fullClient = client.FullClient{} - -// Execute adds all child commands to the root command and sets flags appropriately. -// This is called by main.main(). It only needs to happen once to the rootCmd. -func Execute(version string) error { - must := func(err error) { - if err != nil { - fmt.Fprintf(os.Stderr, "failed to mark flag required: %+v\n", err) - os.Exit(1) - } - } - - rootCmd.Version = version - rootCmd.AddCommand(NewHardwareCommand()) - rootCmd.AddCommand(NewTemplateCommand()) - rootCmd.AddCommand(NewWorkflowCommand()) - - rootCmd.PersistentFlags().StringP("facility", "f", "", "used to build grpc and http urls") - rootCmd.PersistentFlags().Bool("tinkerbell-tls", true, "Connect to server via TLS or not") - - rootCmd.PersistentFlags().String("tinkerbell-grpc-authority", "", "Connection info for tink-server (TINKERBELL_GRPC_AUTHORITY)") - must(rootCmd.MarkPersistentFlagRequired("tinkerbell-grpc-authority")) - - // Both AutomaticEnv and SetEnvKeyReplacer need to be called/setup before the VisitAll command that follows, otherwise env vars don't count - viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) - viper.AutomaticEnv() - - // This effectively "touches" the pflags that are marked as required if viper thinks the flag has been set - // This way ENV vars or values from config files can be seen as setting the required flag - // Really all this does is unset the required bit for any flags that have been set, therefore they are no longer required - rootCmd.PersistentFlags().VisitAll(func(f *pflag.Flag) { - if viper.IsSet(f.Name) { - // setting BashCompOneRequiredFlag is the opposite of MarkFlagRequired - _ = rootCmd.PersistentFlags().SetAnnotation(f.Name, cobra.BashCompOneRequiredFlag, []string{"false"}) - } - }) - - _ = viper.BindPFlags(rootCmd.PersistentFlags()) - - if err := viper.ReadInConfig(); err == nil { - fmt.Println("Using config file:", viper.ConfigFileUsed()) - } - - ctx := clientctx.Set(context.Background(), &fullClient) - return rootCmd.ExecuteContext(ctx) -} diff --git a/cmd/tink-cli/cmd/template.go b/cmd/tink-cli/cmd/template.go deleted file mode 100644 index 7f1a0f934..000000000 --- a/cmd/tink-cli/cmd/template.go +++ /dev/null @@ -1,39 +0,0 @@ -package cmd - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/template" -) - -func NewTemplateCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "template", - Short: "tink template client", - Example: "tink template [command]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires arguments", c.UseLine()) - } - return nil - }, - } - - cmd.AddCommand(template.NewCreateCommand()) - cmd.AddCommand(delete.NewDeleteCommand(template.NewDeleteOptions())) - cmd.AddCommand(template.NewListCommand()) - cmd.AddCommand(template.NewUpdateCommand()) - - // If the variable TINK_CLI_VERSION is set to 0.0.0 use the old get command. - // This is a way to keep retro-compatibility with the old get command. - getCmd := template.GetCmd - if v := os.Getenv("TINK_CLI_VERSION"); v != "0.0.0" { - getCmd = get.NewGetCommand(template.NewGetOptions()) - } - cmd.AddCommand(getCmd) - return cmd -} diff --git a/cmd/tink-cli/cmd/template/create.go b/cmd/tink-cli/cmd/template/create.go deleted file mode 100644 index 91a4ce177..000000000 --- a/cmd/tink-cli/cmd/template/create.go +++ /dev/null @@ -1,85 +0,0 @@ -//nolint:import-shadowing // The name 'template' shadows an import name -package template - -import ( - "context" - "fmt" - "io" - "log" - "os" - "path/filepath" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/template" - "github.com/tinkerbell/tink/workflow" -) - -var filePath string - -func NewCreateCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "create", - Short: "create a workflow template ", - Long: `The create command allows you create workflow templates: -# Pipe the file to create a template: -$ cat /tmp/example.tmpl | tink template create -# Create template using the --file flag: -$ tink template create --file /tmp/example.tmpl -`, - PreRunE: func(c *cobra.Command, args []string) error { - if !isInputFromPipe() { - if filePath == "" { - return fmt.Errorf("%v requires the '--file' flag", c.UseLine()) - } - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - var reader io.Reader - if isInputFromPipe() { - reader = os.Stdin - } else { - f, err := os.Open(filepath.Clean(filePath)) - if err != nil { - log.Fatal(err) - } - reader = f - } - - data := readAll(reader) - if data != nil { - wf, err := workflow.Parse(data) - if err != nil { - log.Fatal(err) - } - createTemplate(wf.Name, data) - } - }, - } - flags := cmd.PersistentFlags() - flags.StringVar(&filePath, "file", "./template.yaml", "path to the template file") - return cmd -} - -func readAll(reader io.Reader) []byte { - data, err := io.ReadAll(reader) - if err != nil { - log.Fatal(err) - } - return data -} - -func createTemplate(name string, data []byte) { - req := template.WorkflowTemplate{Name: name, Data: string(data)} - res, err := client.TemplateClient.CreateTemplate(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - fmt.Println("Created Template: ", res.Id) -} - -func isInputFromPipe() bool { - fileInfo, _ := os.Stdin.Stat() - return fileInfo.Mode()&os.ModeCharDevice == 0 -} diff --git a/cmd/tink-cli/cmd/template/delete.go b/cmd/tink-cli/cmd/template/delete.go deleted file mode 100644 index d63820c78..000000000 --- a/cmd/tink-cli/cmd/template/delete.go +++ /dev/null @@ -1,28 +0,0 @@ -package template - -import ( - "context" - - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - "github.com/tinkerbell/tink/protos/template" -) - -type deleteTemplate struct { - delete.Options -} - -func (d *deleteTemplate) DeleteByID(ctx context.Context, cl *client.FullClient, requestedID string) (interface{}, error) { - return cl.TemplateClient.DeleteTemplate(ctx, &template.GetRequest{ - GetBy: &template.GetRequest_Id{ - Id: requestedID, - }, - }) -} - -func NewDeleteOptions() delete.Options { - t := deleteTemplate{} - return delete.Options{ - DeleteByID: t.DeleteByID, - } -} diff --git a/cmd/tink-cli/cmd/template/get.go b/cmd/tink-cli/cmd/template/get.go deleted file mode 100644 index 99f5da295..000000000 --- a/cmd/tink-cli/cmd/template/get.go +++ /dev/null @@ -1,114 +0,0 @@ -package template - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "time" - - "github.com/google/uuid" - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/protos/template" -) - -// GetCmd represents the get subcommand for template command. -var GetCmd = &cobra.Command{ - Use: "get [id]", - Short: "get a template", - Example: "tink template get [id]", - DisableFlagsInUseLine: true, - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires an argument", c.UseLine()) - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - for _, arg := range args { - req := template.GetRequest{} - // Parse arg[0] to see if it is a UUID - if _, err := uuid.Parse(arg); err == nil { - // UUID - req.GetBy = &template.GetRequest_Id{Id: arg} - } else { - // String (Name) - req.GetBy = &template.GetRequest_Name{Name: arg} - } - t, err := client.TemplateClient.GetTemplate(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - fmt.Println(t.Data) - } - }, -} - -type getTemplate struct { - get.Options -} - -func (h *getTemplate) RetrieveByID(ctx context.Context, cl *client.FullClient, requestedID string) (interface{}, error) { - return cl.TemplateClient.GetTemplate(ctx, &template.GetRequest{ - GetBy: &template.GetRequest_Id{ - Id: requestedID, - }, - }) -} - -func (h *getTemplate) RetrieveByName(_ context.Context, cl *client.FullClient, requestName string) (interface{}, error) { - return cl.TemplateClient.GetTemplate(context.Background(), &template.GetRequest{ - GetBy: &template.GetRequest_Name{ - Name: requestName, - }, - }) -} - -func (h *getTemplate) RetrieveData(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - list, err := cl.TemplateClient.ListTemplates(ctx, &template.ListRequest{ - FilterBy: &template.ListRequest_Name{ - Name: "*", - }, - }) - if err != nil { - return nil, err - } - - data := []interface{}{} - var tmp *template.WorkflowTemplate - for tmp, err = list.Recv(); err == nil && tmp.Name != ""; tmp, err = list.Recv() { - data = append(data, tmp) - } - if err != nil && !errors.Is(err, io.EOF) { - return nil, err - } - return data, nil -} - -func (h *getTemplate) PopulateTable(data []interface{}, t table.Writer) error { - for _, v := range data { - if tmp, ok := v.(*template.WorkflowTemplate); ok { - t.AppendRow(table.Row{ - tmp.Id, tmp.Name, - tmp.CreatedAt.AsTime().Format(time.RFC3339), - tmp.UpdatedAt.AsTime().Format(time.RFC3339), - }) - } - } - return nil -} - -func NewGetOptions() get.Options { - h := getTemplate{} - return get.Options{ - Headers: []string{"ID", "Name", "Created At", "Updated At"}, - RetrieveByID: h.RetrieveByID, - RetrieveByName: h.RetrieveByName, - RetrieveData: h.RetrieveData, - PopulateTable: h.PopulateTable, - } -} diff --git a/cmd/tink-cli/cmd/template/get_test.go b/cmd/tink-cli/cmd/template/get_test.go deleted file mode 100644 index b3ccf0a8f..000000000 --- a/cmd/tink-cli/cmd/template/get_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package template - -import ( - "bytes" - "context" - "io" - "testing" - "time" - - "github.com/google/go-cmp/cmp" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/internal/clientctx" - "github.com/tinkerbell/tink/protos/template" - "google.golang.org/grpc" - "google.golang.org/protobuf/types/known/timestamppb" -) - -func TestGetTemplate(t *testing.T) { - table := []struct { - counter int - Name string - ReturnedTemplate []*template.WorkflowTemplate - Args []string - ExpectedStdout string - }{ - { - Name: "happy-path", - ReturnedTemplate: []*template.WorkflowTemplate{ - { - Id: "template-123", - Name: "hello-test", - CreatedAt: func() *timestamppb.Timestamp { - ti, _ := time.Parse("2006", "2016") - return timestamppb.New(ti) - }(), - UpdatedAt: func() *timestamppb.Timestamp { - ti, _ := time.Parse("2006", "2016") - return timestamppb.New(ti) - }(), - }, - }, - ExpectedStdout: `+--------------+------------+----------------------+----------------------+ -| ID | NAME | CREATED AT | UPDATED AT | -+--------------+------------+----------------------+----------------------+ -| template-123 | hello-test | 2016-01-01T00:00:00Z | 2016-01-01T00:00:00Z | -+--------------+------------+----------------------+----------------------+ -`, - }, - } - - for _, s := range table { - t.Run(s.Name, func(t *testing.T) { - cl := &client.FullClient{ - TemplateClient: &template.TemplateServiceClientMock{ - ListTemplatesFunc: func(ctx context.Context, in *template.ListRequest, opts ...grpc.CallOption) (template.TemplateService_ListTemplatesClient, error) { - return &template.TemplateService_ListTemplatesClientMock{ - RecvFunc: func() (*template.WorkflowTemplate, error) { - s.counter++ - if s.counter > len(s.ReturnedTemplate) { - return nil, io.EOF - } - return s.ReturnedTemplate[s.counter-1], nil - }, - }, nil - }, - }, - } - stdout := bytes.NewBufferString("") - opt := NewGetOptions() - cmd := get.NewGetCommand(opt) - cmd.SetOut(stdout) - cmd.SetArgs(s.Args) - err := cmd.ExecuteContext(clientctx.Set(context.Background(), cl)) - if err != nil { - t.Error(err) - } - out, err := io.ReadAll(stdout) - if err != nil { - t.Error(err) - } - if diff := cmp.Diff(string(out), s.ExpectedStdout); diff != "" { - t.Error(diff) - } - }) - } -} diff --git a/cmd/tink-cli/cmd/template/list.go b/cmd/tink-cli/cmd/template/list.go deleted file mode 100644 index 7ac1cb139..000000000 --- a/cmd/tink-cli/cmd/template/list.go +++ /dev/null @@ -1,94 +0,0 @@ -package template - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "os" - "time" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/template" -) - -// table headers. -var ( - id = "Template ID" - name = "Template Name" - createdAt = "Created At" - updatedAt = "Updated At" -) - -var ( - quiet bool - t table.Writer -) - -// listCmd represents the list subcommand for template command. -func NewListCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "list", - Short: "list all saved templates", - Example: "tink template list", - Deprecated: `This command is deprecated and it will be removed soon in favor of - -$ tink template get - -please familiarise and migrate your automation accordingly.`, - Args: func(c *cobra.Command, args []string) error { - if len(args) != 0 { - return fmt.Errorf("%v takes no arguments", c.UseLine()) - } - return nil - }, - Run: func(cmd *cobra.Command, args []string) { - if quiet { - listTemplates() - return - } - t = table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{id, name, createdAt, updatedAt}) - listTemplates() - t.Render() - }, - } - cmd.Flags().BoolVarP(&quiet, "quiet", "q", false, "only display template IDs") - return cmd -} - -func listTemplates() { - list, err := client.TemplateClient.ListTemplates(context.Background(), &template.ListRequest{ - FilterBy: &template.ListRequest_Name{ - Name: "*", - }, - }) - if err != nil { - log.Fatal(err) - } - - var tmp *template.WorkflowTemplate - for tmp, err = list.Recv(); err == nil && tmp.Name != ""; tmp, err = list.Recv() { - printOutput(tmp) - } - - if err != nil && !errors.Is(err, io.EOF) { - log.Fatal(err) - } -} - -func printOutput(tmp *template.WorkflowTemplate) { - if quiet { - fmt.Println(tmp.Id) - } else { - cr := tmp.CreatedAt - up := tmp.UpdatedAt - t.AppendRows([]table.Row{ - {tmp.Id, tmp.Name, time.Unix(cr.Seconds, 0), time.Unix(up.Seconds, 0)}, - }) - } -} diff --git a/cmd/tink-cli/cmd/template/update.go b/cmd/tink-cli/cmd/template/update.go deleted file mode 100644 index 7249e288b..000000000 --- a/cmd/tink-cli/cmd/template/update.go +++ /dev/null @@ -1,102 +0,0 @@ -package template - -import ( - "context" - "fmt" - "io" - "log" - "os" - "path/filepath" - - "github.com/google/uuid" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/template" - "github.com/tinkerbell/tink/workflow" -) - -// updateCmd represents the get subcommand for template command. -func NewUpdateCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "update [id] [flags]", - Short: "update a workflow template", - Long: `The update command allows you change the definition of an existing workflow template: -# Pipe the file to create a template: -$ cat /tmp/example.tmpl | tink template update 614168df-45a5-11eb-b13d-0242ac120003 -# Update an existing template: -$ tink template update 614168df-45a5-11eb-b13d-0242ac120003 --path /tmp/example.tmpl -`, - PreRunE: func(c *cobra.Command, args []string) error { - if !isInputFromPipe() { - if filePath == "" { - return fmt.Errorf("%v requires the '--path' flag", c.UseLine()) - } - } - return nil - }, - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires argument", c.UseLine()) - } - for _, arg := range args { - if _, err := uuid.Parse(arg); err != nil { - return fmt.Errorf("invalid uuid: %s", arg) - } - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - for _, arg := range args { - updateTemplate(arg) - } - }, - } - - cmd.PersistentFlags().StringVarP(&filePath, "path", "p", "", "path to the template file") - return cmd -} - -func updateTemplate(id string) { - req := template.WorkflowTemplate{Id: id} - data, err := readTemplateData() - if err != nil { - log.Fatalf("readTemplateData: %v", err) - } - - if data != "" { - wf, err := workflow.Parse([]byte(data)) - if err != nil { - log.Fatal(err) - } - req.Name = wf.Name - req.Data = data - } - - if _, err := client.TemplateClient.UpdateTemplate(context.Background(), &req); err != nil { - log.Fatal(err) - } - fmt.Println("Updated Template: ", id) -} - -func readTemplateData() (string, error) { - var reader io.Reader - if isInputFromPipe() { - reader = os.Stdin - } else { - f, err := os.Open(filepath.Clean(filePath)) - if err != nil { - return "", err - } - - defer f.Close() - - reader = f - } - - data, err := io.ReadAll(reader) - if err != nil { - return "", err - } - - return string(data), nil -} diff --git a/cmd/tink-cli/cmd/template_test.go b/cmd/tink-cli/cmd/template_test.go deleted file mode 100644 index c5daa7127..000000000 --- a/cmd/tink-cli/cmd/template_test.go +++ /dev/null @@ -1,144 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package cmd - -import ( - "bytes" - "fmt" - "strings" - "testing" - - "github.com/spf13/cobra" -) - -func Test_NewTemplateCommand(t *testing.T) { - subCommand := "template" - type args struct { - name string - } - tests := []struct { - name string - args args - want *cobra.Command - cmdFunc func(*testing.T, *cobra.Command) - }{ - { - name: "NoArgs", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - root.SetArgs([]string{subCommand}) - if err := root.Execute(); err != nil { - t.Logf("%+v", root.Args) - t.Error("expected an error") - } - }, - }, - { - name: "List", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "list", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "list all saved templates" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - { - name: "Create", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "create", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "Create template using the --file flag" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - { - name: "Delete", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "delete", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "delete a template" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - { - name: "Get", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "get", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "get a template" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - { - name: "Update", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "update", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - want := "Update an existing template" - if !strings.Contains(out.String(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, out.String())) - } - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Skip(`In the current form the CLI uses init too much and it is - preventing env vars to work as expected. That's why it does not pick up - the right get command. Overall those tests are not that good (testing - surface is almost zero). I think we should just remove them.`) - rootCmd := &cobra.Command{ - Use: testCommand, - Run: func(_ *cobra.Command, _ []string) {}, - Version: "test", - } - rootCmd.AddCommand(NewTemplateCommand()) - tt.cmdFunc(t, rootCmd) - }) - } -} diff --git a/cmd/tink-cli/cmd/workflow.go b/cmd/tink-cli/cmd/workflow.go deleted file mode 100644 index d2e2ba0e9..000000000 --- a/cmd/tink-cli/cmd/workflow.go +++ /dev/null @@ -1,41 +0,0 @@ -package cmd - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/workflow" -) - -func NewWorkflowCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "workflow", - Short: "tink workflow client", - Example: "tink workflow [command]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires arguments", c.UseLine()) - } - return nil - }, - } - - cmd.AddCommand(workflow.NewCreateCommand()) - cmd.AddCommand(workflow.NewDataCommand()) - cmd.AddCommand(delete.NewDeleteCommand(workflow.NewDeleteOptions())) - cmd.AddCommand(workflow.NewShowCommand()) - cmd.AddCommand(workflow.NewListCommand()) - cmd.AddCommand(workflow.NewStateCommand()) - - // If the variable TINK_CLI_VERSION is not set to 0.0.0 use the old get - // command - getCmd := workflow.GetCmd - if v := os.Getenv("TINK_CLI_VERSION"); v != "0.0.0" { - getCmd = get.NewGetCommand(workflow.NewGetOptions()) - } - cmd.AddCommand(getCmd) - return cmd -} diff --git a/cmd/tink-cli/cmd/workflow/commands.go b/cmd/tink-cli/cmd/workflow/commands.go deleted file mode 100644 index fd72a11f4..000000000 --- a/cmd/tink-cli/cmd/workflow/commands.go +++ /dev/null @@ -1,14 +0,0 @@ -package workflow - -import ( - "fmt" - - "github.com/google/uuid" -) - -func validateID(id string) error { - if _, err := uuid.Parse(id); err != nil { - return fmt.Errorf("invalid uuid: %s", id) - } - return nil -} diff --git a/cmd/tink-cli/cmd/workflow/create.go b/cmd/tink-cli/cmd/workflow/create.go deleted file mode 100644 index 7ab18954d..000000000 --- a/cmd/tink-cli/cmd/workflow/create.go +++ /dev/null @@ -1,50 +0,0 @@ -package workflow - -import ( - "context" - "fmt" - "log" - - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/workflow" -) - -var ( - fTemplate = "template" - fHardware = "hardware" - template string - hardware string -) - -func NewCreateCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "create", - Short: "create a workflow", - Example: "tink workflow create [flags]", - PreRunE: func(c *cobra.Command, args []string) error { - tmp, _ := c.Flags().GetString(fTemplate) - err := validateID(tmp) - return err - }, - Run: func(c *cobra.Command, args []string) { - createWorkflow() - }, - } - flags := cmd.PersistentFlags() - flags.StringVarP(&template, "template", "t", "", "workflow template") - flags.StringVarP(&hardware, "hardware", "r", "", "workflow targeted hardwares") - - _ = cmd.MarkPersistentFlagRequired(fHardware) - _ = cmd.MarkPersistentFlagRequired(fTemplate) - return cmd -} - -func createWorkflow() { - req := workflow.CreateRequest{Template: template, Hardware: hardware} - res, err := client.WorkflowClient.CreateWorkflow(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - fmt.Println("Created Workflow: ", res.Id) -} diff --git a/cmd/tink-cli/cmd/workflow/data.go b/cmd/tink-cli/cmd/workflow/data.go deleted file mode 100644 index 77d691475..000000000 --- a/cmd/tink-cli/cmd/workflow/data.go +++ /dev/null @@ -1,70 +0,0 @@ -package workflow - -import ( - "context" - "fmt" - "log" - - "github.com/google/uuid" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/workflow" -) - -var ( - version int32 - needsMetadata bool - versionOnly bool -) - -// dataCmd represents the data subcommand for workflow command. -func NewDataCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "data [id]", - Short: "get workflow data", - Example: "tink workflow data [id] [flags]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires an argument", c.UseLine()) - } - for _, arg := range args { - if _, err := uuid.Parse(arg); err != nil { - return fmt.Errorf("invalid uuid: %s", arg) - } - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - for _, arg := range args { - req := &workflow.GetWorkflowDataRequest{WorkflowId: arg, Version: version} - var res *workflow.GetWorkflowDataResponse - var err error - - switch { - case needsMetadata: - res, err = client.WorkflowClient.GetWorkflowMetadata(context.Background(), req) - case versionOnly: - res, err = client.WorkflowClient.GetWorkflowDataVersion(context.Background(), req) - default: - res, err = client.WorkflowClient.GetWorkflowData(context.Background(), req) - } - - if err != nil { - log.Fatal(err) - } - - if versionOnly { - fmt.Printf("Latest workflow data version: %v\n", res.Version) - } else { - fmt.Println(string(res.Data)) - } - } - }, - } - flags := cmd.PersistentFlags() - flags.Int32VarP(&version, "version", "v", 0, "data version") - flags.BoolVarP(&needsMetadata, "metadata", "m", false, "metadata only") - flags.BoolVarP(&versionOnly, "latest version", "l", false, "latest version") - - return cmd -} diff --git a/cmd/tink-cli/cmd/workflow/delete.go b/cmd/tink-cli/cmd/workflow/delete.go deleted file mode 100644 index 20eb33430..000000000 --- a/cmd/tink-cli/cmd/workflow/delete.go +++ /dev/null @@ -1,24 +0,0 @@ -package workflow - -import ( - "context" - - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/delete" - "github.com/tinkerbell/tink/protos/workflow" -) - -type deleteWorkflow struct { - delete.Options -} - -func (d *deleteWorkflow) DeleteByID(ctx context.Context, cl *client.FullClient, requestedID string) (interface{}, error) { - return cl.WorkflowClient.DeleteWorkflow(ctx, &workflow.GetRequest{Id: requestedID}) -} - -func NewDeleteOptions() delete.Options { - w := deleteWorkflow{} - return delete.Options{ - DeleteByID: w.DeleteByID, - } -} diff --git a/cmd/tink-cli/cmd/workflow/events.go b/cmd/tink-cli/cmd/workflow/events.go deleted file mode 100644 index ea054a5a1..000000000 --- a/cmd/tink-cli/cmd/workflow/events.go +++ /dev/null @@ -1,67 +0,0 @@ -package workflow - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "os" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/workflow" -) - -var ( - hWorkerID = "Worker ID" - hTaskName = "Task Name" - hActionName = "Action Name" - hExecutionTime = "Execution Time" - hMessage = "Message" - hStatus = "Action Status" -) - -func NewShowCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "events [id]", - Short: "show all events for a workflow", - DisableFlagsInUseLine: true, - Example: "tink workflow events [id]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v takes an arguments", c.UseLine()) - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - t := table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{hWorkerID, hTaskName, hActionName, hExecutionTime, hMessage, hStatus}) - listEvents(t, args) - t.Render() - }, - } - return cmd -} - -func listEvents(t table.Writer, args []string) { - for _, arg := range args { - req := workflow.GetRequest{Id: arg} - events, err := client.WorkflowClient.ShowWorkflowEvents(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - // var wf *workflow.Workflow - err = nil - for event, err := events.Recv(); err == nil && event != nil; event, err = events.Recv() { - t.AppendRows([]table.Row{ - {event.WorkerId, event.TaskName, event.ActionName, event.Seconds, event.Message, event.ActionStatus}, - }) - } - if err != nil && !errors.Is(err, io.EOF) { - log.Fatal(err) - } - } -} diff --git a/cmd/tink-cli/cmd/workflow/get.go b/cmd/tink-cli/cmd/workflow/get.go deleted file mode 100644 index 0998cd997..000000000 --- a/cmd/tink-cli/cmd/workflow/get.go +++ /dev/null @@ -1,109 +0,0 @@ -package workflow - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "time" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd/get" - "github.com/tinkerbell/tink/protos/workflow" -) - -var ( - hID = "Workflow ID" - hTemplate = "Template ID" - hDevice = "Hardware device" -) - -// GetCmd represents the get subcommand for workflow command. -var GetCmd = &cobra.Command{ - Use: "get [id]", - Short: "get a workflow", - Example: "tink workflow get [id]", - Deprecated: `This command is deprecated and it will change at some - point. Please unset the environment variable TINK_CLI_VERSION and if - you are doing some complex automation try using the following command: - - $ tink workflow get -o json [id] -`, - - DisableFlagsInUseLine: true, - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires an argument", c.UseLine()) - } - return validateID(args[0]) - }, - Run: func(c *cobra.Command, args []string) { - for _, arg := range args { - req := workflow.GetRequest{Id: arg} - w, err := client.WorkflowClient.GetWorkflow(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - fmt.Println(w.Data) - } - }, -} - -func init() { -} - -type getWorkflow struct { - get.Options -} - -func (h *getWorkflow) RetrieveByID(ctx context.Context, cl *client.FullClient, requestedID string) (interface{}, error) { - return cl.WorkflowClient.GetWorkflow(ctx, &workflow.GetRequest{ - Id: requestedID, - }) -} - -func (h *getWorkflow) RetrieveData(ctx context.Context, cl *client.FullClient) ([]interface{}, error) { - list, err := cl.WorkflowClient.ListWorkflows(ctx, &workflow.Empty{}) - if err != nil { - return nil, err - } - - data := []interface{}{} - - var w *workflow.Workflow - for w, err = list.Recv(); err == nil && w.Id != ""; w, err = list.Recv() { - data = append(data, w) - } - if err != nil && !errors.Is(err, io.EOF) { - return nil, err - } - return data, nil -} - -func (h *getWorkflow) PopulateTable(data []interface{}, t table.Writer) error { - for _, v := range data { - if w, ok := v.(*workflow.Workflow); ok { - t.AppendRow(table.Row{ - w.Id, w.Template, - w.State.String(), - w.CreatedAt.AsTime().UTC().Format(time.RFC3339), - w.UpdatedAt.AsTime().UTC().Format(time.RFC3339), - }) - } - } - return nil -} - -func NewGetOptions() get.Options { - h := getWorkflow{} - opt := get.Options{ - Headers: []string{"ID", "Template ID", "State", "Created At", "Updated At"}, - RetrieveByID: h.RetrieveByID, - RetrieveData: h.RetrieveData, - PopulateTable: h.PopulateTable, - } - return opt -} diff --git a/cmd/tink-cli/cmd/workflow/list.go b/cmd/tink-cli/cmd/workflow/list.go deleted file mode 100644 index 8e560f543..000000000 --- a/cmd/tink-cli/cmd/workflow/list.go +++ /dev/null @@ -1,92 +0,0 @@ -package workflow - -import ( - "context" - "errors" - "fmt" - "io" - "log" - "os" - "time" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/workflow" -) - -var ( - quiet bool - t table.Writer - - hCreatedAt = "Created At" - hUpdatedAt = "Updated At" -) - -// listCmd represents the list subcommand for workflow command. -func NewListCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "list", - Short: "list all workflows", - Example: "tink workflow list", - Deprecated: `This command is deprecated and it will change at some - point. Please try what follows: - - # If you want to retrieve a single workflow you know by ID - tink workflow get [id] - # You can print it in JSON and CSV as well - tink workflow get --format json [id] - - # Get a list of available workflows - tink workflow get -`, - Args: func(c *cobra.Command, args []string) error { - if len(args) != 0 { - return fmt.Errorf("%v takes no arguments", c.UseLine()) - } - return nil - }, - Run: func(c *cobra.Command, args []string) { - if quiet { - listWorkflows() - return - } - t = table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{hID, hTemplate, hDevice, hCreatedAt, hUpdatedAt}) - listWorkflows() - t.Render() - }, - } - flags := cmd.Flags() - flags.BoolVarP(&quiet, "quiet", "q", false, "only display workflow IDs") - return cmd -} - -func listWorkflows() { - list, err := client.WorkflowClient.ListWorkflows(context.Background(), &workflow.Empty{}) - if err != nil { - log.Fatal(err) - } - - var wf *workflow.Workflow - for wf, err = list.Recv(); err == nil && wf.Id != ""; wf, err = list.Recv() { - printOutput(wf) - } - - if err != nil && !errors.Is(err, io.EOF) { - log.Fatal(err) - } -} - -func printOutput(wf *workflow.Workflow) { - if quiet { - fmt.Println(wf.Id) - } else { - cr := wf.CreatedAt - up := wf.UpdatedAt - t.AppendRows([]table.Row{ - {wf.Id, wf.Template, wf.Hardware, time.Unix(cr.Seconds, 0), time.Unix(up.Seconds, 0)}, - }) - } -} diff --git a/cmd/tink-cli/cmd/workflow/state.go b/cmd/tink-cli/cmd/workflow/state.go deleted file mode 100644 index e09aee32c..000000000 --- a/cmd/tink-cli/cmd/workflow/state.go +++ /dev/null @@ -1,66 +0,0 @@ -package workflow - -import ( - "context" - "fmt" - "log" - "os" - "strconv" - - "github.com/jedib0t/go-pretty/table" - "github.com/spf13/cobra" - "github.com/tinkerbell/tink/client" - "github.com/tinkerbell/tink/protos/workflow" -) - -func NewStateCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "state [id]", - Short: "get the current workflow state", - Example: "tink workflow state [id]", - Args: func(c *cobra.Command, args []string) error { - if len(args) == 0 { - return fmt.Errorf("%v requires an argument", c.UseLine()) - } - return validateID(args[0]) - }, - Run: func(c *cobra.Command, args []string) { - for _, arg := range args { - req := workflow.GetRequest{Id: arg} - t := table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{"Field Name", "Values"}) - wf, err := client.WorkflowClient.GetWorkflowContext(context.Background(), &req) - if err != nil { - log.Fatal(err) - } - wfProgress := calWorkflowProgress(wf.CurrentActionIndex, wf.TotalNumberOfActions, wf.CurrentActionState) - t.AppendRow(table.Row{"Workflow ID", wf.WorkflowId}) - t.AppendRow(table.Row{"Workflow Progress", wfProgress}) - t.AppendRow(table.Row{"Current Task", wf.CurrentTask}) - t.AppendRow(table.Row{"Current Action", wf.CurrentAction}) - t.AppendRow(table.Row{"Current Worker", wf.CurrentWorker}) - t.AppendRow(table.Row{"Current Action State", wf.CurrentActionState}) - - t.Render() - } - }, - } - return cmd -} - -func calWorkflowProgress(cur int64, total int64, state workflow.State) string { - if total == 0 || (cur == 0 && state != workflow.State_STATE_SUCCESS) { - return "0%" - } - var taskCompleted int64 - if state == workflow.State_STATE_SUCCESS { - taskCompleted = cur + 1 - } else { - taskCompleted = cur - } - progress := (taskCompleted * 100) / total - perc := strconv.Itoa(int(progress)) + "%" - - return perc -} diff --git a/cmd/tink-cli/cmd/workflow_test.go b/cmd/tink-cli/cmd/workflow_test.go deleted file mode 100644 index 1629cd03c..000000000 --- a/cmd/tink-cli/cmd/workflow_test.go +++ /dev/null @@ -1,172 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package cmd - -import ( - "bytes" - "strings" - "testing" - - "github.com/spf13/cobra" -) - -func Test_NewWorkflowCommand(t *testing.T) { - subCommand := "workflow" - type args struct { - name string - } - tests := []struct { - name string - args args - want *cobra.Command - cmdFunc func(*testing.T, *cobra.Command) - }{ - { - name: "NoArgs", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - root.SetArgs([]string{subCommand}) - if err := root.Execute(); err != nil { - t.Logf("%+v", root.Args) - t.Error("expected an error") - } - }, - }, - { - name: "List", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "list", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "list all workflows") { - t.Error("expected output should include list all workflows") - } - }, - }, - { - name: "Create", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "create", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "create a workflow") { - t.Error("expected output should include create a workflow") - } - }, - }, - { - name: "Data", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "data", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get workflow data") { - t.Error("expected output should include get workflow data") - } - }, - }, - { - name: "Delete", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "delete", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "delete a workflow") { - t.Error("expected output should include delete a workflow") - } - }, - }, - { - name: "Events", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "events", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "show all events for a workflow") { - t.Error("expected output should include show all events for a workflow") - } - }, - }, - { - name: "Get", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "get", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get a workflow") { - t.Error("expected output should include get a workflow") - } - }, - }, - { - name: "State", - args: args{name: testCommand}, - want: &cobra.Command{}, - cmdFunc: func(t *testing.T, c *cobra.Command) { - root := c.Root() - out := &bytes.Buffer{} - root.SetArgs([]string{subCommand, "state", "-h"}) - root.SetOutput(out) - if err := root.Execute(); err != nil { - t.Error(err) - } - if !strings.Contains(out.String(), "get the current workflow state") { - t.Error("expected output should include get the current workflow state") - } - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Skip(`In the current form the CLI uses init too much and it is - preventing env vars to work as expected. That's why it does not pick up - the right get command. Overall those tests are not that good (testing - surface is almost zero). I think we should just remove them.`) - rootCmd := &cobra.Command{ - Use: testCommand, - Run: func(_ *cobra.Command, _ []string) {}, - Version: "test", - } - rootCmd.AddCommand(NewWorkflowCommand()) - tt.cmdFunc(t, rootCmd) - }) - } -} diff --git a/cmd/tink-cli/main.go b/cmd/tink-cli/main.go deleted file mode 100644 index 20804664d..000000000 --- a/cmd/tink-cli/main.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "context" - "fmt" - "os" - - "github.com/equinix-labs/otel-init-go/otelinit" - "github.com/tinkerbell/tink/cmd/tink-cli/cmd" -) - -// version is set at build time. -var version = "devel" - -func main() { - ctx, otelShutdown := otelinit.InitOpenTelemetry(context.Background(), "github.com/tinkerbell/tink") - - if err := cmd.Execute(version); err != nil { - fmt.Fprintln(os.Stderr, err.Error()) - os.Exit(1) - } - - otelShutdown(ctx) -} diff --git a/cmd/tink-cli/sample.tmpl b/cmd/tink-cli/sample.tmpl deleted file mode 100644 index e92ee322f..000000000 --- a/cmd/tink-cli/sample.tmpl +++ /dev/null @@ -1,23 +0,0 @@ -version: '0.1' -name: packet_osie_provision -global_timeout: 600 -tasks: -- name: "OS Installation" - worker: "{{.device_1}}" - actions: - - name: "server_partitioning" - image: hello-world - timeout: 60 - volumes: - - ./host-path:/container-path - environment: - key: value - - name: os_install - image: hello-world - timeout: 60 -- name: "Updated DB Entries" - worker: "{{.device_1}}" - actions: - - name: "update_db" - image: hello-world - timeout: 50 diff --git a/cmd/tink-server/internal/postgres_setup.go b/cmd/tink-server/internal/postgres_setup.go deleted file mode 100644 index b354fe4b8..000000000 --- a/cmd/tink-server/internal/postgres_setup.go +++ /dev/null @@ -1,36 +0,0 @@ -package internal - -import ( - "database/sql" - - "github.com/packethost/pkg/log" - "github.com/tinkerbell/tink/db" -) - -// SetupPostgres initializes a connection to a postgres database. -func SetupPostgres(connInfo string, onlyMigrate bool, logger log.Logger) (db.Database, error) { - dbCon, err := sql.Open("postgres", connInfo) - if err != nil { - return nil, err - } - tinkDB := db.Connect(dbCon, logger) - - if onlyMigrate { - logger.Info("Applying migrations. This process will end when migrations will take place.") - numAppliedMigrations, err := tinkDB.Migrate() - if err != nil { - return nil, err - } - logger.With("num_applied_migrations", numAppliedMigrations).Info("Migrations applied successfully") - return nil, nil - } - - numAvailableMigrations, err := tinkDB.CheckRequiredMigrations() - if err != nil { - return nil, err - } - if numAvailableMigrations != 0 { - logger.Info("Your database schema is not up to date. Please apply migrations running tink-server with env var ONLY_MIGRATION set.") - } - return *tinkDB, nil -} diff --git a/cmd/tink-server/main.go b/cmd/tink-server/main.go index b631cc56c..3edb35a5e 100644 --- a/cmd/tink-server/main.go +++ b/cmd/tink-server/main.go @@ -15,7 +15,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" - "github.com/tinkerbell/tink/cmd/tink-server/internal" grpcserver "github.com/tinkerbell/tink/grpc-server" httpserver "github.com/tinkerbell/tink/http-server" "github.com/tinkerbell/tink/metrics" @@ -47,27 +46,19 @@ type DaemonConfig struct { KubeNamespace string } -const ( - backendPostgres = "postgres" - backendKubernetes = "kubernetes" -) +const backendKubernetes = "kubernetes" func backends() []string { - return []string{backendPostgres, backendKubernetes} + return []string{backendKubernetes} } func (c *DaemonConfig) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&c.Facility, "facility", "deprecated", "This is temporary. It will be removed") - fs.StringVar(&c.PGDatabase, "postgres-database", "tinkerbell", "The Postgres database name. Only takes effect if `--backend=postgres`") - fs.StringVar(&c.PGUSer, "postgres-user", "tinkerbell", "The Postgres database username. Only takes effect if `--backend=postgres`") - fs.StringVar(&c.PGPassword, "postgres-password", "tinkerbell", "The Postgres database password. Only takes effect if `--backend=postgres`") - fs.StringVar(&c.PGSSLMode, "postgres-sslmode", "disable", "Enable or disable SSL mode in postgres. Only takes effect if `--backend=postgres`") - fs.BoolVar(&c.OnlyMigration, "only-migration", false, "When enabled the server applies the migration to postgres database and it exits. Only takes effect if `--backend=postgres`") fs.StringVar(&c.GRPCAuthority, "grpc-authority", ":42113", "The address used to expose the gRPC server") fs.StringVar(&c.CertDir, "cert-dir", "", "") fs.StringVar(&c.HTTPAuthority, "http-authority", ":42114", "The address used to expose the HTTP server") fs.BoolVar(&c.TLS, "tls", true, "Run in tls protected mode (disabling should only be done for development or if behind TLS terminating proxy)") - fs.StringVar(&c.Backend, "backend", backendPostgres, fmt.Sprintf("The backend datastore to use. Must be one of %s", strings.Join(backends(), ", "))) + fs.StringVar(&c.Backend, "backend", backendKubernetes, fmt.Sprintf("The backend datastore to use. Must be one of %s", strings.Join(backends(), ", "))) fs.StringVar(&c.KubeconfigPath, "kubeconfig", "", "The path to the Kubeconfig. Only takes effect if `--backend=kubernetes`") fs.StringVar(&c.KubeAPI, "kubernetes", "", "The Kubernetes API URL, used for in-cluster client construction. Only takes effect if `--backend=kubernetes`") fs.StringVar(&c.KubeNamespace, "kube-namespace", "", "The Kubernetes namespace to target") @@ -76,12 +67,6 @@ func (c *DaemonConfig) AddFlags(fs *pflag.FlagSet) { func (c *DaemonConfig) PopulateFromLegacyEnvVar() { c.Facility = env.Get("FACILITY", c.Facility) - c.PGDatabase = env.Get("PGDATABASE", c.PGDatabase) - c.PGUSer = env.Get("PGUSER", c.PGUSer) - c.PGPassword = env.Get("PGPASSWORD", c.PGPassword) - c.PGSSLMode = env.Get("PGSSLMODE", c.PGSSLMode) - c.OnlyMigration = env.Bool("ONLY_MIGRATION", c.OnlyMigration) - c.CertDir = env.Get("TINKERBELL_CERTS_DIR", c.CertDir) c.GRPCAuthority = env.Get("TINKERBELL_GRPC_AUTHORITY", c.GRPCAuthority) c.HTTPAuthority = env.Get("TINKERBELL_HTTP_AUTHORITY", c.HTTPAuthority) @@ -165,32 +150,6 @@ func NewRootCommand(config *DaemonConfig, logger log.Logger) *cobra.Command { if err != nil { return err } - case backendPostgres: - // TODO(gianarb): I moved this up because we need to be sure that both - // connection, the one used for the resources and the one used for - // listening to events and notification are coming in the same way. - // BUT we should be using the right flags - connInfo := fmt.Sprintf("dbname=%s user=%s password=%s sslmode=%s", - config.PGDatabase, - config.PGUSer, - config.PGPassword, - config.PGSSLMode, - ) - database, err := internal.SetupPostgres(connInfo, config.OnlyMigration, logger) - if err != nil { - return err - } - if config.OnlyMigration { - return nil - } - - registrar, err = server.NewDBServer( - logger, - database, - ) - if err != nil { - return err - } default: return fmt.Errorf("invalid backend: %s", config.Backend) } diff --git a/cmd/tink-worker/worker/worker.go b/cmd/tink-worker/worker/worker.go index 5fc039962..d829867a7 100644 --- a/cmd/tink-worker/worker/worker.go +++ b/cmd/tink-worker/worker/worker.go @@ -2,15 +2,10 @@ package worker import ( "context" - sha "crypto/sha256" - "encoding/base64" - "encoding/json" "fmt" - "io" "os" "path/filepath" "strconv" - "strings" "time" "github.com/packethost/pkg/log" @@ -34,10 +29,7 @@ type loggingContext string var loggingContextKey loggingContext = "logger" -var ( - workflowcontexts = map[string]*pb.WorkflowContext{} - workflowDataSHA = map[string]string{} -) +var workflowcontexts = map[string]*pb.WorkflowContext{} // WorkflowMetadata is the metadata related to workflow data. type WorkflowMetadata struct { @@ -357,9 +349,6 @@ func (w *Worker) ProcessWorkflowActions(ctx context.Context) error { l.With("status", actionStatus.ActionStatus, "duration", strconv.FormatInt(actionStatus.Seconds, 10)).Info("sent action status") } - // get workflow data - w.getWorkflowData(ctx, wfID) - // start executing the action start := time.Now() st, err := w.execute(ctx, wfID, action) @@ -397,9 +386,6 @@ func (w *Worker) ProcessWorkflowActions(ctx context.Context) error { } l.Info("sent action status") - // send workflow data, if updated - w.updateWorkflowData(ctx, actionStatus) - if len(actions.GetActionList()) == actionIndex+1 { l.Info("reached to end of workflow") delete(workflowcontexts, wfID) @@ -455,98 +441,6 @@ func (w *Worker) reportActionStatus(ctx context.Context, actionStatus *pb.Workfl return err } -func (w *Worker) getWorkflowData(ctx context.Context, workflowID string) { - l := w.getLogger(ctx).With("workflowID", workflowID, - "workerID", w.workerID, - ) - res, err := w.tinkClient.GetWorkflowData(ctx, &pb.GetWorkflowDataRequest{WorkflowId: workflowID}) - if err != nil { - l.Error(err) - } - - if len(res.GetData()) != 0 { - wfDir := filepath.Join(w.dataDir, workflowID) - f := openDataFile(wfDir, l) - defer func() { - if err := f.Close(); err != nil { - l.With("file", f.Name()).Error(err) - } - }() - - _, err := f.Write(res.GetData()) - if err != nil { - l.Error(err) - } - h := sha.New() - workflowDataSHA[workflowID] = base64.StdEncoding.EncodeToString(h.Sum(res.Data)) - } -} - -func (w *Worker) updateWorkflowData(ctx context.Context, actionStatus *pb.WorkflowActionStatus) { - l := w.getLogger(ctx).With("workflowID", actionStatus.GetWorkflowId, - "workerID", actionStatus.GetWorkerId(), - "actionName", actionStatus.GetActionName(), - "taskName", actionStatus.GetTaskName(), - ) - - wfDir := filepath.Join(w.dataDir, actionStatus.GetWorkflowId()) - f := openDataFile(wfDir, l) - defer func() { - if err := f.Close(); err != nil { - l.With("file", f.Name()).Error(err) - } - }() - - data, err := io.ReadAll(f) - if err != nil { - l.Error(err) - } - - if isValidDataFile(f, w.maxSize, data, l) { - h := sha.New() - if _, ok := workflowDataSHA[actionStatus.GetWorkflowId()]; !ok { - checksum := base64.StdEncoding.EncodeToString(h.Sum(data)) - workflowDataSHA[actionStatus.GetWorkflowId()] = checksum - w.sendUpdate(ctx, actionStatus, data, checksum) - } else { - newSHA := base64.StdEncoding.EncodeToString(h.Sum(data)) - if !strings.EqualFold(workflowDataSHA[actionStatus.GetWorkflowId()], newSHA) { - w.sendUpdate(ctx, actionStatus, data, newSHA) - } - } - } -} - -func (w *Worker) sendUpdate(ctx context.Context, st *pb.WorkflowActionStatus, data []byte, checksum string) { - l := w.getLogger(ctx).With("workflowID", st.GetWorkflowId, - "workerID", st.GetWorkerId(), - "actionName", st.GetActionName(), - "taskName", st.GetTaskName(), - ) - meta := WorkflowMetadata{ - WorkerID: st.GetWorkerId(), - Action: st.GetActionName(), - Task: st.GetTaskName(), - UpdatedAt: time.Now(), - SHA: checksum, - } - metadata, err := json.Marshal(meta) - if err != nil { - l.Error(err) - os.Exit(1) - } - - _, err = w.tinkClient.UpdateWorkflowData(ctx, &pb.UpdateWorkflowDataRequest{ - WorkflowId: st.GetWorkflowId(), - Data: data, - Metadata: metadata, - }) - if err != nil { - l.Error(err) - os.Exit(1) - } -} - func openDataFile(wfDir string, l log.Logger) *os.File { f, err := os.OpenFile(filepath.Clean(wfDir+string(os.PathSeparator)+dataFile), os.O_RDWR|os.O_CREATE, 0o600) if err != nil { @@ -555,20 +449,3 @@ func openDataFile(wfDir string, l log.Logger) *os.File { } return f } - -func isValidDataFile(f *os.File, maxSize int64, data []byte, l log.Logger) bool { - var dataMap map[string]interface{} - err := json.Unmarshal(data, &dataMap) - if err != nil { - l.Error(err) - return false - } - - stat, err := f.Stat() - if err != nil { - l.Error(err) - return false - } - - return stat.Size() <= maxSize -} diff --git a/db/db.go b/db/db.go deleted file mode 100644 index b976e3e4b..000000000 --- a/db/db.go +++ /dev/null @@ -1,118 +0,0 @@ -package db - -import ( - "context" - "database/sql" - "fmt" - "time" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/uuid" - "github.com/lib/pq" - "github.com/packethost/pkg/log" - "github.com/pkg/errors" - migrate "github.com/rubenv/sql-migrate" - "github.com/tinkerbell/tink/db/migration" - tb "github.com/tinkerbell/tink/protos/template" - pb "github.com/tinkerbell/tink/protos/workflow" -) - -// Database interface for tinkerbell database operations. -type Database interface { - hardware - template - workflow - WorkerWorkflow -} - -type hardware interface { - DeleteFromDB(ctx context.Context, id string) error - InsertIntoDB(ctx context.Context, data string) error - GetByMAC(ctx context.Context, mac string) (string, error) - GetByIP(ctx context.Context, ip string) (string, error) - GetByID(ctx context.Context, id string) (string, error) - GetAll(fn func([]byte) error) error -} - -type template interface { - CreateTemplate(ctx context.Context, name string, data string, id uuid.UUID) error - GetTemplate(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) - DeleteTemplate(ctx context.Context, name string) error - ListTemplates(in string, fn func(id, n string, in, del *timestamp.Timestamp) error) error - UpdateTemplate(ctx context.Context, name string, data string, id uuid.UUID) error -} - -type workflow interface { - CreateWorkflow(ctx context.Context, wf Workflow, data string, id uuid.UUID) error - GetWorkflowMetadata(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) - GetWorkflowDataVersion(ctx context.Context, workflowID string) (int32, error) - GetWorkflow(ctx context.Context, id string) (Workflow, error) - DeleteWorkflow(ctx context.Context, id string, state int32) error - ListWorkflows(fn func(wf Workflow) error) error - UpdateWorkflow(ctx context.Context, wf Workflow, state int32) error - InsertIntoWorkflowEventTable(ctx context.Context, wfEvent *pb.WorkflowActionStatus, t time.Time) error - ShowWorkflowEvents(wfID string, fn func(wfs *pb.WorkflowActionStatus) error) error -} - -// WorkerWorkflow is an interface for methods invoked by APIs that the worker calls. -type WorkerWorkflow interface { - InsertIntoWfDataTable(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error - GetfromWfDataTable(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) - GetWorkflowsForWorker(ctx context.Context, id string) ([]string, error) - UpdateWorkflowState(ctx context.Context, wfContext *pb.WorkflowContext) error - GetWorkflowContexts(ctx context.Context, wfID string) (*pb.WorkflowContext, error) - GetWorkflowActions(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) -} - -// TinkDB implements the Database interface. -type TinkDB struct { - instance *sql.DB - logger log.Logger -} - -// Connect returns a connection to postgres database. -func Connect(db *sql.DB, lg log.Logger) *TinkDB { - return &TinkDB{instance: db, logger: lg} -} - -func (d *TinkDB) Migrate() (int, error) { - return migrate.Exec(d.instance, "postgres", migration.GetMigrations(), migrate.Up) -} - -func (d *TinkDB) CheckRequiredMigrations() (int, error) { - migrations := migration.GetMigrations().Migrations - records, err := migrate.GetMigrationRecords(d.instance, "postgres") - if err != nil { - return 0, err - } - return len(migrations) - len(records), nil -} - -// Error returns the underlying cause for error. -func Error(err error) *pq.Error { - if pqErr, ok := errors.Cause(err).(*pq.Error); ok { - return pqErr - } - return nil -} - -func get(ctx context.Context, db *sql.DB, query string, args ...interface{}) (string, error) { - row := db.QueryRowContext(ctx, query, args...) - - buf := []byte{} - if err := row.Scan(&buf); err != nil { - return "", errors.Wrap(err, "SELECT") - } - return string(buf), nil -} - -// buildGetCondition builds a where condition string in the format "column_name = 'field_value' AND" -// takes in a map[string]string with keys being the column name and the values being the field values. -func buildGetCondition(fields map[string]string) (string, error) { - for column, field := range fields { - if field != "" { - return fmt.Sprintf("%s = %s", pq.QuoteIdentifier(column), pq.QuoteLiteral(field)), nil - } - } - return "", errors.New("one GetBy field must be set to build a get condition") -} diff --git a/db/db_test.go b/db/db_test.go deleted file mode 100644 index 5eda4c1df..000000000 --- a/db/db_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package db_test - -import ( - "context" - "database/sql" - "fmt" - "testing" - "time" - - "github.com/packethost/pkg/log" - "github.com/pkg/errors" - "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/wait" - "github.com/tinkerbell/tink/db" -) - -type NewPostgresDatabaseRequest struct { - ApplyMigration bool -} - -// NewPostgresDatabaseClient returns a SQL client ready to be used. Behind the -// scene it is starting a Docker container that will get cleaned up when the -// test is over. Tests using this function are safe to run in parallel. -func NewPostgresDatabaseClient(ctx context.Context, t *testing.T, req NewPostgresDatabaseRequest) (*sql.DB, *db.TinkDB, func() error) { - t.Helper() - - testcontainers.SkipIfProviderIsNotHealthy(t) - postgresC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ - ContainerRequest: testcontainers.ContainerRequest{ - Image: "postgres:14-alpine", - ExposedPorts: []string{"5432/tcp"}, - WaitingFor: wait.ForLog("database system is ready to accept connections"), - Env: map[string]string{ - "POSTGRES_PASSWORD": "tinkerbell", - "POSTGRES_USER": "tinkerbell", - "POSTGRES_DB": "tinkerbell", - }, - }, - Started: true, - }) - if err != nil { - t.Error(err) - } - port, err := postgresC.MappedPort(ctx, "5432") - if err != nil { - t.Error(err) - } - dbCon, err := sql.Open( - "postgres", - fmt.Sprintf( - "host=localhost port=%d user=%s password=%s dbname=%s sslmode=disable", - port.Int(), - "tinkerbell", - "tinkerbell", - "tinkerbell")) - if err != nil { - t.Error(err) - } - - for ii := 0; ii < 5; ii++ { - err = dbCon.Ping() - if err != nil { - t.Log(errors.Wrap(err, "db check")) - time.Sleep(1 * time.Second) - continue - } - break - } - if err != nil { - t.Fatal(err) - } - - tinkDB := db.Connect(dbCon, log.Test(t, "db-test")) - if req.ApplyMigration { - n, err := tinkDB.Migrate() - if err != nil { - t.Error(err) - } - t.Logf("applied %d migrations", n) - } - return dbCon, tinkDB, func() error { - return postgresC.Terminate(ctx) - } -} diff --git a/db/hardware.go b/db/hardware.go deleted file mode 100644 index 97a6475fc..000000000 --- a/db/hardware.go +++ /dev/null @@ -1,190 +0,0 @@ -package db - -import ( - "context" - "database/sql" - "fmt" - "time" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// DeleteFromDB : delete data from hardware table. -func (d TinkDB) DeleteFromDB(ctx context.Context, id string) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - res, err := tx.ExecContext(ctx, ` - UPDATE hardware - SET - deleted_at = NOW() - WHERE - id = $1; - `, id) - if err != nil { - return errors.Wrap(err, "DELETE") - } - - if count, _ := res.RowsAffected(); count == int64(0) { - return status.Error(codes.NotFound, fmt.Sprintf("not found, id:%s", id)) - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// InsertIntoDB : insert data into hardware table. -func (d TinkDB) InsertIntoDB(ctx context.Context, data string) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - _, err = tx.ExecContext(ctx, ` - INSERT INTO - hardware (inserted_at, id, data) - VALUES - ($1, ($2::jsonb ->> 'id')::uuid, $2) - ON CONFLICT (id) - DO - UPDATE SET - (inserted_at, deleted_at, data) = ($1, NULL, $2); - `, time.Now(), data) - if err != nil { - return errors.Wrap(err, "INSERT") - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// GetByMAC : get data by machine mac. -func (d TinkDB) GetByMAC(ctx context.Context, mac string) (string, error) { - arg := ` - { - "network": { - "interfaces": [ - { - "dhcp": { - "mac": "` + mac + `" - } - } - ] - } - } - ` - query := ` - SELECT data - FROM hardware - WHERE - deleted_at IS NULL - AND - data @> $1 - ` - - return get(ctx, d.instance, query, arg) -} - -// GetByIP : get data by machine ip. -func (d TinkDB) GetByIP(ctx context.Context, ip string) (string, error) { - instance := ` - { - "instance": { - "ip_addresses": [ - { - "address": "` + ip + `" - } - ] - } - } - ` - hardwareOrManagement := ` - { - "network": { - "interfaces": [ - { - "dhcp": { - "ip": { - "address": "` + ip + `" - } - } - } - ] - } - } - ` - - query := ` - SELECT data - FROM hardware - WHERE - deleted_at IS NULL - AND ( - data @> $1 - OR - data @> $2 - ) - ` - - return get(ctx, d.instance, query, instance, hardwareOrManagement) -} - -// GetByID : get data by machine id. -func (d TinkDB) GetByID(ctx context.Context, id string) (string, error) { - arg := id - - query := ` - SELECT data - FROM hardware - WHERE - deleted_at IS NULL - AND - id = $1 - ` - return get(ctx, d.instance, query, arg) -} - -// GetAll : get data for all machine. -func (d TinkDB) GetAll(fn func([]byte) error) error { - rows, err := d.instance.Query(` - SELECT data - FROM hardware - WHERE - deleted_at IS NULL - `) - if err != nil { - return err - } - - defer rows.Close() - buf := []byte{} - for rows.Next() { - err = rows.Scan(&buf) - if err != nil { - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - return err - } - - err = fn(buf) - if err != nil { - return err - } - } - - err = rows.Err() - if errors.Is(err, sql.ErrNoRows) { - err = nil - } - return err -} diff --git a/db/hardware_test.go b/db/hardware_test.go deleted file mode 100644 index abde1c501..000000000 --- a/db/hardware_test.go +++ /dev/null @@ -1,574 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package db_test - -import ( - "context" - "encoding/json" - "fmt" - "os" - "strings" - "sync" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/google/uuid" - _ "github.com/lib/pq" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/pkg" - "github.com/tinkerbell/tink/protos/hardware" -) - -func TestCreateHardware(t *testing.T) { - ctx := context.Background() - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // InputAsync if set to true inserts all the input concurrently - InputAsync bool - // Input is a hardware that will be used to pre-populate the database - Input []*hardware.Hardware - // Expectation is the function used to apply the assertions. - // You can use it to validate if the Input are created as you expect - Expectation func(*testing.T, []*hardware.Hardware, *db.TinkDB) - // ExpectedErr is used to check for error during - // CreateTemplate execution. If you expect a particular error - // and you want to assert it, you can use this function - ExpectedErr func(*testing.T, error) - }{ - { - Name: "create-single-hardware", - Input: []*hardware.Hardware{readHardwareData("./testdata/hardware.json")}, - Expectation: func(t *testing.T, input []*hardware.Hardware, tinkDB *db.TinkDB) { - data, err := tinkDB.GetByID(ctx, input[0].Id) - if err != nil { - t.Error(err) - } - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(data), hw); err != nil { - t.Error(err) - } - if dif := cmp.Diff(input[0], hw, cmp.Comparer(hardwareComparer)); dif != "" { - t.Errorf(dif) - } - }, - }, - { - Name: "two-hardware-with-same-mac", - Input: []*hardware.Hardware{ - func() *hardware.Hardware { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - return hw - }(), - func() *hardware.Hardware { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - return hw - }(), - }, - ExpectedErr: func(t *testing.T, err error) { - if err == nil { - t.Error("expected error, got nil") - } - if !strings.Contains(err.Error(), "conflicting hardware MAC address 08:00:27:00:00:01 provided with hardware data/info") { - t.Errorf("\nexpected err: %s\ngot: %s", "conflicting hardware MAC address 08:00:27:00:00:01 provided with hardware data/info", err) - } - }, - }, - { - Name: "update-on-create", - Input: []*hardware.Hardware{ - func() *hardware.Hardware { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = "d71b659c-3db8-404e-be0e-2fb3c2a482bd" - return hw - }(), - func() *hardware.Hardware { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = "d71b659c-3db8-404e-be0e-2fb3c2a482bd" - hw.Network.Interfaces[0].Dhcp.Hostname = "updated-hostname" - return hw - }(), - }, - Expectation: func(t *testing.T, input []*hardware.Hardware, tinkDB *db.TinkDB) { - data, err := tinkDB.GetByID(ctx, input[0].Id) - if err != nil { - t.Error(err) - } - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(data), hw); err != nil { - t.Error(err) - } - hostName := hw.Network.Interfaces[0].Dhcp.Hostname - if hostName != "updated-hostname" { - t.Errorf("expected hostname to be \"%s\", got \"%s\"", "updated-hostname", hostName) - } - }, - }, - { - Name: "create-stress-test", - InputAsync: true, - Input: func() []*hardware.Hardware { - input := []*hardware.Hardware{} - for ii := 0; ii < 10; ii++ { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - hw.Network.Interfaces[0].Dhcp.Mac = strings.Replace(hw.Network.Interfaces[0].Dhcp.Mac, "00", fmt.Sprintf("0%d", ii), 1) - } - return input - }(), - Expectation: func(t *testing.T, input []*hardware.Hardware, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.GetAll(func(b []byte) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if len(input) != count { - t.Errorf("expected %d hardwares stored in the database but we got %d", len(input), count) - } - }, - ExpectedErr: func(t *testing.T, err error) { - if err != nil { - t.Error(err) - } - }, - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, hw := range s.Input { - if s.InputAsync { - go func(ctx context.Context, tinkDB *db.TinkDB, hw *hardware.Hardware) { - defer wg.Done() - err := createHardware(ctx, tinkDB, hw) - if err != nil { - s.ExpectedErr(t, err) - } - }(ctx, tinkDB, hw) - } else { - wg.Done() - err := createHardware(ctx, tinkDB, hw) - if err != nil { - s.ExpectedErr(t, err) - } - } - } - wg.Wait() - s.Expectation(t, s.Input, tinkDB) - }) - } -} - -func TestDeleteHardware(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - hw := readHardwareData("./testdata/hardware.json") - err := createHardware(ctx, tinkDB, hw) - if err != nil { - t.Error(err) - } - err = tinkDB.DeleteFromDB(ctx, hw.Id) - if err != nil { - t.Error(err) - } - - count := 0 - err = tinkDB.GetAll(func(b []byte) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != 0 { - t.Errorf("expected 0 hardwares stored in the database after delete, but we got %d", count) - } -} - -func TestGetByID(t *testing.T) { - ctx := context.Background() - expectation := func(t *testing.T, input *hardware.Hardware, tinkDB *db.TinkDB) { - data, err := tinkDB.GetByID(ctx, input.Id) - if err != nil { - t.Error(err) - } - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(data), hw); err != nil { - t.Error(err) - } - if dif := cmp.Diff(input, hw, cmp.Comparer(hardwareComparer)); dif != "" { - t.Errorf(dif) - } - } - - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // GetAsync if set to true gets all the hardwares concurrently - GetAsync bool - // Input is a hardware that will be used to pre-populate the database - Input []*hardware.Hardware - // Expectation is the function used to apply the assertions. - // You can use it to validate if you get hardware you expected - Expectation func(*testing.T, *hardware.Hardware, *db.TinkDB) - }{ - { - Name: "get-hardware-by-id", - Input: []*hardware.Hardware{readHardwareData("./testdata/hardware.json")}, - Expectation: expectation, - }, - { - Name: "stress-get-hardware-by-id", - GetAsync: true, - Input: func() []*hardware.Hardware { - input := []*hardware.Hardware{} - for ii := 0; ii < 10; ii++ { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - hw.Network.Interfaces[0].Dhcp.Mac = strings.Replace(hw.Network.Interfaces[0].Dhcp.Mac, "00", fmt.Sprintf("0%d", ii), 1) - } - return input - }(), - Expectation: expectation, - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - for _, hw := range s.Input { - err := createHardware(ctx, tinkDB, hw) - if err != nil { - t.Error(err) - } - } - - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, hw := range s.Input { - if s.GetAsync { - go func(t *testing.T, h *hardware.Hardware, db *db.TinkDB) { - defer wg.Done() - s.Expectation(t, h, db) - }(t, hw, tinkDB) - } else { - wg.Done() - s.Expectation(t, hw, tinkDB) - } - } - wg.Wait() - }) - } -} - -func TestGetByID_WithNonExistingID(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - _, err := tinkDB.GetByID(ctx, uuid.New().String()) - if err == nil { - t.Error("expected error, got nil") - } - - want := "no rows in result set" - - // TODO: use errors.Is here - if !strings.Contains(err.Error(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, err.Error())) - } -} - -func TestGetByIP(t *testing.T) { - ctx := context.Background() - expectation := func(t *testing.T, input *hardware.Hardware, tinkDB *db.TinkDB) { - data, err := tinkDB.GetByIP(ctx, input.Network.Interfaces[0].Dhcp.Ip.Address) - if err != nil { - t.Error(err) - } - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(data), hw); err != nil { - t.Error(err) - } - if dif := cmp.Diff(input, hw, cmp.Comparer(hardwareComparer)); dif != "" { - t.Errorf(dif) - } - } - - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // GetAsync if set to true gets all the hardwares concurrently - GetAsync bool - // Input is a hardware that will be used to pre-populate the database - Input []*hardware.Hardware - // Expectation is the function used to apply the assertions. - // You can use it to validate if you get hardware you expected - Expectation func(*testing.T, *hardware.Hardware, *db.TinkDB) - }{ - { - Name: "get-hardware-by-ip", - Input: []*hardware.Hardware{readHardwareData("./testdata/hardware.json")}, - Expectation: expectation, - }, - { - Name: "stress-get-hardware-by-ip", - GetAsync: true, - Input: func() []*hardware.Hardware { - input := []*hardware.Hardware{} - for ii := 0; ii < 10; ii++ { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - hw.Network.Interfaces[0].Dhcp.Ip.Address = strings.Replace(hw.Network.Interfaces[0].Dhcp.Ip.Address, "1", fmt.Sprintf("%d", ii), 1) - hw.Network.Interfaces[0].Dhcp.Mac = strings.Replace(hw.Network.Interfaces[0].Dhcp.Mac, "00", fmt.Sprintf("0%d", ii), 1) - } - return input - }(), - Expectation: expectation, - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - for _, hw := range s.Input { - err := createHardware(ctx, tinkDB, hw) - if err != nil { - t.Error(err) - } - } - - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, hw := range s.Input { - if s.GetAsync { - go func(t *testing.T, h *hardware.Hardware, db *db.TinkDB) { - defer wg.Done() - s.Expectation(t, h, db) - }(t, hw, tinkDB) - } else { - wg.Done() - s.Expectation(t, hw, tinkDB) - } - } - wg.Wait() - }) - } -} - -func TestGetByIP_WithNonExistingIP(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - _, err := tinkDB.GetByIP(ctx, "192.168.1.5") - if err == nil { - t.Error("expected error, got nil") - } - - want := "no rows in result set" - if !strings.Contains(err.Error(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, err.Error())) - } -} - -func TestGetByMAC(t *testing.T) { - ctx := context.Background() - expectation := func(t *testing.T, input *hardware.Hardware, tinkDB *db.TinkDB) { - data, err := tinkDB.GetByMAC(ctx, input.Network.Interfaces[0].Dhcp.Mac) - if err != nil { - t.Error(err) - } - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(data), hw); err != nil { - t.Error(err) - } - if dif := cmp.Diff(input, hw, cmp.Comparer(hardwareComparer)); dif != "" { - t.Errorf(dif) - } - } - - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // GetAsync if set to true gets all the hardwares concurrently - GetAsync bool - // Input is a hardware that will be used to pre-populate the database - Input []*hardware.Hardware - // Expectation is the function used to apply the assertions. - // You can use it to validate if you get hardware you expected - Expectation func(*testing.T, *hardware.Hardware, *db.TinkDB) - }{ - { - Name: "get-hardware-by-mac", - Input: []*hardware.Hardware{readHardwareData("./testdata/hardware.json")}, - Expectation: expectation, - }, - { - Name: "stress-get-hardware-by-mac", - GetAsync: true, - Input: func() []*hardware.Hardware { - input := []*hardware.Hardware{} - for ii := 0; ii < 10; ii++ { - hw := readHardwareData("./testdata/hardware.json") - hw.Id = uuid.New().String() - hw.Network.Interfaces[0].Dhcp.Mac = strings.Replace(hw.Network.Interfaces[0].Dhcp.Mac, "00", fmt.Sprintf("0%d", ii), 1) - } - return input - }(), - Expectation: expectation, - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - for _, hw := range s.Input { - err := createHardware(ctx, tinkDB, hw) - if err != nil { - t.Error(err) - } - } - - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, hw := range s.Input { - if s.GetAsync { - go func(t *testing.T, h *hardware.Hardware, db *db.TinkDB) { - defer wg.Done() - s.Expectation(t, h, db) - }(t, hw, tinkDB) - } else { - wg.Done() - s.Expectation(t, hw, tinkDB) - } - } - wg.Wait() - }) - } -} - -func TestGetByMAC_WithNonExistingMAC(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - _, err := tinkDB.GetByMAC(ctx, "08:00:27:00:00:01") - if err == nil { - t.Error("expected error, got nil") - } - - want := "no rows in result set" - if !strings.Contains(err.Error(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, err.Error())) - } -} - -func readHardwareData(file string) *hardware.Hardware { - data, err := os.ReadFile(file) - if err != nil { - panic(err) - } - var hw pkg.HardwareWrapper - err = json.Unmarshal(data, &hw) - if err != nil { - panic(err) - } - return hw.Hardware -} - -func createHardware(ctx context.Context, d *db.TinkDB, hw *hardware.Hardware) error { - data, err := json.Marshal(hw) - if err != nil { - return err - } - return d.InsertIntoDB(ctx, string(data)) -} - -func hardwareComparer(in *hardware.Hardware, hw *hardware.Hardware) bool { - return in.Id == hw.Id && - in.Version == hw.Version && - strings.EqualFold(in.Metadata, hw.Metadata) && - strings.EqualFold(in.Network.Interfaces[0].Dhcp.Mac, hw.Network.Interfaces[0].Dhcp.Mac) -} diff --git a/db/migration/202009171251-init-database.go b/db/migration/202009171251-init-database.go deleted file mode 100644 index db26c6dac..000000000 --- a/db/migration/202009171251-init-database.go +++ /dev/null @@ -1,84 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -func Get202009171251() *migrate.Migration { - return &migrate.Migration{ - Id: "202009171251-init-database", - Up: []string{` -CREATE TABLE IF NOT EXISTS hardware ( - id UUID UNIQUE - , inserted_at TIMESTAMPTZ - , deleted_at TIMESTAMPTZ - , data JSONB -); - -CREATE INDEX IF NOT EXISTS idx_id ON hardware (id); -CREATE INDEX IF NOT EXISTS idx_deleted_at ON hardware (deleted_at NULLS FIRST); -CREATE INDEX IF NOT EXISTS idxgin_type ON hardware USING GIN (data JSONB_PATH_OPS); - -CREATE TABLE IF NOT EXISTS template ( - id UUID UNIQUE NOT NULL - , name VARCHAR(200) UNIQUE NOT NULL - , created_at TIMESTAMPTZ - , updated_at TIMESTAMPTZ - , deleted_at TIMESTAMPTZ - , data BYTEA - - CONSTRAINT CK_name CHECK (name ~ '^[a-zA-Z0-9_-]*$') -); - -CREATE INDEX IF NOT EXISTS idx_tid ON template (id); -CREATE INDEX IF NOT EXISTS idx_tdeleted_at ON template (deleted_at NULLS FIRST); - -CREATE TABLE IF NOT EXISTS workflow ( - id UUID UNIQUE NOT NULL - , template UUID NOT NULL - , devices JSONB NOT NULL - , created_at TIMESTAMPTZ - , updated_at TIMESTAMPTZ - , deleted_at TIMESTAMPTZ -); - -CREATE INDEX IF NOT EXISTS idx_wid ON workflow (id); -CREATE INDEX IF NOT EXISTS idx_wdeleted_at ON workflow (deleted_at NULLS FIRST); - -CREATE TABLE IF NOT EXISTS workflow_state ( - workflow_id UUID UNIQUE NOT NULL - , current_task_name VARCHAR(200) - , current_action_name VARCHAR(200) - , current_action_state SMALLINT - , current_worker VARCHAR(200) - , action_list JSONB - , current_action_index int - , total_number_of_actions INT -); - -CREATE INDEX IF NOT EXISTS idx_wfid ON workflow_state (workflow_id); - -CREATE TABLE IF NOT EXISTS workflow_event ( - workflow_id UUID NOT NULL - , worker_id UUID NOT NULL - , task_name VARCHAR(200) - , action_name VARCHAR(200) - , execution_time int - , message VARCHAR(200) - , status SMALLINT - , created_at TIMESTAMPTZ -); - -CREATE INDEX IF NOT EXISTS idx_event ON workflow_event (created_at); - -CREATE TABLE IF NOT EXISTS workflow_worker_map ( - workflow_id UUID NOT NULL - , worker_id UUID NOT NULL -); - -CREATE TABLE IF NOT EXISTS workflow_data ( - workflow_id UUID NOT NULL - , version INT - , metadata JSONB - , data JSONB -);`}, - } -} diff --git a/db/migration/202010071530-init-events-table-and-triggers.go b/db/migration/202010071530-init-events-table-and-triggers.go deleted file mode 100644 index 4b6636071..000000000 --- a/db/migration/202010071530-init-events-table-and-triggers.go +++ /dev/null @@ -1,120 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -func Get202010071530() *migrate.Migration { - return &migrate.Migration{ - Id: "202010071530-init-events-table-and-triggers", - Up: []string{` -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - -DO $$ BEGIN - CREATE TYPE resource_type AS ENUM ('HARDWARE', 'TEMPLATE', 'WORKFLOW'); -EXCEPTION - WHEN duplicate_object THEN null; -END $$; - -DO $$ BEGIN - CREATE TYPE event_type AS ENUM ('CREATED', 'UPDATED', 'DELETED'); -EXCEPTION - WHEN duplicate_object THEN null; -END $$; - -CREATE TABLE IF NOT EXISTS events ( - id UUID UNIQUE DEFAULT uuid_generate_v4() - , resource_id UUID NOT NULL - , resource_type resource_type NOT NULL - , event_type event_type NOT NULL - , created_at TIMESTAMPTZ PRIMARY KEY DEFAULT now() - , data JSONB -); - -CREATE INDEX IF NOT EXISTS idx_events_event_type ON events (event_type); -CREATE INDEX IF NOT EXISTS idx_events_resource_id ON events (resource_id); -CREATE INDEX IF NOT EXISTS idx_events_resource_type ON events (resource_type); - -CREATE OR REPLACE FUNCTION events_notify_changes() -RETURNS trigger AS $$ -BEGIN - PERFORM pg_notify('events_channel', row_to_json(NEW)::text); - RETURN NULL; -END; -$$ LANGUAGE plpgsql; - -DROP TRIGGER IF EXISTS events_channel ON events; - -CREATE TRIGGER events_channel -AFTER INSERT ON events -FOR EACH ROW EXECUTE PROCEDURE events_notify_changes(); - -CREATE OR REPLACE FUNCTION insert_hardware_event() -RETURNS trigger AS $$ -BEGIN - IF (TG_OP = 'INSERT') THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'HARDWARE', 'CREATED', row_to_json(new)); - ELSE - IF new.deleted_at IS NULL THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'HARDWARE', 'UPDATED', row_to_json(new)); - ELSE - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'HARDWARE', 'DELETED', row_to_json(new)); - END IF; - END IF; - - RETURN NULL; -END; -$$ LANGUAGE plpgsql; - -DROP TRIGGER IF EXISTS hardware_event_trigger ON hardware; - -CREATE TRIGGER hardware_event_trigger -AFTER INSERT OR UPDATE ON hardware -FOR EACH ROW EXECUTE PROCEDURE insert_hardware_event(); - -CREATE OR REPLACE FUNCTION insert_template_event() -RETURNS trigger AS $$ -BEGIN - IF (TG_OP = 'INSERT') THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'TEMPLATE', 'CREATED', row_to_json(new)); - ELSE - IF new.deleted_at IS NULL THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'TEMPLATE', 'UPDATED', row_to_json(new)); - ELSE - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'TEMPLATE', 'DELETED', row_to_json(new)); - END IF; - END IF; - - RETURN NULL; -END; -$$ LANGUAGE plpgsql; - -DROP TRIGGER IF EXISTS template_event_trigger ON template; - -CREATE TRIGGER template_event_trigger -AFTER INSERT OR UPDATE ON template -FOR EACH ROW EXECUTE PROCEDURE insert_template_event(); - -CREATE OR REPLACE FUNCTION insert_workflow_event() -RETURNS trigger AS $$ -BEGIN - IF (TG_OP = 'INSERT') THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'WORKFLOW', 'CREATED', row_to_json(new)); - ELSE - IF new.deleted_at IS NULL THEN - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'WORKFLOW', 'UPDATED', row_to_json(new)); - ELSE - INSERT INTO events(resource_id, resource_type, event_type, data) VALUES (new.id, 'WORKFLOW', 'DELETED', row_to_json(new)); - END IF; - END IF; - - RETURN NULL; -END; -$$ LANGUAGE plpgsql; - -DROP TRIGGER IF EXISTS workflow_event_trigger ON workflow; - -CREATE TRIGGER workflow_event_trigger -AFTER INSERT OR UPDATE ON workflow -FOR EACH ROW EXECUTE PROCEDURE insert_workflow_event(); -`}, - } -} diff --git a/db/migration/202010221010-add-unique-index.go b/db/migration/202010221010-add-unique-index.go deleted file mode 100644 index 0bccd77d2..000000000 --- a/db/migration/202010221010-add-unique-index.go +++ /dev/null @@ -1,12 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -func Get202010221010() *migrate.Migration { - return &migrate.Migration{ - Id: "202010221010-add-unique-index", - Up: []string{` -CREATE UNIQUE INDEX IF NOT EXISTS uidx_workflow_worker_map ON workflow_worker_map (workflow_id, worker_id); -`}, - } -} diff --git a/db/migration/202012041103-template-with-same-name-are-acceptable.go b/db/migration/202012041103-template-with-same-name-are-acceptable.go deleted file mode 100644 index ab1c5fc49..000000000 --- a/db/migration/202012041103-template-with-same-name-are-acceptable.go +++ /dev/null @@ -1,12 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -func Get202012041103() *migrate.Migration { - return &migrate.Migration{ - Id: "202012041103-template-with-same-name-are-acceptable", - Up: []string{` - ALTER TABLE template DROP CONSTRAINT template_name_key; - `}, - } -} diff --git a/db/migration/202012091055-add-partial-unique-constraint-on-template.go b/db/migration/202012091055-add-partial-unique-constraint-on-template.go deleted file mode 100644 index 08c4da53a..000000000 --- a/db/migration/202012091055-add-partial-unique-constraint-on-template.go +++ /dev/null @@ -1,12 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -func Get202012091055() *migrate.Migration { - return &migrate.Migration{ - Id: "202012091055-add-partial-unique-constraint-on-template", - Up: []string{` - CREATE UNIQUE INDEX uidx_template_name ON template (name) WHERE deleted_at IS NULL; - `}, - } -} diff --git a/db/migration/2020121691335-update-events-primary-key.go b/db/migration/2020121691335-update-events-primary-key.go deleted file mode 100644 index 47f348f2c..000000000 --- a/db/migration/2020121691335-update-events-primary-key.go +++ /dev/null @@ -1,24 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -// Get2020121691335 updates the primary key on events table. -// -// Fixes: https://github.com/tinkerbell/tink/issues/379 -// -// We can have multiple events generated at a given time, therefore the value of -// 'created_at' field will be same for each event. This violates the unique constraint -// on "events_pkey", when these events are add to the events table. -// -// The migration changes the primary key on events table from 'created_at' to `id`, -// which will always be unique for each event generated at any point in time. -func Get2020121691335() *migrate.Migration { - return &migrate.Migration{ - Id: "2020121691335-update-events-primary-key", - Up: []string{` - ALTER TABLE events DROP CONSTRAINT events_pkey; - ALTER TABLE events ADD PRIMARY KEY (id); - CREATE INDEX IF NOT EXISTS idx_events_created_at ON events (created_at); - `}, - } -} diff --git a/db/migration/2021032610300-drop-events-system.go b/db/migration/2021032610300-drop-events-system.go deleted file mode 100644 index 4a00c099e..000000000 --- a/db/migration/2021032610300-drop-events-system.go +++ /dev/null @@ -1,25 +0,0 @@ -package migration - -import migrate "github.com/rubenv/sql-migrate" - -// Get202103261030 removes the event system tables and triggers. -// -// Fixes: https://github.com/tinkerbell/tink/issues/464 -// -// The event system in place relies on triggers. -// It causes many problems because of its 8k characters limitation. -// CAPT is suffering from this limitation. -func Get2021032610300() *migrate.Migration { - return &migrate.Migration{ - Id: "2021032610300-drop-events-system", - Up: []string{` -DROP TABLE IF EXISTS events CASCADE; -DROP TRIGGER IF EXISTS events_channel ON events; -DROP TRIGGER IF EXISTS hardware_event_trigger ON hardware; -DROP TRIGGER IF EXISTS template_event_trigger ON template; -DROP TRIGGER IF EXISTS workflow_event_trigger ON workflow; -DROP TYPE IF EXISTS resource_type; -DROP TYPE IF EXISTS event_type; -`}, - } -} diff --git a/db/migration/migration.go b/db/migration/migration.go deleted file mode 100644 index 31db1e5c7..000000000 --- a/db/migration/migration.go +++ /dev/null @@ -1,25 +0,0 @@ -package migration - -import ( - migrate "github.com/rubenv/sql-migrate" -) - -var migrations = []func() *migrate.Migration{ - Get202009171251, - Get202010071530, - Get202010221010, - Get202012041103, - Get202012091055, - Get2020121691335, - Get2021032610300, -} - -func GetMigrations() *migrate.MemoryMigrationSource { - m := make([]*migrate.Migration, len(migrations)) - for i := range migrations { - m[i] = migrations[i]() - } - return &migrate.MemoryMigrationSource{ - Migrations: m, - } -} diff --git a/db/migration/migration_test.go b/db/migration/migration_test.go deleted file mode 100644 index f06ba317b..000000000 --- a/db/migration/migration_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package migration - -import ( - "path" - "reflect" - "runtime" - "strings" - "testing" - - assert "github.com/stretchr/testify/require" -) - -// This tests is coming from this PR -// https://github.com/tinkerbell/tink/pull/466 -// -// We didn't fully understood how -// the migration library sorts migration before having to troubleshoot -// that PR. Even if we declare them in order as part of the GetMigrations -// function the library still applies quick sort on the migration ID to -// stay concurrency safe -// -// https://github.com/rubenv/sql-migrate/blob/011dc47c6043b25483490739b61cabbc5da7ee9a/migrate.go#L216 -// -// In order to improve the visibility and to acknowledge that the way we -// append migrations to GetMigrations is the same we get after the sorting -// we wrote this tests. -// A possible solution is to write our own MigrationSet who won't do the -// ordering. In the meantime I (gianarb) will start a conversation with library -// maintainer to figure out how we can improve this. -func TestMigrationsAreOrderendInTheWayWeDeclaredThem(t *testing.T) { - declaredMigration := GetMigrations().Migrations - orderedMigration, err := GetMigrations().FindMigrations() - if err != nil { - t.Fatal(err) - } - if len(declaredMigration) != len(orderedMigration) { - t.Error("Migrations do not have the same number of elements. This should never happen.") - } - - for ii, dm := range declaredMigration { - if dm.Id != orderedMigration[ii].Id { - t.Errorf("Expected migration \"%s\" but got \"%s\"", dm.Id, orderedMigration[ii].Id) - } - } -} - -func TestMigrationFuncNamesMatchIDs(t *testing.T) { - timestamps := map[string]bool{} - for _, m := range migrations { - pc := reflect.ValueOf(m).Pointer() - fn := runtime.FuncForPC(pc) - - file, _ := fn.FileLine(pc) - file = path.Base(file) - root := strings.TrimSuffix(file, path.Ext(file)) - - migration := m() - mid := strings.Split(migration.Id, "-")[0] - - assert.Equal(t, root, migration.Id, "file root name (%s) and migration id (%s) do not match", root, migration.Id) - - fnName := strings.Split(fn.Name(), "migration.")[1] - assert.Equal(t, fnName, "Get"+mid, "migration func name and id timestamp mismatch, func: %s, migration.Id: %s", fnName, mid) - - assert.NotContains(t, timestamps, mid) - } -} - -func TestGetMigrations(t *testing.T) { - m := GetMigrations() - assert.Len(t, m.Migrations, len(migrations)) -} diff --git a/db/mock/hardware.go b/db/mock/hardware.go deleted file mode 100644 index b68665b11..000000000 --- a/db/mock/hardware.go +++ /dev/null @@ -1,35 +0,0 @@ -package mock - -import ( - "context" -) - -// DeleteFromDB : delete data from hardware table. -func (d DB) DeleteFromDB(_ context.Context, _ string) error { - return nil -} - -// InsertIntoDB : insert data into hardware table. -func (d DB) InsertIntoDB(_ context.Context, _ string) error { - return nil -} - -// GetByMAC : get data by machine mac. -func (d DB) GetByMAC(_ context.Context, _ string) (string, error) { - return "", nil -} - -// GetByIP : get data by machine ip. -func (d DB) GetByIP(_ context.Context, _ string) (string, error) { - return "", nil -} - -// GetByID : get data by machine id. -func (d DB) GetByID(_ context.Context, _ string) (string, error) { - return "", nil -} - -// GetAll : get data for all machine. -func (d DB) GetAll(_ func([]byte) error) error { - return nil -} diff --git a/db/mock/mock.go b/db/mock/mock.go deleted file mode 100644 index aa4196fb5..000000000 --- a/db/mock/mock.go +++ /dev/null @@ -1,30 +0,0 @@ -package mock - -import ( - "context" - "time" - - "github.com/google/uuid" - "github.com/tinkerbell/tink/db" - tb "github.com/tinkerbell/tink/protos/template" - pb "github.com/tinkerbell/tink/protos/workflow" -) - -// DB is the mocked implementation of Database interface. -type DB struct { - // workflow - CreateWorkflowFunc func(ctx context.Context, wf db.Workflow, data string, id uuid.UUID) error - GetWorkflowFunc func(ctx context.Context, id string) (db.Workflow, error) - GetfromWfDataTableFunc func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) - InsertIntoWfDataTableFunc func(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error - GetWorkflowMetadataFunc func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) - GetWorkflowDataVersionFunc func(ctx context.Context, workflowID string) (int32, error) - GetWorkflowsForWorkerFunc func(ctx context.Context, id string) ([]string, error) - GetWorkflowContextsFunc func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) - GetWorkflowActionsFunc func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) - UpdateWorkflowStateFunc func(ctx context.Context, wfContext *pb.WorkflowContext) error - InsertIntoWorkflowEventTableFunc func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error - // template - TemplateDB map[string]interface{} - GetTemplateFunc func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) -} diff --git a/db/mock/template.go b/db/mock/template.go deleted file mode 100644 index c9cfa4f60..000000000 --- a/db/mock/template.go +++ /dev/null @@ -1,71 +0,0 @@ -package mock - -import ( - "context" - "fmt" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/uuid" - tb "github.com/tinkerbell/tink/protos/template" -) - -type Template struct { - ID uuid.UUID - Data string - Deleted bool -} - -// CreateTemplate creates a new workflow template. -func (d *DB) CreateTemplate(_ context.Context, name string, data string, id uuid.UUID) error { - if d.TemplateDB == nil { - d.TemplateDB = make(map[string]interface{}) - } - - if _, ok := d.TemplateDB[name]; ok { - tmpl := d.TemplateDB[name] - switch stmpl := tmpl.(type) { - case Template: - if !stmpl.Deleted { - return fmt.Errorf("template name %q already exists in the database", name) - } - default: - return fmt.Errorf("template %q not a Template type in the database", name) - } - } - d.TemplateDB[name] = Template{ - ID: id, - Data: data, - Deleted: false, - } - - return nil -} - -// GetTemplate returns a workflow template. -func (d DB) GetTemplate(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return d.GetTemplateFunc(ctx, fields, deleted) -} - -// DeleteTemplate deletes a workflow template. -func (d DB) DeleteTemplate(_ context.Context, name string) error { - if d.TemplateDB != nil { - delete(d.TemplateDB, name) - } - - return nil -} - -// ListTemplates returns all saved templates. -func (d DB) ListTemplates(_ string, _ func(id, n string, in, del *timestamp.Timestamp) error) error { - return nil -} - -// UpdateTemplate update a given template. -func (d DB) UpdateTemplate(_ context.Context, _ string, _ string, _ uuid.UUID) error { - return nil -} - -// ClearTemplateDB clear all the templates. -func (d *DB) ClearTemplateDB() { - d.TemplateDB = make(map[string]interface{}) -} diff --git a/db/mock/workflow.go b/db/mock/workflow.go deleted file mode 100644 index 86004e010..000000000 --- a/db/mock/workflow.go +++ /dev/null @@ -1,85 +0,0 @@ -package mock - -import ( - "context" - "time" - - "github.com/google/uuid" - "github.com/tinkerbell/tink/db" - pb "github.com/tinkerbell/tink/protos/workflow" -) - -// CreateWorkflow creates a new workflow. -func (d DB) CreateWorkflow(ctx context.Context, wf db.Workflow, data string, id uuid.UUID) error { - return d.CreateWorkflowFunc(ctx, wf, data, id) -} - -// InsertIntoWfDataTable : Insert ephemeral data in workflow_data table. -func (d DB) InsertIntoWfDataTable(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error { - return d.InsertIntoWfDataTableFunc(ctx, req) -} - -// GetfromWfDataTable : Give you the ephemeral data from workflow_data table. -func (d DB) GetfromWfDataTable(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return d.GetfromWfDataTableFunc(ctx, req) -} - -// GetWorkflowMetadata returns metadata wrt to the ephemeral data of a workflow. -func (d DB) GetWorkflowMetadata(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return d.GetWorkflowMetadataFunc(ctx, req) -} - -// GetWorkflowDataVersion returns the latest version of data for a workflow. -func (d DB) GetWorkflowDataVersion(ctx context.Context, workflowID string) (int32, error) { - return d.GetWorkflowDataVersionFunc(ctx, workflowID) -} - -// GetWorkflowsForWorker : returns the list of workflows for a particular worker. -func (d DB) GetWorkflowsForWorker(ctx context.Context, id string) ([]string, error) { - return d.GetWorkflowsForWorkerFunc(ctx, id) -} - -// GetWorkflow returns a workflow. -func (d DB) GetWorkflow(ctx context.Context, id string) (db.Workflow, error) { - return d.GetWorkflowFunc(ctx, id) -} - -// DeleteWorkflow deletes a workflow. -func (d DB) DeleteWorkflow(_ context.Context, _ string, _ int32) error { - return nil -} - -// ListWorkflows returns all workflows. -func (d DB) ListWorkflows(_ func(wf db.Workflow) error) error { - return nil -} - -// UpdateWorkflow updates a given workflow. -func (d DB) UpdateWorkflow(_ context.Context, _ db.Workflow, _ int32) error { - return nil -} - -// UpdateWorkflowState : update the current workflow state. -func (d DB) UpdateWorkflowState(ctx context.Context, wfContext *pb.WorkflowContext) error { - return d.UpdateWorkflowStateFunc(ctx, wfContext) -} - -// GetWorkflowContexts : gives you the current workflow context. -func (d DB) GetWorkflowContexts(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return d.GetWorkflowContextsFunc(ctx, wfID) -} - -// GetWorkflowActions : gives you the action list of workflow. -func (d DB) GetWorkflowActions(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return d.GetWorkflowActionsFunc(ctx, wfID) -} - -// InsertIntoWorkflowEventTable : insert workflow event table. -func (d DB) InsertIntoWorkflowEventTable(ctx context.Context, wfEvent *pb.WorkflowActionStatus, t time.Time) error { - return d.InsertIntoWorkflowEventTableFunc(ctx, wfEvent, t) -} - -// ShowWorkflowEvents returns all workflows. -func (d DB) ShowWorkflowEvents(_ string, _ func(wfs *pb.WorkflowActionStatus) error) error { - return nil -} diff --git a/db/template.go b/db/template.go deleted file mode 100644 index 6fd31bffc..000000000 --- a/db/template.go +++ /dev/null @@ -1,202 +0,0 @@ -package db - -import ( - "context" - "database/sql" - "fmt" - "time" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/uuid" - "github.com/pkg/errors" - tb "github.com/tinkerbell/tink/protos/template" - wflow "github.com/tinkerbell/tink/workflow" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// CreateTemplate creates a new workflow template. -func (d TinkDB) CreateTemplate(ctx context.Context, name string, data string, id uuid.UUID) error { - _, err := wflow.Parse([]byte(data)) - if err != nil { - return err - } - - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - _, err = tx.ExecContext(ctx, ` - INSERT INTO - template (created_at, updated_at, name, data, id) - VALUES - ($1, $1, $2, $3, $4) - ON CONFLICT (id) - DO - UPDATE SET - (updated_at, deleted_at, name, data) = ($1, NULL, $2, $3); - `, time.Now(), name, data, id) - if err != nil { - return errors.Wrap(err, "INSERT") - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// GetTemplate returns template which is not deleted. -func (d TinkDB) GetTemplate(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - getCondition, err := buildGetCondition(fields) - if err != nil { - return &tb.WorkflowTemplate{}, errors.Wrap(err, "failed to get template") - } - - var query string - if !deleted { - query = ` - SELECT id, name, data, created_at, updated_at - FROM template - WHERE - ` + getCondition + ` AND - deleted_at IS NULL - ` - } else { - query = ` - SELECT id, name, data, created_at, updated_at - FROM template - WHERE - ` + getCondition + ` - ` - } - - row := d.instance.QueryRowContext(ctx, query) - var ( - id string - name string - data string - createdAt time.Time - updatedAt time.Time - ) - err = row.Scan(&id, &name, &data, &createdAt, &updatedAt) - if err == nil { - crAt := timestamppb.New(createdAt) - upAt := timestamppb.New(updatedAt) - return &tb.WorkflowTemplate{ - Id: id, - Name: name, - Data: data, - CreatedAt: crAt, - UpdatedAt: upAt, - }, nil - } - if !errors.Is(err, sql.ErrNoRows) { - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - } - return &tb.WorkflowTemplate{}, err -} - -// DeleteTemplate deletes a workflow template by id. -func (d TinkDB) DeleteTemplate(ctx context.Context, id string) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - res, err := tx.ExecContext(ctx, ` - UPDATE template - SET - deleted_at = NOW() - WHERE - id = $1; - `, id) - if err != nil { - return errors.Wrap(err, "UPDATE") - } - - if count, _ := res.RowsAffected(); count == int64(0) { - return status.Error(codes.NotFound, fmt.Sprintf("not found, id:%s", id)) - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// ListTemplates returns all saved templates. -func (d TinkDB) ListTemplates(filter string, fn func(id, n string, in, del *timestamp.Timestamp) error) error { - rows, err := d.instance.Query(` - SELECT id, name, created_at, updated_at - FROM template - WHERE - name ILIKE $1 - AND - deleted_at IS NULL; - `, filter) - if err != nil { - return err - } - - defer rows.Close() - var ( - id string - name string - createdAt time.Time - updatedAt time.Time - ) - - for rows.Next() { - err = rows.Scan(&id, &name, &createdAt, &updatedAt) - if err != nil { - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - return err - } - - tCr := timestamppb.New(createdAt) - tUp := timestamppb.New(updatedAt) - err = fn(id, name, tCr, tUp) - if err != nil { - return err - } - } - - err = rows.Err() - if errors.Is(err, sql.ErrNoRows) { - err = nil - } - return err -} - -// UpdateTemplate update a given template. -func (d TinkDB) UpdateTemplate(ctx context.Context, name string, data string, id uuid.UUID) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - switch { - case data == "" && name != "": - _, err = tx.ExecContext(ctx, `UPDATE template SET updated_at = NOW(), name = $2 WHERE id = $1;`, id, name) - case data != "" && name == "": - _, err = tx.ExecContext(ctx, `UPDATE template SET updated_at = NOW(), data = $2 WHERE id = $1;`, id, data) - default: - _, err = tx.ExecContext(ctx, `UPDATE template SET updated_at = NOW(), name = $2, data = $3 WHERE id = $1;`, id, name, data) - } - - if err != nil { - return errors.Wrap(err, "UPDATE") - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} diff --git a/db/template_test.go b/db/template_test.go deleted file mode 100644 index 7e84195db..000000000 --- a/db/template_test.go +++ /dev/null @@ -1,380 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package db_test - -import ( - "context" - "fmt" - "math/rand" - "strings" - "sync" - "testing" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/go-cmp/cmp" - "github.com/google/uuid" - _ "github.com/lib/pq" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/workflow" - "gopkg.in/yaml.v2" -) - -func TestCreateTemplate(t *testing.T) { - ctx := context.Background() - - table := []struct { - // Name identifies the single test in a table test scenario - Name string - // Input is a list of workflows that will be used to pre-populate the database - Input []*workflow.Workflow - // InputAsync if set to true inserts all the input concurrently - InputAsync bool - // Expectation is the function used to apply the assertions. - // You can use it to validate if the Input are created as you expect - Expectation func(*testing.T, []*workflow.Workflow, *db.TinkDB) - // ExpectedErr is used to check for error during - // CreateTemplate execution. If you expect a particular error - // and you want to assert it, you can use this function - ExpectedErr func(*testing.T, error) - }{ - { - Name: "happy-path-single-create-template", - Input: []*workflow.Workflow{ - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - return w - }(), - }, - Expectation: func(t *testing.T, input []*workflow.Workflow, tinkDB *db.TinkDB) { - wtmpl, err := tinkDB.GetTemplate(ctx, map[string]string{"id": input[0].ID}, false) - if err != nil { - t.Error(err) - } - w := workflow.MustParse([]byte(wtmpl.GetData())) - w.ID = wtmpl.GetId() - w.Name = wtmpl.GetName() - if dif := cmp.Diff(input[0], w); dif != "" { - t.Errorf(dif) - } - }, - }, - { - Name: "create-two-template-same-name", - Input: []*workflow.Workflow{ - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - return w - }(), - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "aaaaaaaa-5313-49c6-8704-bbbbbbbbbbbb" - return w - }(), - }, - ExpectedErr: func(t *testing.T, err error) { - if err == nil { - t.Error("expected error, got nil") - } - if !strings.Contains(err.Error(), "pq: duplicate key value violates unique constraint \"uidx_template_name\"") { - t.Errorf("\nexpected err: %s\ngot: %s", "pq: duplicate key value violates unique constraint \"uidx_template_name\"", err) - } - }, - }, - { - Name: "update-on-create", - Input: []*workflow.Workflow{ - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - return w - }(), - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - w.Name = "updated-name" - return w - }(), - }, - Expectation: func(t *testing.T, input []*workflow.Workflow, tinkDB *db.TinkDB) { - wtmpl, err := tinkDB.GetTemplate(context.Background(), map[string]string{"id": input[0].ID}, false) - if err != nil { - t.Error(err) - } - if wtmpl.GetName() != "updated-name" { - t.Errorf("expected name to be \"%s\", got \"%s\"", "updated-name", wtmpl.GetName()) - } - }, - }, - { - Name: "create-stress-test", - InputAsync: true, - Input: func() []*workflow.Workflow { - input := []*workflow.Workflow{} - for ii := 0; ii < 20; ii++ { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = uuid.New().String() - w.Name = fmt.Sprintf("id_%d", rand.Int()) - t.Log(w.Name) - input = append(input, w) - } - return input - }(), - ExpectedErr: func(t *testing.T, err error) { - if err != nil { - t.Error(err) - } - }, - Expectation: func(t *testing.T, input []*workflow.Workflow, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.ListTemplates("%", func(id, n string, in, del *timestamp.Timestamp) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if len(input) != count { - t.Errorf("expected %d templates stored in the database but we got %d", len(input), count) - } - }, - }, - } - - for _, s := range table { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, tt := range s.Input { - if s.InputAsync { - go func(ctx context.Context, tinkDB *db.TinkDB, tt *workflow.Workflow) { - defer wg.Done() - err := createTemplateFromWorkflowType(ctx, tinkDB, tt) - if err != nil { - s.ExpectedErr(t, err) - } - }(ctx, tinkDB, tt) - } else { - wg.Done() - err := createTemplateFromWorkflowType(ctx, tinkDB, tt) - if err != nil { - s.ExpectedErr(t, err) - } - } - } - wg.Wait() - s.Expectation(t, s.Input, tinkDB) - }) - } -} - -func TestCreateTemplate_TwoTemplateWithSameNameButFirstOneIsDeleted(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - err := createTemplateFromWorkflowType(ctx, tinkDB, w) - if err != nil { - t.Error(err) - } - err = tinkDB.DeleteTemplate(ctx, w.ID) - if err != nil { - t.Error(err) - } - - ww := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - ww.ID = "1111aaaa-5313-49c6-8704-222222aaaaaa" - err = createTemplateFromWorkflowType(ctx, tinkDB, ww) - if err != nil { - t.Error(err) - } -} - -func TestDeleteTemplate(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = uuid.New().String() - w.Name = fmt.Sprintf("id_%d", rand.Int()) - - err := createTemplateFromWorkflowType(ctx, tinkDB, w) - if err != nil { - t.Error(err) - } - err = tinkDB.DeleteTemplate(ctx, w.ID) - if err != nil { - t.Error(err) - } - - count := 0 - err = tinkDB.ListTemplates("%", func(id, n string, in, del *timestamp.Timestamp) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != 0 { - t.Errorf("expected 0 templates stored in the database after delete, but we got %d", count) - } -} - -func TestGetTemplate(t *testing.T) { - ctx := context.Background() - expectation := func(t *testing.T, input *workflow.Workflow, tinkDB *db.TinkDB) { - wtmpl, err := tinkDB.GetTemplate(ctx, map[string]string{"id": input.ID}, false) - if err != nil { - t.Error(err) - } - w := workflow.MustParse([]byte(wtmpl.GetData())) - w.ID = wtmpl.GetId() - w.Name = wtmpl.GetName() - if dif := cmp.Diff(input, w); dif != "" { - t.Errorf(dif) - } - } - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // Input is a list of workflows that will be used to pre-populate the database - Input []*workflow.Workflow - // GetAsync if set to true gets all the templates concurrently - GetAsync bool - // Expectation is the function used to apply the assertions. - // You can use it to validate if you get template you expected - Expectation func(*testing.T, *workflow.Workflow, *db.TinkDB) - }{ - { - Name: "get-template", - Input: []*workflow.Workflow{ - func() *workflow.Workflow { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = "545f7ce9-5313-49c6-8704-0ed98814f1f7" - return w - }(), - }, - Expectation: expectation, - }, - { - Name: "stress-get-template", - GetAsync: true, - Input: func() []*workflow.Workflow { - input := []*workflow.Workflow{} - for i := 0; i < 20; i++ { - w := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - w.ID = uuid.New().String() - w.Name = fmt.Sprintf("id_%d", rand.Int()) - t.Log(w.Name) - input = append(input, w) - } - return input - }(), - Expectation: expectation, - }, - } - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - for _, in := range s.Input { - err := createTemplateFromWorkflowType(ctx, tinkDB, in) - if err != nil { - t.Error(err) - } - } - - var wg sync.WaitGroup - wg.Add(len(s.Input)) - for _, in := range s.Input { - if s.GetAsync { - go func(t *testing.T, wf *workflow.Workflow, db *db.TinkDB) { - defer wg.Done() - s.Expectation(t, wf, db) - }(t, in, tinkDB) - } else { - wg.Done() - s.Expectation(t, in, tinkDB) - } - } - wg.Wait() - }) - } -} - -func TestGetTemplateWithInvalidID(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - id := uuid.New().String() - _, err := tinkDB.GetTemplate(ctx, map[string]string{"id": id}, false) - if err == nil { - t.Error("expected error, got nil") - } - - want := "no rows in result set" - // TODO: replace with errors.Is - if !strings.Contains(err.Error(), want) { - t.Error(fmt.Errorf("unexpected output, looking for %q as a substring in %q", want, err.Error())) - } -} - -func createTemplateFromWorkflowType(ctx context.Context, tinkDB *db.TinkDB, tt *workflow.Workflow) error { - uID := uuid.MustParse(tt.ID) - content, err := yaml.Marshal(tt) - if err != nil { - return err - } - err = tinkDB.CreateTemplate(ctx, tt.Name, string(content), uID) - if err != nil { - return err - } - return nil -} diff --git a/db/testdata/hardware.json b/db/testdata/hardware.json deleted file mode 100644 index 509e6b014..000000000 --- a/db/testdata/hardware.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "state": "provisioning", - "manufacturer": {}, - "instance": { - "operating_system_version": { - "distro": "ubuntu", - "version": "18.04", - "os_slug": "ubuntu_18_04" - }, - "crypted_root_password": "$6$xyz$/pdZy4hazXmqu1t0TACitLlKZPD4bFyRUw6ycXiOTdf4kcnkmpgmtg9zUpEE8rG9KtOWwX7kp1Gl96NCGbDk60", - "storage": { - "disks": [ - { - "device": "/dev/sda", - "wipe_table": true, - "partitions": [ - { "label": "BIOS", "number": 1, "size": 4096 }, - { "label": "SWAP", "number": 2, "size": 3993600 }, - { "label": "ROOT", "number": 3, "size": 15993600 } - ] - } - ], - "filesystems": [ - { - "mount": { - "device": "/dev/sda3", - "format": "ext4", - "create": { "options": ["-L", "ROOT"] }, - "point": "/" - } - }, - { - "mount": { - "device": "/dev/sda2", - "format": "swap", - "create": { "options": ["-L", "SWAP"] }, - "point": "none" - } - } - ] - } - }, - "facility": { "plan_slug": "c2.medium.x86", "facility_code": "onprem" } - }, - "network": { - "interfaces": [ - { - "dhcp": { - "mac": "08:00:27:00:00:01", - "hostname": "server001", - "lease_time": 86400, - "arch": "x86_64", - "ip": { - "address": "192.168.1.5", - "netmask": "255.255.255.248", - "gateway": "192.168.1.1" - } - }, - "netboot": { - "allow_pxe": true, - "allow_workflow": true, - "osie": { "kernel": "vmlinuz-x86_64" } - } - } - ] - }, - "id": "0eba0bf8-3772-4b4a-ab9f-6ebe93b90a95" -} diff --git a/db/testdata/hardware_2.json b/db/testdata/hardware_2.json deleted file mode 100644 index 13dd973c5..000000000 --- a/db/testdata/hardware_2.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "metadata": { - "state": "provisioning", - "manufacturer": {}, - "instance": { - "operating_system_version": { - "distro": "ubuntu", - "version": "18.04", - "os_slug": "ubuntu_18_04" - }, - "crypted_root_password": "$6$xyz$/pdZy4hazXmqu1t0TACitLlKZPD4bFyRUw6ycXiOTdf4kcnkmpgmtg9zUpEE8rG9KtOWwX7kp1Gl96NCGbDk60", - "storage": { - "disks": [ - { - "device": "/dev/sda", - "wipe_table": true, - "partitions": [ - { "label": "BIOS", "number": 1, "size": 4096 }, - { "label": "SWAP", "number": 2, "size": 3993600 }, - { "label": "ROOT", "number": 3, "size": 15993600 } - ] - } - ], - "filesystems": [ - { - "mount": { - "device": "/dev/sda3", - "format": "ext4", - "create": { "options": ["-L", "ROOT"] }, - "point": "/" - } - }, - { - "mount": { - "device": "/dev/sda2", - "format": "swap", - "create": { "options": ["-L", "SWAP"] }, - "point": "none" - } - } - ] - } - }, - "facility": { "plan_slug": "c2.medium.x86", "facility_code": "onprem" } - }, - "network": { - "interfaces": [ - { - "dhcp": { - "mac": "ae:fb:27:a1:c4:02", - "hostname": "server002", - "lease_time": 86400, - "arch": "x86_64", - "ip": { - "address": "192.168.1.6", - "netmask": "255.255.255.248", - "gateway": "192.168.1.1" - } - }, - "netboot": { - "allow_pxe": true, - "allow_workflow": true, - "osie": { "kernel": "vmlinuz-x86_64" } - } - } - ] - }, - "id": "0eba0bf8-3772-4b4a-ab9f-6ebe93b90a96" -} diff --git a/db/testdata/template_happy_path_1.yaml b/db/testdata/template_happy_path_1.yaml deleted file mode 100644 index 1c424302d..000000000 --- a/db/testdata/template_happy_path_1.yaml +++ /dev/null @@ -1,19 +0,0 @@ -version: "0.1" -name: packet_osie_provision -global_timeout: 600 -tasks: - - name: "run_one_worker" - worker: "{{.device_1}}" - environment: - MIRROR_HOST: 192.168.1.2 - actions: - - name: "server_partitioning" - image: update-data - timeout: 60 - environment: - NGINX_HOST: 192.168.1.2 - - name: "update_db" - image: update-data - timeout: 50 - environment: - MIRROR_HOST: 192.168.1.3 diff --git a/db/workflow.go b/db/workflow.go deleted file mode 100644 index 70824d468..000000000 --- a/db/workflow.go +++ /dev/null @@ -1,764 +0,0 @@ -package db - -import ( - "context" - "database/sql" - "encoding/json" - "fmt" - "net" - "os" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/uuid" - "github.com/pkg/errors" - pb "github.com/tinkerbell/tink/protos/workflow" - wflow "github.com/tinkerbell/tink/workflow" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// Workflow represents a workflow instance in database. -type Workflow struct { - State int32 - ID, Hardware, Template string - CreatedAt, UpdatedAt *timestamp.Timestamp -} - -var ( - defaultMaxVersions = 3 - maxVersions = defaultMaxVersions // maximum number of workflow data versions to be kept in database -) - -// CreateWorkflow creates a new workflow. -func (d TinkDB) CreateWorkflow(ctx context.Context, wf Workflow, data string, id uuid.UUID) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - err = insertActionList(ctx, d.instance, data, id, tx) - if err != nil { - return errors.Wrap(err, "failed to create workflow") - } - err = insertInWorkflow(ctx, wf, tx) - if err != nil { - return errors.Wrap(err, "failed to create workflow") - } - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -func insertInWorkflow(ctx context.Context, wf Workflow, tx *sql.Tx) error { - _, err := tx.ExecContext(ctx, ` - INSERT INTO - workflow (created_at, updated_at, template, devices, id) - VALUES - ($1, $1, $2, $3, $4) - ON CONFLICT (id) - DO - UPDATE SET - (updated_at, deleted_at, template, devices) = ($1, NULL, $2, $3); - `, time.Now(), wf.Template, wf.Hardware, wf.ID) - if err != nil { - return errors.Wrap(err, "INSERT in to workflow") - } - return nil -} - -func insertIntoWfWorkerTable(ctx context.Context, wfID uuid.UUID, workerID uuid.UUID, tx *sql.Tx) error { - _, err := tx.ExecContext(ctx, ` - INSERT INTO - workflow_worker_map (workflow_id, worker_id) - VALUES - ($1, $2) - ON CONFLICT (workflow_id, worker_id) - DO NOTHING; - `, wfID, workerID) - if err != nil { - return errors.Wrap(err, "INSERT in to workflow_worker_map") - } - return nil -} - -// Insert actions in the workflow_state table. -func insertActionList(ctx context.Context, db *sql.DB, yamlData string, id uuid.UUID, tx *sql.Tx) error { - wf, err := wflow.Parse([]byte(yamlData)) - if err != nil { - return err - } - - var actionList []*pb.WorkflowAction - var uniqueWorkerID uuid.UUID - for _, task := range wf.Tasks { - taskEnvs := map[string]string{} - taskVolumes := map[string]string{} - for _, vol := range task.Volumes { - v := strings.Split(vol, ":") - taskVolumes[v[0]] = strings.Join(v[1:], ":") - } - for key, val := range task.Environment { - taskEnvs[key] = val - } - - workerID, err := getWorkerID(ctx, db, task.WorkerAddr) - if err != nil { - return errors.WithMessage(err, "unable to insert into action list") - } - workerUID, err := uuid.Parse(workerID) - if err != nil { - return err - } - if uniqueWorkerID != workerUID { - err = insertIntoWfWorkerTable(ctx, id, workerUID, tx) - if err != nil { - return err - } - uniqueWorkerID = workerUID - } - for _, ac := range task.Actions { - acenvs := map[string]string{} - for key, val := range taskEnvs { - acenvs[key] = val - } - for key, val := range ac.Environment { - acenvs[key] = val - } - - envs := []string{} - for key, val := range acenvs { - envs = append(envs, key+"="+val) - } - - volumes := map[string]string{} - for k, v := range taskVolumes { - volumes[k] = v - } - - for _, vol := range ac.Volumes { - v := strings.Split(vol, ":") - volumes[v[0]] = strings.Join(v[1:], ":") - } - - ac.Volumes = []string{} - for k, v := range volumes { - ac.Volumes = append(ac.Volumes, k+":"+v) - } - - action := pb.WorkflowAction{ - TaskName: task.Name, - WorkerId: workerUID.String(), - Name: ac.Name, - Image: ac.Image, - Timeout: ac.Timeout, - Command: ac.Command, - OnTimeout: ac.OnTimeout, - OnFailure: ac.OnFailure, - Environment: envs, - Volumes: ac.Volumes, - Pid: ac.Pid, - } - actionList = append(actionList, &action) - } - } - totalActions := int64(len(actionList)) - actionData, err := json.Marshal(actionList) - if err != nil { - return err - } - - _, err = tx.ExecContext(ctx, ` - INSERT INTO - workflow_state (workflow_id, current_worker, current_task_name, current_action_name, current_action_state, action_list, current_action_index, total_number_of_actions) - VALUES - ($1, $2, $3, $4, $5, $6, $7, $8) - ON CONFLICT (workflow_id) - DO - UPDATE SET - (workflow_id, current_worker, current_task_name, current_action_name, current_action_state, action_list, current_action_index, total_number_of_actions) = ($1, $2, $3, $4, $5, $6, $7, $8); - `, id, "", "", "", 0, actionData, 0, totalActions) - if err != nil { - return errors.Wrap(err, "INSERT in to workflow_state") - } - return nil -} - -// InsertIntoWfDataTable : Insert ephemeral data in workflow_data table. -func (d TinkDB) InsertIntoWfDataTable(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error { - version, err := getLatestVersionWfData(ctx, d.instance, req.GetWorkflowId()) - if err != nil { - return err - } - - // increment version - version++ - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - _, err = tx.ExecContext(ctx, ` - INSERT INTO - workflow_data (workflow_id, version, metadata, data) - VALUES - ($1, $2, $3, $4); - `, req.GetWorkflowId(), version, string(req.GetMetadata()), string(req.GetData())) - if err != nil { - return errors.Wrap(err, "INSERT Into workflow_data") - } - - if version > int32(maxVersions) { - cleanVersion := version - int32(maxVersions) - _, err = tx.ExecContext(ctx, ` - UPDATE workflow_data - SET - data = NULL - WHERE - workflow_id = $1 AND version = $2; - `, req.GetWorkflowId(), cleanVersion) - if err != nil { - return errors.Wrap(err, "UPDATE") - } - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// GetfromWfDataTable : Give you the ephemeral data from workflow_data table. -func (d TinkDB) GetfromWfDataTable(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - version := req.GetVersion() - if req.Version == 0 { - v, err := getLatestVersionWfData(ctx, d.instance, req.GetWorkflowId()) - if err != nil { - return []byte(""), err - } - version = v - } - query := ` - SELECT data - FROM workflow_data - WHERE - workflow_id = $1 AND version = $2 - ` - row := d.instance.QueryRowContext(ctx, query, req.GetWorkflowId(), version) - buf := []byte{} - err := row.Scan(&buf) - if err == nil { - return buf, nil - } - - if err != sql.ErrNoRows { //nolint:errorlint // there's no wrapping going on here - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - } - - return []byte{}, nil -} - -// GetWorkflowMetadata returns metadata wrt to the ephemeral data of a workflow. -func (d TinkDB) GetWorkflowMetadata(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - version := req.GetVersion() - if req.Version == 0 { - v, err := getLatestVersionWfData(ctx, d.instance, req.GetWorkflowId()) - if err != nil { - return []byte(""), err - } - version = v - } - query := ` - SELECT metadata - FROM workflow_data - WHERE - workflow_id = $1 AND version = $2 - ` - row := d.instance.QueryRowContext(ctx, query, req.GetWorkflowId(), version) - buf := []byte{} - err := row.Scan(&buf) - if err == nil { - return buf, nil - } - - if err != sql.ErrNoRows { //nolint:errorlint // there's no wrapping going on here - err = errors.Wrap(err, "SELECT from workflow_data") - d.logger.Error(err) - } - - return []byte{}, nil -} - -// GetWorkflowDataVersion returns the latest version of data for a workflow. -func (d TinkDB) GetWorkflowDataVersion(ctx context.Context, workflowID string) (int32, error) { - return getLatestVersionWfData(ctx, d.instance, workflowID) -} - -// GetWorkflowsForWorker : returns the list of workflows for a particular worker. -func (d TinkDB) GetWorkflowsForWorker(ctx context.Context, id string) ([]string, error) { - rows, err := d.instance.QueryContext(ctx, ` - SELECT workflow_id - FROM workflow_worker_map - WHERE - worker_id = $1; - `, id) - if err != nil { - return nil, err - } - var wfID []string - defer rows.Close() - var workerID string - - for rows.Next() { - err = rows.Scan(&workerID) - if err != nil { - err = errors.Wrap(err, "SELECT from worflow_worker_map") - d.logger.Error(err) - return nil, err - } - wfID = append(wfID, workerID) - } - err = rows.Err() - if errors.Is(err, sql.ErrNoRows) { - return nil, nil - } - return wfID, err -} - -// GetWorkflow returns a workflow. -func (d TinkDB) GetWorkflow(ctx context.Context, id string) (Workflow, error) { - query := ` - SELECT template, devices, created_at, updated_at - FROM workflow - WHERE - id = $1 - AND - deleted_at IS NULL; - ` - row := d.instance.QueryRowContext(ctx, query, id) - var ( - tmp, tar string - crAt, upAt time.Time - ) - err := row.Scan(&tmp, &tar, &crAt, &upAt) - if err == nil { - createdAt := timestamppb.New(crAt) - updatedAt := timestamppb.New(upAt) - return Workflow{ - ID: id, - Template: tmp, - Hardware: tar, - CreatedAt: createdAt, - UpdatedAt: updatedAt, - }, nil - } - if err != sql.ErrNoRows { //nolint:errorlint // there's no wrapping going on here - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - return Workflow{}, err - } - - return Workflow{}, errors.New("Workflow with id " + id + " does not exist") -} - -// DeleteWorkflow deletes a workflow. -func (d TinkDB) DeleteWorkflow(ctx context.Context, id string, _ int32) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - _, err = tx.ExecContext(ctx, ` - DELETE FROM workflow_worker_map - WHERE - workflow_id = $1; - `, id) - if err != nil { - return errors.Wrap(err, "Delete Workflow Error") - } - - _, err = tx.ExecContext(ctx, ` - DELETE FROM workflow_state - WHERE - workflow_id = $1; - `, id) - if err != nil { - return errors.Wrap(err, "Delete Workflow Error") - } - - res, err := tx.ExecContext(ctx, ` - UPDATE workflow - SET - deleted_at = NOW() - WHERE - id = $1; - `, id) - if err != nil { - return errors.Wrap(err, "UPDATE") - } - - if count, _ := res.RowsAffected(); count == int64(0) { - return status.Error(codes.NotFound, fmt.Sprintf("not found, id:%s", id)) - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// ListWorkflows returns all workflows. -func (d TinkDB) ListWorkflows(fn func(wf Workflow) error) error { - rows, err := d.instance.Query(` - SELECT id, template, devices, created_at, updated_at - FROM workflow - WHERE - deleted_at IS NULL; - `) - if err != nil { - return err - } - - defer rows.Close() - var ( - id, tmp, tar string - crAt, upAt time.Time - ) - - for rows.Next() { - err = rows.Scan(&id, &tmp, &tar, &crAt, &upAt) - if err != nil { - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - return err - } - - wf := Workflow{ - ID: id, - Template: tmp, - Hardware: tar, - } - wf.CreatedAt = timestamppb.New(crAt) - wf.UpdatedAt = timestamppb.New(upAt) - err = fn(wf) - if err != nil { - return err - } - } - err = rows.Err() - if errors.Is(err, sql.ErrNoRows) { - err = nil - } - return err -} - -// UpdateWorkflow updates a given workflow. -func (d TinkDB) UpdateWorkflow(ctx context.Context, wf Workflow, _ int32) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - switch { - case wf.Hardware == "" && wf.Template != "": - _, err = tx.ExecContext(ctx, `UPDATE workflow SET updated_at = NOW(), template = $2 WHERE id = $1;`, wf.ID, wf.Template) - case wf.Hardware != "" && wf.Template == "": - _, err = tx.ExecContext(ctx, `UPDATE workflow SET updated_at = NOW(), devices = $2 WHERE id = $1;`, wf.ID, wf.Hardware) - default: - _, err = tx.ExecContext(ctx, `UPDATE workflow SET updated_at = NOW(), template = $2, devices = $3 WHERE id = $1;`, wf.ID, wf.Template, wf.Hardware) - } - - if err != nil { - return errors.Wrap(err, "UPDATE") - } - - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// UpdateWorkflowState : update the current workflow state. -func (d TinkDB) UpdateWorkflowState(ctx context.Context, wfContext *pb.WorkflowContext) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - _, err = tx.ExecContext(ctx, ` - UPDATE workflow_state - SET current_task_name = $2, - current_action_name = $3, - current_action_state = $4, - current_worker = $5, - current_action_index = $6 - WHERE - workflow_id = $1; - `, wfContext.WorkflowId, wfContext.CurrentTask, wfContext.CurrentAction, wfContext.CurrentActionState, wfContext.CurrentWorker, wfContext.CurrentActionIndex) - if err != nil { - return errors.Wrap(err, "INSERT in to workflow_state") - } - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// GetWorkflowContexts : gives you the current workflow context. -func (d TinkDB) GetWorkflowContexts(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - query := ` - SELECT current_worker, current_task_name, current_action_name, current_action_index, current_action_state, total_number_of_actions - FROM workflow_state - WHERE - workflow_id = $1; - ` - row := d.instance.QueryRowContext(ctx, query, wfID) - var cw, ct, ca string - var cai, tact int64 - var cas pb.State - err := row.Scan(&cw, &ct, &ca, &cai, &cas, &tact) - if err == nil { - return &pb.WorkflowContext{ - WorkflowId: wfID, - CurrentWorker: cw, - CurrentTask: ct, - CurrentAction: ca, - CurrentActionIndex: cai, - CurrentActionState: cas, - TotalNumberOfActions: tact, - }, nil - } - if err != sql.ErrNoRows { //nolint:errorlint // there's no wrapping going on here - err = errors.Wrap(err, "SELECT from worflow_state") - d.logger.Error(err) - return &pb.WorkflowContext{}, err - } - return &pb.WorkflowContext{}, errors.New("Workflow with id " + wfID + " does not exist") -} - -// GetWorkflowActions : gives you the action list of workflow. -func (d TinkDB) GetWorkflowActions(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - query := ` - SELECT action_list - FROM workflow_state - WHERE - workflow_id = $1; - ` - row := d.instance.QueryRowContext(ctx, query, wfID) - var actionList string - err := row.Scan(&actionList) - if err == nil { - actions := []*pb.WorkflowAction{} - if err := json.Unmarshal([]byte(actionList), &actions); err != nil { - return nil, err - } - return &pb.WorkflowActionList{ - ActionList: actions, - }, nil - } - if err != sql.ErrNoRows { //nolint:errorlint // there's no wrapping going on here - err = errors.Wrap(err, "SELECT from worflow_state") - d.logger.Error(err) - } - return &pb.WorkflowActionList{}, nil -} - -// InsertIntoWorkflowEventTable : insert workflow event table. -func (d TinkDB) InsertIntoWorkflowEventTable(ctx context.Context, wfEvent *pb.WorkflowActionStatus, t time.Time) error { - tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) - if err != nil { - return errors.Wrap(err, "BEGIN transaction") - } - - // TODO "created_at" field should be set in worker and come in the request - _, err = tx.ExecContext(ctx, ` - INSERT INTO - workflow_event (workflow_id, worker_id, task_name, action_name, execution_time, message, status, created_at) - VALUES - ($1, $2, $3, $4, $5, $6, $7, $8); - `, wfEvent.WorkflowId, wfEvent.WorkerId, wfEvent.TaskName, wfEvent.ActionName, wfEvent.Seconds, wfEvent.Message, wfEvent.ActionStatus, t) - if err != nil { - return errors.Wrap(err, "INSERT in to workflow_event") - } - err = tx.Commit() - if err != nil { - return errors.Wrap(err, "COMMIT") - } - return nil -} - -// ShowWorkflowEvents returns all workflows. -func (d TinkDB) ShowWorkflowEvents(wfID string, fn func(wfs *pb.WorkflowActionStatus) error) error { - rows, err := d.instance.Query(` - SELECT worker_id, task_name, action_name, execution_time, message, status, created_at - FROM workflow_event - WHERE - workflow_id = $1 - ORDER BY - created_at ASC; - `, wfID) - if err != nil { - return err - } - - defer rows.Close() - var ( - st int32 - secs int64 - id, tName, aName, msg string - evTime time.Time - ) - - for rows.Next() { - err = rows.Scan(&id, &tName, &aName, &secs, &msg, &st, &evTime) - if err != nil { - err = errors.Wrap(err, "SELECT") - d.logger.Error(err) - return err - } - createdAt := timestamppb.New(evTime) - wfs := &pb.WorkflowActionStatus{ - WorkerId: id, - TaskName: tName, - ActionName: aName, - Seconds: secs, - Message: msg, - ActionStatus: pb.State(st), - CreatedAt: createdAt, - } - err = fn(wfs) - if err != nil { - return err - } - } - err = rows.Err() - if errors.Is(err, sql.ErrNoRows) { - err = nil - } - return err -} - -func getLatestVersionWfData(ctx context.Context, db *sql.DB, wfID string) (int32, error) { - query := ` - SELECT COUNT(*) - FROM workflow_data - WHERE - workflow_id = $1; - ` - row := db.QueryRowContext(ctx, query, wfID) - var version int32 - - if err := row.Scan(&version); err != nil { - return -1, err - } - return version, nil -} - -func getWorkerIDbyMac(ctx context.Context, db *sql.DB, mac string) (string, error) { - arg := ` - { - "network": { - "interfaces": [ - { - "dhcp": { - "mac": "` + mac + `" - } - } - ] - } - } - ` - query := ` - SELECT id - FROM hardware - WHERE - deleted_at IS NULL - AND - data @> $1 - ` - - id, err := get(ctx, db, query, arg) - if errors.Is(err, sql.ErrNoRows) { - err = errors.WithMessage(errors.New(mac), "mac") - } - return id, err -} - -func getWorkerIDbyIP(ctx context.Context, db *sql.DB, ip string) (string, error) { - // update for instance (under metadata) - instance := ` - { - "instance": { - "ip_addresses": [ - { - "address": "` + ip + `" - } - ] - } - } - ` - hardwareOrManagement := ` - { - "network": { - "interfaces": [ - { - "dhcp": { - "ip": { - "address": "` + ip + `" - } - } - } - ] - } - } - ` - - query := ` - SELECT id - FROM hardware - WHERE - deleted_at IS NULL - AND ( - data @> $1 - OR - data @> $2 - ) - ` - - id, err := get(ctx, db, query, instance, hardwareOrManagement) - if errors.Is(err, sql.ErrNoRows) { - err = errors.WithMessage(errors.New(ip), "ip") - } - return id, err -} - -func getWorkerID(ctx context.Context, db *sql.DB, addr string) (string, error) { - parsedMAC, err := net.ParseMAC(addr) - if err != nil { - ip := net.ParseIP(addr) - if ip == nil || ip.To4() == nil { - return "", fmt.Errorf("invalid worker address: %s", addr) - } - id, err := getWorkerIDbyIP(ctx, db, addr) - return id, errors.WithMessage(err, "no worker found") - } - id, err := getWorkerIDbyMac(ctx, db, parsedMAC.String()) - return id, errors.WithMessage(err, "no worker found") -} - -func init() { - val := os.Getenv("MAX_WORKFLOW_DATA_VERSIONS") - if v, err := strconv.Atoi(val); err == nil { - maxVersions = v - } -} diff --git a/db/workflow_test.go b/db/workflow_test.go deleted file mode 100644 index 9de1f8ff6..000000000 --- a/db/workflow_test.go +++ /dev/null @@ -1,409 +0,0 @@ -//nolint:thelper // misuse of test helpers requires a large refactor into subtests -package db_test - -import ( - "context" - "fmt" - "math/rand" - "sync" - "testing" - - "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/protos/hardware" - pb "github.com/tinkerbell/tink/protos/workflow" - "github.com/tinkerbell/tink/workflow" -) - -type input struct { - devices string - template *workflow.Workflow - hardware *hardware.Hardware - workflowCount int -} - -func TestCreateWorkflow(t *testing.T) { - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // InputAsync if set to true inserts all the input concurrently - InputAsync bool - // Input is a struct that will be used to create a workflow and pre-populate the database - Input *input - // Expectation is the function used to apply the assertions. - // You can use it to validate if the Input are created as you expect - Expectation func(t *testing.T, in *input, tinkDB *db.TinkDB) - // ExpectedErr is used to check for error during - // CreateWorkflow execution. If you expect a particular error - // and you want to assert it, you can use this function - ExpectedErr func(*testing.T, error) - }{ - { - Name: "create-single-workflow", - Input: &input{ - workflowCount: 1, - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, in *input, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.ListWorkflows(func(wf db.Workflow) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != in.workflowCount { - t.Errorf("expected %d workflows stored in the database but we got %d", in.workflowCount, count) - } - }, - }, - { - Name: "create-single-workflow-with-upper-case-worker-address", - Input: &input{ - workflowCount: 1, - devices: "{\"device_1\":\"AE:FB:27:a1:C4:02\"}", - hardware: readHardwareData("./testdata/hardware_2.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, in *input, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.ListWorkflows(func(wf db.Workflow) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != in.workflowCount { - t.Errorf("expected %d workflows stored in the database but we got %d", in.workflowCount, count) - } - }, - }, - { - Name: "create-fails-invalid-worker-address", - Input: &input{ - workflowCount: 0, - devices: "{\"invalid_device\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, in *input, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.ListWorkflows(func(wf db.Workflow) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != in.workflowCount { - t.Errorf("expected %d workflows stored in the database but we got %d", in.workflowCount, count) - } - }, - }, - { - Name: "stress-create-workflow", - InputAsync: true, - Input: &input{ - workflowCount: 20, - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, in *input, tinkDB *db.TinkDB) { - count := 0 - err := tinkDB.ListWorkflows(func(wf db.Workflow) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != in.workflowCount { - t.Errorf("expected %d workflows stored in the database but we got %d", in.workflowCount, count) - } - }, - }, - } - - ctx := context.Background() - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - err := createHardware(ctx, tinkDB, s.Input.hardware) - if err != nil { - t.Error(err) - } - err = createTemplateFromWorkflowType(ctx, tinkDB, s.Input.template) - if err != nil { - t.Error(err) - } - - var wg sync.WaitGroup - wg.Add(s.Input.workflowCount) - for i := 0; i < s.Input.workflowCount; i++ { - if s.InputAsync { - go func(ctx context.Context, tinkDB *db.TinkDB, in *input) { - defer wg.Done() - _, err := createWorkflow(ctx, tinkDB, in) - if err != nil { - s.ExpectedErr(t, err) - } - }(ctx, tinkDB, s.Input) - } else { - wg.Done() - _, err := createWorkflow(ctx, tinkDB, s.Input) - if err != nil { - s.ExpectedErr(t, err) - } - } - } - wg.Wait() - s.Expectation(t, s.Input, tinkDB) - }) - } -} - -func TestDeleteWorkflow(t *testing.T) { - t.Parallel() - ctx := context.Background() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - in := &input{ - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - } - err := createHardware(ctx, tinkDB, in.hardware) - if err != nil { - t.Error(err) - } - err = createTemplateFromWorkflowType(ctx, tinkDB, in.template) - if err != nil { - t.Error(err) - } - - wfID, err := createWorkflow(ctx, tinkDB, in) - if err != nil { - t.Error(err) - } - - // TODO: Investigate why we bother with passing an unused status value - err = tinkDB.DeleteWorkflow(ctx, wfID, pb.State_value[pb.State_STATE_PENDING.String()]) - if err != nil { - t.Error(err) - } - - count := 0 - err = tinkDB.ListWorkflows(func(wf db.Workflow) error { - count++ - return nil - }) - if err != nil { - t.Error(err) - } - if count != 0 { - t.Errorf("expected 0 workflows stored in the database after delete, but we got %d", count) - } -} - -func TestGetWorkflow(t *testing.T) { - ctx := context.Background() - tests := []struct { - // Name identifies the single test in a table test scenario - Name string - // GetAsync if set to true gets all the workflows concurrently - GetAsync bool - // Input is a struct that will be used to create a workflow and pre-populate the database - Input *input - // Expectation is the function used to apply the assertions. - // You can use it to validate if you get workflow you expected - Expectation func(t *testing.T, tinkDB *db.TinkDB, id string) - }{ - { - Name: "get-workflow", - Input: &input{ - workflowCount: 1, - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, tinkDB *db.TinkDB, id string) { - _, err := tinkDB.GetWorkflow(ctx, id) - if err != nil { - t.Error(err) - } - }, - }, - { - Name: "get-workflow-non-existing-id", - Input: &input{ - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, tinkDB *db.TinkDB, id string) { - wf, err := tinkDB.GetWorkflow(ctx, uuid.New().String()) - if err != nil { - t.Error(err) - } - assert.Empty(t, wf) - }, - }, - { - Name: "stress-get-workflow", - GetAsync: true, - Input: &input{ - workflowCount: 20, - devices: "{\"device_1\":\"08:00:27:00:00:01\"}", - hardware: readHardwareData("./testdata/hardware.json"), - template: func() *workflow.Workflow { - tmp := workflow.MustParseFromFile("./testdata/template_happy_path_1.yaml") - tmp.ID = uuid.New().String() - tmp.Name = fmt.Sprintf("id_%d", rand.Int()) - return tmp - }(), - }, - Expectation: func(t *testing.T, tinkDB *db.TinkDB, id string) { - _, err := tinkDB.GetWorkflow(ctx, id) - if err != nil { - t.Error(err) - } - }, - }, - } - - for _, s := range tests { - t.Run(s.Name, func(t *testing.T) { - t.Parallel() - _, tinkDB, cl := NewPostgresDatabaseClient(ctx, t, NewPostgresDatabaseRequest{ - ApplyMigration: true, - }) - defer func() { - err := cl() - if err != nil { - t.Error(err) - } - }() - - err := createHardware(ctx, tinkDB, s.Input.hardware) - if err != nil { - t.Error(err) - } - err = createTemplateFromWorkflowType(ctx, tinkDB, s.Input.template) - if err != nil { - t.Error(err) - } - - if s.Input.workflowCount == 0 { - s.Expectation(t, tinkDB, uuid.New().String()) - return - } - - wfIDs := []string{} - for i := 0; i < s.Input.workflowCount; i++ { - id, err := createWorkflow(ctx, tinkDB, s.Input) - if err != nil { - t.Error(err) - } - wfIDs = append(wfIDs, id) - } - - var wg sync.WaitGroup - wg.Add(s.Input.workflowCount) - for i := 0; i < s.Input.workflowCount; i++ { - if s.GetAsync { - go func(t *testing.T, tinkDB *db.TinkDB, wfID string) { - defer wg.Done() - s.Expectation(t, tinkDB, wfID) - }(t, tinkDB, wfIDs[i]) - } else { - wg.Done() - s.Expectation(t, tinkDB, wfIDs[i]) - } - } - wg.Wait() - }) - } -} - -func createWorkflow(ctx context.Context, tinkDB *db.TinkDB, in *input) (string, error) { - wtmpl, err := tinkDB.GetTemplate(context.Background(), map[string]string{"id": in.template.ID}, false) - if err != nil { - return "", err - } - - data, err := workflow.RenderTemplate(in.template.ID, wtmpl.GetData(), []byte(in.devices)) - if err != nil { - return "", err - } - - id := uuid.New() - wf := db.Workflow{ - ID: id.String(), - Template: in.template.ID, - Hardware: in.devices, - } - err = tinkDB.CreateWorkflow(ctx, wf, data, id) - if err != nil { - return "", err - } - return id.String(), nil -} diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index a1d70c0be..000000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,125 +0,0 @@ -version: "3.8" -services: - ##### Actual services first ##### - db: - image: postgres:14-alpine - environment: - POSTGRES_DB: tinkerbell - POSTGRES_PASSWORD: tinkerbell - POSTGRES_USER: tinkerbell - volumes: - - postgres_data:/var/lib/postgresql/data - ports: - - 5432:5432 - deploy: - resources: - limits: - cpus: "0.50" - memory: "512M" - healthcheck: - test: - - CMD-SHELL - - pg_isready -U tinkerbell - interval: 1s - timeout: 1s - retries: 30 - restart: unless-stopped - - tink-server: - build: - context: ./cmd/tink-server/ - dockerfile: Dockerfile - environment: - FACILITY: ${FACILITY:-onprem} - PACKET_ENV: ${PACKET_ENV:-testing} - PACKET_VERSION: ${PACKET_VERSION:-ignored} - PGDATABASE: tinkerbell - PGHOST: db - PGPASSWORD: tinkerbell - PGPORT: 5432 - PGSSLMODE: disable - PGUSER: tinkerbell - ROLLBAR_DISABLE: ${ROLLBAR_DISABLE:-1} - ROLLBAR_TOKEN: ${ROLLBAR_TOKEN:-ignored} - TINKERBELL_GRPC_AUTHORITY: :42113 - TINKERBELL_HTTP_AUTHORITY: :42114 - TINKERBELL_TLS: ${TINKERBERLL_TLS:-"true"} - volumes: - - certs:/certs/${FACILITY:-onprem}:ro - ports: - - 42113:42113/tcp - - 42114:42114/tcp - depends_on: - db: - condition: service_healthy - generate-tls-certs: - condition: service_completed_successfully - db-migrations: - condition: service_completed_successfully - deploy: - resources: - limits: - cpus: "0.50" - memory: "512M" - healthcheck: - # port needs to match TINKERBELL_HTTP_AUTHORITY - test: - - CMD-SHELL - - wget -qO- 127.0.0.1:42114/healthz - interval: 5s - timeout: 2s - retries: 30 - restart: unless-stopped - - ##### One-off setup processes ##### - db-migrations: - build: - context: ./cmd/tink-server/ - dockerfile: Dockerfile - environment: - FACILITY: ${FACILITY:-onprem} - ONLY_MIGRATION: "true" - PGDATABASE: tinkerbell - PGHOST: db - PGPASSWORD: tinkerbell - PGPORT: 5432 - PGSSLMODE: disable - PGUSER: tinkerbell - TINKERBELL_GRPC_AUTHORITY: :42113 - TINKERBELL_HTTP_AUTHORITY: :42114 - TINKERBELL_TLS: ${TINKERBERLL_TLS:-"true"} - depends_on: - db: - condition: service_healthy - restart: on-failure - - generate-tls-certs: - image: cfssl/cfssl - entrypoint: /app/generate.sh - environment: - FACILITY: ${FACILITY:-onprem} - volumes: - - certs:/certs/${FACILITY:-onprem} - - ./deploy/generate-tls-certs/:/app:ro - - ##### Debugging/interactive commands ##### - tink-cli: - build: - context: ./cmd/tink-cli/ - dockerfile: Dockerfile - environment: - TINKERBELL_GRPC_AUTHORITY: tink-server:42113 - TINKERBELL_TLS: ${TINKERBERLL_TLS:-"true"} - depends_on: - tink-server: - condition: service_healthy - deploy: - resources: - limits: - cpus: "0.50" - memory: "512M" - restart: unless-stopped - -volumes: - certs: - postgres_data: diff --git a/go.mod b/go.mod index 4481bee55..4779b27a1 100644 --- a/go.mod +++ b/go.mod @@ -3,170 +3,103 @@ module github.com/tinkerbell/tink go 1.18 require ( - github.com/bufbuild/buf v1.8.0 github.com/docker/distribution v2.8.1+incompatible - github.com/docker/docker v20.10.17+incompatible + github.com/docker/docker v20.10.21+incompatible github.com/equinix-labs/otel-init-go v0.0.1 + github.com/go-logr/logr v1.2.3 github.com/go-logr/zapr v1.2.0 - github.com/golang/protobuf v1.5.2 - github.com/google/go-cmp v0.5.8 - github.com/google/uuid v1.3.0 + github.com/google/go-cmp v0.5.9 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/jedib0t/go-pretty v4.3.0+incompatible - github.com/ktr0731/evans v0.10.0 - github.com/lib/pq v1.10.1 - github.com/matryer/moq v0.2.3 github.com/onsi/ginkgo/v2 v2.1.3 github.com/onsi/gomega v1.18.1 - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 + github.com/opencontainers/image-spec v1.1.0-rc2 github.com/packethost/pkg v0.0.0-20200903155310-0433e0605550 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.12.1 - github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 - github.com/spf13/cobra v1.5.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.8.1 - github.com/stretchr/testify v1.8.0 - github.com/testcontainers/testcontainers-go v0.11.1 - github.com/tinkerbell/lint-install v0.0.0-20220502172532-2fdfa62596af - go.mongodb.org/mongo-driver v1.1.2 // indirect + github.com/stretchr/testify v1.8.1 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 - go.uber.org/multierr v1.8.0 - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa - google.golang.org/grpc v1.48.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.28.1 + go.uber.org/multierr v1.9.0 + google.golang.org/grpc v1.51.0 + google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.0 k8s.io/apimachinery v0.23.0 k8s.io/client-go v0.23.0 knative.dev/pkg v0.0.0-20211119170723-a99300deff34 - mvdan.cc/gofumpt v0.1.1 sigs.k8s.io/controller-runtime v0.11.1 - sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220304125252-9ee63fc65a97 - sigs.k8s.io/controller-tools v0.8.0 - sigs.k8s.io/kustomize/kustomize/v4 v4.5.4 sigs.k8s.io/yaml v1.3.0 ) -require github.com/go-logr/logr v1.2.3 - require ( - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/Microsoft/hcsshim v0.9.4 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect - github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blendle/zapdriver v1.3.1 // indirect - github.com/bufbuild/connect-go v0.4.0 // indirect - github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.1.2 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/cgroups v1.0.3 // indirect - github.com/containerd/containerd v1.6.8 // indirect - github.com/containerd/typeurl v1.0.2 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fatih/color v1.12.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/go-chi/chi/v5 v5.0.7 // indirect - github.com/go-errors/errors v1.0.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/errors v0.19.2 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.5 // indirect - github.com/go-openapi/strfmt v0.19.3 // indirect - github.com/go-openapi/swag v0.19.15 // indirect - github.com/go-stack/stack v1.8.0 // indirect - github.com/gobuffalo/flect v0.2.4 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect - github.com/gorilla/websocket v1.4.2 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a // indirect - github.com/jhump/protocompile v0.0.0-20220812162104-d108583e055d // indirect - github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b // indirect - github.com/josharian/intern v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/compress v1.15.9 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect - github.com/ktr0731/grpc-web-go-client v0.2.7 // indirect + github.com/kr/pretty v0.3.0 // indirect github.com/magiconair/properties v1.8.5 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect - github.com/moby/buildkit v0.10.3 // indirect - github.com/moby/sys/mount v0.3.0 // indirect - github.com/moby/sys/mountinfo v0.6.0 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/runc v1.1.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pkg/profile v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rollbar/rollbar-go v1.0.2 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect + github.com/smartystreets/assertions v1.0.0 // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.3.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect - go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel v1.9.0 // indirect + go.opentelemetry.io/otel v1.11.2 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 // indirect go.opentelemetry.io/otel/sdk v1.4.1 // indirect - go.opentelemetry.io/otel/trace v1.9.0 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect go.opentelemetry.io/proto/otlp v0.12.0 // indirect - go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/zap v1.22.0 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect - golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 // indirect - golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect - golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect - golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect - golang.org/x/text v0.3.7 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/oauth2 v0.1.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/tools v0.4.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - gopkg.in/gorp.v1 v1.7.2 // indirect + google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -176,13 +109,13 @@ require ( k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/kustomize/api v0.11.4 // indirect - sigs.k8s.io/kustomize/cmd/config v0.10.6 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect ) -replace github.com/stormcat24/protodep => github.com/ackintosh/protodep v0.0.0-20200728152107-abf8eb579d6c +// When updating buf we receive ambiguous import errors stemming from the cloud.google.com/go +// package. This is a known issue with buf and is fixed in the latest version of buf. +// This fix was found in https://github.com/aws-observability/aws-otel-collector/issues/926#issuecomment-1263065587 +replace cloud.google.com/go => cloud.google.com/go v0.107.0 // 2.8.0+incompatible has incorrect checksums in the public sumdb. exclude github.com/docker/distributions v2.8.0+incompatible diff --git a/go.sum b/go.sum index d6c691004..c002c1c66 100644 --- a/go.sum +++ b/go.sum @@ -1,253 +1,289 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= -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.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= -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.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= -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.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -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 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -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 v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +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.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.5.0/go.mod h1:c4nNYR1qdq7eaZ+jSc5fonrQN2k3M7sWATcYTiakjEo= -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/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/pubsub v1.10.3/go.mod h1:FUcc28GpGxxACoklPsE1sCtbkY4Ix+ro7yvw+h82Jn4= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= 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= -cloud.google.com/go/storage v1.15.0/go.mod h1:mjjQMoxxyGH7Jr8K5qrx6N2O0AHsczI61sMNn03GIZI= cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM= -code.gitea.io/sdk/gitea v0.14.0/go.mod h1:89WiyOX1KEcvjP66sRHdu0RafojGo60bT9UqW17VbWs= -contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= -contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE= -contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/Azure/azure-amqp-common-go/v3 v3.1.0/go.mod h1:PBIGdzcO1teYoufTKMcGibdKaYZv4avS+O6LNIp8bq0= -github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v54.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-service-bus-go v0.10.11/go.mod h1:AWw9eTTWZVZyvgpPahD1ybz3a8/vT3GsJDS8KYex55U= -github.com/Azure/azure-storage-blob-go v0.13.0/go.mod h1:pA9kNqtjUeQF2zOSu4s//nUdBD+e64lEuc4sVnuOfNs= -github.com/Azure/go-amqp v0.13.0/go.mod h1:qj+o8xPCz9tMSbQ83Vp8boHahuRDl5mkNHyt1xlxUTs= -github.com/Azure/go-amqp v0.13.4/go.mod h1:wbpCKA8tR5MLgRyIu+bb+S6ECdIDdYJ0NlpFE9xsBPI= -github.com/Azure/go-amqp v0.13.7/go.mod h1:wbpCKA8tR5MLgRyIu+bb+S6ECdIDdYJ0NlpFE9xsBPI= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.3/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.7/go.mod h1:AkzUsqkrdmNhfP2i54HqINVQopw0CLDnvHpJ88Zz1eI= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= 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/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GoogleCloudPlatform/cloudsql-proxy v1.22.0/go.mod h1:mAm5O/zik2RFmcpigNjg6nMotDL8ZXJaxKzgGVcSMFA= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= -github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/ProtonMail/go-crypto v0.0.0-20210329181949-3900d675f39b/go.mod h1:HTM9X7e9oLwn7RiqLG0UVwVRJenLs3wN+tQ0NPAfwMQ= -github.com/ProtonMail/go-crypto v0.0.0-20210408094314-bf0c5240ed99/go.mod h1:HTM9X7e9oLwn7RiqLG0UVwVRJenLs3wN+tQ0NPAfwMQ= -github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a/go.mod h1:NYt+V3/4rEeDuaev/zw1zCq8uqVEuPHzDPo3OZrlGJ4= -github.com/ProtonMail/gopenpgp/v2 v2.1.8/go.mod h1:mjMvRMlOlBhNuaa3z0xOmEgAkba/Mu1Z8uWwYj4/6Ws= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= -github.com/Songmu/gocredits v0.2.0/go.mod h1:JBywHzwOmBMF9uidu1EgS3mwVNqZCKOPLPrFd1h7qQo= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/jsonschema v0.0.0-20180308105923-f2c93856175a/go.mod h1:qpebaTNSsyUn5rPSJMsfqEtDw71TTggXM6stUDI16HA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= -github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= -github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= -github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bufbuild/buf v1.8.0 h1:53qJ3QY/KOHwSjWgCQYkQaR3jGWst7aOfTXnFe8e+VQ= -github.com/bufbuild/buf v1.8.0/go.mod h1:tBzKkd1fzCcBV6KKSO7zo3rlhk3o1YQ0F2tQKSC2aNU= -github.com/bufbuild/connect-go v0.4.0 h1:fIMyUYG8mXSTH+nnlOx9KmRUf3mBF0R2uKK+BQBoOHE= -github.com/bufbuild/connect-go v0.4.0/go.mod h1:ZEtBnQ7J/m7bvWOW+H8T/+hKQCzPVfhhhICuvtcnjlI= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= -github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= -github.com/caarlos0/env/v6 v6.6.2/go.mod h1:P0BVSgU9zfkxfSpFUs6KsO3uWR4k3Ac0P66ibAGTybM= -github.com/caarlos0/go-shellwords v1.0.12/go.mod h1:bYeeX1GrTLPl5cAMYEzdm272qdsQAZiaHgeF0KTk1Gw= -github.com/caarlos0/testfs v0.4.3/go.mod h1:bRN55zgG4XCUVVHZCeU+/Tz1Q6AxEJOEJTliBy+1DMk= -github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -259,24 +295,11 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= -github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= 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/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -288,177 +311,38 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= -github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8 h1:yGFEcFNMhze29DxAAB33v/1OMRYF/cM9iwwgV2P0ZrE= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.1/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -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= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/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/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= -github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= -github.com/dghubble/go-twitter v0.0.0-20201011215211-4b180d0cc78d/go.mod h1:xfg4uS5LEzOj8PgZV7SQYRHbG7jPUnelEiaAVJxmhJE= -github.com/dghubble/oauth1 v0.7.0/go.mod h1:8pFdfPkv/jr8mkChVbNVuJ0suiHe278BtWI4Tk1ujxk= -github.com/dghubble/sling v1.3.0/go.mod h1:XXShWaBWKzNLhu2OxikSNFrlsvowtz4kyRuXUG7oQKY= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-gk v0.0.0-20140819190930-201884a44051/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654/go.mod h1:qm+vckxRlDt0aOla0RYJJVeqHZlWfOm2UIxHaqPB46E= github.com/dgryski/go-lttb v0.0.0-20180810165845-318fcdf10a77/go.mod h1:Va5MyIzkU0rAM92tn3hb3Anb7oz7KcnixF49+2wOMe4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= +github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -466,80 +350,42 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/equinix-labs/otel-init-go v0.0.1 h1:v+XdagFMmmZHsOF6TLQArOt6CkuxiwXsIQnn3A/sCYQ= github.com/equinix-labs/otel-init-go v0.0.1/go.mod h1:Zprvqw70JGsTRLbj6bCtndooCAgg4mY4H2MF3KC/AS0= -github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8= -github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git/v5 v5.2.0/go.mod h1:kh02eMX+wdqqxgNMEyq8YgwlIOsDOa9homkUq1PoTMs= -github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= 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/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -555,120 +401,42 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= -github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= -github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= -github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/flect v0.2.4 h1:BSYA8+T60cdyq+vynaSUjqSVI9mDEg9ZfQUXKmfjo4I= github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= -github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= -github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= -github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/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/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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= @@ -684,16 +452,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.41.1/go.mod h1:LPtcY3aAAU8wydHrKpnanx9Og8K/cblZSyGmI5CJZUk= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= github.com/gonum/diff v0.0.0-20181124234638-500114f11e71/go.mod h1:22dM4PLscQl+Nzf64qNBurVJvfyvZELT0iRW2l/NN70= github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= @@ -708,155 +466,85 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= 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.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.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +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/go-github/v27 v27.0.6/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= -github.com/google/go-github/v35 v35.3.0/go.mod h1:yWB7uCcVWaUbUP74Aq3whuMySRMatyRmq5U9FTNlbio= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/go-replayers/grpcreplay v1.0.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= -github.com/google/go-replayers/httpreplay v0.1.2/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+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/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= -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-20200507031123-427632fa3b1c/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-20201218002935-b9804c9f04c2/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-20210407192527-94a9f03dee38/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/rpmpack v0.0.0-20210410105602-e20c988a6f5a/go.mod h1:+y9lKiqDhR4zkLl+V9h4q0rdyrYVsWWm6LLCQP33DIk= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/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/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= 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.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/goreleaser/chglog v0.1.2/go.mod h1:tTZsFuSZK4epDXfjMkxzcGbrIOXprf0JFp47BjIr3B8= -github.com/goreleaser/fileglob v1.2.0/go.mod h1:rFyb2pXaK3YdnYnSjn6lifw0h2Q6s8OfOsx6I6bXkKE= -github.com/goreleaser/goreleaser v0.172.1/go.mod h1:oxH1VQjOnAu+MFl4WdZyz9xbQr/MglE/CCgE1AnSxWc= -github.com/goreleaser/nfpm/v2 v2.5.1/go.mod h1:Bq9OBKhvhTmdPh6lHUbVBKa3JCw61OgIFEau+vs2CO0= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= @@ -867,118 +555,46 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -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/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= -github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/tdigest v0.0.0-20180711151920-a7d76c6f093a/go.mod h1:9GkyshztGufsdPQWjH+ifgnIr3xNUL5syI70g2dzU1o= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= -github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a h1:d4+I1YEKVmWZrgkt6jpXBnLgV2ZjO0YxEtLDdfIZfH4= -github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= -github.com/jedib0t/go-pretty v4.3.0+incompatible h1:CGs8AVhEKg/n9YbUenWmNStRW2PHJzaeDodcfvRAbIo= -github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jhump/protocompile v0.0.0-20220812162104-d108583e055d h1:1BLWxsvcb5w9/vGjtyEo//r3dwEPNg7z73nbQ/XV4/s= -github.com/jhump/protocompile v0.0.0-20220812162104-d108583e055d/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= -github.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= -github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= -github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= -github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/godepgraph v0.0.0-20190626013829-57a7e4a651a9/go.mod h1:Gb5YEgxqiSSVrXKWQxDcKoCM94NO5QAwOwTaVmIUAMI= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -986,153 +602,47 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/ktr0731/bump v0.1.0/go.mod h1:RaAnwhvNY1dzTpF3ptJA7Z9EBW8OuVYOGXBcr7iRcgg= -github.com/ktr0731/dept v0.1.1/go.mod h1:RTx3aP/gE0/MNhYgOcxETTNBudO24Nbis4y4KImynVA= -github.com/ktr0731/dept v0.1.3/go.mod h1:b1EtCEjbjGShAfhZue+BrFKTG7sQmK7aSD7Q6VcGvO0= -github.com/ktr0731/evans v0.10.0 h1:o5zNTfWyFJndOar0Uc7xY8IvXnJMGMR5RE7HpvrfwCs= -github.com/ktr0731/evans v0.10.0/go.mod h1:1LrcEgYvdJVgmpcUwf30KKgE6p3gykRFywqxYdSiY/4= -github.com/ktr0731/go-multierror v0.0.0-20171204182908-b7773ae21874/go.mod h1:ZWayuE/hCzOD96CJizvcYnqrbmTC7RAG332yNtlKj6w= -github.com/ktr0731/go-prompt v0.2.2-0.20190609072126-7894cc3f2925/go.mod h1:wmOS5scuWlKkbJFD0l2d/Uc6M8h01Zw4y1lPpzYerhc= -github.com/ktr0731/go-semver v0.1.1/go.mod h1:gE6cyNMdgKcUY/d9tdlZDqiLYPixpJcZh3addTcQSp4= -github.com/ktr0731/go-shellstring v0.1.3/go.mod h1:f0/XX0hsm6A02Es/UDQ9MGd3VqpCHrCw5pMjE2y6qTU= -github.com/ktr0731/go-updater v0.1.5/go.mod h1:dsdOg7a9sj6ttcOU5ZxPCtKdm9WeB1hwcX/7oKgz9/0= -github.com/ktr0731/grpc-test v0.1.4/go.mod h1:v47616grayBYXQveGWxO3OwjLB3nEEnHsZuMTc73FM0= -github.com/ktr0731/grpc-test v0.1.8 h1:ZGX8bQu9aIlJFJ4NBUBvcyyzyFa2xH5STfmZZWoP4tc= -github.com/ktr0731/grpc-test v0.1.8/go.mod h1:NfrFy0MifkU4tftOx0iZirhLHjz8+dAOKJQ5XRiYjDg= -github.com/ktr0731/grpc-web-go-client v0.2.7 h1:Op1U1XC29kb7S8XptqYd742JwcG7oR5Q7QoYPZMN2T4= -github.com/ktr0731/grpc-web-go-client v0.2.7/go.mod h1:1Iac8gFJvC/DRfZoGnFZsfEbEq/wQFK+2Ve1o3pHkCQ= -github.com/ktr0731/modfile v1.11.2/go.mod h1:LzNwnHJWHbuDh3BO17lIqzqDldXqGu1HCydWH3SinE0= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/ldez/gomoddirectives v0.2.1/go.mod h1:sGicqkRgBOg//JfpXwkB9Hj0X5RyJ7mlACM5B9f6Me4= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.1 h1:6VXZrLU0jHBYyAqrSPa+MgPfnSvTPuMgK+k0o5kVFWo= -github.com/lib/pq v1.10.1/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/matryer/moq v0.2.3 h1:Q06vEqnBYjjfx5KKgHfYRKE/lvlRu+Nj+xodG4YdHnU= -github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-oci8 v0.0.7/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= -github.com/mattn/go-pipeline v0.0.0-20170920030317-cfb87a531e2b/go.mod h1:THCMZVX5asLpinN+6hFlR1xKFcFsaDpAtUltGqZauBM= -github.com/mattn/go-pipeline v0.0.0-20190323144519-32d779b32768/go.mod h1:THCMZVX5asLpinN+6hFlR1xKFcFsaDpAtUltGqZauBM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.12.0 h1:u/x3mp++qUxvYfulZ4HKOvVO0JWhk7HtE8lWhbGz/Do= -github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/go-tty v0.0.0-20190424173100-523744f04859/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.0.7/go.mod h1:vuE5ox/4L/HDd63MCcCk3H6wTLQ6XXezRphJ8cJJOxY= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.1.2/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/buildkit v0.10.3 h1:/dGykD8FW+H4p++q5+KqKEo6gAkYKyBQHdawdjVwVAU= -github.com/moby/buildkit v0.10.3/go.mod h1:jxeOuly98l9gWHai0Ojrbnczrk/rf+o9/JqNhY+UCSo= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= -github.com/moby/sys/mount v0.3.0 h1:bXZYMmq7DBQPwHRxH/MG+u9+XF90ZOwoXpHTOznMGp0= -github.com/moby/sys/mount v0.3.0/go.mod h1:U2Z3ur2rXPFrFmy4q6WMwWrBOAQGYtYTRVM8BIvzbwk= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.0 h1:gUDhXQx58YNrpHlK4nSL+7y2pxFZkUcXqzFDKWdC0Oo= -github.com/moby/sys/mountinfo v0.6.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= 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= @@ -1140,197 +650,92 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN 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/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210209181001-cf43108d6880/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= -github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/packethost/pkg v0.0.0-20200903155310-0433e0605550 h1:/ojL7LAVjyH1MY+db0+j6rcWU3UWWpzHksYFsHWs9vQ= github.com/packethost/pkg v0.0.0-20200903155310-0433e0605550/go.mod h1:GSv7cTtIjns4yc0pyajaM1RE/KE4djJONoblFIRDrxA= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/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/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM= -github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180423043932-cda20d4ac917/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/polyfloyd/go-errorlint v0.0.0-20210510181950-ab96adb96fea/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= @@ -1338,67 +743,23 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= -github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rollbar/rollbar-go v1.0.2 h1:uA3+z0jq6ka9WUUt9VX/xuiQZXZyWRoeKvkhVvLO9Jc= github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk= -github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.2/go.mod h1:tpI+C/nzvfUR3bF28b5QHpTn/jM/zlGniI++6ZlIWeE= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/securego/gosec/v2 v2.8.0/go.mod h1:hJZ6NT5TqoY+jmOsaxAV4cXoEdrMRLVaNPnSpUCvCZs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil/v3 v3.21.5/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -1408,66 +769,43 @@ github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25/go.mod h1:lbP8tGiBjZ5YWIc2fzuRpTaz0b/53vT6PEs3QuAWzuU= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1475,106 +813,32 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 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 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/testcontainers/testcontainers-go v0.11.1 h1:FiYsB83LSGbiawoV8TpAZGfcCUbtaeeg1SXqEKUxh08= -github.com/testcontainers/testcontainers-go v0.11.1/go.mod h1:/V0UVq+1e7NWYoqTPog179clf0Qp9TOyp4EcXaEFQz8= -github.com/tetafro/godot v1.4.7/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tinkerbell/lint-install v0.0.0-20220502172532-2fdfa62596af h1:KlPjxhYanKNUEd0TCjKsyTAqrtZ6HF0El2/+NKhpUHQ= -github.com/tinkerbell/lint-install v0.0.0-20220502172532-2fdfa62596af/go.mod h1:xW1I8Nqsc88qG0zmPLcbQqHE1Co8eo628OJMRerLHFM= -github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= -github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= -github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc= -github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= -github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= -github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.1.0/go.mod h1:crK5eI4RGSUrb9duDTQ5GqcukbKZvi85vX6nbhsBAeI= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tsenart/go-tsz v0.0.0-20180814232043-cdeb9e1e981e/go.mod h1:SWZznP1z5Ki7hDT2ioqiFKEse8K9tU2OUvaRI0NeGQo= github.com/tsenart/vegeta/v12 v12.8.4/go.mod h1:ZiJtwLn/9M4fTPdMY7bdbIeyNeFVE8/AHbWFqCsUuho= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/xanzy/go-gitlab v0.50.0/go.mod h1:Q+hQhV508bDPoBijv7YjK/Lvlb4PhVhJdKqXVQrUoAE= -github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= 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= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zchee/go-xdgbasedir v1.0.3/go.mod h1:Ta5nXXeucstQZw/DpFneOcG3OF8i3pxPTqda2w+nyc8= -github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= -github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= @@ -1583,22 +847,11 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= -go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 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 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 h1:PNEMW4EvpNQ7SuoPFNkvbZqi1STkTPKq+8vfoMl/6AE= @@ -1607,8 +860,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1: go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.0.0-RC2/go.mod h1:w1thVQ7qbAy8MHb0IFj8a5Q2QU0l2ksf8u/CN8m3NOM= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= -go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 h1:imIM3vRDMyZK1ypQlQlO+brE22I9lRhJsBDXpDWjlz8= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= @@ -1629,226 +882,166 @@ go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4 go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.0.0-RC2/go.mod h1:JPQ+z6nNw9mqEGT8o3eoPTdnNI+Aj5JcxEsVGREIAy4= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= -go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.22.0 h1:Zcye5DUgBloQ9BaT4qc9BnjOFog5TvBSAGkJ3Nf70c0= -go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= -gocloud.dev v0.23.0/go.mod h1:zklCCIIo1N9ELkU2S2E7tW8P8eeMU7oGLeQCXdDwx9Q= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 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-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -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-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= 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/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/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= 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.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.3.1-0.20200828183125-ce943fd02449/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-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191112182307-2180aed22343/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-20200421231249-e086a090c8fd/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-20200520004742-59133d7f0dd7/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-20200602114024-627f9648deb9/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-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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-20201202161906-c7110b5ffcbb/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-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/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-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210420210106-798c2154c571/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/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-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211101193420-4a448f8816b3/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= -golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +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-20181106182150-f42d05182288/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-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-20210402161424-2e8d93401602/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-20210427180440-81ed05c6b58c/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-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 h1:v79phzBz03tsVCUTbvTBmmC3CUXF5mKYt7DA4ZVldpM= golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5/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.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= 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-20190412183630-56d357773e84/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.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.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180620133508-ad87a3a340fa/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/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-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1856,442 +1049,254 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116161606-93218def8b18/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/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-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/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-20190422165155-953cdadca894/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-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/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-20200217220822-9197077df867/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-20200420163511-1957bb5e6d1f/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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201109165425-215b40eba54c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/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-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210223095934-7937bea0104d/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-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210412220455-f1c623a9e750/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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-20210603081109-ebe580a85c40/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-20210616045830-e2b7044e8c71/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-20210809222454-d867a43fc93e/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-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/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-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/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-20220114195835-da31bd327af9/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-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 h1:Sx/u41w+OwrInGdEckYmEuU5gHoGSL4QbDz3S9s6j4U= -golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/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-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= 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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -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-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/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-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/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-20190614205625-5aca471b1d59/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-20190624222133-a101b041ded4/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-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/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-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/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-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/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-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/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-20200117220505-0cba7a3a9ee9/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-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/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-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/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-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -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-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/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.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.5.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.10.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.25.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/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.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.45.0/go.mod h1:ISLIJCedJolbZvDfAk+Ctuq5hf+aJ33WgtUsfyFoLXA= -google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= -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.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= +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.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 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.2/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/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/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-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -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-20190927181202-20e1ac93f88c/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-20200117163144-32f20d992d24/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-20200204235621-fb4a7afc5178/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-20200423170343-7949de9c1215/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-20200513103714-09dca8ec2884/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-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -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-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-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/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-20201110150050-8816d57aaa9a/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-20210108203827-ffc7fda8c3d7/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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210420162539-3c870d7478d2/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210423144448-3a41ef94ed2b/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210506142907-4a47615972c2/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -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-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +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-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= 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.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 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= @@ -2300,13 +1305,20 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ 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.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +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/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= @@ -2318,32 +1330,23 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.25.1-0.20200805231151-a709e31e5d12/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.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= +google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw= -gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2352,102 +1355,63 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/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-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/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= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= -honnef.co/go/tools v0.2.0/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk= k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/apiextensions-apiserver v0.21.4/go.mod h1:OoC8LhI9LnV+wKjZkXIBbLUwtnOGJiTRE33qctH5CIk= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.21.4/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/apiserver v0.21.4/go.mod h1:SErUuFBBPZUcD2nsUU8hItxoYheqyYr2o/pCINEPW8g= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.21.4/go.mod h1:t0/eMKyUAq/DoQ7vW8NVVA00/nomlwC+eInsS8PxSew= k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/code-generator v0.21.4/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.21.4/go.mod h1:ZKG0eHVX+tUDcaoIGpU3Vtk4TIjMddN9uhEWDmW6Nyg= k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= @@ -2455,40 +1419,14 @@ k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ knative.dev/hack v0.0.0-20211112192837-128cf0150a69/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/pkg v0.0.0-20211119170723-a99300deff34 h1:3PTfphK/gjxA+XJIwyDZ1g1KxRaADsI/BdhFlRAtdEE= knative.dev/pkg v0.0.0-20211119170723-a99300deff34/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw= -mvdan.cc/gofumpt v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= -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= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.11.1 h1:7YIHT2QnHJArj/dk9aUkYhfqfK5cIxPOX5gPECfdZLU= sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220304125252-9ee63fc65a97 h1:ntDPPFop48UjjtWl7kGwx3FNdnP/CZAEzjZMPXR6nlE= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220304125252-9ee63fc65a97/go.mod h1:nLkMD2WB4Jcix1qfVuJeOF4j5y/VfyeOIlTxG5Wj9co= -sigs.k8s.io/controller-tools v0.8.0 h1:uUkfTGEwrguqYYfcI2RRGUnC8mYdCFDqfwPKUcNJh1o= -sigs.k8s.io/controller-tools v0.8.0/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/kustomize/api v0.11.4 h1:/0Mr3kfBBNcNPOW5Qwk/3eb8zkswCwnqQxxKtmrTkRo= -sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= -sigs.k8s.io/kustomize/cmd/config v0.10.6 h1:Qjs7z/Q1NrVmW86tavmhM7wZtgWJ7aitLMARlUKrj98= -sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4 h1:rzGrL+DA4k8bT6SMz7/U+2z3iiZf1t2RaYJWx8OeTmE= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= -sigs.k8s.io/kustomize/kyaml v0.13.6 h1:eF+wsn4J7GOAXlvajv6OknSunxpcOBQQqsnPxObtkGs= -sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= @@ -2496,4 +1434,3 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/grpc-server/grpc_server_test.go b/grpc-server/grpc_server_test.go deleted file mode 100644 index 02ee48636..000000000 --- a/grpc-server/grpc_server_test.go +++ /dev/null @@ -1,173 +0,0 @@ -package grpcserver - -import ( - "context" - "fmt" - "os" - "path/filepath" - "testing" - "time" - - "github.com/google/go-cmp/cmp" - "github.com/ktr0731/evans/grpc" - "github.com/packethost/pkg/log" - "github.com/tinkerbell/tink/server" -) - -func TestSetupGRPC(t *testing.T) { - type input struct { - server string - client string - } - tests := []struct { - name string - input input - want []string - err error - }{ - { - name: "successful grpc client call", - input: input{ - server: "127.0.0.1:55005", - client: "127.0.0.1:55005", - }, - want: []string{"HardwareService", "TemplateService", "WorkflowService", "ServerReflection"}, - }, - { - name: "grpc client fail to communicate", - input: input{ - server: "127.0.0.1:0", - client: "127.0.0.1:55007", - }, - err: fmt.Errorf("failed to list services from reflection enabled gRPC server: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:55007: connect: connection refused\""), - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - errCh := make(chan error) - logger := log.Test(t, "test_package") - tinkServer, _ := server.NewDBServer( - logger, - nil, - ) - _, err := SetupGRPC( - ctx, - tinkServer, - tc.input.server, - nil, - errCh) - if err != nil { - t.Errorf("failed to set up gRPC server: %v", err) - return - } - - client, err := grpc.NewClient(tc.input.client, "name", true, false, "", "", "", nil) - if err != nil { - t.Fatal(err) - } - var retries int - RETRY: - pkgs, err := client.ListPackages() - if err != nil { - // there's a timing issue with the grpc server, so we retry - if retries != 2 && tc.err == nil { - retries++ - time.Sleep(1 * time.Second) - goto RETRY - } - if tc.err != nil { - if diff := cmp.Diff(tc.err.Error(), err.Error()); diff != "" { - t.Error(diff) - } - } else { - t.Errorf("got unexpected error: %v", err) - } - } else { - var got []string - for _, proto := range pkgs { - for _, elem := range proto.AsFileDescriptorProto().GetService() { - got = append(got, elem.GetName()) - } - } - if diff := cmp.Diff(tc.want, got); diff != "" { - t.Error(diff) - } - } - }) - } -} - -func TestGetCerts(t *testing.T) { - cases := []struct { - name string - setupFunc func(t *testing.T) (string, error) - wanterr error - }{ - { - "Real key file", - func(t *testing.T) (string, error) { - t.Helper() - return "./testdata", nil - }, - nil, - }, - { - "No cert", - func(t *testing.T) (string, error) { - t.Helper() - return "./not-a-directory", nil - }, - fmt.Errorf("failed to load TLS files: open not-a-directory/bundle.pem: no such file or directory"), - }, - { - "empty content", - func(t *testing.T) (string, error) { - t.Helper() - tdir := t.TempDir() - err := os.WriteFile(filepath.Join(tdir, "bundle.pem"), []byte{}, 0o644) - if err != nil { - return "", err - } - err = os.WriteFile(filepath.Join(tdir, "server-key.pem"), []byte{}, 0o644) - if err != nil { - return "", err - } - return tdir, nil - }, - fmt.Errorf("failed to load TLS files: tls: failed to find any PEM data in certificate input"), - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - input, err := tc.setupFunc(t) - if err != nil { - t.Errorf("Failed to setup test: %v", err) - return - } - gotCert, err := GetCerts(input) - - if tc.wanterr == nil { - if gotCert == nil { - t.Error("Missing expected cert, got nil") - } - } - if tc.wanterr == nil && err == nil { - return - } - if tc.wanterr != nil { - if err == nil { - t.Errorf("Missing expected error %s", tc.wanterr.Error()) - return - } - if tc.wanterr.Error() != err.Error() { - t.Errorf("Got different error.\nWanted:\n %s\nGot:\n %s", tc.wanterr.Error(), err.Error()) - } - return - } - }) - } -} diff --git a/internal/tests/frozen_time.go b/internal/tests/frozen_time.go index f60703a85..63239f426 100644 --- a/internal/tests/frozen_time.go +++ b/internal/tests/frozen_time.go @@ -3,8 +3,7 @@ package tests import ( "time" - "github.com/golang/protobuf/ptypes/timestamp" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" + "google.golang.org/protobuf/types/known/timestamppb" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -103,9 +102,9 @@ func (f *FrozenTime) PbAfterSec(s int64) *timestamppb.Timestamp { } func (f *FrozenTime) PbBeforeFunc(d time.Duration) ProtobufTimeFunc { - return func() *timestamp.Timestamp { return f.PbBefore(d) } + return func() *timestamppb.Timestamp { return f.PbBefore(d) } } func (f *FrozenTime) PbAfterFunc(d time.Duration) ProtobufTimeFunc { - return func() *timestamp.Timestamp { return f.PbAfter(d) } + return func() *timestamppb.Timestamp { return f.PbAfter(d) } } diff --git a/kube.mk b/kube.mk deleted file mode 100644 index b14581988..000000000 --- a/kube.mk +++ /dev/null @@ -1,66 +0,0 @@ -## -------------------------------------- -## Generate -## -------------------------------------- - -CONTROLLER_GEN := go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10 -GOFUMPT := go run mvdan.cc/gofumpt@v0.1 -KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/v4@latestv4.5 - -.PHONY: generate -generate: generate-go generate-manifests # Generate code, manifests etc. - -.PHONY: generate-go -generate-go: # Generate Go code. - $(CONTROLLER_GEN) object:headerFile="hack/boilerplate/boilerplate.generatego.txt" paths="./pkg/apis/..." - $(GOFUMPT) -w ./pkg/apis - -.PHONY: generate-manifests -generate-manifests: generate-crds generate-rbacs generate-server-rbacs # Generate manifests e.g. CRD, RBAC etc. - -.PHONY: generate-crds -generate-crds: - $(CONTROLLER_GEN) \ - paths=./pkg/apis/... \ - crd:crdVersions=v1 \ - rbac:roleName=manager-role \ - output:crd:dir=./config/crd/bases \ - output:webhook:dir=./config/webhook \ - webhook - -.PHONY: generate-rbacs -generate-rbacs: - $(CONTROLLER_GEN) \ - paths=./pkg/controllers/... \ - output:rbac:dir=./config/rbac/ \ - rbac:roleName=manager-role - -.PHONY: generate-server-rbacs -generate-server-rbacs: - $(CONTROLLER_GEN) \ - paths=./server/... \ - output:rbac:dir=./config/server-rbac \ - rbac:roleName=server-role - -TINK_SERVER_IMAGE ?= quay.io/tinkerbell/tink-server -TINK_SERVER_TAG ?= latest - -TINK_CONTROLLER_IMAGE ?= quay.io/tinkerbell/tink-controller -TINK_CONTROLLER_TAG ?= latest - -NAMESPACE ?= tink-system - -out/release/default/kustomization.yaml: config/default/kustomization.yaml - rm -rf out/ - mkdir -p out/ - cp -a config/ out/release/ - -out/release/tink.yaml: bin/kustomize generate-manifests out/release/default/kustomization.yaml - ( - cd out/release/default && \ - $(KUSTOMIZE) edit set image server=$(TINK_SERVER_IMAGE):$(TINK_CONTROLLER_TAG) controller=$(TINK_CONTROLLER_IMAGE):$(TINK_CONTROLLER_TAG) && \ - $(KUSTOMIZE) edit set namespace $(NAMESPACE) \ - ) - $(KUSTOMIZE) build out/release/default -o $@ - prettier --write $@ - -release-manifests: out/release/tink.yaml ## Builds the manifests to publish with a release. diff --git a/lint.mk b/lint.mk deleted file mode 100644 index f52563958..000000000 --- a/lint.mk +++ /dev/null @@ -1,92 +0,0 @@ - -# BEGIN: lint-install --dockerfile=warn -makefile=lint.mk . -# http://github.com/tinkerbell/lint-install - -.PHONY: lint -lint: _lint - -LINT_ARCH := $(shell uname -m) -LINT_OS := $(shell uname) -LINT_OS_LOWER := $(shell echo $(LINT_OS) | tr '[:upper:]' '[:lower:]') -LINT_ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) - -# shellcheck and hadolint lack arm64 native binaries: rely on x86-64 emulation -ifeq ($(LINT_OS),Darwin) - ifeq ($(LINT_ARCH),arm64) - LINT_ARCH=x86_64 - endif -endif - -LINTERS := -FIXERS := - -SHELLCHECK_VERSION ?= v0.8.0 -SHELLCHECK_BIN := out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH) -$(SHELLCHECK_BIN): - mkdir -p out/linters - curl -sSfL -o $@.tar.xz https://github.com/koalaman/shellcheck/releases/download/$(SHELLCHECK_VERSION)/shellcheck-$(SHELLCHECK_VERSION).$(LINT_OS_LOWER).$(LINT_ARCH).tar.xz \ - || echo "Unable to fetch shellcheck for $(LINT_OS)/$(LINT_ARCH): falling back to locally install" - test -f $@.tar.xz \ - && tar -C out/linters -xJf $@.tar.xz \ - && mv out/linters/shellcheck-$(SHELLCHECK_VERSION)/shellcheck $@ \ - || printf "#!/usr/bin/env shellcheck\n" > $@ - chmod u+x $@ - -LINTERS += shellcheck-lint -shellcheck-lint: $(SHELLCHECK_BIN) - $(SHELLCHECK_BIN) $(shell find . -name "*.sh") - -FIXERS += shellcheck-fix -shellcheck-fix: $(SHELLCHECK_BIN) - $(SHELLCHECK_BIN) $(shell find . -name "*.sh") -f diff | { read -t 1 line || exit 0; { echo "$$line" && cat; } | git apply -p2; } - -HADOLINT_VERSION ?= v2.8.0 -HADOLINT_BIN := out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) -$(HADOLINT_BIN): - mkdir -p out/linters - curl -sSfL -o $@.dl https://github.com/hadolint/hadolint/releases/download/$(HADOLINT_VERSION)/hadolint-$(LINT_OS)-$(LINT_ARCH) \ - || echo "Unable to fetch hadolint for $(LINT_OS)/$(LINT_ARCH), falling back to local install" - test -f $@.dl && mv $(HADOLINT_BIN).dl $@ || printf "#!/usr/bin/env hadolint\n" > $@ - chmod u+x $@ - -LINTERS += hadolint-lint -hadolint-lint: $(HADOLINT_BIN) - $(HADOLINT_BIN) --no-fail $(shell find . -name "*Dockerfile") - -GOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml -GOLANGCI_LINT_VERSION ?= v1.49.0 -GOLANGCI_LINT_BIN := out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH) -$(GOLANGCI_LINT_BIN): - mkdir -p out/linters - rm -rf out/linters/golangci-lint-* - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b out/linters $(GOLANGCI_LINT_VERSION) - mv out/linters/golangci-lint $@ - -LINTERS += golangci-lint-lint -golangci-lint-lint: $(GOLANGCI_LINT_BIN) - $(GOLANGCI_LINT_BIN) run - -FIXERS += golangci-lint-fix -golangci-lint-fix: $(GOLANGCI_LINT_BIN) - $(GOLANGCI_LINT_BIN) run --fix - -YAMLLINT_VERSION ?= 1.26.3 -YAMLLINT_ROOT := out/linters/yamllint-$(YAMLLINT_VERSION) -YAMLLINT_BIN := $(YAMLLINT_ROOT)/dist/bin/yamllint -$(YAMLLINT_BIN): - mkdir -p out/linters - rm -rf out/linters/yamllint-* - curl -sSfL https://github.com/adrienverge/yamllint/archive/refs/tags/v$(YAMLLINT_VERSION).tar.gz | tar -C out/linters -zxf - - cd $(YAMLLINT_ROOT) && pip3 install --target dist . || pip install --target dist . - -LINTERS += yamllint-lint -yamllint-lint: $(YAMLLINT_BIN) - PYTHONPATH=$(YAMLLINT_ROOT)/dist $(YAMLLINT_ROOT)/dist/bin/yamllint . - -.PHONY: _lint $(LINTERS) -_lint: $(LINTERS) - -.PHONY: fix $(FIXERS) -fix: $(FIXERS) - -# END: lint-install --dockerfile=warn -makefile=lint.mk . diff --git a/pkg/convert/template.go b/pkg/convert/template.go deleted file mode 100644 index 79b29f8b2..000000000 --- a/pkg/convert/template.go +++ /dev/null @@ -1,63 +0,0 @@ -package convert - -import ( - "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1" - prototemplate "github.com/tinkerbell/tink/protos/template" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func metav1ToTimestamppb(in *metav1.Time) *timestamppb.Timestamp { - if in == nil { - return nil - } - return timestamppb.New(in.Time) -} - -// TemplateCRDToProto converts a K8s Template to a tinkerbell WorkflowTemplate. -func TemplateCRDToProto(t *v1alpha1.Template) *prototemplate.WorkflowTemplate { - if t == nil { - return nil - } - data := "" - if t.Spec.Data != nil { - data = *t.Spec.Data - } - return &prototemplate.WorkflowTemplate{ - Id: t.TinkID(), - Name: t.Name, - CreatedAt: timestamppb.New(t.CreationTimestamp.Time), - DeletedAt: metav1ToTimestamppb(t.DeletionTimestamp), - Data: data, - } -} - -// TemplateProtoToCRD converts a tinkerbell WorkflowTemplate to a K8s Template. -func TemplateProtoToCRD(t *prototemplate.WorkflowTemplate) *v1alpha1.Template { - if t == nil { - return nil - } - return &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{ - Kind: "Template", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: t.Name, - Annotations: map[string]string{ - "template.tinkerbell.org/id": t.Id, - }, - CreationTimestamp: metav1.NewTime(t.CreatedAt.AsTime()), - DeletionTimestamp: func() *metav1.Time { - if t.DeletedAt != nil { - resp := metav1.NewTime(t.DeletedAt.AsTime()) - return &resp - } - return nil - }(), - }, - Spec: v1alpha1.TemplateSpec{ - Data: &t.Data, - }, - } -} diff --git a/pkg/convert/template_test.go b/pkg/convert/template_test.go deleted file mode 100644 index 23a2c996b..000000000 --- a/pkg/convert/template_test.go +++ /dev/null @@ -1,215 +0,0 @@ -package convert - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/tinkerbell/tink/internal/tests" - "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1" - prototemplate "github.com/tinkerbell/tink/protos/template" - "google.golang.org/protobuf/testing/protocmp" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// TestTime is a static time that can be used for testing. -var TestTime = tests.NewFrozenTimeUnix(1637361794) - -func TestTemplateCRDToProto(t *testing.T) { - cases := []struct { - name string - input *v1alpha1.Template - want *prototemplate.WorkflowTemplate - }{ - { - "Full Example", - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - Annotations: map[string]string{ - "template.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - DeletionTimestamp: TestTime.MetaV1AfterSec(600), - }, - Spec: v1alpha1.TemplateSpec{ - Data: func() *string { - resp := `version: "0.1"` - return &resp - }(), - }, - }, - &prototemplate.WorkflowTemplate{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Name: "template1", - CreatedAt: TestTime.PbNow(), - DeletedAt: TestTime.PbAfterSec(600), - Data: `version: "0.1"`, - }, - }, - { - "No DeletionTime", - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - Annotations: map[string]string{ - "template.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.TemplateSpec{ - Data: func() *string { - resp := `version: "0.1"` - return &resp - }(), - }, - }, - &prototemplate.WorkflowTemplate{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Name: "template1", - CreatedAt: TestTime.PbNow(), - Data: `version: "0.1"`, - }, - }, - { - "No Annotation or data", - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.TemplateSpec{ - Data: nil, - }, - }, - &prototemplate.WorkflowTemplate{ - Id: "", - Name: "template1", - CreatedAt: TestTime.PbNow(), - Data: "", - }, - }, - { - "Empty", - nil, - nil, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := TemplateCRDToProto(tc.input) - if diff := cmp.Diff(tc.want, got, protocmp.Transform()); diff != "" { - t.Errorf("unexpected difference:\n%v", diff) - } - }) - } -} - -func TestTemplateProtoToCRD(t *testing.T) { - cases := []struct { - name string - input *prototemplate.WorkflowTemplate - want *v1alpha1.Template - }{ - { - "Full Example", - &prototemplate.WorkflowTemplate{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Name: "template1", - CreatedAt: TestTime.PbNow(), - DeletedAt: TestTime.PbAfterSec(600), - Data: `version: "0.1"`, - }, - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{ - Kind: "Template", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - Annotations: map[string]string{ - "template.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - DeletionTimestamp: TestTime.MetaV1AfterSec(600), - }, - Spec: v1alpha1.TemplateSpec{ - Data: func() *string { - resp := `version: "0.1"` - return &resp - }(), - }, - }, - }, - { - "No DeletionTime", - &prototemplate.WorkflowTemplate{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Name: "template1", - CreatedAt: TestTime.PbNow(), - Data: `version: "0.1"`, - }, - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{ - Kind: "Template", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - Annotations: map[string]string{ - "template.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.TemplateSpec{ - Data: func() *string { - resp := `version: "0.1"` - return &resp - }(), - }, - }, - }, - { - "No id or data", - &prototemplate.WorkflowTemplate{ - Id: "", - Name: "template1", - CreatedAt: TestTime.PbNow(), - Data: "", - }, - &v1alpha1.Template{ - TypeMeta: metav1.TypeMeta{ - Kind: "Template", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "template1", - Annotations: map[string]string{ - "template.tinkerbell.org/id": "", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.TemplateSpec{ - Data: func(s string) *string { return &s }(""), - }, - }, - }, - { - "Empty", - nil, - nil, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := TemplateProtoToCRD(tc.input) - if diff := cmp.Diff(tc.want, got, protocmp.Transform()); diff != "" { - t.Errorf("unexpected difference:\n%v", diff) - } - }) - } -} diff --git a/pkg/convert/workflow.go b/pkg/convert/workflow.go index d94c69039..ccd941aae 100644 --- a/pkg/convert/workflow.go +++ b/pkg/convert/workflow.go @@ -7,8 +7,6 @@ import ( "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1" protoworkflow "github.com/tinkerbell/tink/protos/workflow" "github.com/tinkerbell/tink/workflow" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func WorkflowToWorkflowContext(wf *v1alpha1.Workflow) *protoworkflow.WorkflowContext { @@ -59,24 +57,6 @@ func WorkflowYAMLToStatus(wf *workflow.Workflow) *v1alpha1.WorkflowStatus { } } -func WorkflowCRDToProto(w *v1alpha1.Workflow) *protoworkflow.Workflow { - if w == nil { - return nil - } - v, ok := protoworkflow.State_value[string(w.Status.State)] - state := protoworkflow.State(v) - if !ok { - state = protoworkflow.State_STATE_PENDING - } - return &protoworkflow.Workflow{ - Id: w.TinkID(), - Template: w.Spec.TemplateRef, - State: state, - CreatedAt: timestamppb.New(w.CreationTimestamp.Time), - DeletedAt: metav1ToTimestamppb(w.DeletionTimestamp), - } -} - func WorkflowActionListCRDToProto(wf *v1alpha1.Workflow) *protoworkflow.WorkflowActionList { if wf == nil { return nil @@ -117,28 +97,3 @@ func WorkflowActionListCRDToProto(wf *v1alpha1.Workflow) *protoworkflow.Workflow } return resp } - -func WorkflowProtoToCRD(w *protoworkflow.Workflow) *v1alpha1.Workflow { - if w == nil { - return nil - } - resp := &v1alpha1.Workflow{ - TypeMeta: metav1.TypeMeta{ - Kind: "Workflow", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - v1alpha1.WorkflowIDAnnotation: w.Id, - }, - CreationTimestamp: metav1.NewTime(w.CreatedAt.AsTime()), - }, - Spec: v1alpha1.WorkflowSpec{}, - Status: v1alpha1.WorkflowStatus{}, - } - - if v, ok := protoworkflow.State_name[int32(w.State)]; ok { - resp.Status.State = v1alpha1.WorkflowState(v) - } - return resp -} diff --git a/pkg/convert/workflow_test.go b/pkg/convert/workflow_test.go index 30e745e2f..7f1543cd1 100644 --- a/pkg/convert/workflow_test.go +++ b/pkg/convert/workflow_test.go @@ -3,17 +3,18 @@ package convert import ( "reflect" "testing" - "time" "github.com/google/go-cmp/cmp" + "github.com/tinkerbell/tink/internal/tests" "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1" protoworkflow "github.com/tinkerbell/tink/protos/workflow" "github.com/tinkerbell/tink/workflow" "google.golang.org/protobuf/testing/protocmp" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +var TestTime = tests.NewFrozenTimeUnix(1637361794) + func TestWorkflowToWorkflowContext(t *testing.T) { cases := []struct { name string @@ -90,78 +91,6 @@ func TestWorkflowToWorkflowContext(t *testing.T) { } } -func TestWorkflowCRDToProto(t *testing.T) { - cases := []struct { - name string - input *v1alpha1.Workflow - want *protoworkflow.Workflow - }{ - { - "nil arg", - nil, - nil, - }, - { - "empty workflow", - &v1alpha1.Workflow{ - TypeMeta: metav1.TypeMeta{ - Kind: "Workflow", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "wf1", - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.WorkflowSpec{}, - Status: v1alpha1.WorkflowStatus{}, - }, - &protoworkflow.Workflow{ - Id: "", - Template: "", - State: protoworkflow.State_STATE_PENDING, - CreatedAt: TestTime.PbNow(), - }, - }, - { - "full workflow", - &v1alpha1.Workflow{ - TypeMeta: metav1.TypeMeta{ - Kind: "Workflow", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "wf1", - Annotations: map[string]string{ - "workflow.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: *TestTime.MetaV1Now(), - }, - Spec: v1alpha1.WorkflowSpec{ - TemplateRef: "MyCoolWorkflow", - }, - Status: v1alpha1.WorkflowStatus{ - State: "STATE_SUCCESS", - }, - }, - &protoworkflow.Workflow{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Template: "MyCoolWorkflow", - State: protoworkflow.State_STATE_SUCCESS, - CreatedAt: TestTime.PbNow(), - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := WorkflowCRDToProto(tc.input) - if diff := cmp.Diff(tc.want, got, protocmp.Transform()); diff != "" { - t.Errorf("unexpected difference:\n%v", diff) - } - }) - } -} - func TestWorkflowActionListCRDToProto(t *testing.T) { cases := []struct { name string @@ -309,77 +238,6 @@ func TestWorkflowActionListCRDToProto(t *testing.T) { } } -func TestWorkflowProtoToCRD(t *testing.T) { - cases := []struct { - name string - input *protoworkflow.Workflow - want *v1alpha1.Workflow - }{ - { - "nil arg", - nil, - nil, - }, - { - "empty workflow", - &protoworkflow.Workflow{ - Id: "", - Template: "", - // State: protoworkflow.State_STATE_PENDING, - CreatedAt: timestamppb.New(time.Unix(1637361794, 0)), - }, - &v1alpha1.Workflow{ - TypeMeta: metav1.TypeMeta{ - Kind: "Workflow", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{"workflow.tinkerbell.org/id": ""}, - CreationTimestamp: metav1.NewTime(time.Unix(1637361794, 0)), - }, - Spec: v1alpha1.WorkflowSpec{}, - Status: v1alpha1.WorkflowStatus{ - State: "STATE_PENDING", - }, - }, - }, - { - "full workflow", - &protoworkflow.Workflow{ - Id: "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - Template: "MyCoolWorkflow", - State: protoworkflow.State_STATE_SUCCESS, - CreatedAt: timestamppb.New(time.Unix(1637361794, 0)), - }, - &v1alpha1.Workflow{ - TypeMeta: metav1.TypeMeta{ - Kind: "Workflow", - APIVersion: "tinkerbell.org/v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - "workflow.tinkerbell.org/id": "7d9031ee-18d4-4ba4-b934-c3a78a1330f6", - }, - CreationTimestamp: metav1.NewTime(time.Unix(1637361794, 0)), - }, - Spec: v1alpha1.WorkflowSpec{}, - Status: v1alpha1.WorkflowStatus{ - State: "STATE_SUCCESS", - }, - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := WorkflowProtoToCRD(tc.input) - if diff := cmp.Diff(tc.want, got, protocmp.Transform()); diff != "" { - t.Errorf("unexpected difference:\n%v", diff) - } - }) - } -} - func TestWorkflowYAMLToStatus(t *testing.T) { cases := []struct { name string diff --git a/pkg/hardware_wrapper.go b/pkg/hardware_wrapper.go deleted file mode 100644 index 85d3bb461..000000000 --- a/pkg/hardware_wrapper.go +++ /dev/null @@ -1,96 +0,0 @@ -package pkg - -import ( - "encoding/json" - - "github.com/tinkerbell/tink/protos/hardware" -) - -// HardwareWrapper is a wrapper for the Hardware type generated from the protos -// to allow for custom marshalling/unmarshalling of the Hardware type -// -// Why we need this: -// Since the metadata field is a json formatted string, when it's being marshaled -// along with the rest of the Hardware object to json format, the double quotes -// inside the metadata string would be automatically escaped, making it hard to read/consume. -// -// The point of the custom marshal/unmarshal is to manually convert the metadata field -// between a string (for creating a hardware object) and a map (for printing) as a workaround -// for this problem. -type HardwareWrapper struct { - *hardware.Hardware -} - -// MarshalJSON marshals the HardwareWrapper object, with the metadata field represented as a map -// as the final result -// -// Since the Hardware object's metadata field is of type string, to convert the field into a map -// we need to solve somewhat of a water jug problem. -// -// 1. Create an empty map A -// 2. Marshal Hardware object to then be unmarshaled into map A -// 3. Create another empty map B to unmarshal metadata string into -// 4. Set map B as map A's metadata field -// 5. Marshal map A. -func (h HardwareWrapper) MarshalJSON() ([]byte, error) { - tmp := make(map[string]interface{}) // map (A) to hold metadata as a map (as opposed to string) - hwByte, err := json.Marshal(h.Hardware) // marshal hardware object - if err != nil { - return nil, err - } - err = json.Unmarshal(hwByte, &tmp) // fill out the tmp map - if err != nil { - return nil, err - } - if h.Metadata != "" { - metadata := make(map[string]interface{}) // map (B) to unmarshal metadata string into - err = json.Unmarshal([]byte(h.Metadata), &metadata) // fill metadata map - if err != nil { - return nil, err - } - tmp["metadata"] = metadata // set hw metadata field to the metadata map - } - tmpByte, err := json.Marshal(tmp) // marshal hw map into []byte - if err != nil { - return nil, err - } - return tmpByte, err -} - -// UnmarshalJSON unmarshals the HardwareWrapper object, with the metadata field represented as a string -// as the final result -// -// Since the incoming []byte b represents the metadata as a map, we can't directly unmarshal it into -// a Hardware object, cue water jug problem. -// -// 1. Create empty map -// 2. Unmarshal []byte b into map -// 3. Marshal metadata field -// 4. Set metadata string as map's metadata field -// 5. Marshal map to then be unmarshaled into Hardware object. -func (h *HardwareWrapper) UnmarshalJSON(b []byte) error { - type hwWrapper HardwareWrapper // intermediary type to avoid infinite recursion - tmp := make(map[string]interface{}) // map to hold metadata as a string (as well as all the hardware data) - err := json.Unmarshal(b, &tmp) // unmarshal []byte b into map - if err != nil { - return err - } - if _, ok := tmp["metadata"]; ok { // check if there's metadata - metadata, err := json.Marshal(tmp["metadata"]) // marshal metadata field - if err != nil { - return err - } - tmp["metadata"] = string(metadata) // set tmp metadata field to the metadata string - } - tmpByte, err := json.Marshal(tmp) // marshal map tmp - if err != nil { - return err - } - var hw hwWrapper - err = json.Unmarshal(tmpByte, &hw) // unmarshal tmpByte into hardware object - if err != nil { - return err - } - *h = HardwareWrapper(hw) - return nil -} diff --git a/protos/.gitignore b/protos/.gitignore deleted file mode 100644 index 76b510c71..000000000 --- a/protos/.gitignore +++ /dev/null @@ -1 +0,0 @@ -third_party/ diff --git a/protos/hardware/gen.go b/protos/hardware/gen.go deleted file mode 100644 index 28947394b..000000000 --- a/protos/hardware/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package hardware - -//go:generate moq -out mock.go . HardwareServiceClient HardwareService_AllClient diff --git a/protos/hardware/hardware.pb.go b/protos/hardware/hardware.pb.go deleted file mode 100644 index 06e1e2c5b..000000000 --- a/protos/hardware/hardware.pb.go +++ /dev/null @@ -1,1258 +0,0 @@ -// -// Hardware represents a single device managed by Tinkerbell. -// It can be identifed with its own UUID but more in general it can be everything that has a MAC address. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: protos/hardware/hardware.proto - -package hardware - -import ( - reflect "reflect" - sync "sync" - - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// -// PushRequest is the body for the Push method. It contains information about -// a piece of hardware. -type PushRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // Hardware describes the hardware you want to register to Tinkerbell and - // what it looks like. - // Hostname, MAC address, DHCP, network interfaces, metadata and so on. - Data *Hardware `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *PushRequest) Reset() { - *x = PushRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushRequest) ProtoMessage() {} - -func (x *PushRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushRequest.ProtoReflect.Descriptor instead. -func (*PushRequest) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{0} -} - -func (x *PushRequest) GetData() *Hardware { - if x != nil { - return x.Data - } - return nil -} - -// -// Empty represents an empty response -type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Empty) Reset() { - *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{1} -} - -// -// GetRequest is the request used by the Get various get methods exposed by the -// hardware service. -type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetRequest) Reset() { - *x = GetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRequest) ProtoMessage() {} - -func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. -func (*GetRequest) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{2} -} - -func (x *GetRequest) GetMac() string { - if x != nil { - return x.Mac - } - return "" -} - -func (x *GetRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *GetRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// -// Hardware describes a specific device managed by Tinkerbell -type Hardware struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // Describe network layout for your hardware - Network *Hardware_Network `protobuf:"bytes,6,opt,name=network,proto3" json:"network,omitempty"` - // - // A UUID representing a unique identifier for your hardware - Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"` - Version int64 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"` - // - // Metadata served by Hegel and that are accessible from the server itself To - // know more about what Hegel is have a look at the documentation - // https://docs.tinkerbell.org/services/hegel/ - // - // And at this URL you can find an explanation of how a metadata looks like: - // https://docs.tinkerbell.org/about/hardware-data/ - // Right now it is a string but we want to structure it a bit more. - Metadata string `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Hardware) Reset() { - *x = Hardware{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware) ProtoMessage() {} - -func (x *Hardware) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware.ProtoReflect.Descriptor instead. -func (*Hardware) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3} -} - -func (x *Hardware) GetNetwork() *Hardware_Network { - if x != nil { - return x.Network - } - return nil -} - -func (x *Hardware) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Hardware) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Hardware) GetMetadata() string { - if x != nil { - return x.Metadata - } - return "" -} - -// -// DeleteRequest gets used when you want to delete an hardware by its identifier. -// Usually it is a UUID. -type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteRequest) Reset() { - *x = DeleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRequest) ProtoMessage() {} - -func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// -// DHCP represents -type Hardware_DHCP struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // The MAC address for your hardware. It is important to get it - // right because it is used from Tinkerbell to dispatch workflows to the - // right destination. - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` - // - // Hostname represents the hostname of your server - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` - LeaseTime int64 `protobuf:"varint,4,opt,name=lease_time,json=leaseTime,proto3" json:"lease_time,omitempty"` - // - NameServers []string `protobuf:"bytes,5,rep,name=name_servers,json=nameServers,proto3" json:"name_servers,omitempty"` - // - TimeServers []string `protobuf:"bytes,6,rep,name=time_servers,json=timeServers,proto3" json:"time_servers,omitempty"` - // - // The CPU architecture like arm64, amd64, x86_64 and so on. - Arch string `protobuf:"bytes,8,opt,name=arch,proto3" json:"arch,omitempty"` - Uefi bool `protobuf:"varint,9,opt,name=uefi,proto3" json:"uefi,omitempty"` - // - // The name of the interface in your hardware like eth0, en1 and so on. - IfaceName string `protobuf:"bytes,10,opt,name=iface_name,json=ifaceName,proto3" json:"iface_name,omitempty"` - // - // - Ip *Hardware_DHCP_IP `protobuf:"bytes,11,opt,name=ip,proto3" json:"ip,omitempty"` -} - -func (x *Hardware_DHCP) Reset() { - *x = Hardware_DHCP{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_DHCP) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_DHCP) ProtoMessage() {} - -func (x *Hardware_DHCP) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_DHCP.ProtoReflect.Descriptor instead. -func (*Hardware_DHCP) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *Hardware_DHCP) GetMac() string { - if x != nil { - return x.Mac - } - return "" -} - -func (x *Hardware_DHCP) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *Hardware_DHCP) GetLeaseTime() int64 { - if x != nil { - return x.LeaseTime - } - return 0 -} - -func (x *Hardware_DHCP) GetNameServers() []string { - if x != nil { - return x.NameServers - } - return nil -} - -func (x *Hardware_DHCP) GetTimeServers() []string { - if x != nil { - return x.TimeServers - } - return nil -} - -func (x *Hardware_DHCP) GetArch() string { - if x != nil { - return x.Arch - } - return "" -} - -func (x *Hardware_DHCP) GetUefi() bool { - if x != nil { - return x.Uefi - } - return false -} - -func (x *Hardware_DHCP) GetIfaceName() string { - if x != nil { - return x.IfaceName - } - return "" -} - -func (x *Hardware_DHCP) GetIp() *Hardware_DHCP_IP { - if x != nil { - return x.Ip - } - return nil -} - -// -// Netboot is the model used to represent and configure the netbooting -// behavior From there you can customise the IPXE chained during boot, the in -// memory operating system tand so on. -type Hardware_Netboot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // This is a boolean value that tells to Tinkerbell if the hardware has PXE - // enabled. If set to false Tinkerbell won't attempt a provisioning at the - // moment. - AllowPxe bool `protobuf:"varint,1,opt,name=allow_pxe,json=allowPxe,proto3" json:"allow_pxe,omitempty"` - // - // When set to true Osie will lookup and execute the workflows assigned to - // a particular hardware. - // - // When set to false Osie will be executed but no workflows will be - // applied. This is useful if you don't want to execute any workflows but - // you simply need an operating system running in memory - AllowWorkflow bool `protobuf:"varint,2,opt,name=allow_workflow,json=allowWorkflow,proto3" json:"allow_workflow,omitempty"` - // - // - Ipxe *Hardware_Netboot_IPXE `protobuf:"bytes,3,opt,name=ipxe,proto3" json:"ipxe,omitempty"` - // - // - Osie *Hardware_Netboot_Osie `protobuf:"bytes,5,opt,name=osie,proto3" json:"osie,omitempty"` -} - -func (x *Hardware_Netboot) Reset() { - *x = Hardware_Netboot{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_Netboot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_Netboot) ProtoMessage() {} - -func (x *Hardware_Netboot) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_Netboot.ProtoReflect.Descriptor instead. -func (*Hardware_Netboot) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *Hardware_Netboot) GetAllowPxe() bool { - if x != nil { - return x.AllowPxe - } - return false -} - -func (x *Hardware_Netboot) GetAllowWorkflow() bool { - if x != nil { - return x.AllowWorkflow - } - return false -} - -func (x *Hardware_Netboot) GetIpxe() *Hardware_Netboot_IPXE { - if x != nil { - return x.Ipxe - } - return nil -} - -func (x *Hardware_Netboot) GetOsie() *Hardware_Netboot_Osie { - if x != nil { - return x.Osie - } - return nil -} - -// -// Network describes the networking you expect in your hardware. -// The number of interfaces, their name, gateway and IP. -type Hardware_Network struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // Configure the network interfaces you have in your hardware and defines their - // behavior. - Interfaces []*Hardware_Network_Interface `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"` -} - -func (x *Hardware_Network) Reset() { - *x = Hardware_Network{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_Network) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_Network) ProtoMessage() {} - -func (x *Hardware_Network) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_Network.ProtoReflect.Descriptor instead. -func (*Hardware_Network) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 2} -} - -func (x *Hardware_Network) GetInterfaces() []*Hardware_Network_Interface { - if x != nil { - return x.Interfaces - } - return nil -} - -type Hardware_DHCP_IP struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask,omitempty"` - Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` - Family int64 `protobuf:"varint,4,opt,name=family,proto3" json:"family,omitempty"` -} - -func (x *Hardware_DHCP_IP) Reset() { - *x = Hardware_DHCP_IP{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_DHCP_IP) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_DHCP_IP) ProtoMessage() {} - -func (x *Hardware_DHCP_IP) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_DHCP_IP.ProtoReflect.Descriptor instead. -func (*Hardware_DHCP_IP) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 0, 0} -} - -func (x *Hardware_DHCP_IP) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Hardware_DHCP_IP) GetNetmask() string { - if x != nil { - return x.Netmask - } - return "" -} - -func (x *Hardware_DHCP_IP) GetGateway() string { - if x != nil { - return x.Gateway - } - return "" -} - -func (x *Hardware_DHCP_IP) GetFamily() int64 { - if x != nil { - return x.Family - } - return 0 -} - -// -// IPXE is the network boot firmware Tinkerbell uses to start the -// provisioning in the hardware -type Hardware_Netboot_IPXE struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // This is the location of the IPXE script - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - // - Contents string `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` -} - -func (x *Hardware_Netboot_IPXE) Reset() { - *x = Hardware_Netboot_IPXE{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_Netboot_IPXE) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_Netboot_IPXE) ProtoMessage() {} - -func (x *Hardware_Netboot_IPXE) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_Netboot_IPXE.ProtoReflect.Descriptor instead. -func (*Hardware_Netboot_IPXE) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 1, 0} -} - -func (x *Hardware_Netboot_IPXE) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Hardware_Netboot_IPXE) GetContents() string { - if x != nil { - return x.Contents - } - return "" -} - -// -// Osie is the in memory operating system -type Hardware_Netboot_Osie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` - Kernel string `protobuf:"bytes,2,opt,name=kernel,proto3" json:"kernel,omitempty"` - Initrd string `protobuf:"bytes,3,opt,name=initrd,proto3" json:"initrd,omitempty"` -} - -func (x *Hardware_Netboot_Osie) Reset() { - *x = Hardware_Netboot_Osie{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_Netboot_Osie) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_Netboot_Osie) ProtoMessage() {} - -func (x *Hardware_Netboot_Osie) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_Netboot_Osie.ProtoReflect.Descriptor instead. -func (*Hardware_Netboot_Osie) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 1, 1} -} - -func (x *Hardware_Netboot_Osie) GetBaseUrl() string { - if x != nil { - return x.BaseUrl - } - return "" -} - -func (x *Hardware_Netboot_Osie) GetKernel() string { - if x != nil { - return x.Kernel - } - return "" -} - -func (x *Hardware_Netboot_Osie) GetInitrd() string { - if x != nil { - return x.Initrd - } - return "" -} - -// -// Interface represents a single network interface in your hardware -type Hardware_Network_Interface struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // DHCP configures the behavior of DHCP connection for your hardware. - // IP you expect, gateway and netmask. - Dhcp *Hardware_DHCP `protobuf:"bytes,1,opt,name=dhcp,proto3" json:"dhcp,omitempty"` - // - // Netboot pilots netbooting. You can select Osie, the in memory - // operating system used during netbooting. - Netboot *Hardware_Netboot `protobuf:"bytes,2,opt,name=netboot,proto3" json:"netboot,omitempty"` -} - -func (x *Hardware_Network_Interface) Reset() { - *x = Hardware_Network_Interface{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_hardware_hardware_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hardware_Network_Interface) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hardware_Network_Interface) ProtoMessage() {} - -func (x *Hardware_Network_Interface) ProtoReflect() protoreflect.Message { - mi := &file_protos_hardware_hardware_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hardware_Network_Interface.ProtoReflect.Descriptor instead. -func (*Hardware_Network_Interface) Descriptor() ([]byte, []int) { - return file_protos_hardware_hardware_proto_rawDescGZIP(), []int{3, 2, 0} -} - -func (x *Hardware_Network_Interface) GetDhcp() *Hardware_DHCP { - if x != nil { - return x.Dhcp - } - return nil -} - -func (x *Hardware_Network_Interface) GetNetboot() *Hardware_Netboot { - if x != nil { - return x.Netboot - } - return nil -} - -var File_protos_hardware_hardware_proto protoreflect.FileDescriptor - -var file_protos_hardware_hardware_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x75, - 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3e, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, - 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb7, 0x0a, 0x0a, - 0x08, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xa6, 0x03, 0x0a, 0x04, 0x44, 0x48, 0x43, 0x50, - 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, - 0x61, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x65, 0x66, 0x69, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x75, 0x65, 0x66, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x69, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x70, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x44, 0x48, 0x43, - 0x50, 0x2e, 0x49, 0x50, 0x52, 0x02, 0x69, 0x70, 0x1a, 0x6a, 0x0a, 0x02, 0x49, 0x50, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x6d, - 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x6d, 0x61, - 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, - 0x1a, 0x8a, 0x03, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x78, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x78, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x55, 0x0a, 0x04, 0x69, 0x70, 0x78, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x49, 0x50, 0x58, - 0x45, 0x52, 0x04, 0x69, 0x70, 0x78, 0x65, 0x12, 0x55, 0x0a, 0x04, 0x6f, 0x73, 0x69, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x62, - 0x6f, 0x6f, 0x74, 0x2e, 0x4f, 0x73, 0x69, 0x65, 0x52, 0x04, 0x6f, 0x73, 0x69, 0x65, 0x1a, 0x34, - 0x0a, 0x04, 0x49, 0x50, 0x58, 0x45, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x51, 0x0a, 0x04, 0x4f, 0x73, 0x69, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, - 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0xb8, 0x02, - 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x66, 0x0a, 0x0a, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x73, 0x1a, 0xb2, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, - 0x4d, 0x0a, 0x04, 0x64, 0x68, 0x63, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x2e, 0x44, 0x48, 0x43, 0x50, 0x52, 0x04, 0x64, 0x68, 0x63, 0x70, 0x12, 0x56, - 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x74, 0x52, 0x07, 0x6e, - 0x65, 0x74, 0x62, 0x6f, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, - 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x1f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0xfa, 0x07, 0x0a, 0x0f, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x04, - 0x50, 0x75, 0x73, 0x68, 0x12, 0x37, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x61, - 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x05, 0x42, 0x79, - 0x4d, 0x41, 0x43, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, - 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x6d, 0x61, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0x90, - 0x01, 0x0a, 0x04, 0x42, 0x79, 0x49, 0x50, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, - 0x76, 0x31, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x69, 0x70, 0x3a, 0x01, - 0x2a, 0x12, 0x8f, 0x01, 0x0a, 0x04, 0x42, 0x79, 0x49, 0x44, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, - 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, - 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x12, 0x31, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, - 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x34, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, - 0x31, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, - 0x0f, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x30, 0x01, - 0x12, 0x91, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x39, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, - 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x68, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x74, 0x69, - 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_protos_hardware_hardware_proto_rawDescOnce sync.Once - file_protos_hardware_hardware_proto_rawDescData = file_protos_hardware_hardware_proto_rawDesc -) - -func file_protos_hardware_hardware_proto_rawDescGZIP() []byte { - file_protos_hardware_hardware_proto_rawDescOnce.Do(func() { - file_protos_hardware_hardware_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_hardware_hardware_proto_rawDescData) - }) - return file_protos_hardware_hardware_proto_rawDescData -} - -var ( - file_protos_hardware_hardware_proto_msgTypes = make([]protoimpl.MessageInfo, 12) - file_protos_hardware_hardware_proto_goTypes = []interface{}{ - (*PushRequest)(nil), // 0: jackfan.us.kg.tinkerbell.tink.protos.hardware.PushRequest - (*Empty)(nil), // 1: jackfan.us.kg.tinkerbell.tink.protos.hardware.Empty - (*GetRequest)(nil), // 2: jackfan.us.kg.tinkerbell.tink.protos.hardware.GetRequest - (*Hardware)(nil), // 3: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - (*DeleteRequest)(nil), // 4: jackfan.us.kg.tinkerbell.tink.protos.hardware.DeleteRequest - (*Hardware_DHCP)(nil), // 5: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.DHCP - (*Hardware_Netboot)(nil), // 6: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot - (*Hardware_Network)(nil), // 7: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network - (*Hardware_DHCP_IP)(nil), // 8: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.DHCP.IP - (*Hardware_Netboot_IPXE)(nil), // 9: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.IPXE - (*Hardware_Netboot_Osie)(nil), // 10: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.Osie - (*Hardware_Network_Interface)(nil), // 11: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network.Interface - } -) - -var file_protos_hardware_hardware_proto_depIdxs = []int32{ - 3, // 0: jackfan.us.kg.tinkerbell.tink.protos.hardware.PushRequest.data:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 7, // 1: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.network:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network - 8, // 2: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.DHCP.ip:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.DHCP.IP - 9, // 3: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.ipxe:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.IPXE - 10, // 4: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.osie:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot.Osie - 11, // 5: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network.interfaces:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network.Interface - 5, // 6: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network.Interface.dhcp:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.DHCP - 6, // 7: jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Network.Interface.netboot:type_name -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware.Netboot - 0, // 8: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.Push:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.PushRequest - 2, // 9: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByMAC:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.GetRequest - 2, // 10: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByIP:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.GetRequest - 2, // 11: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByID:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.GetRequest - 1, // 12: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.All:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Empty - 2, // 13: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.DeprecatedWatch:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.GetRequest - 4, // 14: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.Delete:input_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.DeleteRequest - 1, // 15: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.Push:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Empty - 3, // 16: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByMAC:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 3, // 17: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByIP:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 3, // 18: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.ByID:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 3, // 19: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.All:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 3, // 20: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.DeprecatedWatch:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Hardware - 1, // 21: jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService.Delete:output_type -> jackfan.us.kg.tinkerbell.tink.protos.hardware.Empty - 15, // [15:22] is the sub-list for method output_type - 8, // [8:15] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_protos_hardware_hardware_proto_init() } -func file_protos_hardware_hardware_proto_init() { - if File_protos_hardware_hardware_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_protos_hardware_hardware_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_DHCP); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_Netboot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_DHCP_IP); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_Netboot_IPXE); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_Netboot_Osie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_hardware_hardware_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hardware_Network_Interface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_hardware_hardware_proto_rawDesc, - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_protos_hardware_hardware_proto_goTypes, - DependencyIndexes: file_protos_hardware_hardware_proto_depIdxs, - MessageInfos: file_protos_hardware_hardware_proto_msgTypes, - }.Build() - File_protos_hardware_hardware_proto = out.File - file_protos_hardware_hardware_proto_rawDesc = nil - file_protos_hardware_hardware_proto_goTypes = nil - file_protos_hardware_hardware_proto_depIdxs = nil -} diff --git a/protos/hardware/hardware.proto b/protos/hardware/hardware.proto deleted file mode 100644 index c9988aaf9..000000000 --- a/protos/hardware/hardware.proto +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Hardware represents a single device managed by Tinkerbell. - * It can be identifed with its own UUID but more in general it can be everything that has a MAC address. - */ -syntax = "proto3"; - -option go_package = "github.com/tinkerbell/tink/protos/hardware"; - -package jackfan.us.kg.tinkerbell.tink.protos.hardware; - -import "google/api/annotations.proto"; - -/* - * The HardwareService provides access to data describing the compute - * and networking profiles of the hardware available to accept workflows. - * - * The API supports adding new entries. While the hardware data is essential, - * not all of the properties are required for every workflow. The choice of - * workflow predicates the level of hardware detail necessary. - * - * Read access to individual hardware profiles is provided through the unique - * ID, MAC, and IP hardware properties. - */ -service HardwareService { - // Push adds a new Hardware profile to the data store. - rpc Push (PushRequest) returns (Empty) { - option (google.api.http) = { - post: "/v1/hardware" - body: "*" - }; - }; - - // ByMac returns the Hardware with the given hardware MAC Address. - rpc ByMAC(GetRequest) returns (Hardware) { - option (google.api.http) = { - post: "/v1/hardware/mac" - body: "*" - }; - }; - - // ByIP returns the Hardware with the given IP Address. - rpc ByIP(GetRequest) returns (Hardware) { - option (google.api.http) = { - post: "/v1/hardware/ip" - body: "*" - }; - }; - - // ByID returns the Hardware with the given ID. - rpc ByID(GetRequest) returns (Hardware) { - option (google.api.http) = { - get: "/v1/hardware/{id}" - }; - }; - - // All returns all of the Hardware profiles. - rpc All(Empty) returns (stream Hardware) { - option (google.api.http) = { - get: "/v1/hardware" - }; - }; - - // DeprecatedWatch watches for events on the given hardware and streams the matching Hardware. - // We would like to keep Watch as the function used to stream events, - // and ideally Watch should be more powerful than the DeprecatedWatch - rpc DeprecatedWatch(GetRequest) returns (stream Hardware); - - // Delete deletes the given hardware from the data store. - rpc Delete(DeleteRequest) returns (Empty) { - option (google.api.http) = { - delete: "/v1/hardware/{id}" - }; - }; -} - -/* - * PushRequest is the body for the Push method. It contains information about - * a piece of hardware. - */ -message PushRequest { - /* - * Hardware describes the hardware you want to register to Tinkerbell and - * what it looks like. - * Hostname, MAC address, DHCP, network interfaces, metadata and so on. - */ - Hardware data = 1; -} - -/* - * Empty represents an empty response - */ -message Empty { -} - -/* - * GetRequest is the request used by the Get various get methods exposed by the - * hardware service. - */ -message GetRequest { - string mac = 1; - string ip = 2; - string id = 3; -} - -/* - * Hardware describes a specific device managed by Tinkerbell - */ -message Hardware { - /* - * DHCP represents - */ - message DHCP { - message IP { - string address = 1; - string netmask = 2; - string gateway = 3; - int64 family = 4; - } - /* - * The MAC address for your hardware. It is important to get it - * right because it is used from Tinkerbell to dispatch workflows to the - * right destination. - */ - string mac = 1; - reserved 2; // obsolete ip - /* - * Hostname represents the hostname of your server - */ - string hostname = 3; - int64 lease_time = 4; - /* - */ - repeated string name_servers = 5; - /* - */ - repeated string time_servers = 6; - /* - */ - reserved 7; - /* - * The CPU architecture like arm64, amd64, x86_64 and so on. - */ - string arch = 8; - bool uefi = 9; - /* - * The name of the interface in your hardware like eth0, en1 and so on. - */ - string iface_name = 10; - /* - * - */ - IP ip = 11; - } - /* - * Netboot is the model used to represent and configure the netbooting - * behavior From there you can customise the IPXE chained during boot, the in - * memory operating system tand so on. - */ - message Netboot { - /* - * IPXE is the network boot firmware Tinkerbell uses to start the - * provisioning in the hardware - */ - message IPXE { - /* - * This is the location of the IPXE script - */ - string url = 1; - /* - */ - string contents = 2; - } - /* - * Osie is the in memory operating system - */ - message Osie { - string base_url = 1; - string kernel = 2; - string initrd = 3; - } - - /* - * This is a boolean value that tells to Tinkerbell if the hardware has PXE - * enabled. If set to false Tinkerbell won't attempt a provisioning at the - * moment. - */ - bool allow_pxe = 1; - /* - * When set to true Osie will lookup and execute the workflows assigned to - * a particular hardware. - * - * When set to false Osie will be executed but no workflows will be - * applied. This is useful if you don't want to execute any workflows but - * you simply need an operating system running in memory - */ - bool allow_workflow = 2; - /* - * - */ - IPXE ipxe = 3; - reserved 4; // obsolete bootstrapper - /* - * - */ - Osie osie = 5; - } - /* - * Network describes the networking you expect in your hardware. - * The number of interfaces, their name, gateway and IP. - */ - message Network { - /* - * Interface represents a single network interface in your hardware - */ - message Interface { - /* - * DHCP configures the behavior of DHCP connection for your hardware. - * IP you expect, gateway and netmask. - */ - DHCP dhcp = 1; - /* - * Netboot pilots netbooting. You can select Osie, the in memory - * operating system used during netbooting. - */ - Netboot netboot = 2; - } - reserved 1; // obsolete dhcp - reserved 2; // obsolete netboot - /* - * Configure the network interfaces you have in your hardware and defines their - * behavior. - */ - repeated Interface interfaces = 3; - reserved 4; // obsolete default - } - - reserved 1; // obsolete json - reserved 2; // obsolete dhcp - reserved 3; // obsolete netboot - reserved 4; // obsolete network - reserved 5; // obsolete metadata - /* - * Describe network layout for your hardware - */ - Network network = 6; - /* - * A UUID representing a unique identifier for your hardware - */ - string id = 7; - int64 version = 8; - /* - * Metadata served by Hegel and that are accessible from the server itself To - * know more about what Hegel is have a look at the documentation - * https://docs.tinkerbell.org/services/hegel/ - * - * And at this URL you can find an explanation of how a metadata looks like: - * https://docs.tinkerbell.org/about/hardware-data/ - * Right now it is a string but we want to structure it a bit more. - */ - string metadata = 9; -} - -/* - * DeleteRequest gets used when you want to delete an hardware by its identifier. - * Usually it is a UUID. - */ -message DeleteRequest { - string id = 1; -} diff --git a/protos/hardware/hardware_grpc.pb.go b/protos/hardware/hardware_grpc.pb.go deleted file mode 100644 index 248fd26d8..000000000 --- a/protos/hardware/hardware_grpc.pb.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package hardware - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// HardwareServiceClient is the client API for HardwareService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type HardwareServiceClient interface { - // Push adds a new Hardware profile to the data store. - Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) - // ByMac returns the Hardware with the given hardware MAC Address. - ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - // ByIP returns the Hardware with the given IP Address. - ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - // ByID returns the Hardware with the given ID. - ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - // All returns all of the Hardware profiles. - All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) - // DeprecatedWatch watches for events on the given hardware and streams the matching Hardware. - // We would like to keep Watch as the function used to stream events, - // and ideally Watch should be more powerful than the DeprecatedWatch - DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) - // Delete deletes the given hardware from the data store. - Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) -} - -type hardwareServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHardwareServiceClient(cc grpc.ClientConnInterface) HardwareServiceClient { - return &hardwareServiceClient{cc} -} - -func (c *hardwareServiceClient) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/Push", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hardwareServiceClient) ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - out := new(Hardware) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByMAC", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hardwareServiceClient) ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - out := new(Hardware) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByIP", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hardwareServiceClient) ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - out := new(Hardware) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hardwareServiceClient) All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) { - stream, err := c.cc.NewStream(ctx, &HardwareService_ServiceDesc.Streams[0], "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/All", opts...) - if err != nil { - return nil, err - } - x := &hardwareServiceAllClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type HardwareService_AllClient interface { - Recv() (*Hardware, error) - grpc.ClientStream -} - -type hardwareServiceAllClient struct { - grpc.ClientStream -} - -func (x *hardwareServiceAllClient) Recv() (*Hardware, error) { - m := new(Hardware) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *hardwareServiceClient) DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) { - stream, err := c.cc.NewStream(ctx, &HardwareService_ServiceDesc.Streams[1], "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/DeprecatedWatch", opts...) - if err != nil { - return nil, err - } - x := &hardwareServiceDeprecatedWatchClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type HardwareService_DeprecatedWatchClient interface { - Recv() (*Hardware, error) - grpc.ClientStream -} - -type hardwareServiceDeprecatedWatchClient struct { - grpc.ClientStream -} - -func (x *hardwareServiceDeprecatedWatchClient) Recv() (*Hardware, error) { - m := new(Hardware) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *hardwareServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HardwareServiceServer is the server API for HardwareService service. -// All implementations should embed UnimplementedHardwareServiceServer -// for forward compatibility -type HardwareServiceServer interface { - // Push adds a new Hardware profile to the data store. - Push(context.Context, *PushRequest) (*Empty, error) - // ByMac returns the Hardware with the given hardware MAC Address. - ByMAC(context.Context, *GetRequest) (*Hardware, error) - // ByIP returns the Hardware with the given IP Address. - ByIP(context.Context, *GetRequest) (*Hardware, error) - // ByID returns the Hardware with the given ID. - ByID(context.Context, *GetRequest) (*Hardware, error) - // All returns all of the Hardware profiles. - All(*Empty, HardwareService_AllServer) error - // DeprecatedWatch watches for events on the given hardware and streams the matching Hardware. - // We would like to keep Watch as the function used to stream events, - // and ideally Watch should be more powerful than the DeprecatedWatch - DeprecatedWatch(*GetRequest, HardwareService_DeprecatedWatchServer) error - // Delete deletes the given hardware from the data store. - Delete(context.Context, *DeleteRequest) (*Empty, error) -} - -// UnimplementedHardwareServiceServer should be embedded to have forward compatible implementations. -type UnimplementedHardwareServiceServer struct{} - -func (UnimplementedHardwareServiceServer) Push(context.Context, *PushRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Push not implemented") -} - -func (UnimplementedHardwareServiceServer) ByMAC(context.Context, *GetRequest) (*Hardware, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByMAC not implemented") -} - -func (UnimplementedHardwareServiceServer) ByIP(context.Context, *GetRequest) (*Hardware, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByIP not implemented") -} - -func (UnimplementedHardwareServiceServer) ByID(context.Context, *GetRequest) (*Hardware, error) { - return nil, status.Errorf(codes.Unimplemented, "method ByID not implemented") -} - -func (UnimplementedHardwareServiceServer) All(*Empty, HardwareService_AllServer) error { - return status.Errorf(codes.Unimplemented, "method All not implemented") -} - -func (UnimplementedHardwareServiceServer) DeprecatedWatch(*GetRequest, HardwareService_DeprecatedWatchServer) error { - return status.Errorf(codes.Unimplemented, "method DeprecatedWatch not implemented") -} - -func (UnimplementedHardwareServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} - -// UnsafeHardwareServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to HardwareServiceServer will -// result in compilation errors. -type UnsafeHardwareServiceServer interface { - mustEmbedUnimplementedHardwareServiceServer() -} - -func RegisterHardwareServiceServer(s grpc.ServiceRegistrar, srv HardwareServiceServer) { - s.RegisterService(&HardwareService_ServiceDesc, srv) -} - -func _HardwareService_Push_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HardwareServiceServer).Push(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/Push", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HardwareServiceServer).Push(ctx, req.(*PushRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HardwareService_ByMAC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HardwareServiceServer).ByMAC(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByMAC", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HardwareServiceServer).ByMAC(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HardwareService_ByIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HardwareServiceServer).ByIP(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByIP", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HardwareServiceServer).ByIP(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HardwareService_ByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HardwareServiceServer).ByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/ByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HardwareServiceServer).ByID(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HardwareService_All_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(Empty) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(HardwareServiceServer).All(m, &hardwareServiceAllServer{stream}) -} - -type HardwareService_AllServer interface { - Send(*Hardware) error - grpc.ServerStream -} - -type hardwareServiceAllServer struct { - grpc.ServerStream -} - -func (x *hardwareServiceAllServer) Send(m *Hardware) error { - return x.ServerStream.SendMsg(m) -} - -func _HardwareService_DeprecatedWatch_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(HardwareServiceServer).DeprecatedWatch(m, &hardwareServiceDeprecatedWatchServer{stream}) -} - -type HardwareService_DeprecatedWatchServer interface { - Send(*Hardware) error - grpc.ServerStream -} - -type hardwareServiceDeprecatedWatchServer struct { - grpc.ServerStream -} - -func (x *hardwareServiceDeprecatedWatchServer) Send(m *Hardware) error { - return x.ServerStream.SendMsg(m) -} - -func _HardwareService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HardwareServiceServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HardwareServiceServer).Delete(ctx, req.(*DeleteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// HardwareService_ServiceDesc is the grpc.ServiceDesc for HardwareService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var HardwareService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "jackfan.us.kg.tinkerbell.tink.protos.hardware.HardwareService", - HandlerType: (*HardwareServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Push", - Handler: _HardwareService_Push_Handler, - }, - { - MethodName: "ByMAC", - Handler: _HardwareService_ByMAC_Handler, - }, - { - MethodName: "ByIP", - Handler: _HardwareService_ByIP_Handler, - }, - { - MethodName: "ByID", - Handler: _HardwareService_ByID_Handler, - }, - { - MethodName: "Delete", - Handler: _HardwareService_Delete_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "All", - Handler: _HardwareService_All_Handler, - ServerStreams: true, - }, - { - StreamName: "DeprecatedWatch", - Handler: _HardwareService_DeprecatedWatch_Handler, - ServerStreams: true, - }, - }, - Metadata: "protos/hardware/hardware.proto", -} diff --git a/protos/hardware/mock.go b/protos/hardware/mock.go deleted file mode 100644 index c7c147baa..000000000 --- a/protos/hardware/mock.go +++ /dev/null @@ -1,687 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package hardware - -import ( - context "context" - sync "sync" - - grpc "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// Ensure, that HardwareServiceClientMock does implement HardwareServiceClient. -// If this is not the case, regenerate this file with moq. -var _ HardwareServiceClient = &HardwareServiceClientMock{} - -// HardwareServiceClientMock is a mock implementation of HardwareServiceClient. -// -// func TestSomethingThatUsesHardwareServiceClient(t *testing.T) { -// -// // make and configure a mocked HardwareServiceClient -// mockedHardwareServiceClient := &HardwareServiceClientMock{ -// AllFunc: func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) { -// panic("mock out the All method") -// }, -// ByIDFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { -// panic("mock out the ByID method") -// }, -// ByIPFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { -// panic("mock out the ByIP method") -// }, -// ByMACFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { -// panic("mock out the ByMAC method") -// }, -// DeleteFunc: func(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the Delete method") -// }, -// DeprecatedWatchFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) { -// panic("mock out the DeprecatedWatch method") -// }, -// PushFunc: func(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the Push method") -// }, -// } -// -// // use mockedHardwareServiceClient in code that requires HardwareServiceClient -// // and then make assertions. -// -// } -type HardwareServiceClientMock struct { - // AllFunc mocks the All method. - AllFunc func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) - - // ByIDFunc mocks the ByID method. - ByIDFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - - // ByIPFunc mocks the ByIP method. - ByIPFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - - // ByMACFunc mocks the ByMAC method. - ByMACFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) - - // DeleteFunc mocks the Delete method. - DeleteFunc func(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) - - // DeprecatedWatchFunc mocks the DeprecatedWatch method. - DeprecatedWatchFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) - - // PushFunc mocks the Push method. - PushFunc func(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) - - // calls tracks calls to the methods. - calls struct { - // All holds details about calls to the All method. - All []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *Empty - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ByID holds details about calls to the ByID method. - ByID []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ByIP holds details about calls to the ByIP method. - ByIP []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ByMAC holds details about calls to the ByMAC method. - ByMAC []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // Delete holds details about calls to the Delete method. - Delete []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *DeleteRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // DeprecatedWatch holds details about calls to the DeprecatedWatch method. - DeprecatedWatch []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // Push holds details about calls to the Push method. - Push []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *PushRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - } - lockAll sync.RWMutex - lockByID sync.RWMutex - lockByIP sync.RWMutex - lockByMAC sync.RWMutex - lockDelete sync.RWMutex - lockDeprecatedWatch sync.RWMutex - lockPush sync.RWMutex -} - -// All calls AllFunc. -func (mock *HardwareServiceClientMock) All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) { - if mock.AllFunc == nil { - panic("HardwareServiceClientMock.AllFunc: method is nil but HardwareServiceClient.All was just called") - } - callInfo := struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockAll.Lock() - mock.calls.All = append(mock.calls.All, callInfo) - mock.lockAll.Unlock() - return mock.AllFunc(ctx, in, opts...) -} - -// AllCalls gets all the calls that were made to All. -// Check the length with: -// len(mockedHardwareServiceClient.AllCalls()) -func (mock *HardwareServiceClientMock) AllCalls() []struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption - } - mock.lockAll.RLock() - calls = mock.calls.All - mock.lockAll.RUnlock() - return calls -} - -// ByID calls ByIDFunc. -func (mock *HardwareServiceClientMock) ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - if mock.ByIDFunc == nil { - panic("HardwareServiceClientMock.ByIDFunc: method is nil but HardwareServiceClient.ByID was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockByID.Lock() - mock.calls.ByID = append(mock.calls.ByID, callInfo) - mock.lockByID.Unlock() - return mock.ByIDFunc(ctx, in, opts...) -} - -// ByIDCalls gets all the calls that were made to ByID. -// Check the length with: -// len(mockedHardwareServiceClient.ByIDCalls()) -func (mock *HardwareServiceClientMock) ByIDCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockByID.RLock() - calls = mock.calls.ByID - mock.lockByID.RUnlock() - return calls -} - -// ByIP calls ByIPFunc. -func (mock *HardwareServiceClientMock) ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - if mock.ByIPFunc == nil { - panic("HardwareServiceClientMock.ByIPFunc: method is nil but HardwareServiceClient.ByIP was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockByIP.Lock() - mock.calls.ByIP = append(mock.calls.ByIP, callInfo) - mock.lockByIP.Unlock() - return mock.ByIPFunc(ctx, in, opts...) -} - -// ByIPCalls gets all the calls that were made to ByIP. -// Check the length with: -// len(mockedHardwareServiceClient.ByIPCalls()) -func (mock *HardwareServiceClientMock) ByIPCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockByIP.RLock() - calls = mock.calls.ByIP - mock.lockByIP.RUnlock() - return calls -} - -// ByMAC calls ByMACFunc. -func (mock *HardwareServiceClientMock) ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { - if mock.ByMACFunc == nil { - panic("HardwareServiceClientMock.ByMACFunc: method is nil but HardwareServiceClient.ByMAC was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockByMAC.Lock() - mock.calls.ByMAC = append(mock.calls.ByMAC, callInfo) - mock.lockByMAC.Unlock() - return mock.ByMACFunc(ctx, in, opts...) -} - -// ByMACCalls gets all the calls that were made to ByMAC. -// Check the length with: -// len(mockedHardwareServiceClient.ByMACCalls()) -func (mock *HardwareServiceClientMock) ByMACCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockByMAC.RLock() - calls = mock.calls.ByMAC - mock.lockByMAC.RUnlock() - return calls -} - -// Delete calls DeleteFunc. -func (mock *HardwareServiceClientMock) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) { - if mock.DeleteFunc == nil { - panic("HardwareServiceClientMock.DeleteFunc: method is nil but HardwareServiceClient.Delete was just called") - } - callInfo := struct { - Ctx context.Context - In *DeleteRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockDelete.Lock() - mock.calls.Delete = append(mock.calls.Delete, callInfo) - mock.lockDelete.Unlock() - return mock.DeleteFunc(ctx, in, opts...) -} - -// DeleteCalls gets all the calls that were made to Delete. -// Check the length with: -// len(mockedHardwareServiceClient.DeleteCalls()) -func (mock *HardwareServiceClientMock) DeleteCalls() []struct { - Ctx context.Context - In *DeleteRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *DeleteRequest - Opts []grpc.CallOption - } - mock.lockDelete.RLock() - calls = mock.calls.Delete - mock.lockDelete.RUnlock() - return calls -} - -// DeprecatedWatch calls DeprecatedWatchFunc. -func (mock *HardwareServiceClientMock) DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) { - if mock.DeprecatedWatchFunc == nil { - panic("HardwareServiceClientMock.DeprecatedWatchFunc: method is nil but HardwareServiceClient.DeprecatedWatch was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockDeprecatedWatch.Lock() - mock.calls.DeprecatedWatch = append(mock.calls.DeprecatedWatch, callInfo) - mock.lockDeprecatedWatch.Unlock() - return mock.DeprecatedWatchFunc(ctx, in, opts...) -} - -// DeprecatedWatchCalls gets all the calls that were made to DeprecatedWatch. -// Check the length with: -// len(mockedHardwareServiceClient.DeprecatedWatchCalls()) -func (mock *HardwareServiceClientMock) DeprecatedWatchCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockDeprecatedWatch.RLock() - calls = mock.calls.DeprecatedWatch - mock.lockDeprecatedWatch.RUnlock() - return calls -} - -// Push calls PushFunc. -func (mock *HardwareServiceClientMock) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) { - if mock.PushFunc == nil { - panic("HardwareServiceClientMock.PushFunc: method is nil but HardwareServiceClient.Push was just called") - } - callInfo := struct { - Ctx context.Context - In *PushRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockPush.Lock() - mock.calls.Push = append(mock.calls.Push, callInfo) - mock.lockPush.Unlock() - return mock.PushFunc(ctx, in, opts...) -} - -// PushCalls gets all the calls that were made to Push. -// Check the length with: -// len(mockedHardwareServiceClient.PushCalls()) -func (mock *HardwareServiceClientMock) PushCalls() []struct { - Ctx context.Context - In *PushRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *PushRequest - Opts []grpc.CallOption - } - mock.lockPush.RLock() - calls = mock.calls.Push - mock.lockPush.RUnlock() - return calls -} - -// Ensure, that HardwareService_AllClientMock does implement HardwareService_AllClient. -// If this is not the case, regenerate this file with moq. -var _ HardwareService_AllClient = &HardwareService_AllClientMock{} - -// HardwareService_AllClientMock is a mock implementation of HardwareService_AllClient. -// -// func TestSomethingThatUsesHardwareService_AllClient(t *testing.T) { -// -// // make and configure a mocked HardwareService_AllClient -// mockedHardwareService_AllClient := &HardwareService_AllClientMock{ -// CloseSendFunc: func() error { -// panic("mock out the CloseSend method") -// }, -// ContextFunc: func() context.Context { -// panic("mock out the Context method") -// }, -// HeaderFunc: func() (metadata.MD, error) { -// panic("mock out the Header method") -// }, -// RecvFunc: func() (*Hardware, error) { -// panic("mock out the Recv method") -// }, -// RecvMsgFunc: func(m interface{}) error { -// panic("mock out the RecvMsg method") -// }, -// SendMsgFunc: func(m interface{}) error { -// panic("mock out the SendMsg method") -// }, -// TrailerFunc: func() metadata.MD { -// panic("mock out the Trailer method") -// }, -// } -// -// // use mockedHardwareService_AllClient in code that requires HardwareService_AllClient -// // and then make assertions. -// -// } -type HardwareService_AllClientMock struct { - // CloseSendFunc mocks the CloseSend method. - CloseSendFunc func() error - - // ContextFunc mocks the Context method. - ContextFunc func() context.Context - - // HeaderFunc mocks the Header method. - HeaderFunc func() (metadata.MD, error) - - // RecvFunc mocks the Recv method. - RecvFunc func() (*Hardware, error) - - // RecvMsgFunc mocks the RecvMsg method. - RecvMsgFunc func(m interface{}) error - - // SendMsgFunc mocks the SendMsg method. - SendMsgFunc func(m interface{}) error - - // TrailerFunc mocks the Trailer method. - TrailerFunc func() metadata.MD - - // calls tracks calls to the methods. - calls struct { - // CloseSend holds details about calls to the CloseSend method. - CloseSend []struct{} - // Context holds details about calls to the Context method. - Context []struct{} - // Header holds details about calls to the Header method. - Header []struct{} - // Recv holds details about calls to the Recv method. - Recv []struct{} - // RecvMsg holds details about calls to the RecvMsg method. - RecvMsg []struct { - // M is the m argument value. - M interface{} - } - // SendMsg holds details about calls to the SendMsg method. - SendMsg []struct { - // M is the m argument value. - M interface{} - } - // Trailer holds details about calls to the Trailer method. - Trailer []struct{} - } - lockCloseSend sync.RWMutex - lockContext sync.RWMutex - lockHeader sync.RWMutex - lockRecv sync.RWMutex - lockRecvMsg sync.RWMutex - lockSendMsg sync.RWMutex - lockTrailer sync.RWMutex -} - -// CloseSend calls CloseSendFunc. -func (mock *HardwareService_AllClientMock) CloseSend() error { - if mock.CloseSendFunc == nil { - panic("HardwareService_AllClientMock.CloseSendFunc: method is nil but HardwareService_AllClient.CloseSend was just called") - } - callInfo := struct{}{} - mock.lockCloseSend.Lock() - mock.calls.CloseSend = append(mock.calls.CloseSend, callInfo) - mock.lockCloseSend.Unlock() - return mock.CloseSendFunc() -} - -// CloseSendCalls gets all the calls that were made to CloseSend. -// Check the length with: -// len(mockedHardwareService_AllClient.CloseSendCalls()) -func (mock *HardwareService_AllClientMock) CloseSendCalls() []struct{} { - var calls []struct{} - mock.lockCloseSend.RLock() - calls = mock.calls.CloseSend - mock.lockCloseSend.RUnlock() - return calls -} - -// Context calls ContextFunc. -func (mock *HardwareService_AllClientMock) Context() context.Context { - if mock.ContextFunc == nil { - panic("HardwareService_AllClientMock.ContextFunc: method is nil but HardwareService_AllClient.Context was just called") - } - callInfo := struct{}{} - mock.lockContext.Lock() - mock.calls.Context = append(mock.calls.Context, callInfo) - mock.lockContext.Unlock() - return mock.ContextFunc() -} - -// ContextCalls gets all the calls that were made to Context. -// Check the length with: -// len(mockedHardwareService_AllClient.ContextCalls()) -func (mock *HardwareService_AllClientMock) ContextCalls() []struct{} { - var calls []struct{} - mock.lockContext.RLock() - calls = mock.calls.Context - mock.lockContext.RUnlock() - return calls -} - -// Header calls HeaderFunc. -func (mock *HardwareService_AllClientMock) Header() (metadata.MD, error) { - if mock.HeaderFunc == nil { - panic("HardwareService_AllClientMock.HeaderFunc: method is nil but HardwareService_AllClient.Header was just called") - } - callInfo := struct{}{} - mock.lockHeader.Lock() - mock.calls.Header = append(mock.calls.Header, callInfo) - mock.lockHeader.Unlock() - return mock.HeaderFunc() -} - -// HeaderCalls gets all the calls that were made to Header. -// Check the length with: -// len(mockedHardwareService_AllClient.HeaderCalls()) -func (mock *HardwareService_AllClientMock) HeaderCalls() []struct{} { - var calls []struct{} - mock.lockHeader.RLock() - calls = mock.calls.Header - mock.lockHeader.RUnlock() - return calls -} - -// Recv calls RecvFunc. -func (mock *HardwareService_AllClientMock) Recv() (*Hardware, error) { - if mock.RecvFunc == nil { - panic("HardwareService_AllClientMock.RecvFunc: method is nil but HardwareService_AllClient.Recv was just called") - } - callInfo := struct{}{} - mock.lockRecv.Lock() - mock.calls.Recv = append(mock.calls.Recv, callInfo) - mock.lockRecv.Unlock() - return mock.RecvFunc() -} - -// RecvCalls gets all the calls that were made to Recv. -// Check the length with: -// len(mockedHardwareService_AllClient.RecvCalls()) -func (mock *HardwareService_AllClientMock) RecvCalls() []struct{} { - var calls []struct{} - mock.lockRecv.RLock() - calls = mock.calls.Recv - mock.lockRecv.RUnlock() - return calls -} - -// RecvMsg calls RecvMsgFunc. -func (mock *HardwareService_AllClientMock) RecvMsg(m interface{}) error { - if mock.RecvMsgFunc == nil { - panic("HardwareService_AllClientMock.RecvMsgFunc: method is nil but HardwareService_AllClient.RecvMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockRecvMsg.Lock() - mock.calls.RecvMsg = append(mock.calls.RecvMsg, callInfo) - mock.lockRecvMsg.Unlock() - return mock.RecvMsgFunc(m) -} - -// RecvMsgCalls gets all the calls that were made to RecvMsg. -// Check the length with: -// len(mockedHardwareService_AllClient.RecvMsgCalls()) -func (mock *HardwareService_AllClientMock) RecvMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockRecvMsg.RLock() - calls = mock.calls.RecvMsg - mock.lockRecvMsg.RUnlock() - return calls -} - -// SendMsg calls SendMsgFunc. -func (mock *HardwareService_AllClientMock) SendMsg(m interface{}) error { - if mock.SendMsgFunc == nil { - panic("HardwareService_AllClientMock.SendMsgFunc: method is nil but HardwareService_AllClient.SendMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockSendMsg.Lock() - mock.calls.SendMsg = append(mock.calls.SendMsg, callInfo) - mock.lockSendMsg.Unlock() - return mock.SendMsgFunc(m) -} - -// SendMsgCalls gets all the calls that were made to SendMsg. -// Check the length with: -// len(mockedHardwareService_AllClient.SendMsgCalls()) -func (mock *HardwareService_AllClientMock) SendMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockSendMsg.RLock() - calls = mock.calls.SendMsg - mock.lockSendMsg.RUnlock() - return calls -} - -// Trailer calls TrailerFunc. -func (mock *HardwareService_AllClientMock) Trailer() metadata.MD { - if mock.TrailerFunc == nil { - panic("HardwareService_AllClientMock.TrailerFunc: method is nil but HardwareService_AllClient.Trailer was just called") - } - callInfo := struct{}{} - mock.lockTrailer.Lock() - mock.calls.Trailer = append(mock.calls.Trailer, callInfo) - mock.lockTrailer.Unlock() - return mock.TrailerFunc() -} - -// TrailerCalls gets all the calls that were made to Trailer. -// Check the length with: -// len(mockedHardwareService_AllClient.TrailerCalls()) -func (mock *HardwareService_AllClientMock) TrailerCalls() []struct{} { - var calls []struct{} - mock.lockTrailer.RLock() - calls = mock.calls.Trailer - mock.lockTrailer.RUnlock() - return calls -} diff --git a/protos/packet/packet.pb.go b/protos/packet/packet.pb.go deleted file mode 100644 index e5c914450..000000000 --- a/protos/packet/packet.pb.go +++ /dev/null @@ -1,1623 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: protos/packet/packet.proto - -package packet - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - BondingMode int64 `protobuf:"varint,2,opt,name=bonding_mode,json=bondingMode,proto3" json:"bonding_mode,omitempty"` - Manufacturer *Metadata_Manufacturer `protobuf:"bytes,3,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` - Instance *Metadata_Instance `protobuf:"bytes,4,opt,name=instance,proto3" json:"instance,omitempty"` - Custom *Metadata_Custom `protobuf:"bytes,5,opt,name=custom,proto3" json:"custom,omitempty"` - Facility *Metadata_Facility `protobuf:"bytes,6,opt,name=facility,proto3" json:"facility,omitempty"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0} -} - -func (x *Metadata) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *Metadata) GetBondingMode() int64 { - if x != nil { - return x.BondingMode - } - return 0 -} - -func (x *Metadata) GetManufacturer() *Metadata_Manufacturer { - if x != nil { - return x.Manufacturer - } - return nil -} - -func (x *Metadata) GetInstance() *Metadata_Instance { - if x != nil { - return x.Instance - } - return nil -} - -func (x *Metadata) GetCustom() *Metadata_Custom { - if x != nil { - return x.Custom - } - return nil -} - -func (x *Metadata) GetFacility() *Metadata_Facility { - if x != nil { - return x.Facility - } - return nil -} - -type Metadata_Manufacturer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` -} - -func (x *Metadata_Manufacturer) Reset() { - *x = Metadata_Manufacturer{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Manufacturer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Manufacturer) ProtoMessage() {} - -func (x *Metadata_Manufacturer) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Manufacturer.ProtoReflect.Descriptor instead. -func (*Metadata_Manufacturer) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Metadata_Manufacturer) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Metadata_Manufacturer) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -type Metadata_Instance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` - AllowPxe bool `protobuf:"varint,4,opt,name=allow_pxe,json=allowPxe,proto3" json:"allow_pxe,omitempty"` - Rescue bool `protobuf:"varint,5,opt,name=rescue,proto3" json:"rescue,omitempty"` - OperatingSystem *Metadata_Instance_OperatingSystem `protobuf:"bytes,6,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` - AlwaysPxe bool `protobuf:"varint,7,opt,name=always_pxe,json=alwaysPxe,proto3" json:"always_pxe,omitempty"` - IpxeScriptUrl string `protobuf:"bytes,8,opt,name=ipxe_script_url,json=ipxeScriptUrl,proto3" json:"ipxe_script_url,omitempty"` - Ips []*Metadata_Instance_IP `protobuf:"bytes,9,rep,name=ips,proto3" json:"ips,omitempty"` - Userdata string `protobuf:"bytes,10,opt,name=userdata,proto3" json:"userdata,omitempty"` - CryptedRootPassword string `protobuf:"bytes,11,opt,name=crypted_root_password,json=cryptedRootPassword,proto3" json:"crypted_root_password,omitempty"` - Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` - Storage *Metadata_Instance_Storage `protobuf:"bytes,13,opt,name=storage,proto3" json:"storage,omitempty"` - SshKeys []string `protobuf:"bytes,14,rep,name=ssh_keys,json=sshKeys,proto3" json:"ssh_keys,omitempty"` - NetworkReady bool `protobuf:"varint,15,opt,name=network_ready,json=networkReady,proto3" json:"network_ready,omitempty"` - Vendordata string `protobuf:"bytes,16,opt,name=vendordata,proto3" json:"vendordata,omitempty"` -} - -func (x *Metadata_Instance) Reset() { - *x = Metadata_Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance) ProtoMessage() {} - -func (x *Metadata_Instance) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance.ProtoReflect.Descriptor instead. -func (*Metadata_Instance) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Metadata_Instance) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Metadata_Instance) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *Metadata_Instance) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *Metadata_Instance) GetAllowPxe() bool { - if x != nil { - return x.AllowPxe - } - return false -} - -func (x *Metadata_Instance) GetRescue() bool { - if x != nil { - return x.Rescue - } - return false -} - -func (x *Metadata_Instance) GetOperatingSystem() *Metadata_Instance_OperatingSystem { - if x != nil { - return x.OperatingSystem - } - return nil -} - -func (x *Metadata_Instance) GetAlwaysPxe() bool { - if x != nil { - return x.AlwaysPxe - } - return false -} - -func (x *Metadata_Instance) GetIpxeScriptUrl() string { - if x != nil { - return x.IpxeScriptUrl - } - return "" -} - -func (x *Metadata_Instance) GetIps() []*Metadata_Instance_IP { - if x != nil { - return x.Ips - } - return nil -} - -func (x *Metadata_Instance) GetUserdata() string { - if x != nil { - return x.Userdata - } - return "" -} - -func (x *Metadata_Instance) GetCryptedRootPassword() string { - if x != nil { - return x.CryptedRootPassword - } - return "" -} - -func (x *Metadata_Instance) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Metadata_Instance) GetStorage() *Metadata_Instance_Storage { - if x != nil { - return x.Storage - } - return nil -} - -func (x *Metadata_Instance) GetSshKeys() []string { - if x != nil { - return x.SshKeys - } - return nil -} - -func (x *Metadata_Instance) GetNetworkReady() bool { - if x != nil { - return x.NetworkReady - } - return false -} - -func (x *Metadata_Instance) GetVendordata() string { - if x != nil { - return x.Vendordata - } - return "" -} - -type Metadata_Custom struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PreinstalledOperatingSystemVersion *Metadata_Instance_OperatingSystem `protobuf:"bytes,1,opt,name=preinstalled_operating_system_version,json=preinstalledOperatingSystemVersion,proto3" json:"preinstalled_operating_system_version,omitempty"` - PrivateSubnets []string `protobuf:"bytes,2,rep,name=private_subnets,json=privateSubnets,proto3" json:"private_subnets,omitempty"` -} - -func (x *Metadata_Custom) Reset() { - *x = Metadata_Custom{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Custom) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Custom) ProtoMessage() {} - -func (x *Metadata_Custom) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Custom.ProtoReflect.Descriptor instead. -func (*Metadata_Custom) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *Metadata_Custom) GetPreinstalledOperatingSystemVersion() *Metadata_Instance_OperatingSystem { - if x != nil { - return x.PreinstalledOperatingSystemVersion - } - return nil -} - -func (x *Metadata_Custom) GetPrivateSubnets() []string { - if x != nil { - return x.PrivateSubnets - } - return nil -} - -type Metadata_Facility struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlanSlug string `protobuf:"bytes,1,opt,name=plan_slug,json=planSlug,proto3" json:"plan_slug,omitempty"` - PlanVersionSlug string `protobuf:"bytes,2,opt,name=plan_version_slug,json=planVersionSlug,proto3" json:"plan_version_slug,omitempty"` - FacilityCode string `protobuf:"bytes,3,opt,name=facility_code,json=facilityCode,proto3" json:"facility_code,omitempty"` -} - -func (x *Metadata_Facility) Reset() { - *x = Metadata_Facility{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Facility) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Facility) ProtoMessage() {} - -func (x *Metadata_Facility) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Facility.ProtoReflect.Descriptor instead. -func (*Metadata_Facility) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *Metadata_Facility) GetPlanSlug() string { - if x != nil { - return x.PlanSlug - } - return "" -} - -func (x *Metadata_Facility) GetPlanVersionSlug() string { - if x != nil { - return x.PlanVersionSlug - } - return "" -} - -func (x *Metadata_Facility) GetFacilityCode() string { - if x != nil { - return x.FacilityCode - } - return "" -} - -type Metadata_Instance_OperatingSystem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` - Distro string `protobuf:"bytes,2,opt,name=distro,proto3" json:"distro,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - ImageTag string `protobuf:"bytes,4,opt,name=image_tag,json=imageTag,proto3" json:"image_tag,omitempty"` - OsSlug string `protobuf:"bytes,5,opt,name=os_slug,json=osSlug,proto3" json:"os_slug,omitempty"` -} - -func (x *Metadata_Instance_OperatingSystem) Reset() { - *x = Metadata_Instance_OperatingSystem{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_OperatingSystem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_OperatingSystem) ProtoMessage() {} - -func (x *Metadata_Instance_OperatingSystem) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_OperatingSystem.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_OperatingSystem) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (x *Metadata_Instance_OperatingSystem) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -func (x *Metadata_Instance_OperatingSystem) GetDistro() string { - if x != nil { - return x.Distro - } - return "" -} - -func (x *Metadata_Instance_OperatingSystem) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Metadata_Instance_OperatingSystem) GetImageTag() string { - if x != nil { - return x.ImageTag - } - return "" -} - -func (x *Metadata_Instance_OperatingSystem) GetOsSlug() string { - if x != nil { - return x.OsSlug - } - return "" -} - -type Metadata_Instance_IP struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask,omitempty"` - Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` - Family int64 `protobuf:"varint,4,opt,name=family,proto3" json:"family,omitempty"` - Public bool `protobuf:"varint,5,opt,name=public,proto3" json:"public,omitempty"` - Management bool `protobuf:"varint,6,opt,name=management,proto3" json:"management,omitempty"` -} - -func (x *Metadata_Instance_IP) Reset() { - *x = Metadata_Instance_IP{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_IP) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_IP) ProtoMessage() {} - -func (x *Metadata_Instance_IP) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_IP.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_IP) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *Metadata_Instance_IP) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Metadata_Instance_IP) GetNetmask() string { - if x != nil { - return x.Netmask - } - return "" -} - -func (x *Metadata_Instance_IP) GetGateway() string { - if x != nil { - return x.Gateway - } - return "" -} - -func (x *Metadata_Instance_IP) GetFamily() int64 { - if x != nil { - return x.Family - } - return 0 -} - -func (x *Metadata_Instance_IP) GetPublic() bool { - if x != nil { - return x.Public - } - return false -} - -func (x *Metadata_Instance_IP) GetManagement() bool { - if x != nil { - return x.Management - } - return false -} - -type Metadata_Instance_Storage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Disks []*Metadata_Instance_Storage_Disk `protobuf:"bytes,1,rep,name=disks,proto3" json:"disks,omitempty"` - Raid []*Metadata_Instance_Storage_RAID `protobuf:"bytes,2,rep,name=raid,proto3" json:"raid,omitempty"` - Filesystems []*Metadata_Instance_Storage_Filesystem `protobuf:"bytes,3,rep,name=filesystems,proto3" json:"filesystems,omitempty"` -} - -func (x *Metadata_Instance_Storage) Reset() { - *x = Metadata_Instance_Storage{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage) ProtoMessage() {} - -func (x *Metadata_Instance_Storage) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2} -} - -func (x *Metadata_Instance_Storage) GetDisks() []*Metadata_Instance_Storage_Disk { - if x != nil { - return x.Disks - } - return nil -} - -func (x *Metadata_Instance_Storage) GetRaid() []*Metadata_Instance_Storage_RAID { - if x != nil { - return x.Raid - } - return nil -} - -func (x *Metadata_Instance_Storage) GetFilesystems() []*Metadata_Instance_Storage_Filesystem { - if x != nil { - return x.Filesystems - } - return nil -} - -type Metadata_Instance_Storage_Disk struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` - WipeTable bool `protobuf:"varint,2,opt,name=wipe_table,json=wipeTable,proto3" json:"wipe_table,omitempty"` - Partitions []*Metadata_Instance_Storage_Disk_Partition `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"` -} - -func (x *Metadata_Instance_Storage_Disk) Reset() { - *x = Metadata_Instance_Storage_Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_Disk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_Disk) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_Disk) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_Disk.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_Disk) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 0} -} - -func (x *Metadata_Instance_Storage_Disk) GetDevice() string { - if x != nil { - return x.Device - } - return "" -} - -func (x *Metadata_Instance_Storage_Disk) GetWipeTable() bool { - if x != nil { - return x.WipeTable - } - return false -} - -func (x *Metadata_Instance_Storage_Disk) GetPartitions() []*Metadata_Instance_Storage_Disk_Partition { - if x != nil { - return x.Partitions - } - return nil -} - -type Metadata_Instance_Storage_File struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Contents string `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` - Mode int64 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"` - Uid int64 `protobuf:"varint,4,opt,name=uid,proto3" json:"uid,omitempty"` - Gid int64 `protobuf:"varint,5,opt,name=gid,proto3" json:"gid,omitempty"` -} - -func (x *Metadata_Instance_Storage_File) Reset() { - *x = Metadata_Instance_Storage_File{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_File) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_File) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_File) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_File.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_File) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 1} -} - -func (x *Metadata_Instance_Storage_File) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Metadata_Instance_Storage_File) GetContents() string { - if x != nil { - return x.Contents - } - return "" -} - -func (x *Metadata_Instance_Storage_File) GetMode() int64 { - if x != nil { - return x.Mode - } - return 0 -} - -func (x *Metadata_Instance_Storage_File) GetUid() int64 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *Metadata_Instance_Storage_File) GetGid() int64 { - if x != nil { - return x.Gid - } - return 0 -} - -type Metadata_Instance_Storage_Mount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` - Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` - Files []*Metadata_Instance_Storage_File `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` - Create *Metadata_Instance_Storage_Mount_FilesystemOptions `protobuf:"bytes,4,opt,name=create,proto3" json:"create,omitempty"` - Point string `protobuf:"bytes,5,opt,name=point,proto3" json:"point,omitempty"` -} - -func (x *Metadata_Instance_Storage_Mount) Reset() { - *x = Metadata_Instance_Storage_Mount{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_Mount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_Mount) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_Mount) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_Mount.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_Mount) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 2} -} - -func (x *Metadata_Instance_Storage_Mount) GetDevice() string { - if x != nil { - return x.Device - } - return "" -} - -func (x *Metadata_Instance_Storage_Mount) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *Metadata_Instance_Storage_Mount) GetFiles() []*Metadata_Instance_Storage_File { - if x != nil { - return x.Files - } - return nil -} - -func (x *Metadata_Instance_Storage_Mount) GetCreate() *Metadata_Instance_Storage_Mount_FilesystemOptions { - if x != nil { - return x.Create - } - return nil -} - -func (x *Metadata_Instance_Storage_Mount) GetPoint() string { - if x != nil { - return x.Point - } - return "" -} - -type Metadata_Instance_Storage_Filesystem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mount *Metadata_Instance_Storage_Mount `protobuf:"bytes,1,opt,name=mount,proto3" json:"mount,omitempty"` -} - -func (x *Metadata_Instance_Storage_Filesystem) Reset() { - *x = Metadata_Instance_Storage_Filesystem{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_Filesystem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_Filesystem) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_Filesystem) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_Filesystem.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_Filesystem) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 3} -} - -func (x *Metadata_Instance_Storage_Filesystem) GetMount() *Metadata_Instance_Storage_Mount { - if x != nil { - return x.Mount - } - return nil -} - -type Metadata_Instance_Storage_RAID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` - Devices []string `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"` - Spare int64 `protobuf:"varint,4,opt,name=spare,proto3" json:"spare,omitempty"` -} - -func (x *Metadata_Instance_Storage_RAID) Reset() { - *x = Metadata_Instance_Storage_RAID{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_RAID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_RAID) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_RAID) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_RAID.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_RAID) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 4} -} - -func (x *Metadata_Instance_Storage_RAID) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Metadata_Instance_Storage_RAID) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *Metadata_Instance_Storage_RAID) GetDevices() []string { - if x != nil { - return x.Devices - } - return nil -} - -func (x *Metadata_Instance_Storage_RAID) GetSpare() int64 { - if x != nil { - return x.Spare - } - return 0 -} - -type Metadata_Instance_Storage_Disk_Partition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` - Number int64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` - Start int64 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` - TypeGuid string `protobuf:"bytes,5,opt,name=type_guid,json=typeGuid,proto3" json:"type_guid,omitempty"` -} - -func (x *Metadata_Instance_Storage_Disk_Partition) Reset() { - *x = Metadata_Instance_Storage_Disk_Partition{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_Disk_Partition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_Disk_Partition) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_Disk_Partition) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_Disk_Partition.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_Disk_Partition) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 0, 0} -} - -func (x *Metadata_Instance_Storage_Disk_Partition) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *Metadata_Instance_Storage_Disk_Partition) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *Metadata_Instance_Storage_Disk_Partition) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *Metadata_Instance_Storage_Disk_Partition) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Metadata_Instance_Storage_Disk_Partition) GetTypeGuid() string { - if x != nil { - return x.TypeGuid - } - return "" -} - -type Metadata_Instance_Storage_Mount_FilesystemOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Force bool `protobuf:"varint,1,opt,name=force,proto3" json:"force,omitempty"` - Options []string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *Metadata_Instance_Storage_Mount_FilesystemOptions) Reset() { - *x = Metadata_Instance_Storage_Mount_FilesystemOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_packet_packet_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata_Instance_Storage_Mount_FilesystemOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata_Instance_Storage_Mount_FilesystemOptions) ProtoMessage() {} - -func (x *Metadata_Instance_Storage_Mount_FilesystemOptions) ProtoReflect() protoreflect.Message { - mi := &file_protos_packet_packet_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata_Instance_Storage_Mount_FilesystemOptions.ProtoReflect.Descriptor instead. -func (*Metadata_Instance_Storage_Mount_FilesystemOptions) Descriptor() ([]byte, []int) { - return file_protos_packet_packet_proto_rawDescGZIP(), []int{0, 1, 2, 2, 0} -} - -func (x *Metadata_Instance_Storage_Mount_FilesystemOptions) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *Metadata_Instance_Storage_Mount_FilesystemOptions) GetOptions() []string { - if x != nil { - return x.Options - } - return nil -} - -var File_protos_packet_packet_proto protoreflect.FileDescriptor - -var file_protos_packet_packet_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, - 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x22, 0xbb, 0x18, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x63, 0x0a, 0x0c, - 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, - 0x72, 0x65, 0x72, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, - 0x72, 0x12, 0x57, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x57, 0x0a, - 0x08, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x66, 0x61, - 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x1a, 0x32, 0x0a, 0x0c, 0x4d, 0x61, 0x6e, 0x75, 0x66, 0x61, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x1a, 0x88, 0x12, 0x0a, 0x08, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x70, 0x78, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x50, 0x78, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x63, 0x75, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x63, 0x75, 0x65, 0x12, 0x76, - 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, - 0x5f, 0x70, 0x78, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x77, 0x61, - 0x79, 0x73, 0x50, 0x78, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x70, 0x78, 0x65, 0x5f, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x69, 0x70, 0x78, 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x50, 0x0a, - 0x03, 0x69, 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x49, 0x50, 0x52, 0x03, 0x69, 0x70, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x15, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x52, 0x6f, 0x6f, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x64, 0x61, - 0x74, 0x61, 0x1a, 0x8d, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x73, 0x5f, - 0x73, 0x6c, 0x75, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x73, 0x53, 0x6c, - 0x75, 0x67, 0x1a, 0xa2, 0x01, 0x0a, 0x02, 0x49, 0x50, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x9b, 0x0a, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x12, 0x5e, 0x0a, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x05, 0x64, 0x69, - 0x73, 0x6b, 0x73, 0x12, 0x5c, 0x0a, 0x04, 0x72, 0x61, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x41, 0x49, 0x44, 0x52, 0x04, 0x72, 0x61, 0x69, - 0x64, 0x12, 0x70, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x73, 0x1a, 0xb4, 0x02, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x70, 0x65, 0x5f, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x70, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x72, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x69, 0x73, - 0x6b, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x80, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x67, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x47, 0x75, 0x69, 0x64, 0x1a, 0x6e, 0x0a, 0x04, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x1a, 0xe7, 0x02, 0x0a, 0x05, 0x4d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x5e, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x2e, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, - 0x43, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x12, 0x5f, 0x0a, 0x05, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x05, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x1a, 0x60, 0x0a, 0x04, 0x52, 0x41, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x73, 0x70, 0x61, 0x72, 0x65, 0x1a, 0xd2, 0x01, 0x0a, 0x06, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x12, 0x9e, 0x01, 0x0a, 0x25, 0x70, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x4b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x22, 0x70, - 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x6e, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x1a, 0x78, 0x0a, 0x08, 0x46, 0x61, - 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x73, - 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x53, - 0x6c, 0x75, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x70, 0x6c, 0x61, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x6c, 0x75, 0x67, 0x12, - 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x43, 0x6f, 0x64, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x74, 0x69, - 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_protos_packet_packet_proto_rawDescOnce sync.Once - file_protos_packet_packet_proto_rawDescData = file_protos_packet_packet_proto_rawDesc -) - -func file_protos_packet_packet_proto_rawDescGZIP() []byte { - file_protos_packet_packet_proto_rawDescOnce.Do(func() { - file_protos_packet_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_packet_packet_proto_rawDescData) - }) - return file_protos_packet_packet_proto_rawDescData -} - -var ( - file_protos_packet_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_protos_packet_packet_proto_goTypes = []interface{}{ - (*Metadata)(nil), // 0: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata - (*Metadata_Manufacturer)(nil), // 1: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Manufacturer - (*Metadata_Instance)(nil), // 2: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance - (*Metadata_Custom)(nil), // 3: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Custom - (*Metadata_Facility)(nil), // 4: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Facility - (*Metadata_Instance_OperatingSystem)(nil), // 5: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.OperatingSystem - (*Metadata_Instance_IP)(nil), // 6: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.IP - (*Metadata_Instance_Storage)(nil), // 7: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage - (*Metadata_Instance_Storage_Disk)(nil), // 8: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Disk - (*Metadata_Instance_Storage_File)(nil), // 9: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.File - (*Metadata_Instance_Storage_Mount)(nil), // 10: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount - (*Metadata_Instance_Storage_Filesystem)(nil), // 11: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Filesystem - (*Metadata_Instance_Storage_RAID)(nil), // 12: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.RAID - (*Metadata_Instance_Storage_Disk_Partition)(nil), // 13: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Disk.Partition - (*Metadata_Instance_Storage_Mount_FilesystemOptions)(nil), // 14: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount.FilesystemOptions - } -) - -var file_protos_packet_packet_proto_depIdxs = []int32{ - 1, // 0: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.manufacturer:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Manufacturer - 2, // 1: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.instance:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance - 3, // 2: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.custom:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Custom - 4, // 3: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.facility:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Facility - 5, // 4: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.operating_system:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.OperatingSystem - 6, // 5: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.ips:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.IP - 7, // 6: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.storage:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage - 5, // 7: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Custom.preinstalled_operating_system_version:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.OperatingSystem - 8, // 8: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.disks:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Disk - 12, // 9: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.raid:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.RAID - 11, // 10: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.filesystems:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Filesystem - 13, // 11: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Disk.partitions:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Disk.Partition - 9, // 12: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount.files:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.File - 14, // 13: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount.create:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount.FilesystemOptions - 10, // 14: jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Filesystem.mount:type_name -> jackfan.us.kg.tinkerbell.tink.protos.packet.Metadata.Instance.Storage.Mount - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_protos_packet_packet_proto_init() } -func file_protos_packet_packet_proto_init() { - if File_protos_packet_packet_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_protos_packet_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Manufacturer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Custom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Facility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_OperatingSystem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_IP); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_Mount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_Filesystem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_RAID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_Disk_Partition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_packet_packet_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata_Instance_Storage_Mount_FilesystemOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_packet_packet_proto_rawDesc, - NumEnums: 0, - NumMessages: 15, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_protos_packet_packet_proto_goTypes, - DependencyIndexes: file_protos_packet_packet_proto_depIdxs, - MessageInfos: file_protos_packet_packet_proto_msgTypes, - }.Build() - File_protos_packet_packet_proto = out.File - file_protos_packet_packet_proto_rawDesc = nil - file_protos_packet_packet_proto_goTypes = nil - file_protos_packet_packet_proto_depIdxs = nil -} diff --git a/protos/packet/packet.proto b/protos/packet/packet.proto deleted file mode 100644 index 0488b2869..000000000 --- a/protos/packet/packet.proto +++ /dev/null @@ -1,116 +0,0 @@ -syntax = "proto3"; - -option go_package = "github.com/tinkerbell/tink/protos/packet"; - -package jackfan.us.kg.tinkerbell.tink.protos.packet; - -message Metadata { - message Manufacturer { - string id = 1; - string slug = 2; - } - message Instance { - message OperatingSystem { - string slug = 1; - string distro = 2; - string version = 3; - string image_tag = 4; - string os_slug = 5; - } - message IP { - string address = 1; - string netmask = 2; - string gateway = 3; - int64 family = 4; - bool public = 5; - bool management = 6; - } - message Storage { - message Disk { - message Partition { - string label = 1; - int64 number = 2; - int64 size = 3; - int64 start = 4; - string type_guid = 5; - } - - string device = 1; - bool wipe_table = 2; - repeated Partition partitions = 3; - } - - message File { - string path = 1; - string contents = 2; - int64 mode = 3; - int64 uid = 4; - int64 gid = 5; - } - - message Mount { - message FilesystemOptions { - bool force = 1; - repeated string options = 2; - } - - string device = 1; - string format = 2; - repeated File files = 3; - FilesystemOptions create = 4; - string point = 5; - } - - message Filesystem { - Mount mount = 1; - } - - message RAID { - string name = 1; - string level = 2; - repeated string devices = 3; - int64 spare = 4; - } - - repeated Disk disks = 1; - repeated RAID raid = 2; - repeated Filesystem filesystems = 3; - } - - string id = 1; - string state = 2; - string hostname = 3; - bool allow_pxe = 4; - bool rescue = 5; - - OperatingSystem operating_system = 6; - bool always_pxe = 7; - string ipxe_script_url = 8; - repeated IP ips = 9; - string userdata = 10; - - string crypted_root_password = 11; - - repeated string tags = 12; - Storage storage = 13; - repeated string ssh_keys = 14; - bool network_ready = 15; - string vendordata = 16; - } - message Custom { - Instance.OperatingSystem preinstalled_operating_system_version = 1; - repeated string private_subnets = 2; - } - message Facility { - string plan_slug = 1; - string plan_version_slug = 2; - string facility_code = 3; - } - - string state = 1; - int64 bonding_mode = 2; - Manufacturer manufacturer = 3; - Instance instance = 4; - Custom custom = 5; - Facility facility = 6; -} diff --git a/protos/template/gen.go b/protos/template/gen.go deleted file mode 100644 index e4011339d..000000000 --- a/protos/template/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package template - -//go:generate moq -out mock.go . TemplateServiceClient TemplateService_ListTemplatesClient diff --git a/protos/template/mock.go b/protos/template/mock.go deleted file mode 100644 index 80d88b338..000000000 --- a/protos/template/mock.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package template - -import ( - context "context" - sync "sync" - - grpc "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// Ensure, that TemplateServiceClientMock does implement TemplateServiceClient. -// If this is not the case, regenerate this file with moq. -var _ TemplateServiceClient = &TemplateServiceClientMock{} - -// TemplateServiceClientMock is a mock implementation of TemplateServiceClient. -// -// func TestSomethingThatUsesTemplateServiceClient(t *testing.T) { -// -// // make and configure a mocked TemplateServiceClient -// mockedTemplateServiceClient := &TemplateServiceClientMock{ -// CreateTemplateFunc: func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) { -// panic("mock out the CreateTemplate method") -// }, -// DeleteTemplateFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the DeleteTemplate method") -// }, -// GetTemplateFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { -// panic("mock out the GetTemplate method") -// }, -// ListTemplatesFunc: func(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) { -// panic("mock out the ListTemplates method") -// }, -// UpdateTemplateFunc: func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the UpdateTemplate method") -// }, -// } -// -// // use mockedTemplateServiceClient in code that requires TemplateServiceClient -// // and then make assertions. -// -// } -type TemplateServiceClientMock struct { - // CreateTemplateFunc mocks the CreateTemplate method. - CreateTemplateFunc func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) - - // DeleteTemplateFunc mocks the DeleteTemplate method. - DeleteTemplateFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) - - // GetTemplateFunc mocks the GetTemplate method. - GetTemplateFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - - // ListTemplatesFunc mocks the ListTemplates method. - ListTemplatesFunc func(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) - - // UpdateTemplateFunc mocks the UpdateTemplate method. - UpdateTemplateFunc func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) - - // calls tracks calls to the methods. - calls struct { - // CreateTemplate holds details about calls to the CreateTemplate method. - CreateTemplate []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowTemplate - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // DeleteTemplate holds details about calls to the DeleteTemplate method. - DeleteTemplate []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetTemplate holds details about calls to the GetTemplate method. - GetTemplate []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ListTemplates holds details about calls to the ListTemplates method. - ListTemplates []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *ListRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // UpdateTemplate holds details about calls to the UpdateTemplate method. - UpdateTemplate []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowTemplate - // Opts is the opts argument value. - Opts []grpc.CallOption - } - } - lockCreateTemplate sync.RWMutex - lockDeleteTemplate sync.RWMutex - lockGetTemplate sync.RWMutex - lockListTemplates sync.RWMutex - lockUpdateTemplate sync.RWMutex -} - -// CreateTemplate calls CreateTemplateFunc. -func (mock *TemplateServiceClientMock) CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) { - if mock.CreateTemplateFunc == nil { - panic("TemplateServiceClientMock.CreateTemplateFunc: method is nil but TemplateServiceClient.CreateTemplate was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockCreateTemplate.Lock() - mock.calls.CreateTemplate = append(mock.calls.CreateTemplate, callInfo) - mock.lockCreateTemplate.Unlock() - return mock.CreateTemplateFunc(ctx, in, opts...) -} - -// CreateTemplateCalls gets all the calls that were made to CreateTemplate. -// Check the length with: -// len(mockedTemplateServiceClient.CreateTemplateCalls()) -func (mock *TemplateServiceClientMock) CreateTemplateCalls() []struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption - } - mock.lockCreateTemplate.RLock() - calls = mock.calls.CreateTemplate - mock.lockCreateTemplate.RUnlock() - return calls -} - -// DeleteTemplate calls DeleteTemplateFunc. -func (mock *TemplateServiceClientMock) DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { - if mock.DeleteTemplateFunc == nil { - panic("TemplateServiceClientMock.DeleteTemplateFunc: method is nil but TemplateServiceClient.DeleteTemplate was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockDeleteTemplate.Lock() - mock.calls.DeleteTemplate = append(mock.calls.DeleteTemplate, callInfo) - mock.lockDeleteTemplate.Unlock() - return mock.DeleteTemplateFunc(ctx, in, opts...) -} - -// DeleteTemplateCalls gets all the calls that were made to DeleteTemplate. -// Check the length with: -// len(mockedTemplateServiceClient.DeleteTemplateCalls()) -func (mock *TemplateServiceClientMock) DeleteTemplateCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockDeleteTemplate.RLock() - calls = mock.calls.DeleteTemplate - mock.lockDeleteTemplate.RUnlock() - return calls -} - -// GetTemplate calls GetTemplateFunc. -func (mock *TemplateServiceClientMock) GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - if mock.GetTemplateFunc == nil { - panic("TemplateServiceClientMock.GetTemplateFunc: method is nil but TemplateServiceClient.GetTemplate was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetTemplate.Lock() - mock.calls.GetTemplate = append(mock.calls.GetTemplate, callInfo) - mock.lockGetTemplate.Unlock() - return mock.GetTemplateFunc(ctx, in, opts...) -} - -// GetTemplateCalls gets all the calls that were made to GetTemplate. -// Check the length with: -// len(mockedTemplateServiceClient.GetTemplateCalls()) -func (mock *TemplateServiceClientMock) GetTemplateCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockGetTemplate.RLock() - calls = mock.calls.GetTemplate - mock.lockGetTemplate.RUnlock() - return calls -} - -// ListTemplates calls ListTemplatesFunc. -func (mock *TemplateServiceClientMock) ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) { - if mock.ListTemplatesFunc == nil { - panic("TemplateServiceClientMock.ListTemplatesFunc: method is nil but TemplateServiceClient.ListTemplates was just called") - } - callInfo := struct { - Ctx context.Context - In *ListRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockListTemplates.Lock() - mock.calls.ListTemplates = append(mock.calls.ListTemplates, callInfo) - mock.lockListTemplates.Unlock() - return mock.ListTemplatesFunc(ctx, in, opts...) -} - -// ListTemplatesCalls gets all the calls that were made to ListTemplates. -// Check the length with: -// len(mockedTemplateServiceClient.ListTemplatesCalls()) -func (mock *TemplateServiceClientMock) ListTemplatesCalls() []struct { - Ctx context.Context - In *ListRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *ListRequest - Opts []grpc.CallOption - } - mock.lockListTemplates.RLock() - calls = mock.calls.ListTemplates - mock.lockListTemplates.RUnlock() - return calls -} - -// UpdateTemplate calls UpdateTemplateFunc. -func (mock *TemplateServiceClientMock) UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) { - if mock.UpdateTemplateFunc == nil { - panic("TemplateServiceClientMock.UpdateTemplateFunc: method is nil but TemplateServiceClient.UpdateTemplate was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockUpdateTemplate.Lock() - mock.calls.UpdateTemplate = append(mock.calls.UpdateTemplate, callInfo) - mock.lockUpdateTemplate.Unlock() - return mock.UpdateTemplateFunc(ctx, in, opts...) -} - -// UpdateTemplateCalls gets all the calls that were made to UpdateTemplate. -// Check the length with: -// len(mockedTemplateServiceClient.UpdateTemplateCalls()) -func (mock *TemplateServiceClientMock) UpdateTemplateCalls() []struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowTemplate - Opts []grpc.CallOption - } - mock.lockUpdateTemplate.RLock() - calls = mock.calls.UpdateTemplate - mock.lockUpdateTemplate.RUnlock() - return calls -} - -// Ensure, that TemplateService_ListTemplatesClientMock does implement TemplateService_ListTemplatesClient. -// If this is not the case, regenerate this file with moq. -var _ TemplateService_ListTemplatesClient = &TemplateService_ListTemplatesClientMock{} - -// TemplateService_ListTemplatesClientMock is a mock implementation of TemplateService_ListTemplatesClient. -// -// func TestSomethingThatUsesTemplateService_ListTemplatesClient(t *testing.T) { -// -// // make and configure a mocked TemplateService_ListTemplatesClient -// mockedTemplateService_ListTemplatesClient := &TemplateService_ListTemplatesClientMock{ -// CloseSendFunc: func() error { -// panic("mock out the CloseSend method") -// }, -// ContextFunc: func() context.Context { -// panic("mock out the Context method") -// }, -// HeaderFunc: func() (metadata.MD, error) { -// panic("mock out the Header method") -// }, -// RecvFunc: func() (*WorkflowTemplate, error) { -// panic("mock out the Recv method") -// }, -// RecvMsgFunc: func(m interface{}) error { -// panic("mock out the RecvMsg method") -// }, -// SendMsgFunc: func(m interface{}) error { -// panic("mock out the SendMsg method") -// }, -// TrailerFunc: func() metadata.MD { -// panic("mock out the Trailer method") -// }, -// } -// -// // use mockedTemplateService_ListTemplatesClient in code that requires TemplateService_ListTemplatesClient -// // and then make assertions. -// -// } -type TemplateService_ListTemplatesClientMock struct { - // CloseSendFunc mocks the CloseSend method. - CloseSendFunc func() error - - // ContextFunc mocks the Context method. - ContextFunc func() context.Context - - // HeaderFunc mocks the Header method. - HeaderFunc func() (metadata.MD, error) - - // RecvFunc mocks the Recv method. - RecvFunc func() (*WorkflowTemplate, error) - - // RecvMsgFunc mocks the RecvMsg method. - RecvMsgFunc func(m interface{}) error - - // SendMsgFunc mocks the SendMsg method. - SendMsgFunc func(m interface{}) error - - // TrailerFunc mocks the Trailer method. - TrailerFunc func() metadata.MD - - // calls tracks calls to the methods. - calls struct { - // CloseSend holds details about calls to the CloseSend method. - CloseSend []struct{} - // Context holds details about calls to the Context method. - Context []struct{} - // Header holds details about calls to the Header method. - Header []struct{} - // Recv holds details about calls to the Recv method. - Recv []struct{} - // RecvMsg holds details about calls to the RecvMsg method. - RecvMsg []struct { - // M is the m argument value. - M interface{} - } - // SendMsg holds details about calls to the SendMsg method. - SendMsg []struct { - // M is the m argument value. - M interface{} - } - // Trailer holds details about calls to the Trailer method. - Trailer []struct{} - } - lockCloseSend sync.RWMutex - lockContext sync.RWMutex - lockHeader sync.RWMutex - lockRecv sync.RWMutex - lockRecvMsg sync.RWMutex - lockSendMsg sync.RWMutex - lockTrailer sync.RWMutex -} - -// CloseSend calls CloseSendFunc. -func (mock *TemplateService_ListTemplatesClientMock) CloseSend() error { - if mock.CloseSendFunc == nil { - panic("TemplateService_ListTemplatesClientMock.CloseSendFunc: method is nil but TemplateService_ListTemplatesClient.CloseSend was just called") - } - callInfo := struct{}{} - mock.lockCloseSend.Lock() - mock.calls.CloseSend = append(mock.calls.CloseSend, callInfo) - mock.lockCloseSend.Unlock() - return mock.CloseSendFunc() -} - -// CloseSendCalls gets all the calls that were made to CloseSend. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.CloseSendCalls()) -func (mock *TemplateService_ListTemplatesClientMock) CloseSendCalls() []struct{} { - var calls []struct{} - mock.lockCloseSend.RLock() - calls = mock.calls.CloseSend - mock.lockCloseSend.RUnlock() - return calls -} - -// Context calls ContextFunc. -func (mock *TemplateService_ListTemplatesClientMock) Context() context.Context { - if mock.ContextFunc == nil { - panic("TemplateService_ListTemplatesClientMock.ContextFunc: method is nil but TemplateService_ListTemplatesClient.Context was just called") - } - callInfo := struct{}{} - mock.lockContext.Lock() - mock.calls.Context = append(mock.calls.Context, callInfo) - mock.lockContext.Unlock() - return mock.ContextFunc() -} - -// ContextCalls gets all the calls that were made to Context. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.ContextCalls()) -func (mock *TemplateService_ListTemplatesClientMock) ContextCalls() []struct{} { - var calls []struct{} - mock.lockContext.RLock() - calls = mock.calls.Context - mock.lockContext.RUnlock() - return calls -} - -// Header calls HeaderFunc. -func (mock *TemplateService_ListTemplatesClientMock) Header() (metadata.MD, error) { - if mock.HeaderFunc == nil { - panic("TemplateService_ListTemplatesClientMock.HeaderFunc: method is nil but TemplateService_ListTemplatesClient.Header was just called") - } - callInfo := struct{}{} - mock.lockHeader.Lock() - mock.calls.Header = append(mock.calls.Header, callInfo) - mock.lockHeader.Unlock() - return mock.HeaderFunc() -} - -// HeaderCalls gets all the calls that were made to Header. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.HeaderCalls()) -func (mock *TemplateService_ListTemplatesClientMock) HeaderCalls() []struct{} { - var calls []struct{} - mock.lockHeader.RLock() - calls = mock.calls.Header - mock.lockHeader.RUnlock() - return calls -} - -// Recv calls RecvFunc. -func (mock *TemplateService_ListTemplatesClientMock) Recv() (*WorkflowTemplate, error) { - if mock.RecvFunc == nil { - panic("TemplateService_ListTemplatesClientMock.RecvFunc: method is nil but TemplateService_ListTemplatesClient.Recv was just called") - } - callInfo := struct{}{} - mock.lockRecv.Lock() - mock.calls.Recv = append(mock.calls.Recv, callInfo) - mock.lockRecv.Unlock() - return mock.RecvFunc() -} - -// RecvCalls gets all the calls that were made to Recv. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.RecvCalls()) -func (mock *TemplateService_ListTemplatesClientMock) RecvCalls() []struct{} { - var calls []struct{} - mock.lockRecv.RLock() - calls = mock.calls.Recv - mock.lockRecv.RUnlock() - return calls -} - -// RecvMsg calls RecvMsgFunc. -func (mock *TemplateService_ListTemplatesClientMock) RecvMsg(m interface{}) error { - if mock.RecvMsgFunc == nil { - panic("TemplateService_ListTemplatesClientMock.RecvMsgFunc: method is nil but TemplateService_ListTemplatesClient.RecvMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockRecvMsg.Lock() - mock.calls.RecvMsg = append(mock.calls.RecvMsg, callInfo) - mock.lockRecvMsg.Unlock() - return mock.RecvMsgFunc(m) -} - -// RecvMsgCalls gets all the calls that were made to RecvMsg. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.RecvMsgCalls()) -func (mock *TemplateService_ListTemplatesClientMock) RecvMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockRecvMsg.RLock() - calls = mock.calls.RecvMsg - mock.lockRecvMsg.RUnlock() - return calls -} - -// SendMsg calls SendMsgFunc. -func (mock *TemplateService_ListTemplatesClientMock) SendMsg(m interface{}) error { - if mock.SendMsgFunc == nil { - panic("TemplateService_ListTemplatesClientMock.SendMsgFunc: method is nil but TemplateService_ListTemplatesClient.SendMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockSendMsg.Lock() - mock.calls.SendMsg = append(mock.calls.SendMsg, callInfo) - mock.lockSendMsg.Unlock() - return mock.SendMsgFunc(m) -} - -// SendMsgCalls gets all the calls that were made to SendMsg. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.SendMsgCalls()) -func (mock *TemplateService_ListTemplatesClientMock) SendMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockSendMsg.RLock() - calls = mock.calls.SendMsg - mock.lockSendMsg.RUnlock() - return calls -} - -// Trailer calls TrailerFunc. -func (mock *TemplateService_ListTemplatesClientMock) Trailer() metadata.MD { - if mock.TrailerFunc == nil { - panic("TemplateService_ListTemplatesClientMock.TrailerFunc: method is nil but TemplateService_ListTemplatesClient.Trailer was just called") - } - callInfo := struct{}{} - mock.lockTrailer.Lock() - mock.calls.Trailer = append(mock.calls.Trailer, callInfo) - mock.lockTrailer.Unlock() - return mock.TrailerFunc() -} - -// TrailerCalls gets all the calls that were made to Trailer. -// Check the length with: -// len(mockedTemplateService_ListTemplatesClient.TrailerCalls()) -func (mock *TemplateService_ListTemplatesClientMock) TrailerCalls() []struct{} { - var calls []struct{} - mock.lockTrailer.RLock() - calls = mock.calls.Trailer - mock.lockTrailer.RUnlock() - return calls -} diff --git a/protos/template/template.pb.go b/protos/template/template.pb.go deleted file mode 100644 index dcd4ca331..000000000 --- a/protos/template/template.pb.go +++ /dev/null @@ -1,612 +0,0 @@ -// -// A template is a set of jobs and actions that can be performed to some -// hardware. -// It uses YAML to describe order and relation of those actions. Each action is -// a Docker container. -// When a template is stored in Tinkerbell it can be used to trigger a workflow -// targeting a specific hardwarwe. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: protos/template/template.proto - -package template - -import ( - reflect "reflect" - sync "sync" - - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// -// Empty represents an empty response -type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Empty) Reset() { - *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_template_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Empty) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Empty) ProtoMessage() {} - -func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_protos_template_template_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { - return file_protos_template_template_proto_rawDescGZIP(), []int{0} -} - -// -// WorkflowTemplate describes the template itself. -type WorkflowTemplate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // The template identifier - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // - // The name of the template. You can see it as a friendly way to remember a - // template - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // - // When a template got created - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - // - // The last time a template was modified - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - // - // When a template got deleted. This is the value used to identify a deleted - // template as well. If empty the template can be used to generate workflows. - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` - // - // The content of the template in its YAML representation - Data string `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *WorkflowTemplate) Reset() { - *x = WorkflowTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_template_template_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowTemplate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowTemplate) ProtoMessage() {} - -func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_protos_template_template_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowTemplate.ProtoReflect.Descriptor instead. -func (*WorkflowTemplate) Descriptor() ([]byte, []int) { - return file_protos_template_template_proto_rawDescGZIP(), []int{1} -} - -func (x *WorkflowTemplate) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *WorkflowTemplate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WorkflowTemplate) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *WorkflowTemplate) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *WorkflowTemplate) GetDeletedAt() *timestamppb.Timestamp { - if x != nil { - return x.DeletedAt - } - return nil -} - -func (x *WorkflowTemplate) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -// -// CreateResponse returns the ID of the created template -type CreateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *CreateResponse) Reset() { - *x = CreateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_template_template_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResponse) ProtoMessage() {} - -func (x *CreateResponse) ProtoReflect() protoreflect.Message { - mi := &file_protos_template_template_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. -func (*CreateResponse) Descriptor() ([]byte, []int) { - return file_protos_template_template_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// -// GetRequest enables you to filter templates by name or id. -type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to GetBy: - // *GetRequest_Id - // *GetRequest_Name - GetBy isGetRequest_GetBy `protobuf_oneof:"get_by"` -} - -func (x *GetRequest) Reset() { - *x = GetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_template_template_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRequest) ProtoMessage() {} - -func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_template_template_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. -func (*GetRequest) Descriptor() ([]byte, []int) { - return file_protos_template_template_proto_rawDescGZIP(), []int{3} -} - -func (m *GetRequest) GetGetBy() isGetRequest_GetBy { - if m != nil { - return m.GetBy - } - return nil -} - -func (x *GetRequest) GetId() string { - if x, ok := x.GetGetBy().(*GetRequest_Id); ok { - return x.Id - } - return "" -} - -func (x *GetRequest) GetName() string { - if x, ok := x.GetGetBy().(*GetRequest_Name); ok { - return x.Name - } - return "" -} - -type isGetRequest_GetBy interface { - isGetRequest_GetBy() -} - -type GetRequest_Id struct { - // - // Filter by the template id - Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` -} - -type GetRequest_Name struct { - // - // Filter by the template name - Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` -} - -func (*GetRequest_Id) isGetRequest_GetBy() {} - -func (*GetRequest_Name) isGetRequest_GetBy() {} - -// -// The request to use during a List template request -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to FilterBy: - // *ListRequest_Name - FilterBy isListRequest_FilterBy `protobuf_oneof:"filter_by"` -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_template_template_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_template_template_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_protos_template_template_proto_rawDescGZIP(), []int{4} -} - -func (m *ListRequest) GetFilterBy() isListRequest_FilterBy { - if m != nil { - return m.FilterBy - } - return nil -} - -func (x *ListRequest) GetName() string { - if x, ok := x.GetFilterBy().(*ListRequest_Name); ok { - return x.Name - } - return "" -} - -type isListRequest_FilterBy interface { - isListRequest_FilterBy() -} - -type ListRequest_Name struct { - // - // Filter by the template name - Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"` -} - -func (*ListRequest_Name) isListRequest_FilterBy() {} - -var File_protos_template_template_proto protoreflect.FileDescriptor - -var file_protos_template_template_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x22, 0x30, 0x0a, 0x0b, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x0b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x32, 0x9a, 0x06, 0x0a, - 0x0f, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xa4, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x1a, 0x3a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x9f, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x36, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, - 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, - 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x37, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x15, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_protos_template_template_proto_rawDescOnce sync.Once - file_protos_template_template_proto_rawDescData = file_protos_template_template_proto_rawDesc -) - -func file_protos_template_template_proto_rawDescGZIP() []byte { - file_protos_template_template_proto_rawDescOnce.Do(func() { - file_protos_template_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_template_template_proto_rawDescData) - }) - return file_protos_template_template_proto_rawDescData -} - -var ( - file_protos_template_template_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_protos_template_template_proto_goTypes = []interface{}{ - (*Empty)(nil), // 0: jackfan.us.kg.tinkerbell.tink.protos.template.Empty - (*WorkflowTemplate)(nil), // 1: jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate - (*CreateResponse)(nil), // 2: jackfan.us.kg.tinkerbell.tink.protos.template.CreateResponse - (*GetRequest)(nil), // 3: jackfan.us.kg.tinkerbell.tink.protos.template.GetRequest - (*ListRequest)(nil), // 4: jackfan.us.kg.tinkerbell.tink.protos.template.ListRequest - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - } -) - -var file_protos_template_template_proto_depIdxs = []int32{ - 5, // 0: jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate.created_at:type_name -> google.protobuf.Timestamp - 5, // 1: jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate.updated_at:type_name -> google.protobuf.Timestamp - 5, // 2: jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate.deleted_at:type_name -> google.protobuf.Timestamp - 1, // 3: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.CreateTemplate:input_type -> jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate - 3, // 4: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.GetTemplate:input_type -> jackfan.us.kg.tinkerbell.tink.protos.template.GetRequest - 3, // 5: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.DeleteTemplate:input_type -> jackfan.us.kg.tinkerbell.tink.protos.template.GetRequest - 4, // 6: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.ListTemplates:input_type -> jackfan.us.kg.tinkerbell.tink.protos.template.ListRequest - 1, // 7: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.UpdateTemplate:input_type -> jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate - 2, // 8: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.CreateTemplate:output_type -> jackfan.us.kg.tinkerbell.tink.protos.template.CreateResponse - 1, // 9: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.GetTemplate:output_type -> jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate - 0, // 10: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.DeleteTemplate:output_type -> jackfan.us.kg.tinkerbell.tink.protos.template.Empty - 1, // 11: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.ListTemplates:output_type -> jackfan.us.kg.tinkerbell.tink.protos.template.WorkflowTemplate - 0, // 12: jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService.UpdateTemplate:output_type -> jackfan.us.kg.tinkerbell.tink.protos.template.Empty - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_protos_template_template_proto_init() } -func file_protos_template_template_proto_init() { - if File_protos_template_template_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_protos_template_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_template_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_template_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_template_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_template_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_protos_template_template_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*GetRequest_Id)(nil), - (*GetRequest_Name)(nil), - } - file_protos_template_template_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*ListRequest_Name)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_template_template_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_protos_template_template_proto_goTypes, - DependencyIndexes: file_protos_template_template_proto_depIdxs, - MessageInfos: file_protos_template_template_proto_msgTypes, - }.Build() - File_protos_template_template_proto = out.File - file_protos_template_template_proto_rawDesc = nil - file_protos_template_template_proto_goTypes = nil - file_protos_template_template_proto_depIdxs = nil -} diff --git a/protos/template/template.proto b/protos/template/template.proto deleted file mode 100644 index 0ec92a54c..000000000 --- a/protos/template/template.proto +++ /dev/null @@ -1,134 +0,0 @@ -/* - * A template is a set of jobs and actions that can be performed to some - * hardware. - * It uses YAML to describe order and relation of those actions. Each action is - * a Docker container. - * When a template is stored in Tinkerbell it can be used to trigger a workflow - * targeting a specific hardwarwe. - */ -syntax = "proto3"; - -option go_package = "github.com/tinkerbell/tink/protos/template"; - -package jackfan.us.kg.tinkerbell.tink.protos.template; - -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; - -/* - * TemplateService exposes capabilities to manipulate templates. - */ -service TemplateService { - /* - * CreateTemplate stores a template in the Tinkerbell server. - */ - rpc CreateTemplate(WorkflowTemplate) returns (CreateResponse) { - option (google.api.http) = { - post: "/v1/templates" - body: "*" - }; - }; - /* - * GetTemplate returns a specific template via its identifier. - */ - rpc GetTemplate(GetRequest) returns (WorkflowTemplate) { - option (google.api.http) = { - get: "/v1/templates/{id}" - }; - }; - /* - * DeleteTemplate deletes a template via its identifier. - */ - rpc DeleteTemplate(GetRequest) returns (Empty) { - option (google.api.http) = { - delete: "/v1/templates/{id}" - }; - }; - /* - * ListTemplates returns all the template stored in Tinkerbell server - */ - rpc ListTemplates(ListRequest) returns (stream WorkflowTemplate) { - option (google.api.http) = { - get: "/v1/templates" - }; - }; - /* - * UpdateTemplate updates a template - * TODO: Read the code and figure out how an update work - */ - rpc UpdateTemplate(WorkflowTemplate) returns (Empty); -} - -/* - * Empty represents an empty response - */ -message Empty { -} - -/* - * WorkflowTemplate describes the template itself. - */ -message WorkflowTemplate { - /* - * The template identifier - */ - string id = 1; - /* - * The name of the template. You can see it as a friendly way to remember a - * template - */ - string name = 2; - reserved 3; // obsolete data - /* - * When a template got created - */ - google.protobuf.Timestamp created_at = 4; - /* - * The last time a template was modified - */ - google.protobuf.Timestamp updated_at = 5; - /* - * When a template got deleted. This is the value used to identify a deleted - * template as well. If empty the template can be used to generate workflows. - */ - google.protobuf.Timestamp deleted_at = 6; - /* - * The content of the template in its YAML representation - */ - string data = 7; -} - -/* - * CreateResponse returns the ID of the created template - */ -message CreateResponse { - string id = 1; -} - -/* - * GetRequest enables you to filter templates by name or id. - */ -message GetRequest { - oneof get_by { - /* - * Filter by the template id - */ - string id = 1; - /* - * Filter by the template name - */ - string name = 2; - } -} - -/* - * The request to use during a List template request - */ -message ListRequest { - oneof filter_by { - /* - * Filter by the template name - */ - string name = 1; - } -} diff --git a/protos/template/template_grpc.pb.go b/protos/template/template_grpc.pb.go deleted file mode 100644 index f39fe3fab..000000000 --- a/protos/template/template_grpc.pb.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package template - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TemplateServiceClient is the client API for TemplateService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TemplateServiceClient interface { - // - // CreateTemplate stores a template in the Tinkerbell server. - CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) - // - // GetTemplate returns a specific template via its identifier. - GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - // - // DeleteTemplate deletes a template via its identifier. - DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) - // - // ListTemplates returns all the template stored in Tinkerbell server - ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) - // - // UpdateTemplate updates a template - // TODO: Read the code and figure out how an update work - UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) -} - -type templateServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTemplateServiceClient(cc grpc.ClientConnInterface) TemplateServiceClient { - return &templateServiceClient{cc} -} - -func (c *templateServiceClient) CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) { - out := new(CreateResponse) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/CreateTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *templateServiceClient) GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/GetTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *templateServiceClient) DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/DeleteTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *templateServiceClient) ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) { - stream, err := c.cc.NewStream(ctx, &TemplateService_ServiceDesc.Streams[0], "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/ListTemplates", opts...) - if err != nil { - return nil, err - } - x := &templateServiceListTemplatesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type TemplateService_ListTemplatesClient interface { - Recv() (*WorkflowTemplate, error) - grpc.ClientStream -} - -type templateServiceListTemplatesClient struct { - grpc.ClientStream -} - -func (x *templateServiceListTemplatesClient) Recv() (*WorkflowTemplate, error) { - m := new(WorkflowTemplate) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *templateServiceClient) UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/UpdateTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TemplateServiceServer is the server API for TemplateService service. -// All implementations should embed UnimplementedTemplateServiceServer -// for forward compatibility -type TemplateServiceServer interface { - // - // CreateTemplate stores a template in the Tinkerbell server. - CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error) - // - // GetTemplate returns a specific template via its identifier. - GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error) - // - // DeleteTemplate deletes a template via its identifier. - DeleteTemplate(context.Context, *GetRequest) (*Empty, error) - // - // ListTemplates returns all the template stored in Tinkerbell server - ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error - // - // UpdateTemplate updates a template - // TODO: Read the code and figure out how an update work - UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error) -} - -// UnimplementedTemplateServiceServer should be embedded to have forward compatible implementations. -type UnimplementedTemplateServiceServer struct{} - -func (UnimplementedTemplateServiceServer) CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTemplate not implemented") -} - -func (UnimplementedTemplateServiceServer) GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTemplate not implemented") -} - -func (UnimplementedTemplateServiceServer) DeleteTemplate(context.Context, *GetRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTemplate not implemented") -} - -func (UnimplementedTemplateServiceServer) ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error { - return status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") -} - -func (UnimplementedTemplateServiceServer) UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTemplate not implemented") -} - -// UnsafeTemplateServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TemplateServiceServer will -// result in compilation errors. -type UnsafeTemplateServiceServer interface { - mustEmbedUnimplementedTemplateServiceServer() -} - -func RegisterTemplateServiceServer(s grpc.ServiceRegistrar, srv TemplateServiceServer) { - s.RegisterService(&TemplateService_ServiceDesc, srv) -} - -func _TemplateService_CreateTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WorkflowTemplate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TemplateServiceServer).CreateTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/CreateTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TemplateServiceServer).CreateTemplate(ctx, req.(*WorkflowTemplate)) - } - return interceptor(ctx, in, info, handler) -} - -func _TemplateService_GetTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TemplateServiceServer).GetTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/GetTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TemplateServiceServer).GetTemplate(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TemplateService_DeleteTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TemplateServiceServer).DeleteTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/DeleteTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TemplateServiceServer).DeleteTemplate(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TemplateService_ListTemplates_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(TemplateServiceServer).ListTemplates(m, &templateServiceListTemplatesServer{stream}) -} - -type TemplateService_ListTemplatesServer interface { - Send(*WorkflowTemplate) error - grpc.ServerStream -} - -type templateServiceListTemplatesServer struct { - grpc.ServerStream -} - -func (x *templateServiceListTemplatesServer) Send(m *WorkflowTemplate) error { - return x.ServerStream.SendMsg(m) -} - -func _TemplateService_UpdateTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WorkflowTemplate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TemplateServiceServer).UpdateTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService/UpdateTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TemplateServiceServer).UpdateTemplate(ctx, req.(*WorkflowTemplate)) - } - return interceptor(ctx, in, info, handler) -} - -// TemplateService_ServiceDesc is the grpc.ServiceDesc for TemplateService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TemplateService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "jackfan.us.kg.tinkerbell.tink.protos.template.TemplateService", - HandlerType: (*TemplateServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateTemplate", - Handler: _TemplateService_CreateTemplate_Handler, - }, - { - MethodName: "GetTemplate", - Handler: _TemplateService_GetTemplate_Handler, - }, - { - MethodName: "DeleteTemplate", - Handler: _TemplateService_DeleteTemplate_Handler, - }, - { - MethodName: "UpdateTemplate", - Handler: _TemplateService_UpdateTemplate_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ListTemplates", - Handler: _TemplateService_ListTemplates_Handler, - ServerStreams: true, - }, - }, - Metadata: "protos/template/template.proto", -} diff --git a/protos/workflow/gen.go b/protos/workflow/gen.go deleted file mode 100644 index d2ecb4870..000000000 --- a/protos/workflow/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package workflow - -//go:generate moq -out mock.go . WorkflowServiceClient WorkflowService_ListWorkflowsClient diff --git a/protos/workflow/mock.go b/protos/workflow/mock.go deleted file mode 100644 index 2c0ac3820..000000000 --- a/protos/workflow/mock.go +++ /dev/null @@ -1,1072 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package workflow - -import ( - context "context" - sync "sync" - - grpc "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// Ensure, that WorkflowServiceClientMock does implement WorkflowServiceClient. -// If this is not the case, regenerate this file with moq. -var _ WorkflowServiceClient = &WorkflowServiceClientMock{} - -// WorkflowServiceClientMock is a mock implementation of WorkflowServiceClient. -// -// func TestSomethingThatUsesWorkflowServiceClient(t *testing.T) { -// -// // make and configure a mocked WorkflowServiceClient -// mockedWorkflowServiceClient := &WorkflowServiceClientMock{ -// CreateWorkflowFunc: func(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { -// panic("mock out the CreateWorkflow method") -// }, -// DeleteWorkflowFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the DeleteWorkflow method") -// }, -// GetWorkflowFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Workflow, error) { -// panic("mock out the GetWorkflow method") -// }, -// GetWorkflowActionsFunc: func(ctx context.Context, in *WorkflowActionsRequest, opts ...grpc.CallOption) (*WorkflowActionList, error) { -// panic("mock out the GetWorkflowActions method") -// }, -// GetWorkflowContextFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowContext, error) { -// panic("mock out the GetWorkflowContext method") -// }, -// GetWorkflowContextListFunc: func(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (*WorkflowContextList, error) { -// panic("mock out the GetWorkflowContextList method") -// }, -// GetWorkflowContextsFunc: func(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowContextsClient, error) { -// panic("mock out the GetWorkflowContexts method") -// }, -// GetWorkflowDataFunc: func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { -// panic("mock out the GetWorkflowData method") -// }, -// GetWorkflowDataVersionFunc: func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { -// panic("mock out the GetWorkflowDataVersion method") -// }, -// GetWorkflowMetadataFunc: func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { -// panic("mock out the GetWorkflowMetadata method") -// }, -// ListWorkflowsFunc: func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (WorkflowService_ListWorkflowsClient, error) { -// panic("mock out the ListWorkflows method") -// }, -// ReportActionStatusFunc: func(ctx context.Context, in *WorkflowActionStatus, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the ReportActionStatus method") -// }, -// ShowWorkflowEventsFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (WorkflowService_ShowWorkflowEventsClient, error) { -// panic("mock out the ShowWorkflowEvents method") -// }, -// UpdateWorkflowDataFunc: func(ctx context.Context, in *UpdateWorkflowDataRequest, opts ...grpc.CallOption) (*Empty, error) { -// panic("mock out the UpdateWorkflowData method") -// }, -// } -// -// // use mockedWorkflowServiceClient in code that requires WorkflowServiceClient -// // and then make assertions. -// -// } -type WorkflowServiceClientMock struct { - // CreateWorkflowFunc mocks the CreateWorkflow method. - CreateWorkflowFunc func(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) - - // DeleteWorkflowFunc mocks the DeleteWorkflow method. - DeleteWorkflowFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) - - // GetWorkflowFunc mocks the GetWorkflow method. - GetWorkflowFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Workflow, error) - - // GetWorkflowActionsFunc mocks the GetWorkflowActions method. - GetWorkflowActionsFunc func(ctx context.Context, in *WorkflowActionsRequest, opts ...grpc.CallOption) (*WorkflowActionList, error) - - // GetWorkflowContextFunc mocks the GetWorkflowContext method. - GetWorkflowContextFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowContext, error) - - // GetWorkflowContextListFunc mocks the GetWorkflowContextList method. - GetWorkflowContextListFunc func(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (*WorkflowContextList, error) - - // GetWorkflowContextsFunc mocks the GetWorkflowContexts method. - GetWorkflowContextsFunc func(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowContextsClient, error) - - // GetWorkflowDataFunc mocks the GetWorkflowData method. - GetWorkflowDataFunc func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - - // GetWorkflowDataVersionFunc mocks the GetWorkflowDataVersion method. - GetWorkflowDataVersionFunc func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - - // GetWorkflowMetadataFunc mocks the GetWorkflowMetadata method. - GetWorkflowMetadataFunc func(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - - // ListWorkflowsFunc mocks the ListWorkflows method. - ListWorkflowsFunc func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (WorkflowService_ListWorkflowsClient, error) - - // ReportActionStatusFunc mocks the ReportActionStatus method. - ReportActionStatusFunc func(ctx context.Context, in *WorkflowActionStatus, opts ...grpc.CallOption) (*Empty, error) - - // ShowWorkflowEventsFunc mocks the ShowWorkflowEvents method. - ShowWorkflowEventsFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (WorkflowService_ShowWorkflowEventsClient, error) - - // UpdateWorkflowDataFunc mocks the UpdateWorkflowData method. - UpdateWorkflowDataFunc func(ctx context.Context, in *UpdateWorkflowDataRequest, opts ...grpc.CallOption) (*Empty, error) - - // calls tracks calls to the methods. - calls struct { - // CreateWorkflow holds details about calls to the CreateWorkflow method. - CreateWorkflow []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *CreateRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // DeleteWorkflow holds details about calls to the DeleteWorkflow method. - DeleteWorkflow []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflow holds details about calls to the GetWorkflow method. - GetWorkflow []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowActions holds details about calls to the GetWorkflowActions method. - GetWorkflowActions []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowActionsRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowContext holds details about calls to the GetWorkflowContext method. - GetWorkflowContext []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowContextList holds details about calls to the GetWorkflowContextList method. - GetWorkflowContextList []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowContextRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowContexts holds details about calls to the GetWorkflowContexts method. - GetWorkflowContexts []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowContextRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowData holds details about calls to the GetWorkflowData method. - GetWorkflowData []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetWorkflowDataRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowDataVersion holds details about calls to the GetWorkflowDataVersion method. - GetWorkflowDataVersion []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetWorkflowDataRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // GetWorkflowMetadata holds details about calls to the GetWorkflowMetadata method. - GetWorkflowMetadata []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetWorkflowDataRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ListWorkflows holds details about calls to the ListWorkflows method. - ListWorkflows []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *Empty - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ReportActionStatus holds details about calls to the ReportActionStatus method. - ReportActionStatus []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *WorkflowActionStatus - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // ShowWorkflowEvents holds details about calls to the ShowWorkflowEvents method. - ShowWorkflowEvents []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *GetRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - // UpdateWorkflowData holds details about calls to the UpdateWorkflowData method. - UpdateWorkflowData []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // In is the in argument value. - In *UpdateWorkflowDataRequest - // Opts is the opts argument value. - Opts []grpc.CallOption - } - } - lockCreateWorkflow sync.RWMutex - lockDeleteWorkflow sync.RWMutex - lockGetWorkflow sync.RWMutex - lockGetWorkflowActions sync.RWMutex - lockGetWorkflowContext sync.RWMutex - lockGetWorkflowContextList sync.RWMutex - lockGetWorkflowContexts sync.RWMutex - lockGetWorkflowData sync.RWMutex - lockGetWorkflowDataVersion sync.RWMutex - lockGetWorkflowMetadata sync.RWMutex - lockListWorkflows sync.RWMutex - lockReportActionStatus sync.RWMutex - lockShowWorkflowEvents sync.RWMutex - lockUpdateWorkflowData sync.RWMutex -} - -// CreateWorkflow calls CreateWorkflowFunc. -func (mock *WorkflowServiceClientMock) CreateWorkflow(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { - if mock.CreateWorkflowFunc == nil { - panic("WorkflowServiceClientMock.CreateWorkflowFunc: method is nil but WorkflowServiceClient.CreateWorkflow was just called") - } - callInfo := struct { - Ctx context.Context - In *CreateRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockCreateWorkflow.Lock() - mock.calls.CreateWorkflow = append(mock.calls.CreateWorkflow, callInfo) - mock.lockCreateWorkflow.Unlock() - return mock.CreateWorkflowFunc(ctx, in, opts...) -} - -// CreateWorkflowCalls gets all the calls that were made to CreateWorkflow. -// Check the length with: -// len(mockedWorkflowServiceClient.CreateWorkflowCalls()) -func (mock *WorkflowServiceClientMock) CreateWorkflowCalls() []struct { - Ctx context.Context - In *CreateRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *CreateRequest - Opts []grpc.CallOption - } - mock.lockCreateWorkflow.RLock() - calls = mock.calls.CreateWorkflow - mock.lockCreateWorkflow.RUnlock() - return calls -} - -// DeleteWorkflow calls DeleteWorkflowFunc. -func (mock *WorkflowServiceClientMock) DeleteWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { - if mock.DeleteWorkflowFunc == nil { - panic("WorkflowServiceClientMock.DeleteWorkflowFunc: method is nil but WorkflowServiceClient.DeleteWorkflow was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockDeleteWorkflow.Lock() - mock.calls.DeleteWorkflow = append(mock.calls.DeleteWorkflow, callInfo) - mock.lockDeleteWorkflow.Unlock() - return mock.DeleteWorkflowFunc(ctx, in, opts...) -} - -// DeleteWorkflowCalls gets all the calls that were made to DeleteWorkflow. -// Check the length with: -// len(mockedWorkflowServiceClient.DeleteWorkflowCalls()) -func (mock *WorkflowServiceClientMock) DeleteWorkflowCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockDeleteWorkflow.RLock() - calls = mock.calls.DeleteWorkflow - mock.lockDeleteWorkflow.RUnlock() - return calls -} - -// GetWorkflow calls GetWorkflowFunc. -func (mock *WorkflowServiceClientMock) GetWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Workflow, error) { - if mock.GetWorkflowFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowFunc: method is nil but WorkflowServiceClient.GetWorkflow was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflow.Lock() - mock.calls.GetWorkflow = append(mock.calls.GetWorkflow, callInfo) - mock.lockGetWorkflow.Unlock() - return mock.GetWorkflowFunc(ctx, in, opts...) -} - -// GetWorkflowCalls gets all the calls that were made to GetWorkflow. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflow.RLock() - calls = mock.calls.GetWorkflow - mock.lockGetWorkflow.RUnlock() - return calls -} - -// GetWorkflowActions calls GetWorkflowActionsFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowActions(ctx context.Context, in *WorkflowActionsRequest, opts ...grpc.CallOption) (*WorkflowActionList, error) { - if mock.GetWorkflowActionsFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowActionsFunc: method is nil but WorkflowServiceClient.GetWorkflowActions was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowActionsRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowActions.Lock() - mock.calls.GetWorkflowActions = append(mock.calls.GetWorkflowActions, callInfo) - mock.lockGetWorkflowActions.Unlock() - return mock.GetWorkflowActionsFunc(ctx, in, opts...) -} - -// GetWorkflowActionsCalls gets all the calls that were made to GetWorkflowActions. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowActionsCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowActionsCalls() []struct { - Ctx context.Context - In *WorkflowActionsRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowActionsRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowActions.RLock() - calls = mock.calls.GetWorkflowActions - mock.lockGetWorkflowActions.RUnlock() - return calls -} - -// GetWorkflowContext calls GetWorkflowContextFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowContext(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowContext, error) { - if mock.GetWorkflowContextFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowContextFunc: method is nil but WorkflowServiceClient.GetWorkflowContext was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowContext.Lock() - mock.calls.GetWorkflowContext = append(mock.calls.GetWorkflowContext, callInfo) - mock.lockGetWorkflowContext.Unlock() - return mock.GetWorkflowContextFunc(ctx, in, opts...) -} - -// GetWorkflowContextCalls gets all the calls that were made to GetWorkflowContext. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowContextCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowContextCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowContext.RLock() - calls = mock.calls.GetWorkflowContext - mock.lockGetWorkflowContext.RUnlock() - return calls -} - -// GetWorkflowContextList calls GetWorkflowContextListFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowContextList(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (*WorkflowContextList, error) { - if mock.GetWorkflowContextListFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowContextListFunc: method is nil but WorkflowServiceClient.GetWorkflowContextList was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowContextList.Lock() - mock.calls.GetWorkflowContextList = append(mock.calls.GetWorkflowContextList, callInfo) - mock.lockGetWorkflowContextList.Unlock() - return mock.GetWorkflowContextListFunc(ctx, in, opts...) -} - -// GetWorkflowContextListCalls gets all the calls that were made to GetWorkflowContextList. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowContextListCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowContextListCalls() []struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowContextList.RLock() - calls = mock.calls.GetWorkflowContextList - mock.lockGetWorkflowContextList.RUnlock() - return calls -} - -// GetWorkflowContexts calls GetWorkflowContextsFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowContexts(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowContextsClient, error) { - if mock.GetWorkflowContextsFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowContextsFunc: method is nil but WorkflowServiceClient.GetWorkflowContexts was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowContexts.Lock() - mock.calls.GetWorkflowContexts = append(mock.calls.GetWorkflowContexts, callInfo) - mock.lockGetWorkflowContexts.Unlock() - return mock.GetWorkflowContextsFunc(ctx, in, opts...) -} - -// GetWorkflowContextsCalls gets all the calls that were made to GetWorkflowContexts. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowContextsCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowContextsCalls() []struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowContextRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowContexts.RLock() - calls = mock.calls.GetWorkflowContexts - mock.lockGetWorkflowContexts.RUnlock() - return calls -} - -// GetWorkflowData calls GetWorkflowDataFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowData(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - if mock.GetWorkflowDataFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowDataFunc: method is nil but WorkflowServiceClient.GetWorkflowData was just called") - } - callInfo := struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowData.Lock() - mock.calls.GetWorkflowData = append(mock.calls.GetWorkflowData, callInfo) - mock.lockGetWorkflowData.Unlock() - return mock.GetWorkflowDataFunc(ctx, in, opts...) -} - -// GetWorkflowDataCalls gets all the calls that were made to GetWorkflowData. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowDataCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowDataCalls() []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowData.RLock() - calls = mock.calls.GetWorkflowData - mock.lockGetWorkflowData.RUnlock() - return calls -} - -// GetWorkflowDataVersion calls GetWorkflowDataVersionFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowDataVersion(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - if mock.GetWorkflowDataVersionFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowDataVersionFunc: method is nil but WorkflowServiceClient.GetWorkflowDataVersion was just called") - } - callInfo := struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowDataVersion.Lock() - mock.calls.GetWorkflowDataVersion = append(mock.calls.GetWorkflowDataVersion, callInfo) - mock.lockGetWorkflowDataVersion.Unlock() - return mock.GetWorkflowDataVersionFunc(ctx, in, opts...) -} - -// GetWorkflowDataVersionCalls gets all the calls that were made to GetWorkflowDataVersion. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowDataVersionCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowDataVersionCalls() []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowDataVersion.RLock() - calls = mock.calls.GetWorkflowDataVersion - mock.lockGetWorkflowDataVersion.RUnlock() - return calls -} - -// GetWorkflowMetadata calls GetWorkflowMetadataFunc. -func (mock *WorkflowServiceClientMock) GetWorkflowMetadata(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - if mock.GetWorkflowMetadataFunc == nil { - panic("WorkflowServiceClientMock.GetWorkflowMetadataFunc: method is nil but WorkflowServiceClient.GetWorkflowMetadata was just called") - } - callInfo := struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockGetWorkflowMetadata.Lock() - mock.calls.GetWorkflowMetadata = append(mock.calls.GetWorkflowMetadata, callInfo) - mock.lockGetWorkflowMetadata.Unlock() - return mock.GetWorkflowMetadataFunc(ctx, in, opts...) -} - -// GetWorkflowMetadataCalls gets all the calls that were made to GetWorkflowMetadata. -// Check the length with: -// len(mockedWorkflowServiceClient.GetWorkflowMetadataCalls()) -func (mock *WorkflowServiceClientMock) GetWorkflowMetadataCalls() []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetWorkflowDataRequest - Opts []grpc.CallOption - } - mock.lockGetWorkflowMetadata.RLock() - calls = mock.calls.GetWorkflowMetadata - mock.lockGetWorkflowMetadata.RUnlock() - return calls -} - -// ListWorkflows calls ListWorkflowsFunc. -func (mock *WorkflowServiceClientMock) ListWorkflows(ctx context.Context, in *Empty, opts ...grpc.CallOption) (WorkflowService_ListWorkflowsClient, error) { - if mock.ListWorkflowsFunc == nil { - panic("WorkflowServiceClientMock.ListWorkflowsFunc: method is nil but WorkflowServiceClient.ListWorkflows was just called") - } - callInfo := struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockListWorkflows.Lock() - mock.calls.ListWorkflows = append(mock.calls.ListWorkflows, callInfo) - mock.lockListWorkflows.Unlock() - return mock.ListWorkflowsFunc(ctx, in, opts...) -} - -// ListWorkflowsCalls gets all the calls that were made to ListWorkflows. -// Check the length with: -// len(mockedWorkflowServiceClient.ListWorkflowsCalls()) -func (mock *WorkflowServiceClientMock) ListWorkflowsCalls() []struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *Empty - Opts []grpc.CallOption - } - mock.lockListWorkflows.RLock() - calls = mock.calls.ListWorkflows - mock.lockListWorkflows.RUnlock() - return calls -} - -// ReportActionStatus calls ReportActionStatusFunc. -func (mock *WorkflowServiceClientMock) ReportActionStatus(ctx context.Context, in *WorkflowActionStatus, opts ...grpc.CallOption) (*Empty, error) { - if mock.ReportActionStatusFunc == nil { - panic("WorkflowServiceClientMock.ReportActionStatusFunc: method is nil but WorkflowServiceClient.ReportActionStatus was just called") - } - callInfo := struct { - Ctx context.Context - In *WorkflowActionStatus - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockReportActionStatus.Lock() - mock.calls.ReportActionStatus = append(mock.calls.ReportActionStatus, callInfo) - mock.lockReportActionStatus.Unlock() - return mock.ReportActionStatusFunc(ctx, in, opts...) -} - -// ReportActionStatusCalls gets all the calls that were made to ReportActionStatus. -// Check the length with: -// len(mockedWorkflowServiceClient.ReportActionStatusCalls()) -func (mock *WorkflowServiceClientMock) ReportActionStatusCalls() []struct { - Ctx context.Context - In *WorkflowActionStatus - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *WorkflowActionStatus - Opts []grpc.CallOption - } - mock.lockReportActionStatus.RLock() - calls = mock.calls.ReportActionStatus - mock.lockReportActionStatus.RUnlock() - return calls -} - -// ShowWorkflowEvents calls ShowWorkflowEventsFunc. -func (mock *WorkflowServiceClientMock) ShowWorkflowEvents(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (WorkflowService_ShowWorkflowEventsClient, error) { - if mock.ShowWorkflowEventsFunc == nil { - panic("WorkflowServiceClientMock.ShowWorkflowEventsFunc: method is nil but WorkflowServiceClient.ShowWorkflowEvents was just called") - } - callInfo := struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockShowWorkflowEvents.Lock() - mock.calls.ShowWorkflowEvents = append(mock.calls.ShowWorkflowEvents, callInfo) - mock.lockShowWorkflowEvents.Unlock() - return mock.ShowWorkflowEventsFunc(ctx, in, opts...) -} - -// ShowWorkflowEventsCalls gets all the calls that were made to ShowWorkflowEvents. -// Check the length with: -// len(mockedWorkflowServiceClient.ShowWorkflowEventsCalls()) -func (mock *WorkflowServiceClientMock) ShowWorkflowEventsCalls() []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *GetRequest - Opts []grpc.CallOption - } - mock.lockShowWorkflowEvents.RLock() - calls = mock.calls.ShowWorkflowEvents - mock.lockShowWorkflowEvents.RUnlock() - return calls -} - -// UpdateWorkflowData calls UpdateWorkflowDataFunc. -func (mock *WorkflowServiceClientMock) UpdateWorkflowData(ctx context.Context, in *UpdateWorkflowDataRequest, opts ...grpc.CallOption) (*Empty, error) { - if mock.UpdateWorkflowDataFunc == nil { - panic("WorkflowServiceClientMock.UpdateWorkflowDataFunc: method is nil but WorkflowServiceClient.UpdateWorkflowData was just called") - } - callInfo := struct { - Ctx context.Context - In *UpdateWorkflowDataRequest - Opts []grpc.CallOption - }{ - Ctx: ctx, - In: in, - Opts: opts, - } - mock.lockUpdateWorkflowData.Lock() - mock.calls.UpdateWorkflowData = append(mock.calls.UpdateWorkflowData, callInfo) - mock.lockUpdateWorkflowData.Unlock() - return mock.UpdateWorkflowDataFunc(ctx, in, opts...) -} - -// UpdateWorkflowDataCalls gets all the calls that were made to UpdateWorkflowData. -// Check the length with: -// len(mockedWorkflowServiceClient.UpdateWorkflowDataCalls()) -func (mock *WorkflowServiceClientMock) UpdateWorkflowDataCalls() []struct { - Ctx context.Context - In *UpdateWorkflowDataRequest - Opts []grpc.CallOption -} { - var calls []struct { - Ctx context.Context - In *UpdateWorkflowDataRequest - Opts []grpc.CallOption - } - mock.lockUpdateWorkflowData.RLock() - calls = mock.calls.UpdateWorkflowData - mock.lockUpdateWorkflowData.RUnlock() - return calls -} - -// Ensure, that WorkflowService_ListWorkflowsClientMock does implement WorkflowService_ListWorkflowsClient. -// If this is not the case, regenerate this file with moq. -var _ WorkflowService_ListWorkflowsClient = &WorkflowService_ListWorkflowsClientMock{} - -// WorkflowService_ListWorkflowsClientMock is a mock implementation of WorkflowService_ListWorkflowsClient. -// -// func TestSomethingThatUsesWorkflowService_ListWorkflowsClient(t *testing.T) { -// -// // make and configure a mocked WorkflowService_ListWorkflowsClient -// mockedWorkflowService_ListWorkflowsClient := &WorkflowService_ListWorkflowsClientMock{ -// CloseSendFunc: func() error { -// panic("mock out the CloseSend method") -// }, -// ContextFunc: func() context.Context { -// panic("mock out the Context method") -// }, -// HeaderFunc: func() (metadata.MD, error) { -// panic("mock out the Header method") -// }, -// RecvFunc: func() (*Workflow, error) { -// panic("mock out the Recv method") -// }, -// RecvMsgFunc: func(m interface{}) error { -// panic("mock out the RecvMsg method") -// }, -// SendMsgFunc: func(m interface{}) error { -// panic("mock out the SendMsg method") -// }, -// TrailerFunc: func() metadata.MD { -// panic("mock out the Trailer method") -// }, -// } -// -// // use mockedWorkflowService_ListWorkflowsClient in code that requires WorkflowService_ListWorkflowsClient -// // and then make assertions. -// -// } -type WorkflowService_ListWorkflowsClientMock struct { - // CloseSendFunc mocks the CloseSend method. - CloseSendFunc func() error - - // ContextFunc mocks the Context method. - ContextFunc func() context.Context - - // HeaderFunc mocks the Header method. - HeaderFunc func() (metadata.MD, error) - - // RecvFunc mocks the Recv method. - RecvFunc func() (*Workflow, error) - - // RecvMsgFunc mocks the RecvMsg method. - RecvMsgFunc func(m interface{}) error - - // SendMsgFunc mocks the SendMsg method. - SendMsgFunc func(m interface{}) error - - // TrailerFunc mocks the Trailer method. - TrailerFunc func() metadata.MD - - // calls tracks calls to the methods. - calls struct { - // CloseSend holds details about calls to the CloseSend method. - CloseSend []struct{} - // Context holds details about calls to the Context method. - Context []struct{} - // Header holds details about calls to the Header method. - Header []struct{} - // Recv holds details about calls to the Recv method. - Recv []struct{} - // RecvMsg holds details about calls to the RecvMsg method. - RecvMsg []struct { - // M is the m argument value. - M interface{} - } - // SendMsg holds details about calls to the SendMsg method. - SendMsg []struct { - // M is the m argument value. - M interface{} - } - // Trailer holds details about calls to the Trailer method. - Trailer []struct{} - } - lockCloseSend sync.RWMutex - lockContext sync.RWMutex - lockHeader sync.RWMutex - lockRecv sync.RWMutex - lockRecvMsg sync.RWMutex - lockSendMsg sync.RWMutex - lockTrailer sync.RWMutex -} - -// CloseSend calls CloseSendFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) CloseSend() error { - if mock.CloseSendFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.CloseSendFunc: method is nil but WorkflowService_ListWorkflowsClient.CloseSend was just called") - } - callInfo := struct{}{} - mock.lockCloseSend.Lock() - mock.calls.CloseSend = append(mock.calls.CloseSend, callInfo) - mock.lockCloseSend.Unlock() - return mock.CloseSendFunc() -} - -// CloseSendCalls gets all the calls that were made to CloseSend. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.CloseSendCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) CloseSendCalls() []struct{} { - var calls []struct{} - mock.lockCloseSend.RLock() - calls = mock.calls.CloseSend - mock.lockCloseSend.RUnlock() - return calls -} - -// Context calls ContextFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) Context() context.Context { - if mock.ContextFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.ContextFunc: method is nil but WorkflowService_ListWorkflowsClient.Context was just called") - } - callInfo := struct{}{} - mock.lockContext.Lock() - mock.calls.Context = append(mock.calls.Context, callInfo) - mock.lockContext.Unlock() - return mock.ContextFunc() -} - -// ContextCalls gets all the calls that were made to Context. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.ContextCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) ContextCalls() []struct{} { - var calls []struct{} - mock.lockContext.RLock() - calls = mock.calls.Context - mock.lockContext.RUnlock() - return calls -} - -// Header calls HeaderFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) Header() (metadata.MD, error) { - if mock.HeaderFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.HeaderFunc: method is nil but WorkflowService_ListWorkflowsClient.Header was just called") - } - callInfo := struct{}{} - mock.lockHeader.Lock() - mock.calls.Header = append(mock.calls.Header, callInfo) - mock.lockHeader.Unlock() - return mock.HeaderFunc() -} - -// HeaderCalls gets all the calls that were made to Header. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.HeaderCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) HeaderCalls() []struct{} { - var calls []struct{} - mock.lockHeader.RLock() - calls = mock.calls.Header - mock.lockHeader.RUnlock() - return calls -} - -// Recv calls RecvFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) Recv() (*Workflow, error) { - if mock.RecvFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.RecvFunc: method is nil but WorkflowService_ListWorkflowsClient.Recv was just called") - } - callInfo := struct{}{} - mock.lockRecv.Lock() - mock.calls.Recv = append(mock.calls.Recv, callInfo) - mock.lockRecv.Unlock() - return mock.RecvFunc() -} - -// RecvCalls gets all the calls that were made to Recv. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.RecvCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) RecvCalls() []struct{} { - var calls []struct{} - mock.lockRecv.RLock() - calls = mock.calls.Recv - mock.lockRecv.RUnlock() - return calls -} - -// RecvMsg calls RecvMsgFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) RecvMsg(m interface{}) error { - if mock.RecvMsgFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.RecvMsgFunc: method is nil but WorkflowService_ListWorkflowsClient.RecvMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockRecvMsg.Lock() - mock.calls.RecvMsg = append(mock.calls.RecvMsg, callInfo) - mock.lockRecvMsg.Unlock() - return mock.RecvMsgFunc(m) -} - -// RecvMsgCalls gets all the calls that were made to RecvMsg. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.RecvMsgCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) RecvMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockRecvMsg.RLock() - calls = mock.calls.RecvMsg - mock.lockRecvMsg.RUnlock() - return calls -} - -// SendMsg calls SendMsgFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) SendMsg(m interface{}) error { - if mock.SendMsgFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.SendMsgFunc: method is nil but WorkflowService_ListWorkflowsClient.SendMsg was just called") - } - callInfo := struct { - M interface{} - }{ - M: m, - } - mock.lockSendMsg.Lock() - mock.calls.SendMsg = append(mock.calls.SendMsg, callInfo) - mock.lockSendMsg.Unlock() - return mock.SendMsgFunc(m) -} - -// SendMsgCalls gets all the calls that were made to SendMsg. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.SendMsgCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) SendMsgCalls() []struct { - M interface{} -} { - var calls []struct { - M interface{} - } - mock.lockSendMsg.RLock() - calls = mock.calls.SendMsg - mock.lockSendMsg.RUnlock() - return calls -} - -// Trailer calls TrailerFunc. -func (mock *WorkflowService_ListWorkflowsClientMock) Trailer() metadata.MD { - if mock.TrailerFunc == nil { - panic("WorkflowService_ListWorkflowsClientMock.TrailerFunc: method is nil but WorkflowService_ListWorkflowsClient.Trailer was just called") - } - callInfo := struct{}{} - mock.lockTrailer.Lock() - mock.calls.Trailer = append(mock.calls.Trailer, callInfo) - mock.lockTrailer.Unlock() - return mock.TrailerFunc() -} - -// TrailerCalls gets all the calls that were made to Trailer. -// Check the length with: -// len(mockedWorkflowService_ListWorkflowsClient.TrailerCalls()) -func (mock *WorkflowService_ListWorkflowsClientMock) TrailerCalls() []struct{} { - var calls []struct{} - mock.lockTrailer.RLock() - calls = mock.calls.Trailer - mock.lockTrailer.RUnlock() - return calls -} diff --git a/protos/workflow/workflow.pb.go b/protos/workflow/workflow.pb.go index 1f4ebfbcd..36226abcf 100644 --- a/protos/workflow/workflow.pb.go +++ b/protos/workflow/workflow.pb.go @@ -14,7 +14,6 @@ import ( reflect "reflect" sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -101,8 +100,6 @@ func (State) EnumDescriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{0} } -// -// Empty represents an empty response type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -141,39 +138,16 @@ func (*Empty) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{0} } -// -// Workflow represent a single workflow -type Workflow struct { +type WorkflowContextRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - // The unique identifier for a workflow - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // - // The template this workflows starts from - Template string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` - // - // The hardware assigned to a workflow - Hardware string `protobuf:"bytes,3,opt,name=hardware,proto3" json:"hardware,omitempty"` - // - // Current state of the workflow. Pending, success, failed, running. - State State `protobuf:"varint,4,opt,name=state,proto3,enum=jackfan.us.kg.tinkerbell.tink.protos.workflow.State" json:"state,omitempty"` - // - // When the workflow was created - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - // - // The last time the workflow was modified - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - // - // When the workflow was deleted - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` - Data string `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` + WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` } -func (x *Workflow) Reset() { - *x = Workflow{} +func (x *WorkflowContextRequest) Reset() { + *x = WorkflowContextRequest{} if protoimpl.UnsafeEnabled { mi := &file_protos_workflow_workflow_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -181,13 +155,13 @@ func (x *Workflow) Reset() { } } -func (x *Workflow) String() string { +func (x *WorkflowContextRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Workflow) ProtoMessage() {} +func (*WorkflowContextRequest) ProtoMessage() {} -func (x *Workflow) ProtoReflect() protoreflect.Message { +func (x *WorkflowContextRequest) ProtoReflect() protoreflect.Message { mi := &file_protos_workflow_workflow_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -199,86 +173,45 @@ func (x *Workflow) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Workflow.ProtoReflect.Descriptor instead. -func (*Workflow) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowContextRequest.ProtoReflect.Descriptor instead. +func (*WorkflowContextRequest) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{1} } -func (x *Workflow) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Workflow) GetTemplate() string { - if x != nil { - return x.Template - } - return "" -} - -func (x *Workflow) GetHardware() string { - if x != nil { - return x.Hardware - } - return "" -} - -func (x *Workflow) GetState() State { - if x != nil { - return x.State - } - return State_STATE_PENDING -} - -func (x *Workflow) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Workflow) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Workflow) GetDeletedAt() *timestamppb.Timestamp { - if x != nil { - return x.DeletedAt - } - return nil -} - -func (x *Workflow) GetData() string { +func (x *WorkflowContextRequest) GetWorkerId() string { if x != nil { - return x.Data + return x.WorkerId } return "" } // -// CreateRequest registers a workflow in the Tinkerbell server. From this point -// in time it is in pending state, waiting to be executed from the tink-worker -// inside the selected hardware -type CreateRequest struct { +// WorkflowContext represents the state of the execution of this workflow in detail. +// How many tasks are currently executed, the number of actions and their state. +type WorkflowContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // - // The idenfier of the template the workflow starts from. - Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` + // The workflow ID + WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` + CurrentWorker string `protobuf:"bytes,2,opt,name=current_worker,json=currentWorker,proto3" json:"current_worker,omitempty"` + CurrentTask string `protobuf:"bytes,3,opt,name=current_task,json=currentTask,proto3" json:"current_task,omitempty"` + // + // the name of the current action + CurrentAction string `protobuf:"bytes,4,opt,name=current_action,json=currentAction,proto3" json:"current_action,omitempty"` + // + // The index of the current action + CurrentActionIndex int64 `protobuf:"varint,5,opt,name=current_action_index,json=currentActionIndex,proto3" json:"current_action_index,omitempty"` // - // The target hardware for this workflow. - Hardware string `protobuf:"bytes,2,opt,name=hardware,proto3" json:"hardware,omitempty"` + // The state of the current action + CurrentActionState State `protobuf:"varint,6,opt,name=current_action_state,json=currentActionState,proto3,enum=tinkerbell.tink.workflow.State" json:"current_action_state,omitempty"` + TotalNumberOfActions int64 `protobuf:"varint,7,opt,name=total_number_of_actions,json=totalNumberOfActions,proto3" json:"total_number_of_actions,omitempty"` } -func (x *CreateRequest) Reset() { - *x = CreateRequest{} +func (x *WorkflowContext) Reset() { + *x = WorkflowContext{} if protoimpl.UnsafeEnabled { mi := &file_protos_workflow_workflow_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -286,13 +219,13 @@ func (x *CreateRequest) Reset() { } } -func (x *CreateRequest) String() string { +func (x *WorkflowContext) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateRequest) ProtoMessage() {} +func (*WorkflowContext) ProtoMessage() {} -func (x *CreateRequest) ProtoReflect() protoreflect.Message { +func (x *WorkflowContext) ProtoReflect() protoreflect.Message { mi := &file_protos_workflow_workflow_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -304,38 +237,72 @@ func (x *CreateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. -func (*CreateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowContext.ProtoReflect.Descriptor instead. +func (*WorkflowContext) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{2} } -func (x *CreateRequest) GetTemplate() string { +func (x *WorkflowContext) GetWorkflowId() string { + if x != nil { + return x.WorkflowId + } + return "" +} + +func (x *WorkflowContext) GetCurrentWorker() string { + if x != nil { + return x.CurrentWorker + } + return "" +} + +func (x *WorkflowContext) GetCurrentTask() string { if x != nil { - return x.Template + return x.CurrentTask } return "" } -func (x *CreateRequest) GetHardware() string { +func (x *WorkflowContext) GetCurrentAction() string { if x != nil { - return x.Hardware + return x.CurrentAction } return "" } +func (x *WorkflowContext) GetCurrentActionIndex() int64 { + if x != nil { + return x.CurrentActionIndex + } + return 0 +} + +func (x *WorkflowContext) GetCurrentActionState() State { + if x != nil { + return x.CurrentActionState + } + return State_STATE_PENDING +} + +func (x *WorkflowContext) GetTotalNumberOfActions() int64 { + if x != nil { + return x.TotalNumberOfActions + } + return 0 +} + // -// This is the response returned after a successful workflow creation. It -// contains the workflow id. -type CreateResponse struct { +// WorkflowActionsRequest is used to get actions for a particular workflow +type WorkflowActionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` } -func (x *CreateResponse) Reset() { - *x = CreateResponse{} +func (x *WorkflowActionsRequest) Reset() { + *x = WorkflowActionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_protos_workflow_workflow_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -343,13 +310,13 @@ func (x *CreateResponse) Reset() { } } -func (x *CreateResponse) String() string { +func (x *WorkflowActionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateResponse) ProtoMessage() {} +func (*WorkflowActionsRequest) ProtoMessage() {} -func (x *CreateResponse) ProtoReflect() protoreflect.Message { +func (x *WorkflowActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_protos_workflow_workflow_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -361,31 +328,30 @@ func (x *CreateResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. -func (*CreateResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowActionsRequest.ProtoReflect.Descriptor instead. +func (*WorkflowActionsRequest) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{3} } -func (x *CreateResponse) GetId() string { +func (x *WorkflowActionsRequest) GetWorkflowId() string { if x != nil { - return x.Id + return x.WorkflowId } return "" } // -// GetRequest contains the workflow idenfier you want to get back from the -// Tinkerbell server. -type GetRequest struct { +// A list of actions +type WorkflowActionList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ActionList []*WorkflowAction `protobuf:"bytes,1,rep,name=action_list,json=actionList,proto3" json:"action_list,omitempty"` } -func (x *GetRequest) Reset() { - *x = GetRequest{} +func (x *WorkflowActionList) Reset() { + *x = WorkflowActionList{} if protoimpl.UnsafeEnabled { mi := &file_protos_workflow_workflow_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -393,13 +359,13 @@ func (x *GetRequest) Reset() { } } -func (x *GetRequest) String() string { +func (x *WorkflowActionList) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRequest) ProtoMessage() {} +func (*WorkflowActionList) ProtoMessage() {} -func (x *GetRequest) ProtoReflect() protoreflect.Message { +func (x *WorkflowActionList) ProtoReflect() protoreflect.Message { mi := &file_protos_workflow_workflow_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -411,48 +377,64 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. -func (*GetRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowActionList.ProtoReflect.Descriptor instead. +func (*WorkflowActionList) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{4} } -func (x *GetRequest) GetId() string { +func (x *WorkflowActionList) GetActionList() []*WorkflowAction { if x != nil { - return x.Id + return x.ActionList } - return "" + return nil } // -// WorkflowContext represents the state of the execution of this workflow in detail. -// How many tasks are currently executed, the number of actions and their state. -type WorkflowContext struct { +// WorkflowAction represents a single aciton part of a workflow +type WorkflowAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // - // The workflow ID - WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` + // The name of the task the action belong to. + TaskName string `protobuf:"bytes,1,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` // - CurrentWorker string `protobuf:"bytes,2,opt,name=current_worker,json=currentWorker,proto3" json:"current_worker,omitempty"` + // The name of the action + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // - CurrentTask string `protobuf:"bytes,3,opt,name=current_task,json=currentTask,proto3" json:"current_task,omitempty"` + // The docker/oci image the action starts from + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // - // the name of the current action - CurrentAction string `protobuf:"bytes,4,opt,name=current_action,json=currentAction,proto3" json:"current_action,omitempty"` + // Every action has a timeout, after that the execution stops and the action + // gets in a timeout state. + Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // - // The index of the current action - CurrentActionIndex int64 `protobuf:"varint,5,opt,name=current_action_index,json=currentActionIndex,proto3" json:"current_action_index,omitempty"` + // You can override the command executed for the container + Command []string `protobuf:"bytes,5,rep,name=command,proto3" json:"command,omitempty"` // - // The state of the current action - CurrentActionState State `protobuf:"varint,6,opt,name=current_action_state,json=currentActionState,proto3,enum=jackfan.us.kg.tinkerbell.tink.protos.workflow.State" json:"current_action_state,omitempty"` + // On timeout used to be a way to execute an action if the current one times out + // but with the event system in place this is not needed anymore + OnTimeout []string `protobuf:"bytes,6,rep,name=on_timeout,json=onTimeout,proto3" json:"on_timeout,omitempty"` // - TotalNumberOfActions int64 `protobuf:"varint,7,opt,name=total_number_of_actions,json=totalNumberOfActions,proto3" json:"total_number_of_actions,omitempty"` + // On failure used to be a way to execute an action if the current one fails + // but with the event system in place this is not needed anymore + OnFailure []string `protobuf:"bytes,7,rep,name=on_failure,json=onFailure,proto3" json:"on_failure,omitempty"` + WorkerId string `protobuf:"bytes,8,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` + // + // You can mount directory from your host to the running action, mainly to + // share files, or state + Volumes []string `protobuf:"bytes,9,rep,name=volumes,proto3" json:"volumes,omitempty"` + // + // Set environment variables usable from the action itself. + Environment []string `protobuf:"bytes,10,rep,name=environment,proto3" json:"environment,omitempty"` + // + // Set the namespace that the process IDs will be in. + Pid string `protobuf:"bytes,11,opt,name=pid,proto3" json:"pid,omitempty"` } -func (x *WorkflowContext) Reset() { - *x = WorkflowContext{} +func (x *WorkflowAction) Reset() { + *x = WorkflowAction{} if protoimpl.UnsafeEnabled { mi := &file_protos_workflow_workflow_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -460,13 +442,13 @@ func (x *WorkflowContext) Reset() { } } -func (x *WorkflowContext) String() string { +func (x *WorkflowAction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WorkflowContext) ProtoMessage() {} +func (*WorkflowAction) ProtoMessage() {} -func (x *WorkflowContext) ProtoReflect() protoreflect.Message { +func (x *WorkflowAction) ProtoReflect() protoreflect.Message { mi := &file_protos_workflow_workflow_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -478,460 +460,66 @@ func (x *WorkflowContext) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WorkflowContext.ProtoReflect.Descriptor instead. -func (*WorkflowContext) Descriptor() ([]byte, []int) { +// Deprecated: Use WorkflowAction.ProtoReflect.Descriptor instead. +func (*WorkflowAction) Descriptor() ([]byte, []int) { return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{5} } -func (x *WorkflowContext) GetWorkflowId() string { +func (x *WorkflowAction) GetTaskName() string { if x != nil { - return x.WorkflowId + return x.TaskName } return "" } -func (x *WorkflowContext) GetCurrentWorker() string { +func (x *WorkflowAction) GetName() string { if x != nil { - return x.CurrentWorker + return x.Name } return "" } -func (x *WorkflowContext) GetCurrentTask() string { +func (x *WorkflowAction) GetImage() string { if x != nil { - return x.CurrentTask + return x.Image } return "" } -func (x *WorkflowContext) GetCurrentAction() string { +func (x *WorkflowAction) GetTimeout() int64 { if x != nil { - return x.CurrentAction + return x.Timeout } - return "" + return 0 } -func (x *WorkflowContext) GetCurrentActionIndex() int64 { +func (x *WorkflowAction) GetCommand() []string { if x != nil { - return x.CurrentActionIndex + return x.Command } - return 0 + return nil } -func (x *WorkflowContext) GetCurrentActionState() State { +func (x *WorkflowAction) GetOnTimeout() []string { if x != nil { - return x.CurrentActionState + return x.OnTimeout } - return State_STATE_PENDING + return nil } -func (x *WorkflowContext) GetTotalNumberOfActions() int64 { +func (x *WorkflowAction) GetOnFailure() []string { if x != nil { - return x.TotalNumberOfActions + return x.OnFailure } - return 0 + return nil } -// -// WorkflowActionStatus represents the state of all the action part of a -// workflow -type WorkflowActionStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // The workflow id - WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` - // - // The name of the task this action is part of - TaskName string `protobuf:"bytes,2,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` - // - // The name of the action - ActionName string `protobuf:"bytes,3,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"` - // - // The state of the action. Those are the same described for workflow as - // well. pending, running, successful and so on. - ActionStatus State `protobuf:"varint,4,opt,name=action_status,json=actionStatus,proto3,enum=jackfan.us.kg.tinkerbell.tink.protos.workflow.State" json:"action_status,omitempty"` - // - // The execution time for the action - Seconds int64 `protobuf:"varint,5,opt,name=seconds,proto3" json:"seconds,omitempty"` - // - // The message returned from the action. - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - // - // When the status got created for this aciton. You can see it as the time - // when the action started its execution inside the hardware itself. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - // - WorkerId string `protobuf:"bytes,8,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` -} - -func (x *WorkflowActionStatus) Reset() { - *x = WorkflowActionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowActionStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowActionStatus) ProtoMessage() {} - -func (x *WorkflowActionStatus) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowActionStatus.ProtoReflect.Descriptor instead. -func (*WorkflowActionStatus) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{6} -} - -func (x *WorkflowActionStatus) GetWorkflowId() string { - if x != nil { - return x.WorkflowId - } - return "" -} - -func (x *WorkflowActionStatus) GetTaskName() string { - if x != nil { - return x.TaskName - } - return "" -} - -func (x *WorkflowActionStatus) GetActionName() string { - if x != nil { - return x.ActionName - } - return "" -} - -func (x *WorkflowActionStatus) GetActionStatus() State { - if x != nil { - return x.ActionStatus - } - return State_STATE_PENDING -} - -func (x *WorkflowActionStatus) GetSeconds() int64 { - if x != nil { - return x.Seconds - } - return 0 -} - -func (x *WorkflowActionStatus) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *WorkflowActionStatus) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *WorkflowActionStatus) GetWorkerId() string { - if x != nil { - return x.WorkerId - } - return "" -} - -// -type WorkflowContextRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` -} - -func (x *WorkflowContextRequest) Reset() { - *x = WorkflowContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowContextRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowContextRequest) ProtoMessage() {} - -func (x *WorkflowContextRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowContextRequest.ProtoReflect.Descriptor instead. -func (*WorkflowContextRequest) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{7} -} - -func (x *WorkflowContextRequest) GetWorkerId() string { - if x != nil { - return x.WorkerId - } - return "" -} - -// -type WorkflowContextList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowContexts []*WorkflowContext `protobuf:"bytes,1,rep,name=workflow_contexts,json=workflowContexts,proto3" json:"workflow_contexts,omitempty"` -} - -func (x *WorkflowContextList) Reset() { - *x = WorkflowContextList{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowContextList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowContextList) ProtoMessage() {} - -func (x *WorkflowContextList) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowContextList.ProtoReflect.Descriptor instead. -func (*WorkflowContextList) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{8} -} - -func (x *WorkflowContextList) GetWorkflowContexts() []*WorkflowContext { - if x != nil { - return x.WorkflowContexts - } - return nil -} - -// -// WorkflowActionsRequest is used to get actions for a particular workflow -type WorkflowActionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` -} - -func (x *WorkflowActionsRequest) Reset() { - *x = WorkflowActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowActionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowActionsRequest) ProtoMessage() {} - -func (x *WorkflowActionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowActionsRequest.ProtoReflect.Descriptor instead. -func (*WorkflowActionsRequest) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{9} -} - -func (x *WorkflowActionsRequest) GetWorkflowId() string { - if x != nil { - return x.WorkflowId - } - return "" -} - -// -// WorkflowAction represents a single aciton part of a workflow -type WorkflowAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // - // The name of the task the action belong to. - TaskName string `protobuf:"bytes,1,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` - // - // The name of the action - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // - // The docker/oci image the action starts from - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - // - // Every action has a timeout, after that the execution stops and the action - // gets in a timeout state. - Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` - // - // You can override the command executed for the container - Command []string `protobuf:"bytes,5,rep,name=command,proto3" json:"command,omitempty"` - // - // On timeout used to be a way to execute an action if the current one times out - // but with the event system in place this is not needed anymore - OnTimeout []string `protobuf:"bytes,6,rep,name=on_timeout,json=onTimeout,proto3" json:"on_timeout,omitempty"` - // - // On failure used to be a way to execute an action if the current one fails - // but with the event system in place this is not needed anymore - OnFailure []string `protobuf:"bytes,7,rep,name=on_failure,json=onFailure,proto3" json:"on_failure,omitempty"` - WorkerId string `protobuf:"bytes,8,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` - // - // You can mount directory from your host to the running action, mainly to - // share files, or state - Volumes []string `protobuf:"bytes,9,rep,name=volumes,proto3" json:"volumes,omitempty"` - // - // Set environment variables usable from the action itself. - Environment []string `protobuf:"bytes,10,rep,name=environment,proto3" json:"environment,omitempty"` - // - // Set the namespace that the process IDs will be in. - Pid string `protobuf:"bytes,11,opt,name=pid,proto3" json:"pid,omitempty"` -} - -func (x *WorkflowAction) Reset() { - *x = WorkflowAction{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowAction) ProtoMessage() {} - -func (x *WorkflowAction) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowAction.ProtoReflect.Descriptor instead. -func (*WorkflowAction) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{10} -} - -func (x *WorkflowAction) GetTaskName() string { - if x != nil { - return x.TaskName - } - return "" -} - -func (x *WorkflowAction) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WorkflowAction) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *WorkflowAction) GetTimeout() int64 { - if x != nil { - return x.Timeout - } - return 0 -} - -func (x *WorkflowAction) GetCommand() []string { - if x != nil { - return x.Command - } - return nil -} - -func (x *WorkflowAction) GetOnTimeout() []string { - if x != nil { - return x.OnTimeout - } - return nil -} - -func (x *WorkflowAction) GetOnFailure() []string { - if x != nil { - return x.OnFailure - } - return nil -} - -func (x *WorkflowAction) GetWorkerId() string { - if x != nil { - return x.WorkerId - } - return "" -} +func (x *WorkflowAction) GetWorkerId() string { + if x != nil { + return x.WorkerId + } + return "" +} func (x *WorkflowAction) GetVolumes() []string { if x != nil { @@ -955,84 +543,56 @@ func (x *WorkflowAction) GetPid() string { } // -// A list of actions -type WorkflowActionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ActionList []*WorkflowAction `protobuf:"bytes,1,rep,name=action_list,json=actionList,proto3" json:"action_list,omitempty"` -} - -func (x *WorkflowActionList) Reset() { - *x = WorkflowActionList{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowActionList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowActionList) ProtoMessage() {} - -func (x *WorkflowActionList) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowActionList.ProtoReflect.Descriptor instead. -func (*WorkflowActionList) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{11} -} - -func (x *WorkflowActionList) GetActionList() []*WorkflowAction { - if x != nil { - return x.ActionList - } - return nil -} - -// -// When a workflow gets created we have the ability to replace variables -// declared in the template with concrete variables. This is the request you -// can use to visualize those data. -type GetWorkflowDataRequest struct { +// WorkflowActionStatus represents the state of all the action part of a +// workflow +type WorkflowActionStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // + // The workflow id WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // + // The name of the task this action is part of + TaskName string `protobuf:"bytes,2,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` + // + // The name of the action + ActionName string `protobuf:"bytes,3,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"` + // + // The state of the action. Those are the same described for workflow as + // well. pending, running, successful and so on. + ActionStatus State `protobuf:"varint,4,opt,name=action_status,json=actionStatus,proto3,enum=tinkerbell.tink.workflow.State" json:"action_status,omitempty"` + // + // The execution time for the action + Seconds int64 `protobuf:"varint,5,opt,name=seconds,proto3" json:"seconds,omitempty"` + // + // The message returned from the action. + Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + // + // When the status got created for this aciton. You can see it as the time + // when the action started its execution inside the hardware itself. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + WorkerId string `protobuf:"bytes,8,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` } -func (x *GetWorkflowDataRequest) Reset() { - *x = GetWorkflowDataRequest{} +func (x *WorkflowActionStatus) Reset() { + *x = WorkflowActionStatus{} if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[12] + mi := &file_protos_workflow_workflow_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetWorkflowDataRequest) String() string { +func (x *WorkflowActionStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetWorkflowDataRequest) ProtoMessage() {} +func (*WorkflowActionStatus) ProtoMessage() {} -func (x *GetWorkflowDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[12] +func (x *WorkflowActionStatus) ProtoReflect() protoreflect.Message { + mi := &file_protos_workflow_workflow_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1043,145 +603,65 @@ func (x *GetWorkflowDataRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetWorkflowDataRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowDataRequest) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{12} +// Deprecated: Use WorkflowActionStatus.ProtoReflect.Descriptor instead. +func (*WorkflowActionStatus) Descriptor() ([]byte, []int) { + return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{6} } -func (x *GetWorkflowDataRequest) GetWorkflowId() string { +func (x *WorkflowActionStatus) GetWorkflowId() string { if x != nil { return x.WorkflowId } return "" } -func (x *GetWorkflowDataRequest) GetVersion() int32 { +func (x *WorkflowActionStatus) GetTaskName() string { if x != nil { - return x.Version - } - return 0 -} - -// -// List of data passed during workflow creation. -type GetWorkflowDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *GetWorkflowDataResponse) Reset() { - *x = GetWorkflowDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + return x.TaskName } + return "" } -func (x *GetWorkflowDataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowDataResponse) ProtoMessage() {} - -func (x *GetWorkflowDataResponse) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *WorkflowActionStatus) GetActionName() string { + if x != nil { + return x.ActionName } - return mi.MessageOf(x) -} - -// Deprecated: Use GetWorkflowDataResponse.ProtoReflect.Descriptor instead. -func (*GetWorkflowDataResponse) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{13} + return "" } -func (x *GetWorkflowDataResponse) GetData() []byte { +func (x *WorkflowActionStatus) GetActionStatus() State { if x != nil { - return x.Data + return x.ActionStatus } - return nil + return State_STATE_PENDING } -func (x *GetWorkflowDataResponse) GetVersion() int32 { +func (x *WorkflowActionStatus) GetSeconds() int64 { if x != nil { - return x.Version + return x.Seconds } return 0 } -// -// You can change data passed to a workflow -type UpdateWorkflowDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowId string `protobuf:"bytes,1,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"` - Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *UpdateWorkflowDataRequest) Reset() { - *x = UpdateWorkflowDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_protos_workflow_workflow_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkflowDataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkflowDataRequest) ProtoMessage() {} - -func (x *UpdateWorkflowDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_workflow_workflow_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateWorkflowDataRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkflowDataRequest) Descriptor() ([]byte, []int) { - return file_protos_workflow_workflow_proto_rawDescGZIP(), []int{14} -} - -func (x *UpdateWorkflowDataRequest) GetWorkflowId() string { +func (x *WorkflowActionStatus) GetMessage() string { if x != nil { - return x.WorkflowId + return x.Message } return "" } -func (x *UpdateWorkflowDataRequest) GetMetadata() []byte { +func (x *WorkflowActionStatus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { - return x.Metadata + return x.CreatedAt } return nil } -func (x *UpdateWorkflowDataRequest) GetData() []byte { +func (x *WorkflowActionStatus) GetWorkerId() string { if x != nil { - return x.Data + return x.WorkerId } - return nil + return "" } var File_protos_workflow_workflow_proto protoreflect.FileDescriptor @@ -1189,298 +669,119 @@ var File_protos_workflow_workflow_proto protoreflect.FileDescriptor var file_protos_workflow_workflow_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x12, 0x18, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, + 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0xe0, 0x02, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0xf1, 0x02, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x63, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, - 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x0d, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x35, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, - 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, - 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x39, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x49, 0x64, 0x22, 0xb4, 0x02, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x71, 0x0a, 0x12, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x5b, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x53, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x35, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x22, 0xdf, 0x02, 0x0a, 0x0f, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x51, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, + 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x39, 0x0a, + 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x19, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, - 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, - 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x04, - 0x32, 0xc6, 0x11, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x39, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, - 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x31, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, - 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x30, 0x01, - 0x12, 0xab, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0xb3, - 0x01, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x77, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x30, 0x01, 0x12, 0x9f, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x42, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x9a, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x42, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x9a, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49, + 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xb4, 0x02, 0x0a, 0x0e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, + 0x22, 0xc7, 0x02, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1f, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, + 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x11, + 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x04, 0x32, 0xea, 0x02, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x74, + 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, - 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, - 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x9c, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x42, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, - 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa0, 0x01, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, - 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, - 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x44, 0x61, 0x74, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, - 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x43, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x90, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x12, 0x45, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, - 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, - 0x6c, 0x6c, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, + 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x00, 0x30, 0x01, 0x12, 0x76, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, + 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, + 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x2e, 0x74, 0x69, + 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x1f, 0x2e, 0x74, 0x69, + 0x6e, 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2e, 0x74, 0x69, 0x6e, 0x6b, 0x2e, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x2c, + 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6e, + 0x6b, 0x65, 0x72, 0x62, 0x65, 0x6c, 0x6c, 0x2f, 0x74, 0x69, 0x6e, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1497,71 +798,35 @@ func file_protos_workflow_workflow_proto_rawDescGZIP() []byte { var ( file_protos_workflow_workflow_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_protos_workflow_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 15) + file_protos_workflow_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 7) file_protos_workflow_workflow_proto_goTypes = []interface{}{ - (State)(0), // 0: jackfan.us.kg.tinkerbell.tink.protos.workflow.State - (*Empty)(nil), // 1: jackfan.us.kg.tinkerbell.tink.protos.workflow.Empty - (*Workflow)(nil), // 2: jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow - (*CreateRequest)(nil), // 3: jackfan.us.kg.tinkerbell.tink.protos.workflow.CreateRequest - (*CreateResponse)(nil), // 4: jackfan.us.kg.tinkerbell.tink.protos.workflow.CreateResponse - (*GetRequest)(nil), // 5: jackfan.us.kg.tinkerbell.tink.protos.workflow.GetRequest - (*WorkflowContext)(nil), // 6: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContext - (*WorkflowActionStatus)(nil), // 7: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionStatus - (*WorkflowContextRequest)(nil), // 8: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextRequest - (*WorkflowContextList)(nil), // 9: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextList - (*WorkflowActionsRequest)(nil), // 10: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionsRequest - (*WorkflowAction)(nil), // 11: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowAction - (*WorkflowActionList)(nil), // 12: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionList - (*GetWorkflowDataRequest)(nil), // 13: jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataRequest - (*GetWorkflowDataResponse)(nil), // 14: jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataResponse - (*UpdateWorkflowDataRequest)(nil), // 15: jackfan.us.kg.tinkerbell.tink.protos.workflow.UpdateWorkflowDataRequest - (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (State)(0), // 0: tinkerbell.tink.workflow.State + (*Empty)(nil), // 1: tinkerbell.tink.workflow.Empty + (*WorkflowContextRequest)(nil), // 2: tinkerbell.tink.workflow.WorkflowContextRequest + (*WorkflowContext)(nil), // 3: tinkerbell.tink.workflow.WorkflowContext + (*WorkflowActionsRequest)(nil), // 4: tinkerbell.tink.workflow.WorkflowActionsRequest + (*WorkflowActionList)(nil), // 5: tinkerbell.tink.workflow.WorkflowActionList + (*WorkflowAction)(nil), // 6: tinkerbell.tink.workflow.WorkflowAction + (*WorkflowActionStatus)(nil), // 7: tinkerbell.tink.workflow.WorkflowActionStatus + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp } ) - var file_protos_workflow_workflow_proto_depIdxs = []int32{ - 0, // 0: jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow.state:type_name -> jackfan.us.kg.tinkerbell.tink.protos.workflow.State - 16, // 1: jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow.created_at:type_name -> google.protobuf.Timestamp - 16, // 2: jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow.updated_at:type_name -> google.protobuf.Timestamp - 16, // 3: jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow.deleted_at:type_name -> google.protobuf.Timestamp - 0, // 4: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContext.current_action_state:type_name -> jackfan.us.kg.tinkerbell.tink.protos.workflow.State - 0, // 5: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionStatus.action_status:type_name -> jackfan.us.kg.tinkerbell.tink.protos.workflow.State - 16, // 6: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionStatus.created_at:type_name -> google.protobuf.Timestamp - 6, // 7: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextList.workflow_contexts:type_name -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContext - 11, // 8: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionList.action_list:type_name -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowAction - 3, // 9: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.CreateWorkflow:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.CreateRequest - 5, // 10: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflow:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetRequest - 5, // 11: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.DeleteWorkflow:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetRequest - 1, // 12: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ListWorkflows:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Empty - 5, // 13: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContext:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetRequest - 5, // 14: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ShowWorkflowEvents:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetRequest - 8, // 15: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContextList:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextRequest - 8, // 16: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContexts:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextRequest - 10, // 17: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowActions:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionsRequest - 7, // 18: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ReportActionStatus:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionStatus - 13, // 19: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowData:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataRequest - 13, // 20: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowMetadata:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataRequest - 13, // 21: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowDataVersion:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataRequest - 15, // 22: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.UpdateWorkflowData:input_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.UpdateWorkflowDataRequest - 4, // 23: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.CreateWorkflow:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.CreateResponse - 2, // 24: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflow:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow - 1, // 25: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.DeleteWorkflow:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Empty - 2, // 26: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ListWorkflows:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Workflow - 6, // 27: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContext:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContext - 7, // 28: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ShowWorkflowEvents:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionStatus - 9, // 29: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContextList:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContextList - 6, // 30: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowContexts:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowContext - 12, // 31: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowActions:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowActionList - 1, // 32: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.ReportActionStatus:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Empty - 14, // 33: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowData:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataResponse - 14, // 34: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowMetadata:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataResponse - 14, // 35: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.GetWorkflowDataVersion:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.GetWorkflowDataResponse - 1, // 36: jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService.UpdateWorkflowData:output_type -> jackfan.us.kg.tinkerbell.tink.protos.workflow.Empty - 23, // [23:37] is the sub-list for method output_type - 9, // [9:23] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 0, // 0: tinkerbell.tink.workflow.WorkflowContext.current_action_state:type_name -> tinkerbell.tink.workflow.State + 6, // 1: tinkerbell.tink.workflow.WorkflowActionList.action_list:type_name -> tinkerbell.tink.workflow.WorkflowAction + 0, // 2: tinkerbell.tink.workflow.WorkflowActionStatus.action_status:type_name -> tinkerbell.tink.workflow.State + 8, // 3: tinkerbell.tink.workflow.WorkflowActionStatus.created_at:type_name -> google.protobuf.Timestamp + 2, // 4: tinkerbell.tink.workflow.WorkflowService.GetWorkflowContexts:input_type -> tinkerbell.tink.workflow.WorkflowContextRequest + 4, // 5: tinkerbell.tink.workflow.WorkflowService.GetWorkflowActions:input_type -> tinkerbell.tink.workflow.WorkflowActionsRequest + 7, // 6: tinkerbell.tink.workflow.WorkflowService.ReportActionStatus:input_type -> tinkerbell.tink.workflow.WorkflowActionStatus + 3, // 7: tinkerbell.tink.workflow.WorkflowService.GetWorkflowContexts:output_type -> tinkerbell.tink.workflow.WorkflowContext + 5, // 8: tinkerbell.tink.workflow.WorkflowService.GetWorkflowActions:output_type -> tinkerbell.tink.workflow.WorkflowActionList + 1, // 9: tinkerbell.tink.workflow.WorkflowService.ReportActionStatus:output_type -> tinkerbell.tink.workflow.Empty + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_protos_workflow_workflow_proto_init() } @@ -1583,7 +848,7 @@ func file_protos_workflow_workflow_proto_init() { } } file_protos_workflow_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workflow); i { + switch v := v.(*WorkflowContextRequest); i { case 0: return &v.state case 1: @@ -1595,7 +860,7 @@ func file_protos_workflow_workflow_proto_init() { } } file_protos_workflow_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRequest); i { + switch v := v.(*WorkflowContext); i { case 0: return &v.state case 1: @@ -1607,7 +872,7 @@ func file_protos_workflow_workflow_proto_init() { } } file_protos_workflow_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResponse); i { + switch v := v.(*WorkflowActionsRequest); i { case 0: return &v.state case 1: @@ -1619,7 +884,7 @@ func file_protos_workflow_workflow_proto_init() { } } file_protos_workflow_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest); i { + switch v := v.(*WorkflowActionList); i { case 0: return &v.state case 1: @@ -1631,7 +896,7 @@ func file_protos_workflow_workflow_proto_init() { } } file_protos_workflow_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowContext); i { + switch v := v.(*WorkflowAction); i { case 0: return &v.state case 1: @@ -1654,102 +919,6 @@ func file_protos_workflow_workflow_proto_init() { return nil } } - file_protos_workflow_workflow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowContextList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowActionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protos_workflow_workflow_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkflowDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1757,7 +926,7 @@ func file_protos_workflow_workflow_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protos_workflow_workflow_proto_rawDesc, NumEnums: 1, - NumMessages: 15, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/protos/workflow/workflow.proto b/protos/workflow/workflow.proto index 2639b72ca..1910f4e2f 100644 --- a/protos/workflow/workflow.proto +++ b/protos/workflow/workflow.proto @@ -6,9 +6,8 @@ syntax = "proto3"; option go_package = "github.com/tinkerbell/tink/protos/workflow"; -package jackfan.us.kg.tinkerbell.tink.protos.workflow; +package tinkerbell.tink.workflow; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; /* @@ -16,116 +15,21 @@ import "google/protobuf/timestamp.proto"; * monitoring a workflow */ service WorkflowService { - /* - * CreateWorkflow targets a specific hardware and it starts from a particular - * template. The selected hardware is capable of picking the - * workflow up for execution. - */ - rpc CreateWorkflow(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/v1/workflows" - body: "*" - }; - }; - /* - * GetWorkflow returns a specific workflow by its identifier. - */ - rpc GetWorkflow(GetRequest) returns (Workflow) { - option (google.api.http) = { - get: "/v1/workflows/{id}" - }; - }; - /* - * DeleteWorkflow deletes a workflow. This is a logical deletion. Workflow - * will stay available for inspection - */ - rpc DeleteWorkflow(GetRequest) returns (Empty) { - option (google.api.http) = { - delete: "/v1/workflows/{id}" - }; - }; - /* - * ListWorkflows returns a list of workflows - */ - rpc ListWorkflows(Empty) returns (stream Workflow) { - option (google.api.http) = { - get: "/v1/workflows" - }; - }; - /* - * GetWorkflowContext returns specific information about where it is running, - * its state and so on. Useful to debug a workflow and to understand its - * current state. - */ - rpc GetWorkflowContext(GetRequest) returns (WorkflowContext) { - option (google.api.http) = { - get: "/v1/workflows/{id}/state" - }; - }; - /* - * ShowWorkflowEvents returns a list of events for a specific workflows - */ - rpc ShowWorkflowEvents(GetRequest) returns (stream WorkflowActionStatus) { - option (google.api.http) = { - get: "/v1/workflows/{id}/events" - }; - }; - - rpc GetWorkflowContextList(WorkflowContextRequest) returns (WorkflowContextList) {} rpc GetWorkflowContexts(WorkflowContextRequest) returns (stream WorkflowContext) {} rpc GetWorkflowActions(WorkflowActionsRequest) returns (WorkflowActionList) {} rpc ReportActionStatus(WorkflowActionStatus) returns (Empty) {} - rpc GetWorkflowData(GetWorkflowDataRequest) returns (GetWorkflowDataResponse) {} - rpc GetWorkflowMetadata(GetWorkflowDataRequest) returns (GetWorkflowDataResponse) {} - rpc GetWorkflowDataVersion(GetWorkflowDataRequest) returns (GetWorkflowDataResponse) {} - rpc UpdateWorkflowData(UpdateWorkflowDataRequest) returns (Empty) {} } -/* - * Empty represents an empty response - */ -message Empty { -} +message Empty {} -/* - * Workflow represent a single workflow - */ -message Workflow { - /* - * The unique identifier for a workflow - */ - string id = 1; - /* - * The template this workflows starts from - */ - string template = 2; - /* - * The hardware assigned to a workflow - */ - string hardware = 3; - /* - * Current state of the workflow. Pending, success, failed, running. - */ - State state = 4; - /* - * When the workflow was created - */ - google.protobuf.Timestamp created_at = 5; - /* - * The last time the workflow was modified - */ - google.protobuf.Timestamp updated_at = 6; - /* - * When the workflow was deleted - */ - google.protobuf.Timestamp deleted_at = 7; - string data = 8; +message WorkflowContextRequest { + string worker_id = 1; } /* * The various state a workflow can be */ -enum State { + enum State { /* * A workflow is in pending state when it is waiting for the hardware to pick * it up and start the execution. @@ -155,38 +59,6 @@ enum State { STATE_SUCCESS = 4; } -/* - * CreateRequest registers a workflow in the Tinkerbell server. From this point - * in time it is in pending state, waiting to be executed from the tink-worker - * inside the selected hardware - */ -message CreateRequest { - /* - * The idenfier of the template the workflow starts from. - */ - string template = 1; - /* - * The target hardware for this workflow. - */ - string hardware = 2; -} - -/* - * This is the response returned after a successful workflow creation. It - * contains the workflow id. - */ -message CreateResponse { - string id = 1; -} - -/* - * GetRequest contains the workflow idenfier you want to get back from the - * Tinkerbell server. - */ -message GetRequest { - string id = 1; -} - /* * WorkflowContext represents the state of the execution of this workflow in detail. * How many tasks are currently executed, the number of actions and their state. @@ -196,11 +68,9 @@ message WorkflowContext { * The workflow ID */ string workflow_id = 1; - /* - */ + string current_worker = 2; - /* - */ + string current_task = 3; /* * the name of the current action @@ -214,70 +84,22 @@ message WorkflowContext { * The state of the current action */ State current_action_state = 6; - /* - */ + int64 total_number_of_actions = 7; } /* - * WorkflowActionStatus represents the state of all the action part of a - * workflow + * WorkflowActionsRequest is used to get actions for a particular workflow */ -message WorkflowActionStatus { - /* - * The workflow id - */ +message WorkflowActionsRequest { string workflow_id = 1; - /* - * The name of the task this action is part of - */ - string task_name = 2; - /* - * The name of the action - */ - string action_name = 3; - /* - * The state of the action. Those are the same described for workflow as - * well. pending, running, successful and so on. - */ - State action_status = 4; - /* - * The execution time for the action - */ - int64 seconds = 5; - /* - * The message returned from the action. - */ - string message = 6; - /* - * When the status got created for this aciton. You can see it as the time - * when the action started its execution inside the hardware itself. - */ - google.protobuf.Timestamp created_at = 7; - /* - */ - string worker_id = 8; -} - -/* - */ -message WorkflowContextRequest { - /* - */ - string worker_id = 1; -} - -/* - */ -message WorkflowContextList { - repeated WorkflowContext workflow_contexts = 1; } /* - * WorkflowActionsRequest is used to get actions for a particular workflow + * A list of actions */ -message WorkflowActionsRequest { - string workflow_id = 1; +message WorkflowActionList { + repeated WorkflowAction action_list = 1; } /* @@ -332,35 +154,40 @@ message WorkflowAction { } /* - * A list of actions - */ -message WorkflowActionList { - repeated WorkflowAction action_list = 1; -} - -/* - * When a workflow gets created we have the ability to replace variables - * declared in the template with concrete variables. This is the request you - * can use to visualize those data. + * WorkflowActionStatus represents the state of all the action part of a + * workflow */ -message GetWorkflowDataRequest { + message WorkflowActionStatus { + /* + * The workflow id + */ string workflow_id = 1; - int32 version = 2; -} - -/* - * List of data passed during workflow creation. - */ -message GetWorkflowDataResponse { - bytes data = 1; - int32 version = 2; -} + /* + * The name of the task this action is part of + */ + string task_name = 2; + /* + * The name of the action + */ + string action_name = 3; + /* + * The state of the action. Those are the same described for workflow as + * well. pending, running, successful and so on. + */ + State action_status = 4; + /* + * The execution time for the action + */ + int64 seconds = 5; + /* + * The message returned from the action. + */ + string message = 6; + /* + * When the status got created for this aciton. You can see it as the time + * when the action started its execution inside the hardware itself. + */ + google.protobuf.Timestamp created_at = 7; -/* - * You can change data passed to a workflow - */ -message UpdateWorkflowDataRequest { - string workflow_id = 1; - bytes metadata = 2; - bytes data = 3; -} + string worker_id = 8; +} \ No newline at end of file diff --git a/protos/workflow/workflow_grpc.pb.go b/protos/workflow/workflow_grpc.pb.go index 3de1976b2..ad364b779 100644 --- a/protos/workflow/workflow_grpc.pb.go +++ b/protos/workflow/workflow_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: protos/workflow/workflow.proto package workflow @@ -19,37 +23,9 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WorkflowServiceClient interface { - // - // CreateWorkflow targets a specific hardware and it starts from a particular - // template. The selected hardware is capable of picking the - // workflow up for execution. - CreateWorkflow(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) - // - // GetWorkflow returns a specific workflow by its identifier. - GetWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Workflow, error) - // - // DeleteWorkflow deletes a workflow. This is a logical deletion. Workflow - // will stay available for inspection - DeleteWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) - // - // ListWorkflows returns a list of workflows - ListWorkflows(ctx context.Context, in *Empty, opts ...grpc.CallOption) (WorkflowService_ListWorkflowsClient, error) - // - // GetWorkflowContext returns specific information about where it is running, - // its state and so on. Useful to debug a workflow and to understand its - // current state. - GetWorkflowContext(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowContext, error) - // - // ShowWorkflowEvents returns a list of events for a specific workflows - ShowWorkflowEvents(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (WorkflowService_ShowWorkflowEventsClient, error) - GetWorkflowContextList(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (*WorkflowContextList, error) GetWorkflowContexts(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowContextsClient, error) GetWorkflowActions(ctx context.Context, in *WorkflowActionsRequest, opts ...grpc.CallOption) (*WorkflowActionList, error) ReportActionStatus(ctx context.Context, in *WorkflowActionStatus, opts ...grpc.CallOption) (*Empty, error) - GetWorkflowData(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - GetWorkflowMetadata(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - GetWorkflowDataVersion(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) - UpdateWorkflowData(ctx context.Context, in *UpdateWorkflowDataRequest, opts ...grpc.CallOption) (*Empty, error) } type workflowServiceClient struct { @@ -60,117 +36,8 @@ func NewWorkflowServiceClient(cc grpc.ClientConnInterface) WorkflowServiceClient return &workflowServiceClient{cc} } -func (c *workflowServiceClient) CreateWorkflow(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { - out := new(CreateResponse) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/CreateWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Workflow, error) { - out := new(Workflow) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) DeleteWorkflow(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/DeleteWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) ListWorkflows(ctx context.Context, in *Empty, opts ...grpc.CallOption) (WorkflowService_ListWorkflowsClient, error) { - stream, err := c.cc.NewStream(ctx, &WorkflowService_ServiceDesc.Streams[0], "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/ListWorkflows", opts...) - if err != nil { - return nil, err - } - x := &workflowServiceListWorkflowsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type WorkflowService_ListWorkflowsClient interface { - Recv() (*Workflow, error) - grpc.ClientStream -} - -type workflowServiceListWorkflowsClient struct { - grpc.ClientStream -} - -func (x *workflowServiceListWorkflowsClient) Recv() (*Workflow, error) { - m := new(Workflow) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *workflowServiceClient) GetWorkflowContext(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowContext, error) { - out := new(WorkflowContext) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowContext", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) ShowWorkflowEvents(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (WorkflowService_ShowWorkflowEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &WorkflowService_ServiceDesc.Streams[1], "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/ShowWorkflowEvents", opts...) - if err != nil { - return nil, err - } - x := &workflowServiceShowWorkflowEventsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type WorkflowService_ShowWorkflowEventsClient interface { - Recv() (*WorkflowActionStatus, error) - grpc.ClientStream -} - -type workflowServiceShowWorkflowEventsClient struct { - grpc.ClientStream -} - -func (x *workflowServiceShowWorkflowEventsClient) Recv() (*WorkflowActionStatus, error) { - m := new(WorkflowActionStatus) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *workflowServiceClient) GetWorkflowContextList(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (*WorkflowContextList, error) { - out := new(WorkflowContextList) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowContextList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *workflowServiceClient) GetWorkflowContexts(ctx context.Context, in *WorkflowContextRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowContextsClient, error) { - stream, err := c.cc.NewStream(ctx, &WorkflowService_ServiceDesc.Streams[2], "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowContexts", opts...) + stream, err := c.cc.NewStream(ctx, &WorkflowService_ServiceDesc.Streams[0], "/tinkerbell.tink.workflow.WorkflowService/GetWorkflowContexts", opts...) if err != nil { return nil, err } @@ -203,7 +70,7 @@ func (x *workflowServiceGetWorkflowContextsClient) Recv() (*WorkflowContext, err func (c *workflowServiceClient) GetWorkflowActions(ctx context.Context, in *WorkflowActionsRequest, opts ...grpc.CallOption) (*WorkflowActionList, error) { out := new(WorkflowActionList) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowActions", in, out, opts...) + err := c.cc.Invoke(ctx, "/tinkerbell.tink.workflow.WorkflowService/GetWorkflowActions", in, out, opts...) if err != nil { return nil, err } @@ -212,43 +79,7 @@ func (c *workflowServiceClient) GetWorkflowActions(ctx context.Context, in *Work func (c *workflowServiceClient) ReportActionStatus(ctx context.Context, in *WorkflowActionStatus, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/ReportActionStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflowData(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - out := new(GetWorkflowDataResponse) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflowMetadata(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - out := new(GetWorkflowDataResponse) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflowDataVersion(ctx context.Context, in *GetWorkflowDataRequest, opts ...grpc.CallOption) (*GetWorkflowDataResponse, error) { - out := new(GetWorkflowDataResponse) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowDataVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) UpdateWorkflowData(ctx context.Context, in *UpdateWorkflowDataRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/UpdateWorkflowData", in, out, opts...) + err := c.cc.Invoke(ctx, "/tinkerbell.tink.workflow.WorkflowService/ReportActionStatus", in, out, opts...) if err != nil { return nil, err } @@ -259,70 +90,14 @@ func (c *workflowServiceClient) UpdateWorkflowData(ctx context.Context, in *Upda // All implementations should embed UnimplementedWorkflowServiceServer // for forward compatibility type WorkflowServiceServer interface { - // - // CreateWorkflow targets a specific hardware and it starts from a particular - // template. The selected hardware is capable of picking the - // workflow up for execution. - CreateWorkflow(context.Context, *CreateRequest) (*CreateResponse, error) - // - // GetWorkflow returns a specific workflow by its identifier. - GetWorkflow(context.Context, *GetRequest) (*Workflow, error) - // - // DeleteWorkflow deletes a workflow. This is a logical deletion. Workflow - // will stay available for inspection - DeleteWorkflow(context.Context, *GetRequest) (*Empty, error) - // - // ListWorkflows returns a list of workflows - ListWorkflows(*Empty, WorkflowService_ListWorkflowsServer) error - // - // GetWorkflowContext returns specific information about where it is running, - // its state and so on. Useful to debug a workflow and to understand its - // current state. - GetWorkflowContext(context.Context, *GetRequest) (*WorkflowContext, error) - // - // ShowWorkflowEvents returns a list of events for a specific workflows - ShowWorkflowEvents(*GetRequest, WorkflowService_ShowWorkflowEventsServer) error - GetWorkflowContextList(context.Context, *WorkflowContextRequest) (*WorkflowContextList, error) GetWorkflowContexts(*WorkflowContextRequest, WorkflowService_GetWorkflowContextsServer) error GetWorkflowActions(context.Context, *WorkflowActionsRequest) (*WorkflowActionList, error) ReportActionStatus(context.Context, *WorkflowActionStatus) (*Empty, error) - GetWorkflowData(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) - GetWorkflowMetadata(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) - GetWorkflowDataVersion(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) - UpdateWorkflowData(context.Context, *UpdateWorkflowDataRequest) (*Empty, error) } // UnimplementedWorkflowServiceServer should be embedded to have forward compatible implementations. type UnimplementedWorkflowServiceServer struct{} -func (UnimplementedWorkflowServiceServer) CreateWorkflow(context.Context, *CreateRequest) (*CreateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflow not implemented") -} - -func (UnimplementedWorkflowServiceServer) GetWorkflow(context.Context, *GetRequest) (*Workflow, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflow not implemented") -} - -func (UnimplementedWorkflowServiceServer) DeleteWorkflow(context.Context, *GetRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkflow not implemented") -} - -func (UnimplementedWorkflowServiceServer) ListWorkflows(*Empty, WorkflowService_ListWorkflowsServer) error { - return status.Errorf(codes.Unimplemented, "method ListWorkflows not implemented") -} - -func (UnimplementedWorkflowServiceServer) GetWorkflowContext(context.Context, *GetRequest) (*WorkflowContext, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowContext not implemented") -} - -func (UnimplementedWorkflowServiceServer) ShowWorkflowEvents(*GetRequest, WorkflowService_ShowWorkflowEventsServer) error { - return status.Errorf(codes.Unimplemented, "method ShowWorkflowEvents not implemented") -} - -func (UnimplementedWorkflowServiceServer) GetWorkflowContextList(context.Context, *WorkflowContextRequest) (*WorkflowContextList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowContextList not implemented") -} - func (UnimplementedWorkflowServiceServer) GetWorkflowContexts(*WorkflowContextRequest, WorkflowService_GetWorkflowContextsServer) error { return status.Errorf(codes.Unimplemented, "method GetWorkflowContexts not implemented") } @@ -335,22 +110,6 @@ func (UnimplementedWorkflowServiceServer) ReportActionStatus(context.Context, *W return nil, status.Errorf(codes.Unimplemented, "method ReportActionStatus not implemented") } -func (UnimplementedWorkflowServiceServer) GetWorkflowData(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowData not implemented") -} - -func (UnimplementedWorkflowServiceServer) GetWorkflowMetadata(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowMetadata not implemented") -} - -func (UnimplementedWorkflowServiceServer) GetWorkflowDataVersion(context.Context, *GetWorkflowDataRequest) (*GetWorkflowDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowDataVersion not implemented") -} - -func (UnimplementedWorkflowServiceServer) UpdateWorkflowData(context.Context, *UpdateWorkflowDataRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowData not implemented") -} - // UnsafeWorkflowServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WorkflowServiceServer will // result in compilation errors. @@ -362,138 +121,6 @@ func RegisterWorkflowServiceServer(s grpc.ServiceRegistrar, srv WorkflowServiceS s.RegisterService(&WorkflowService_ServiceDesc, srv) } -func _WorkflowService_CreateWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).CreateWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/CreateWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).CreateWorkflow(ctx, req.(*CreateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflow(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_DeleteWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).DeleteWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/DeleteWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).DeleteWorkflow(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_ListWorkflows_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(Empty) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WorkflowServiceServer).ListWorkflows(m, &workflowServiceListWorkflowsServer{stream}) -} - -type WorkflowService_ListWorkflowsServer interface { - Send(*Workflow) error - grpc.ServerStream -} - -type workflowServiceListWorkflowsServer struct { - grpc.ServerStream -} - -func (x *workflowServiceListWorkflowsServer) Send(m *Workflow) error { - return x.ServerStream.SendMsg(m) -} - -func _WorkflowService_GetWorkflowContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowContext(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowContext", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowContext(ctx, req.(*GetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_ShowWorkflowEvents_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WorkflowServiceServer).ShowWorkflowEvents(m, &workflowServiceShowWorkflowEventsServer{stream}) -} - -type WorkflowService_ShowWorkflowEventsServer interface { - Send(*WorkflowActionStatus) error - grpc.ServerStream -} - -type workflowServiceShowWorkflowEventsServer struct { - grpc.ServerStream -} - -func (x *workflowServiceShowWorkflowEventsServer) Send(m *WorkflowActionStatus) error { - return x.ServerStream.SendMsg(m) -} - -func _WorkflowService_GetWorkflowContextList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WorkflowContextRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowContextList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowContextList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowContextList(ctx, req.(*WorkflowContextRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _WorkflowService_GetWorkflowContexts_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(WorkflowContextRequest) if err := stream.RecvMsg(m); err != nil { @@ -525,7 +152,7 @@ func _WorkflowService_GetWorkflowActions_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowActions", + FullMethod: "/tinkerbell.tink.workflow.WorkflowService/GetWorkflowActions", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WorkflowServiceServer).GetWorkflowActions(ctx, req.(*WorkflowActionsRequest)) @@ -543,7 +170,7 @@ func _WorkflowService_ReportActionStatus_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/ReportActionStatus", + FullMethod: "/tinkerbell.tink.workflow.WorkflowService/ReportActionStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WorkflowServiceServer).ReportActionStatus(ctx, req.(*WorkflowActionStatus)) @@ -551,105 +178,13 @@ func _WorkflowService_ReportActionStatus_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } -func _WorkflowService_GetWorkflowData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowData(ctx, req.(*GetWorkflowDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetWorkflowMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowMetadata(ctx, req.(*GetWorkflowDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetWorkflowDataVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowDataVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/GetWorkflowDataVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowDataVersion(ctx, req.(*GetWorkflowDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_UpdateWorkflowData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkflowDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).UpdateWorkflowData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService/UpdateWorkflowData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).UpdateWorkflowData(ctx, req.(*UpdateWorkflowDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - // WorkflowService_ServiceDesc is the grpc.ServiceDesc for WorkflowService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var WorkflowService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "jackfan.us.kg.tinkerbell.tink.protos.workflow.WorkflowService", + ServiceName: "tinkerbell.tink.workflow.WorkflowService", HandlerType: (*WorkflowServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "CreateWorkflow", - Handler: _WorkflowService_CreateWorkflow_Handler, - }, - { - MethodName: "GetWorkflow", - Handler: _WorkflowService_GetWorkflow_Handler, - }, - { - MethodName: "DeleteWorkflow", - Handler: _WorkflowService_DeleteWorkflow_Handler, - }, - { - MethodName: "GetWorkflowContext", - Handler: _WorkflowService_GetWorkflowContext_Handler, - }, - { - MethodName: "GetWorkflowContextList", - Handler: _WorkflowService_GetWorkflowContextList_Handler, - }, { MethodName: "GetWorkflowActions", Handler: _WorkflowService_GetWorkflowActions_Handler, @@ -658,34 +193,8 @@ var WorkflowService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ReportActionStatus", Handler: _WorkflowService_ReportActionStatus_Handler, }, - { - MethodName: "GetWorkflowData", - Handler: _WorkflowService_GetWorkflowData_Handler, - }, - { - MethodName: "GetWorkflowMetadata", - Handler: _WorkflowService_GetWorkflowMetadata_Handler, - }, - { - MethodName: "GetWorkflowDataVersion", - Handler: _WorkflowService_GetWorkflowDataVersion_Handler, - }, - { - MethodName: "UpdateWorkflowData", - Handler: _WorkflowService_UpdateWorkflowData_Handler, - }, }, Streams: []grpc.StreamDesc{ - { - StreamName: "ListWorkflows", - Handler: _WorkflowService_ListWorkflows_Handler, - ServerStreams: true, - }, - { - StreamName: "ShowWorkflowEvents", - Handler: _WorkflowService_ShowWorkflowEvents_Handler, - ServerStreams: true, - }, { StreamName: "GetWorkflowContexts", Handler: _WorkflowService_GetWorkflowContexts_Handler, diff --git a/rules.mk b/rules.mk deleted file mode 100644 index 32e94ebcb..000000000 --- a/rules.mk +++ /dev/null @@ -1,96 +0,0 @@ -# Only use the recipes defined in these makefiles -MAKEFLAGS += --no-builtin-rules -.SUFFIXES: -# Delete target files if there's an error -# This avoids a failure to then skip building on next run if the output is created by shell redirection for example -# Not really necessary for now, but just good to have already if it becomes necessary later. -.DELETE_ON_ERROR: -# Treat the whole recipe as a one shell script/invocation instead of one-per-line -.ONESHELL: -# Use bash instead of plain sh -SHELL := bash -.SHELLFLAGS := -o pipefail -euc - -binaries := cmd/tink-cli/tink-cli cmd/tink-controller/tink-controller cmd/tink-server/tink-server cmd/tink-worker/tink-worker cmd/virtual-worker/virtual-worker -version := $(shell git rev-parse --short HEAD) -tag := $(shell git tag --points-at HEAD | head -n 1) -ifneq (,$(tag)) -version := $(tag)-$(version) -endif -LDFLAGS := -ldflags "-X main.version=$(version)" -export CGO_ENABLED := 0 - -.PHONY: server cli worker virtual-worker test $(binaries) -cli: cmd/tink-cli/tink-cli -controller: cmd/tink-controller/tink-controller -server: cmd/tink-server/tink-server -worker : cmd/tink-worker/tink-worker -virtual-worker : cmd/virtual-worker/virtual-worker - -crossbinaries := $(addsuffix -linux-,$(binaries)) -crossbinaries := $(crossbinaries:=amd64) $(crossbinaries:=arm64) - -.PHONY: crosscompile $(crossbinaries) -%-amd64: FLAGS=GOOS=linux GOARCH=amd64 -%-arm64: FLAGS=GOOS=linux GOARCH=arm64 -$(binaries) $(crossbinaries): - $(FLAGS) go build $(LDFLAGS) -o $@ ./$(@D) - -.PHONY: tink-cli-image tink-controller-image tink-server-image tink-worker-image virtual-worker-image -tink-cli-image: cmd/tink-cli/tink-cli-linux-amd64 - docker build -t tink-cli cmd/tink-cli/ -tink-controller-image: cmd/tink-controller/tink-controller-linux-amd64 - docker build -t tink-controller cmd/tink-controller/ -tink-server-image: cmd/tink-server/tink-server-linux-amd64 - docker build -t tink-server cmd/tink-server/ -tink-worker-image: cmd/tink-worker/tink-worker-linux-amd64 - docker build -t tink-worker cmd/tink-worker/ -virtual-worker-image: cmd/virtual-worker/virtual-worker-linux-amd64 - docker build -t virtual-worker cmd/virtual-worker/ - -.PHONY: run-stack -run-stack: - docker-compose up --build - -ifeq ($(origin GOBIN), undefined) -GOBIN := ${PWD}/bin -export GOBIN -PATH := ${GOBIN}:${PATH} -export PATH -endif - -toolsBins := $(addprefix bin/,$(notdir $(shell awk -F'"' '/^\s*_/ {print $$2}' tools.go | sed 's|/v[[:digit:]]\+||'))) - -# installs cli tools defined in tools.go -$(toolsBins): go.mod go.sum tools.go -$(toolsBins): CMD=$(shell grep -w '$(@F)' tools.go | awk -F'"' '{print $$2}') -$(toolsBins): - go install $(CMD) - -.PHONY: protomocks -protomocks: bin/moq - go generate ./protos/... - gofumpt -s -w ./protos/*/mock.go - -.PHONY: check-protomocks -check-protomocks: - @git diff --no-ext-diff --quiet --exit-code -- protos/*/mock.go || ( - echo "Mock files need to be regenerated!"; - git diff --no-ext-diff --exit-code --stat -- protos/*/mock.go - ) - -.PHONY: pbfiles -pbfiles: buf.gen.yaml buf.lock $(shell git ls-files 'protos/*/*.proto') $(toolsBins) - buf mod update - buf generate - gofumpt -w protos/*/*.pb.* - -.PHONY: check-pbfiles -check-pbfiles: pbfiles - @git diff --no-ext-diff --quiet --exit-code -- protos/*/*.pb.* || ( - echo "Protobuf files need to be regenerated!"; - git diff --no-ext-diff --exit-code --stat -- protos/*/*.pb.* - ) - -e2etest-setup: $(toolsBins) - setup-envtest use diff --git a/server/dbserver.go b/server/dbserver.go deleted file mode 100644 index b30050988..000000000 --- a/server/dbserver.go +++ /dev/null @@ -1,66 +0,0 @@ -package server - -import ( - "sync" - - "github.com/packethost/pkg/log" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/protos/hardware" - "github.com/tinkerbell/tink/protos/template" - "github.com/tinkerbell/tink/protos/workflow" - "google.golang.org/grpc" -) - -const ( - errInvalidWorkerID = "invalid worker id" - errInvalidWorkflowID = "invalid workflow id" - errInvalidTaskName = "invalid task name" - errInvalidActionName = "invalid action name" - errInvalidTaskReported = "reported task name does not match the current action details" - errInvalidActionReported = "reported action name does not match the current action details" - errInvalidActionIndex = "invalid action index for workflow" - - msgReceivedStatus = "received action status: %s" - msgCurrentWfContext = "current workflow context" - msgSendWfContext = "send workflow context: %s" -) - -// DBServerOption is a type for modifying a DBServer. -type DBServerOption func(*DBServer) error - -// DBServer is a gRPC Server for database-backed Tinkerbell. -type DBServer struct { - db db.Database - quit <-chan struct{} - - dbLock sync.RWMutex - dbReady bool - - watchLock sync.RWMutex - watch map[string]chan string - - logger log.Logger -} - -// NewServer returns a new Tinkerbell server. -func NewDBServer(l log.Logger, database db.Database, opts ...DBServerOption) (*DBServer, error) { - ts := &DBServer{ - db: database, - logger: l, - dbReady: true, - } - for _, opt := range opts { - if err := opt(ts); err != nil { - return nil, err - } - } - - return ts, nil -} - -// Register registers Template, Workflow, and Hardware APIs on a gRPC server. -func (s *DBServer) Register(gserver *grpc.Server) { - template.RegisterTemplateServiceServer(gserver, s) - workflow.RegisterWorkflowServiceServer(gserver, s) - hardware.RegisterHardwareServiceServer(gserver, s) -} diff --git a/server/dbserver_hardware.go b/server/dbserver_hardware.go deleted file mode 100644 index 011b0a484..000000000 --- a/server/dbserver_hardware.go +++ /dev/null @@ -1,327 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "fmt" - "strings" - - "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/metrics" - "github.com/tinkerbell/tink/protos/hardware" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -const ( - conflictMACAddr = "conflicting hardware MAC address %v provided with hardware data/info" - duplicateMAC = "Duplicate MAC address found" -) - -func (s *DBServer) Push(ctx context.Context, in *hardware.PushRequest) (*hardware.Empty, error) { - s.logger.Info("push") - labels := prometheus.Labels{"method": "Push", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - // must be a copy so deferred cacheInFlight.Dec matches the Inc - labels = prometheus.Labels{"method": "Push", "op": ""} - - hw := in.GetData() - if hw == nil { - err := errors.New("expected data not to be nil") - s.logger.Error(err) - return &hardware.Empty{}, err - } - - // we know hw is non-nil at this point, since we returned early above - // if it was nil - if hw.GetId() == "" { - metrics.CacheTotals.With(labels).Inc() - metrics.CacheErrors.With(labels).Inc() - err := errors.New("id must be set to a UUID, got id: " + hw.Id) - s.logger.Error(err) - return &hardware.Empty{}, err - } - - // normalize data prior to storing in the database - normalizeHardwareData(hw) - - // validate the hardware data to avoid duplicate mac address - err := s.validateHardwareData(ctx, hw) - if err != nil { - return &hardware.Empty{}, err - } - - const msg = "inserting into DB" - data, err := json.Marshal(hw) - if err != nil { - s.logger.Error(err) - } - - labels["op"] = "insert" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - err = s.db.InsertIntoDB(ctx, string(data)) - s.logger.Info("done " + msg) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - } - s.logger.With("id", hw.Id).Info("data pushed") - - s.watchLock.RLock() - if ch := s.watch[hw.Id]; ch != nil { - select { - case ch <- string(data): - default: - metrics.WatchMissTotal.Inc() - } - } - s.watchLock.RUnlock() - s.logger.With("id", hw.Id).Info("skipping blocked watcher") - - return &hardware.Empty{}, err -} - -func (s *DBServer) by(method string, fn func() (string, error)) (*hardware.Hardware, error) { - labels := prometheus.Labels{"method": method, "op": "get"} - - metrics.CacheTotals.With(labels).Inc() - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - j, err := fn() - if err != nil { - metrics.CacheErrors.With(labels).Inc() - return &hardware.Hardware{}, err - } - - if j == "" { - s.dbLock.RLock() - ready := s.dbReady - s.dbLock.RUnlock() - if !ready { - metrics.CacheStalls.With(labels).Inc() - return &hardware.Hardware{}, errors.New("DB is not ready") - } - } - - metrics.CacheHits.With(labels).Inc() - hw := &hardware.Hardware{} - if err := json.Unmarshal([]byte(j), hw); err != nil { - return nil, err - } - return hw, nil -} - -func (s *DBServer) ByMAC(ctx context.Context, in *hardware.GetRequest) (*hardware.Hardware, error) { - return s.by("ByMAC", func() (string, error) { - return s.db.GetByMAC(ctx, in.Mac) - }) -} - -func (s *DBServer) ByIP(ctx context.Context, in *hardware.GetRequest) (*hardware.Hardware, error) { - return s.by("ByIP", func() (string, error) { - return s.db.GetByIP(ctx, in.Ip) - }) -} - -// ByID implements hardware.ByID. -func (s *DBServer) ByID(ctx context.Context, in *hardware.GetRequest) (*hardware.Hardware, error) { - return s.by("ByID", func() (string, error) { - return s.db.GetByID(ctx, in.Id) - }) -} - -// ALL implements hardware.All. -func (s *DBServer) All(_ *hardware.Empty, stream hardware.HardwareService_AllServer) error { - labels := prometheus.Labels{"method": "All", "op": "get"} - - metrics.CacheTotals.With(labels).Inc() - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - s.dbLock.RLock() - ready := s.dbReady //nolint:ifshort // needed for locking - s.dbLock.RUnlock() - if !ready { - metrics.CacheStalls.With(labels).Inc() - return errors.New("DB is not ready") - } - - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - err := s.db.GetAll(func(j []byte) error { - hw := &hardware.Hardware{} - if err := json.Unmarshal(j, hw); err != nil { - return err - } - return stream.Send(hw) - }) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - return err - } - - metrics.CacheHits.With(labels).Inc() - return nil -} - -func (s *DBServer) DeprecatedWatch(in *hardware.GetRequest, stream hardware.HardwareService_DeprecatedWatchServer) error { - l := s.logger.With("id", in.Id) - - ch := make(chan string, 1) - s.watchLock.Lock() - old, ok := s.watch[in.Id] - if ok { - l.Info("evicting old watch") - close(old) - } - s.watch[in.Id] = ch - s.watchLock.Unlock() - - labels := prometheus.Labels{"method": "Watch", "op": "push"} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - disconnect := true - defer func() { - if !disconnect { - return - } - s.watchLock.Lock() - delete(s.watch, in.Id) - s.watchLock.Unlock() - close(ch) - }() - - hw := &hardware.Hardware{} - for { - select { - case <-s.quit: - l.Info("server is shutting down") - return status.Error(codes.OK, "server is shutting down") - case <-stream.Context().Done(): - l.Info("client disconnected") - return status.Error(codes.OK, "client disconnected") - case j, ok := <-ch: - if !ok { - disconnect = false - l.Info("we are being evicted, goodbye") - // ch was replaced and already closed - return status.Error(codes.Unknown, "evicted") - } - - hw.Reset() - if err := json.Unmarshal([]byte(j), hw); err != nil { - return err - } - err := stream.Send(hw) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - err = errors.Wrap(err, "stream send") - l.Error(err) - return err - } - } - } -} - -func (s *DBServer) Delete(ctx context.Context, in *hardware.DeleteRequest) (*hardware.Empty, error) { - s.logger.Info("delete") - labels := prometheus.Labels{"method": "Delete", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - // must be a copy so deferred cacheInFlight.Dec matches the Inc - labels = prometheus.Labels{"method": "Delete", "op": ""} - - if in.Id == "" { - metrics.CacheTotals.With(labels).Inc() - metrics.CacheErrors.With(labels).Inc() - err := errors.New("id must be set to a UUID") - s.logger.Error(err) - return &hardware.Empty{}, err - } - - s.logger.With("id", in.Id).Info("data deleted") - - labels["op"] = "delete" - const msg = "deleting into DB" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - err := s.db.DeleteFromDB(ctx, in.Id) - s.logger.Info("done " + msg) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - logger := s.logger - if pqErr := db.Error(err); pqErr != nil { - logger = s.logger.With("detail", pqErr.Detail, "where", pqErr.Where) - } - logger.Error(err) - } - - s.watchLock.RLock() - if ch := s.watch[in.Id]; ch != nil { - select { - case ch <- in.Id: - default: - metrics.WatchMissTotal.Inc() - s.logger.With("id", in.Id).Info("skipping blocked watcher") - } - } - s.watchLock.RUnlock() - - return &hardware.Empty{}, err -} - -func (s *DBServer) validateHardwareData(ctx context.Context, hw *hardware.Hardware) error { - for _, iface := range hw.GetNetwork().GetInterfaces() { - mac := iface.GetDhcp().GetMac() - - if data, _ := s.db.GetByMAC(ctx, mac); data != "" { - s.logger.With("MAC", mac).Info(duplicateMAC) - - newhw := hardware.Hardware{} - if err := json.Unmarshal([]byte(data), &newhw); err != nil { - s.logger.Error(err, "Failed to unmarshal hardware data") - return err - } - - if newhw.Id == hw.Id { - return nil - } - - return fmt.Errorf(conflictMACAddr, mac) - } - } - - return nil -} - -func normalizeHardwareData(hw *hardware.Hardware) { - // Ensure MAC is stored as lowercase - for _, iface := range hw.GetNetwork().GetInterfaces() { - dhcp := iface.GetDhcp() - if mac := dhcp.GetMac(); mac != "" { - dhcp.Mac = strings.ToLower(mac) - } - } -} diff --git a/server/dbserver_hardware_test.go b/server/dbserver_hardware_test.go deleted file mode 100644 index bd0228c5a..000000000 --- a/server/dbserver_hardware_test.go +++ /dev/null @@ -1,179 +0,0 @@ -package server - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/tinkerbell/tink/protos/hardware" -) - -func Test_server_normalizeHardwareData(t *testing.T) { - tests := []struct { - name string - given *hardware.Hardware - expected *hardware.Hardware - }{ - { - name: "Expect MAC to be normalized to lowercase", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0E:D9:C7:53", - }, - }, - }, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0e:d9:c7:53", - }, - }, - }, - }, - }, - }, - { - name: "Expect MAC to be normalized to lowercase, multiple interfaces", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0E:D9:C7:53", - }, - }, - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:4F:0E:D9:C7:5E", - }, - }, - }, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0e:d9:c7:53", - }, - }, - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:4f:0e:d9:c7:5e", - }, - }, - }, - }, - }, - }, - { - name: "Expect MAC to be normalized to lowercase, nultiple interfaces, mixed casing", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0e:d9:c7:53", - }, - }, - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:4F:0E:D9:C7:5E", - }, - }, - }, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:42:0e:d9:c7:53", - }, - }, - { - Dhcp: &hardware.Hardware_DHCP{ - Mac: "02:4f:0e:d9:c7:5e", - }, - }, - }, - }, - }, - }, - { - name: "Handle nil DHCP", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: nil, - }, - }, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - { - Dhcp: nil, - }, - }, - }, - }, - }, - { - name: "Handle nil Interface", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - nil, - }, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: []*hardware.Hardware_Network_Interface{ - nil, - }, - }, - }, - }, - { - name: "Handle nil Interfaces", - given: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: nil, - }, - }, - expected: &hardware.Hardware{ - Network: &hardware.Hardware_Network{ - Interfaces: nil, - }, - }, - }, - { - name: "Handle nil Network", - given: &hardware.Hardware{Network: nil}, - expected: &hardware.Hardware{Network: nil}, - }, - { - name: "Handle nil Hardware", - given: nil, - expected: nil, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - assert.NotPanics(t, func() { normalizeHardwareData(tt.given) }) - assert.Equal(t, tt.expected, tt.given) - }) - } -} diff --git a/server/dbserver_template.go b/server/dbserver_template.go deleted file mode 100644 index baf55ff8d..000000000 --- a/server/dbserver_template.go +++ /dev/null @@ -1,167 +0,0 @@ -package server - -import ( - "context" - "strings" - - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/metrics" - "github.com/tinkerbell/tink/protos/template" -) - -// CreateTemplate implements template.CreateTemplate. -func (s *DBServer) CreateTemplate(ctx context.Context, in *template.WorkflowTemplate) (*template.CreateResponse, error) { - s.logger.Info("createtemplate") - labels := prometheus.Labels{"method": "CreateTemplate", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "creating a new Template" - labels["op"] = "createtemplate" - id, _ := uuid.NewUUID() - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - err := s.db.CreateTemplate(ctx, in.Name, in.Data, id) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - return &template.CreateResponse{}, err - } - s.logger.Info("done " + msg) - return &template.CreateResponse{Id: id.String()}, err -} - -// GetTemplate implements template.GetTemplate. -func (s *DBServer) GetTemplate(ctx context.Context, in *template.GetRequest) (*template.WorkflowTemplate, error) { - s.logger.Info("gettemplate") - labels := prometheus.Labels{"method": "GetTemplate", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "getting a template" - labels["op"] = "get" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - fields := map[string]string{ - "id": in.GetId(), - "name": in.GetName(), - } - wtmpl, err := s.db.GetTemplate(ctx, fields, false) - s.logger.Info("done " + msg) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - } - return wtmpl, err -} - -// DeleteTemplate implements template.DeleteTemplate. -func (s *DBServer) DeleteTemplate(ctx context.Context, in *template.GetRequest) (*template.Empty, error) { - s.logger.Info("deletetemplate") - labels := prometheus.Labels{"method": "DeleteTemplate", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "deleting a template" - labels["op"] = "delete" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - err := s.db.DeleteTemplate(ctx, in.GetId()) - s.logger.Info("done " + msg) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - } - return &template.Empty{}, err -} - -// ListTemplates implements template.ListTemplates. -func (s *DBServer) ListTemplates(in *template.ListRequest, stream template.TemplateService_ListTemplatesServer) error { - s.logger.Info("listtemplates") - labels := prometheus.Labels{"method": "ListTemplates", "op": "list"} - metrics.CacheTotals.With(labels).Inc() - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - filter := "%" // default filter will match everything - if in.GetName() != "" { - filter = strings.ReplaceAll(in.GetName(), "*", "%") // replace '*' with psql '%' wildcard - } - - s.dbLock.RLock() - ready := s.dbReady //nolint:ifshort // needed for locking - s.dbLock.RUnlock() - if !ready { - metrics.CacheStalls.With(labels).Inc() - return errors.New("DB is not ready") - } - - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - err := s.db.ListTemplates(filter, func(id, n string, crTime, upTime *timestamp.Timestamp) error { - return stream.Send(&template.WorkflowTemplate{Id: id, Name: n, CreatedAt: crTime, UpdatedAt: upTime}) - }) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - return err - } - - metrics.CacheHits.With(labels).Inc() - return nil -} - -// UpdateTemplate implements template.UpdateTemplate. -func (s *DBServer) UpdateTemplate(ctx context.Context, in *template.WorkflowTemplate) (*template.Empty, error) { - s.logger.Info("updatetemplate") - labels := prometheus.Labels{"method": "UpdateTemplate", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "updating a template" - labels["op"] = "updatetemplate" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - err := s.db.UpdateTemplate(ctx, in.Name, in.Data, uuid.MustParse(in.Id)) - s.logger.Info("done " + msg) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - } - return &template.Empty{}, err -} diff --git a/server/dbserver_template_test.go b/server/dbserver_template_test.go deleted file mode 100644 index 93af6fd0d..000000000 --- a/server/dbserver_template_test.go +++ /dev/null @@ -1,381 +0,0 @@ -package server - -import ( - "context" - "errors" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/tinkerbell/tink/db/mock" - pb "github.com/tinkerbell/tink/protos/template" -) - -const ( - templateNotFoundID = "abstract-beef-beyond-meat-abominations" - templateNotFoundName = "my-awesome-mock-name" - templateNotFoundTemplate = `version: "0.1" -name: not_found_workflow -global_timeout: 600 -tasks: - - name: "not found" - worker: "{{.device_1}}" - actions: - - name: "not_found" - image: not-found - timeout: 60` - - templateID1 = "7cd79119-1959-44eb-8b82-bc15bad4888e" - templateName1 = "template_1" - template1 = `version: "0.1" -name: hello_world_workflow -global_timeout: 600 -tasks: - - name: "hello world" - worker: "{{.device_1}}" - actions: - - name: "hello_world" - image: hello-world - timeout: 60` - - templateID2 = "20a18ecf-b9f2-4348-8668-52f672d49208" - templateName2 = "template_2" - template2 = `version: "0.1" -name: hello_world_again_workflow -global_timeout: 600 -tasks: - - name: "hello world again" - worker: "{{.device_2}}" - actions: - - name: "hello_world_again" - image: hello-world - timeout: 60` -) - -func TestCreateTemplate(t *testing.T) { - type ( - args struct { - db *mock.DB - name string - template string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "SuccessfulTemplateCreation": { - args: args{ - db: &mock.DB{ - TemplateDB: make(map[string]interface{}), - }, - name: "template_1", - template: template1, - }, - want: want{ - expectedError: false, - }, - }, - - "SuccessfulMultipleTemplateCreation": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - "template_1": mock.Template{ - Data: template1, - Deleted: false, - }, - }, - }, - name: "template_2", - template: template2, - }, - want: want{ - expectedError: false, - }, - }, - - "FailedMultipleTemplateCreationWithSameName": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - "template_1": mock.Template{ - Data: template1, - Deleted: false, - }, - }, - }, - name: "template_1", - template: template2, - }, - want: want{ - expectedError: true, - }, - }, - - "SuccessfulTemplateCreationAfterDeletingWithSameName": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - "template_1": mock.Template{ - Data: template1, - Deleted: true, - }, - }, - }, - name: "template_1", - template: template2, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - t.Cleanup(func() { - cancel() - }) - - for name := range testCases { - tc := testCases[name] - t.Run(name, func(t *testing.T) { - t.Parallel() - s := testServer(t, tc.args.db) - res, err := s.CreateTemplate(ctx, &pb.WorkflowTemplate{Name: tc.args.name, Data: tc.args.template}) - if tc.want.expectedError { - assert.Error(t, err) - } else { - assert.Nil(t, err) - assert.NotEmpty(t, res) - } - tc.args.db.ClearTemplateDB() - }) - } -} - -func TestGetTemplate(t *testing.T) { - type ( - args struct { - db *mock.DB - getRequest *pb.GetRequest - } - ) - testCases := map[string]struct { - args args - id string - name string - data string - err bool - }{ - "SuccessfulTemplateGet_Name": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - getRequest: &pb.GetRequest{GetBy: &pb.GetRequest_Name{Name: templateName1}}, - }, - id: templateID1, - name: templateName1, - data: template1, - err: false, - }, - - "FailedTemplateGet_Name": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - getRequest: &pb.GetRequest{GetBy: &pb.GetRequest_Name{Name: templateName2}}, - }, - id: templateNotFoundID, - name: templateNotFoundName, - data: templateNotFoundTemplate, - err: true, - }, - - "SuccessfulTemplateGet_ID": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - getRequest: &pb.GetRequest{GetBy: &pb.GetRequest_Id{Id: templateID1}}, - }, - id: templateID1, - name: templateName1, - data: template1, - err: false, - }, - - "FailedTemplateGet_ID": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - getRequest: &pb.GetRequest{GetBy: &pb.GetRequest_Id{Id: templateID2}}, - }, - id: templateNotFoundID, - name: templateNotFoundName, - data: templateNotFoundTemplate, - err: true, - }, - - "FailedTemplateGet_EmptyRequest": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - getRequest: &pb.GetRequest{}, - }, - id: templateNotFoundID, - name: templateNotFoundName, - data: templateNotFoundTemplate, - err: true, - }, - - "FailedTemplateGet_NilRequest": { - args: args{ - db: &mock.DB{ - TemplateDB: map[string]interface{}{ - templateName1: template1, - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*pb.WorkflowTemplate, error) { - t.Log("in get template func") - - if fields["id"] == templateID1 || fields["name"] == templateName1 { - return &pb.WorkflowTemplate{ - Id: templateID1, - Name: templateName1, - Data: template1, - }, nil - } - return &pb.WorkflowTemplate{ - Id: templateNotFoundID, - Name: templateNotFoundName, - Data: templateNotFoundTemplate, - }, errors.New("failed to get template") - }, - }, - }, - id: templateNotFoundID, - name: templateNotFoundName, - data: templateNotFoundTemplate, - err: true, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - t.Cleanup(func() { - cancel() - }) - - for name := range testCases { - tc := testCases[name] - t.Run(name, func(t *testing.T) { - t.Parallel() - s := testServer(t, tc.args.db) - res, err := s.GetTemplate(ctx, tc.args.getRequest) - if tc.err { - assert.Error(t, err) - } else { - assert.Nil(t, err) - assert.NotEmpty(t, res) - } - assert.Equal(t, res.Id, tc.id) - assert.Equal(t, res.Name, tc.name) - assert.Equal(t, res.Data, tc.data) - }) - } -} diff --git a/server/dbserver_worker_workflow.go b/server/dbserver_worker_workflow.go deleted file mode 100644 index 6344af5d2..000000000 --- a/server/dbserver_worker_workflow.go +++ /dev/null @@ -1,235 +0,0 @@ -package server - -import ( - "context" - "fmt" - "strconv" - "time" - - "github.com/packethost/pkg/log" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/protos/workflow" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// GetWorkflowContexts implements tinkerbell.GetWorkflowContexts. -func (s *DBServer) GetWorkflowContexts(req *workflow.WorkflowContextRequest, stream workflow.WorkflowService_GetWorkflowContextsServer) error { - wfs, err := getWorkflowsForWorker(stream.Context(), s.db, req.WorkerId) - if err != nil { - return err - } - for _, wf := range wfs { - wfContext, err := s.db.GetWorkflowContexts(stream.Context(), wf) - if err != nil { - return status.Errorf(codes.Aborted, err.Error()) - } - if isApplicableToSend(stream.Context(), s.logger, wfContext, req.WorkerId, s.db) { - if err := stream.Send(wfContext); err != nil { - return err - } - } - } - return nil -} - -// GetWorkflowContextList implements tinkerbell.GetWorkflowContextList. -func (s *DBServer) GetWorkflowContextList(ctx context.Context, req *workflow.WorkflowContextRequest) (*workflow.WorkflowContextList, error) { - wfs, err := getWorkflowsForWorker(ctx, s.db, req.WorkerId) - if err != nil { - return nil, err - } - - if wfs != nil { - wfContexts := []*workflow.WorkflowContext{} - for _, wf := range wfs { - wfContext, err := s.db.GetWorkflowContexts(ctx, wf) - if err != nil { - return nil, status.Errorf(codes.Aborted, err.Error()) - } - wfContexts = append(wfContexts, wfContext) - } - return &workflow.WorkflowContextList{ - WorkflowContexts: wfContexts, - }, nil - } - return nil, nil -} - -// GetWorkflowActions implements tinkerbell.GetWorkflowActions. -func (s *DBServer) GetWorkflowActions(ctx context.Context, req *workflow.WorkflowActionsRequest) (*workflow.WorkflowActionList, error) { - wfID := req.GetWorkflowId() - if wfID == "" { - return nil, status.Errorf(codes.InvalidArgument, errInvalidWorkflowID) - } - return getWorkflowActions(ctx, s.db, wfID) -} - -// ReportActionStatus implements tinkerbell.ReportActionStatus. -func (s *DBServer) ReportActionStatus(ctx context.Context, req *workflow.WorkflowActionStatus) (*workflow.Empty, error) { - wfID := req.GetWorkflowId() - if wfID == "" { - return nil, status.Errorf(codes.InvalidArgument, errInvalidWorkflowID) - } - if req.GetTaskName() == "" { - return nil, status.Errorf(codes.InvalidArgument, errInvalidTaskName) - } - if req.GetActionName() == "" { - return nil, status.Errorf(codes.InvalidArgument, errInvalidActionName) - } - - l := s.logger.With("actionName", req.GetActionName(), "workflowID", req.GetWorkflowId(), "taskName", req.GetTaskName()) - l.Info(fmt.Sprintf(msgReceivedStatus, req.GetActionStatus())) - - wfContext, err := s.db.GetWorkflowContexts(ctx, wfID) - if err != nil { - return nil, status.Errorf(codes.Aborted, err.Error()) - } - wfActions, err := s.db.GetWorkflowActions(ctx, wfID) - if err != nil { - return nil, status.Errorf(codes.Aborted, err.Error()) - } - - actionIndex := wfContext.GetCurrentActionIndex() - if req.GetActionStatus() == workflow.State_STATE_RUNNING { - if wfContext.GetCurrentAction() != "" { - actionIndex++ - } - } - - if wfContext.TotalNumberOfActions > 1 && actionIndex >= wfContext.TotalNumberOfActions { - return nil, status.Errorf(codes.FailedPrecondition, errInvalidActionIndex) - } - - action := wfActions.ActionList[actionIndex] - if action.GetTaskName() != req.GetTaskName() { - return nil, status.Errorf(codes.InvalidArgument, errInvalidTaskReported) - } - if action.GetName() != req.GetActionName() { - return nil, status.Errorf(codes.InvalidArgument, errInvalidActionReported) - } - wfContext.CurrentWorker = action.GetWorkerId() - wfContext.CurrentTask = req.GetTaskName() - wfContext.CurrentAction = req.GetActionName() - wfContext.CurrentActionState = req.GetActionStatus() - wfContext.CurrentActionIndex = actionIndex - err = s.db.UpdateWorkflowState(ctx, wfContext) - if err != nil { - return &workflow.Empty{}, status.Errorf(codes.Aborted, err.Error()) - } - - // TODO the below "time" would be a part of the request which is coming form worker. - t := time.Now() - err = s.db.InsertIntoWorkflowEventTable(ctx, req, t) - if err != nil { - return &workflow.Empty{}, status.Error(codes.Aborted, err.Error()) - } - - l = s.logger.With( - "workflowID", wfContext.GetWorkflowId(), - "currentWorker", wfContext.GetCurrentWorker(), - "currentTask", wfContext.GetCurrentTask(), - "currentAction", wfContext.GetCurrentAction(), - "currentActionIndex", strconv.FormatInt(wfContext.GetCurrentActionIndex(), 10), - "currentActionState", wfContext.GetCurrentActionState(), - "totalNumberOfActions", wfContext.GetTotalNumberOfActions(), - ) - l.Info(msgCurrentWfContext) - return &workflow.Empty{}, nil -} - -// UpdateWorkflowData updates workflow ephemeral data. -func (s *DBServer) UpdateWorkflowData(ctx context.Context, req *workflow.UpdateWorkflowDataRequest) (*workflow.Empty, error) { - if wfID := req.GetWorkflowId(); wfID == "" { - return &workflow.Empty{}, status.Errorf(codes.InvalidArgument, errInvalidWorkflowID) - } - - err := s.db.InsertIntoWfDataTable(ctx, req) - if err != nil { - return &workflow.Empty{}, status.Errorf(codes.Aborted, err.Error()) - } - return &workflow.Empty{}, nil -} - -// GetWorkflowData gets the ephemeral data for a workflow. -func (s *DBServer) GetWorkflowData(ctx context.Context, req *workflow.GetWorkflowDataRequest) (*workflow.GetWorkflowDataResponse, error) { - if id := req.GetWorkflowId(); id == "" { - return &workflow.GetWorkflowDataResponse{Data: []byte("")}, status.Errorf(codes.InvalidArgument, errInvalidWorkflowID) - } - - data, err := s.db.GetfromWfDataTable(ctx, req) - if err != nil { - s.logger.Error(err, "Error getting from data table") - return &workflow.GetWorkflowDataResponse{Data: []byte("")}, status.Errorf(codes.Aborted, err.Error()) - } - return &workflow.GetWorkflowDataResponse{Data: data}, nil -} - -// GetWorkflowMetadata returns metadata wrt to the ephemeral data of a workflow. -func (s *DBServer) GetWorkflowMetadata(ctx context.Context, req *workflow.GetWorkflowDataRequest) (*workflow.GetWorkflowDataResponse, error) { - data, err := s.db.GetWorkflowMetadata(ctx, req) - if err != nil { - return &workflow.GetWorkflowDataResponse{Data: []byte("")}, status.Errorf(codes.Aborted, err.Error()) - } - return &workflow.GetWorkflowDataResponse{Data: data}, nil -} - -// GetWorkflowDataVersion returns the latest version of data for a workflow. -func (s *DBServer) GetWorkflowDataVersion(ctx context.Context, req *workflow.GetWorkflowDataRequest) (*workflow.GetWorkflowDataResponse, error) { - version, err := s.db.GetWorkflowDataVersion(ctx, req.WorkflowId) - if err != nil { - return &workflow.GetWorkflowDataResponse{Version: version}, status.Errorf(codes.Aborted, err.Error()) - } - return &workflow.GetWorkflowDataResponse{Version: version}, nil -} - -func getWorkflowsForWorker(ctx context.Context, d db.Database, id string) ([]string, error) { - if id == "" { - return nil, status.Errorf(codes.InvalidArgument, errInvalidWorkerID) - } - wfs, err := d.GetWorkflowsForWorker(ctx, id) - if err != nil { - return nil, status.Errorf(codes.Aborted, err.Error()) - } - return wfs, nil -} - -func getWorkflowActions(ctx context.Context, d db.Database, wfID string) (*workflow.WorkflowActionList, error) { - actions, err := d.GetWorkflowActions(ctx, wfID) - if err != nil { - return nil, status.Errorf(codes.Aborted, errInvalidWorkflowID) - } - return actions, nil -} - -// isApplicableToSend checks if a particular workflow context is applicable or if it is needed to -// be sent to a worker based on the state of the current action and the targeted workerID. -func isApplicableToSend(ctx context.Context, logger log.Logger, wfContext *workflow.WorkflowContext, workerID string, d db.Database) bool { - if wfContext.GetCurrentActionState() == workflow.State_STATE_FAILED || - wfContext.GetCurrentActionState() == workflow.State_STATE_TIMEOUT { - return false - } - actions, err := getWorkflowActions(ctx, d, wfContext.GetWorkflowId()) - if err != nil { - return false - } - if wfContext.GetCurrentActionState() == workflow.State_STATE_SUCCESS { - if isLastAction(wfContext, actions) { - return false - } - if wfContext.GetCurrentActionIndex() == 0 { - if actions.ActionList[wfContext.GetCurrentActionIndex()+1].GetWorkerId() == workerID { - logger.Info(fmt.Sprintf(msgSendWfContext, wfContext.GetWorkflowId())) - return true - } - } - } else if actions.ActionList[wfContext.GetCurrentActionIndex()].GetWorkerId() == workerID { - logger.Info(fmt.Sprintf(msgSendWfContext, wfContext.GetWorkflowId())) - return true - } - return false -} - -func isLastAction(wfContext *workflow.WorkflowContext, actions *workflow.WorkflowActionList) bool { - return int(wfContext.GetCurrentActionIndex()) == len(actions.GetActionList())-1 -} diff --git a/server/dbserver_worker_workflow_test.go b/server/dbserver_worker_workflow_test.go deleted file mode 100644 index 3d5e322fd..000000000 --- a/server/dbserver_worker_workflow_test.go +++ /dev/null @@ -1,1375 +0,0 @@ -package server - -import ( - "context" - "encoding/json" - "os" - "testing" - "time" - - "github.com/packethost/pkg/log" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/db/mock" - "github.com/tinkerbell/tink/metrics" - pb "github.com/tinkerbell/tink/protos/workflow" -) - -const ( - workflowID = "5a6d7564-d699-4e9f-a29c-a5890ccbd768" - workerID = "20fd5833-118f-4115-bd7b-1cf94d0f5727" - invalidID = "d699-4e9f-a29c-a5890ccbd" - actionName = "install-rootfs" - taskName = "ubuntu-provisioning" - - defaultTestTimeout = time.Millisecond * 10 -) - -var wfData = []byte("{'os': 'ubuntu', 'base_url': 'http://192.168.1.1/'}") - -func testServer(t *testing.T, d db.Database) *DBServer { - t.Helper() - l, err := log.Init("github.com/tinkerbell/tink") - if err != nil { - t.Errorf("log init failed: %v", err) - } - - return &DBServer{ - logger: l, - db: d, - } -} - -func TestMain(m *testing.M) { - l, _ := log.Init("github.com/tinkerbell/tink") - metrics.SetupMetrics("onprem", l.Package("grpcserver")) - os.Exit(m.Run()) -} - -func TestGetWorkflowContextList(t *testing.T) { - type ( - args struct { - db *mock.DB - workerID string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty worker id": { - args: args{ - db: &mock.DB{}, - }, - want: want{ - expectedError: true, - }, - }, - "database failure": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return []string{workflowID}, nil - }, - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return nil, errors.New("SELECT from worflow_state") - }, - }, - workerID: workerID, - }, - want: want{ - expectedError: true, - }, - }, - "no workflows found": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return nil, nil - }, - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return nil, nil - }, - }, - workerID: workerID, - }, - want: want{ - expectedError: false, - }, - }, - "workflows found": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return []string{workflowID}, nil - }, - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - }, - workerID: workerID, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflowContextList(ctx, &pb.WorkflowContextRequest{WorkerId: tc.args.workerID}) - if err != nil { - assert.Error(t, err) - assert.Nil(t, res) - assert.True(t, tc.want.expectedError) - return - } - if err == nil && res == nil { - assert.False(t, tc.want.expectedError) - return - } - assert.NoError(t, err) - assert.NotNil(t, res) - assert.Len(t, res.WorkflowContexts, 1) - }) - } -} - -func TestGetWorkflowActions(t *testing.T) { - type ( - args struct { - db *mock.DB - workflowID string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty workflow id": { - args: args{ - db: &mock.DB{}, - }, - want: want{ - expectedError: true, - }, - }, - "database failure": { - args: args{ - db: &mock.DB{ - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return nil, errors.New("SELECT from worflow_state") - }, - }, - workflowID: invalidID, - }, - want: want{ - expectedError: true, - }, - }, - "getting actions": { - args: args{ - db: &mock.DB{ - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - workflowID: workflowID, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflowActions(ctx, &pb.WorkflowActionsRequest{WorkflowId: tc.args.workflowID}) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Nil(t, res) - return - } - assert.NoError(t, err) - assert.NotNil(t, res) - assert.Len(t, res.ActionList, 1) - }) - } -} - -func TestReportActionStatus(t *testing.T) { - type ( - args struct { - db *mock.DB - workflowID, taskName, actionName, workerID string - actionState pb.State - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty workflow id": { - args: args{ - db: &mock.DB{}, - taskName: taskName, - actionName: actionName, - }, - want: want{ - expectedError: true, - }, - }, - "empty task name": { - args: args{ - db: &mock.DB{}, - workflowID: workflowID, - actionName: actionName, - }, - want: want{ - expectedError: true, - }, - }, - "empty action name": { - args: args{ - db: &mock.DB{}, - taskName: taskName, - workflowID: workflowID, - }, - want: want{ - expectedError: true, - }, - }, - "error getting workflow context": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return nil, errors.New("SELECT from worflow_state") - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_PENDING, - }, - want: want{ - expectedError: true, - }, - }, - "failed getting actions for context": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return nil, errors.New("SELECT from worflow_state") - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - "success reporting status": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return nil - }, - InsertIntoWorkflowEventTableFunc: func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error { - return nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: false, - }, - }, - "report status for final action": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 2, - CurrentActionState: pb.State_STATE_RUNNING, - CurrentAction: actionName, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: "first-action", - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return nil - }, - InsertIntoWorkflowEventTableFunc: func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error { - return nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: false, - }, - }, - "report status for after final action": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 2, - CurrentActionState: pb.State_STATE_SUCCESS, - CurrentAction: actionName, - CurrentActionIndex: 2, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: "first-action", - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return nil - }, - InsertIntoWorkflowEventTableFunc: func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error { - return nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - "report status for second action": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionIndex: 0, - CurrentAction: "disk-wipe", - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: "disk-wipe", - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return nil - }, - InsertIntoWorkflowEventTableFunc: func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error { - return nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: false, - }, - }, - "reporting different action name": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: "different-action-name", - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - "reporting different task name": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: "different-task-name", - actionName: taskName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - "failed to update workflow state": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return errors.New("INSERT in to workflow_state") - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - "failed to update workflow events": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - UpdateWorkflowStateFunc: func(ctx context.Context, wfContext *pb.WorkflowContext) error { - return nil - }, - InsertIntoWorkflowEventTableFunc: func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error { - return errors.New("INSERT in to workflow_event") - }, - }, - workflowID: workflowID, - workerID: workerID, - taskName: taskName, - actionName: actionName, - actionState: pb.State_STATE_RUNNING, - }, - want: want{ - expectedError: true, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.ReportActionStatus(ctx, - &pb.WorkflowActionStatus{ - WorkflowId: tc.args.workflowID, - ActionName: tc.args.actionName, - TaskName: tc.args.taskName, - WorkerId: tc.args.workerID, - ActionStatus: tc.args.actionState, - Seconds: 0, - }, - ) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Empty(t, res) - return - } - assert.NoError(t, err) - assert.NotNil(t, res) - }) - } -} - -func TestUpdateWorkflowData(t *testing.T) { - type ( - args struct { - db *mock.DB - data []byte - workflowID string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty workflow id": { - args: args{ - db: &mock.DB{}, - }, - want: want{ - expectedError: true, - }, - }, - "database failure": { - args: args{ - db: &mock.DB{ - InsertIntoWfDataTableFunc: func(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error { - return errors.New("INSERT Into workflow_data") - }, - }, - workflowID: workflowID, - data: wfData, - }, - want: want{ - expectedError: true, - }, - }, - "add new data": { - args: args{ - db: &mock.DB{ - InsertIntoWfDataTableFunc: func(ctx context.Context, req *pb.UpdateWorkflowDataRequest) error { - return nil - }, - }, - workflowID: workflowID, - data: wfData, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.UpdateWorkflowData( - ctx, &pb.UpdateWorkflowDataRequest{ - WorkflowId: tc.args.workflowID, - Data: tc.args.data, - }) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Empty(t, res) - } - }) - } -} - -func TestGetWorkflowData(t *testing.T) { - type ( - args struct { - db *mock.DB - workflowID string - } - want struct { - expectedError bool - data []byte - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty workflow id": { - args: args{ - db: &mock.DB{ - GetfromWfDataTableFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return []byte{}, nil - }, - }, - workflowID: "", - }, - want: want{ - expectedError: true, - data: []byte{}, - }, - }, - "invalid workflow id": { - args: args{ - db: &mock.DB{ - GetfromWfDataTableFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return []byte{}, errors.New("invalid uuid") - }, - }, - workflowID: "d699-4e9f-a29c-a5890ccbd", - }, - want: want{ - expectedError: true, - data: []byte{}, - }, - }, - "no workflow data": { - args: args{ - db: &mock.DB{ - GetfromWfDataTableFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return []byte{}, nil - }, - }, - workflowID: workflowID, - }, - want: want{ - data: []byte{}, - }, - }, - "workflow data": { - args: args{ - db: &mock.DB{ - GetfromWfDataTableFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return wfData, nil - }, - }, - workflowID: workflowID, - }, - want: want{ - data: wfData, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - s := testServer(t, tc.args.db) - t.Run(name, func(t *testing.T) { - res, err := s.GetWorkflowData(ctx, &pb.GetWorkflowDataRequest{WorkflowId: tc.args.workflowID}) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Equal(t, tc.want.data, res.Data) - return - } - assert.NoError(t, err) - assert.NotNil(t, res.Data) - assert.Equal(t, tc.want.data, res.Data) - }) - } -} - -func TestGetWorkflowsForWorker(t *testing.T) { - type ( - args struct { - db *mock.DB - workerID string - } - want struct { - data []string - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "empty workflow id": { - args: args{ - db: &mock.DB{}, - workerID: "", - }, - want: want{ - expectedError: true, - }, - }, - "database failure": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return nil, errors.New("database failed") - }, - }, - workerID: workerID, - }, - want: want{ - expectedError: true, - }, - }, - "no workflows found": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return nil, nil - }, - }, - workerID: workerID, - }, - want: want{ - expectedError: false, - }, - }, - "workflows found": { - args: args{ - db: &mock.DB{ - GetWorkflowsForWorkerFunc: func(ctx context.Context, id string) ([]string, error) { - return []string{workflowID}, nil - }, - }, - workerID: workerID, - }, - want: want{ - data: []string{workflowID}, - }, - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := getWorkflowsForWorker(context.Background(), s.db, tc.args.workerID) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Nil(t, res) - return - } - assert.NoError(t, err) - assert.Equal(t, tc.want.data, res) - }) - } -} - -func TestGetWorkflowMetadata(t *testing.T) { - type ( - args struct { - db *mock.DB - workflowID string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "database failure": { - args: args{ - db: &mock.DB{ - GetWorkflowMetadataFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return []byte{}, errors.New("SELECT from workflow_data") - }, - }, - workflowID: workflowID, - }, - want: want{ - expectedError: true, - }, - }, - "no metadata": { - args: args{ - db: &mock.DB{ - GetWorkflowMetadataFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - return []byte{}, nil - }, - }, - workflowID: workflowID, - }, - want: want{ - expectedError: false, - }, - }, - "metadata": { - args: args{ - db: &mock.DB{ - GetWorkflowMetadataFunc: func(ctx context.Context, req *pb.GetWorkflowDataRequest) ([]byte, error) { - type workflowMetadata struct { - WorkerID string `json:"worker-id"` - Action string `json:"action-name"` - Task string `json:"task-name"` - UpdatedAt time.Time `json:"updated-at"` - SHA string `json:"sha256"` - } - - meta, _ := json.Marshal(workflowMetadata{ - WorkerID: workerID, - Action: actionName, - Task: taskName, - UpdatedAt: time.Now(), - SHA: "fcbf74596047b6d3e746702ccc2c697d87817371918a5042805c8c7c75b2cb5f", - }) - return meta, nil - }, - }, - workflowID: workflowID, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflowMetadata(ctx, &pb.GetWorkflowDataRequest{WorkflowId: tc.args.workflowID}) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - assert.Empty(t, res.Data) - return - } - if err == nil && len(res.Data) == 0 { - assert.False(t, tc.want.expectedError) - assert.Empty(t, res.Data) - return - } - assert.NoError(t, err) - assert.NotNil(t, res.Data) - - var meta map[string]string - _ = json.Unmarshal(res.Data, &meta) - assert.Equal(t, workerID, meta["worker-id"]) - assert.Equal(t, actionName, meta["action-name"]) - assert.Equal(t, taskName, meta["task-name"]) - }) - } -} - -func TestGetWorkflowDataVersion(t *testing.T) { - type ( - args struct { - db *mock.DB - } - want struct { - version int32 - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "database failure": { - args: args{ - db: &mock.DB{ - GetWorkflowDataVersionFunc: func(ctx context.Context, workflowID string) (int32, error) { - return -1, errors.New("SELECT from workflow_data") - }, - }, - }, - want: want{ - version: -1, - expectedError: true, - }, - }, - "success": { - args: args{ - db: &mock.DB{ - GetWorkflowDataVersionFunc: func(ctx context.Context, workflowID string) (int32, error) { - return 2, nil - }, - }, - }, - want: want{ - version: 2, - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflowDataVersion(ctx, &pb.GetWorkflowDataRequest{WorkflowId: workflowID}) - assert.Equal(t, tc.want.version, res.Version) - if err != nil { - assert.True(t, tc.want.expectedError) - assert.Error(t, err) - return - } - assert.NoError(t, err) - }) - } -} - -func TestIsApplicableToSend(t *testing.T) { - type ( - args struct { - db *mock.DB - } - want struct { - isApplicable bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "failed state": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_FAILED, - }, nil - }, - }, - }, - want: want{ - isApplicable: false, - }, - }, - "timeout state": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_FAILED, - }, nil - }, - }, - }, - want: want{ - isApplicable: false, - }, - }, - "failed to get actions": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_PENDING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return nil, errors.New("SELECT from worflow_state") - }, - }, - }, - want: want{ - isApplicable: false, - }, - }, - "is last action and success state": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_SUCCESS, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isApplicable: false, - }, - }, - "in-progress last action for different worker": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_RUNNING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: "c160ee99-a969-49d3-8415-3dbceeff54fd", - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isApplicable: false, - }, - }, - "success state and not the last action": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_SUCCESS, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: "disk-wipe", - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isApplicable: true, - }, - }, - "not the last action": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_RUNNING, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: "disk-wipe", - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isApplicable: true, - }, - }, - } - - logger, _ := log.Init("test") - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - wfContext, _ := s.db.GetWorkflowContexts(ctx, workflowID) - res := isApplicableToSend(ctx, logger, wfContext, workerID, s.db) - assert.Equal(t, tc.want.isApplicable, res) - }) - } -} - -func TestIsLastAction(t *testing.T) { - type ( - args struct { - db *mock.DB - } - want struct { - isLastAction bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "is not last": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_SUCCESS, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: "disk-wipe", - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isLastAction: false, - }, - }, - "is last": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowContext, error) { - return &pb.WorkflowContext{ - WorkflowId: workflowID, - TotalNumberOfActions: 1, - CurrentActionState: pb.State_STATE_SUCCESS, - }, nil - }, - GetWorkflowActionsFunc: func(ctx context.Context, wfID string) (*pb.WorkflowActionList, error) { - return &pb.WorkflowActionList{ - ActionList: []*pb.WorkflowAction{ - { - WorkerId: workerID, - Image: actionName, - Name: actionName, - Timeout: int64(90), - TaskName: taskName, - }, - }, - }, nil - }, - }, - }, - want: want{ - isLastAction: true, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - wfContext, _ := s.db.GetWorkflowContexts(ctx, workflowID) - actions, _ := s.db.GetWorkflowActions(ctx, workflowID) - res := isLastAction(wfContext, actions) - assert.Equal(t, tc.want.isLastAction, res) - }) - } -} diff --git a/server/dbserver_workflow.go b/server/dbserver_workflow.go deleted file mode 100644 index db33ed91a..000000000 --- a/server/dbserver_workflow.go +++ /dev/null @@ -1,295 +0,0 @@ -package server - -import ( - "context" - "strconv" - - "github.com/google/uuid" - "github.com/packethost/pkg/log" - "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/metrics" - "github.com/tinkerbell/tink/protos/workflow" - wkf "github.com/tinkerbell/tink/workflow" -) - -const errFailedToGetTemplate = "failed to get template with ID %s" - -// CreateWorkflow implements workflow.CreateWorkflow. -func (s *DBServer) CreateWorkflow(ctx context.Context, in *workflow.CreateRequest) (*workflow.CreateResponse, error) { - s.logger.Info("createworkflow") - labels := prometheus.Labels{"method": "CreateWorkflow", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "creating a new workflow" - labels["op"] = "createworkflow" - id, err := uuid.NewUUID() - if err != nil { - return &workflow.CreateResponse{}, err - } - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - fields := map[string]string{ - "id": in.GetTemplate(), - } - wtmpl, err := s.db.GetTemplate(ctx, fields, false) - if err != nil { - return &workflow.CreateResponse{}, errors.Wrapf(err, errFailedToGetTemplate, in.GetTemplate()) - } - data, err := wkf.RenderTemplate(in.GetTemplate(), wtmpl.GetData(), []byte(in.Hardware)) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - s.logger.Error(err) - return &workflow.CreateResponse{}, err - } - - wf := db.Workflow{ - ID: id.String(), - Template: in.Template, - Hardware: in.Hardware, - State: workflow.State_value[workflow.State_STATE_PENDING.String()], - } - err = s.db.CreateWorkflow(ctx, wf, data, id) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - return &workflow.CreateResponse{}, err - } - - l := s.logger.With("workflowID", id.String()) - l.Info("done " + msg) - return &workflow.CreateResponse{Id: id.String()}, err -} - -// GetWorkflow implements workflow.GetWorkflow. -func (s *DBServer) GetWorkflow(ctx context.Context, in *workflow.GetRequest) (*workflow.Workflow, error) { - s.logger.Info("getworkflow") - labels := prometheus.Labels{"method": "GetWorkflow", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "getting a workflow" - labels["op"] = "get" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - w, err := s.db.GetWorkflow(ctx, in.Id) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - return &workflow.Workflow{}, err - } - fields := map[string]string{ - "id": w.Template, - } - wtmpl, err := s.db.GetTemplate(ctx, fields, true) - if err != nil { - return &workflow.Workflow{}, errors.Wrapf(err, errFailedToGetTemplate, w.Template) - } - data, err := wkf.RenderTemplate(w.Template, wtmpl.GetData(), []byte(w.Hardware)) - if err != nil { - return &workflow.Workflow{}, err - } - - wf := &workflow.Workflow{ - Id: w.ID, - Template: w.Template, - Hardware: w.Hardware, - State: getWorkflowState(ctx, s.db, s.logger, in.Id), - CreatedAt: w.CreatedAt, - UpdatedAt: w.UpdatedAt, - Data: data, - } - l := s.logger.With("workflowID", w.ID) - l.Info("done " + msg) - return wf, err -} - -// DeleteWorkflow implements workflow.DeleteWorkflow. -func (s *DBServer) DeleteWorkflow(ctx context.Context, in *workflow.GetRequest) (*workflow.Empty, error) { - s.logger.Info("deleteworkflow") - labels := prometheus.Labels{"method": "DeleteWorkflow", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "deleting a workflow" - labels["op"] = "delete" - l := s.logger.With("workflowID", in.GetId()) - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - l.Info(msg) - err := s.db.DeleteWorkflow(ctx, in.Id, workflow.State_value[workflow.State_STATE_RUNNING.String()]) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - } - l.Info("done " + msg) - return &workflow.Empty{}, err -} - -// ListWorkflows implements workflow.ListWorkflows. -func (s *DBServer) ListWorkflows(_ *workflow.Empty, stream workflow.WorkflowService_ListWorkflowsServer) error { - s.logger.Info("listworkflows") - labels := prometheus.Labels{"method": "ListWorkflows", "op": "list"} - metrics.CacheTotals.With(labels).Inc() - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - s.dbLock.RLock() - ready := s.dbReady //nolint:ifshort // needed for locking - s.dbLock.RUnlock() - if !ready { - metrics.CacheStalls.With(labels).Inc() - return errors.New("DB is not ready") - } - - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - err := s.db.ListWorkflows(func(w db.Workflow) error { - wf := &workflow.Workflow{ - Id: w.ID, - Template: w.Template, - Hardware: w.Hardware, - CreatedAt: w.CreatedAt, - UpdatedAt: w.UpdatedAt, - State: getWorkflowState(stream.Context(), s.db, s.logger, w.ID), - } - return stream.Send(wf) - }) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - return err - } - - metrics.CacheHits.With(labels).Inc() - return nil -} - -func (s *DBServer) GetWorkflowContext(ctx context.Context, in *workflow.GetRequest) (*workflow.WorkflowContext, error) { - s.logger.Info("GetworkflowContext") - labels := prometheus.Labels{"method": "GetWorkflowContext", "op": ""} - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - const msg = "getting a workflow context" - labels["op"] = "get" - - metrics.CacheTotals.With(labels).Inc() - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - - s.logger.Info(msg) - w, err := s.db.GetWorkflowContexts(ctx, in.Id) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - l := s.logger - if pqErr := db.Error(err); pqErr != nil { - l = l.With("detail", pqErr.Detail, "where", pqErr.Where) - } - l.Error(err) - return &workflow.WorkflowContext{}, err - } - wf := &workflow.WorkflowContext{ - WorkflowId: w.WorkflowId, - CurrentWorker: w.CurrentWorker, - CurrentTask: w.CurrentTask, - CurrentAction: w.CurrentAction, - CurrentActionIndex: w.CurrentActionIndex, - CurrentActionState: w.CurrentActionState, - TotalNumberOfActions: w.TotalNumberOfActions, - } - l := s.logger.With( - "workflowID", wf.GetWorkflowId(), - "currentWorker", wf.GetCurrentWorker(), - "currentTask", wf.GetCurrentTask(), - "currentAction", wf.GetCurrentAction(), - "currentActionIndex", strconv.FormatInt(wf.GetCurrentActionIndex(), 10), - "currentActionState", wf.GetCurrentActionState(), - "totalNumberOfActions", wf.GetTotalNumberOfActions(), - ) - l.Info("done " + msg) - return wf, err -} - -// ShowWorflowevents implements workflow.ShowWorflowEvents. -func (s *DBServer) ShowWorkflowEvents(req *workflow.GetRequest, stream workflow.WorkflowService_ShowWorkflowEventsServer) error { - s.logger.Info("List workflows Events") - labels := prometheus.Labels{"method": "ShowWorkflowEvents", "op": "list"} - metrics.CacheTotals.With(labels).Inc() - metrics.CacheInFlight.With(labels).Inc() - defer metrics.CacheInFlight.With(labels).Dec() - - s.dbLock.RLock() - ready := s.dbReady //nolint:ifshort // needed for locking - s.dbLock.RUnlock() - if !ready { - metrics.CacheStalls.With(labels).Inc() - return errors.New("DB is not ready") - } - - timer := prometheus.NewTimer(metrics.CacheDuration.With(labels)) - defer timer.ObserveDuration() - err := s.db.ShowWorkflowEvents(req.Id, func(w *workflow.WorkflowActionStatus) error { - wfs := &workflow.WorkflowActionStatus{ - WorkerId: w.WorkerId, - TaskName: w.TaskName, - ActionName: w.ActionName, - ActionStatus: w.ActionStatus, - Seconds: w.Seconds, - Message: w.Message, - CreatedAt: w.CreatedAt, - } - return stream.Send(wfs) - }) - if err != nil { - metrics.CacheErrors.With(labels).Inc() - return err - } - s.logger.Info("done listing workflows events") - metrics.CacheHits.With(labels).Inc() - return nil -} - -// This function will provide the workflow state on the basis of the state of the actions -// For e.g. : If an action has Failed or Timeout then the workflow state will also be -// considered as Failed/Timeout. And If an action is successful then the workflow state -// will be considered as Running until the last action of the workflow is executed successfully. - -func getWorkflowState(ctx context.Context, d db.Database, l log.Logger, id string) workflow.State { - wfCtx, err := d.GetWorkflowContexts(ctx, id) - if err != nil { - l.Error(err) - } - - if wfCtx.CurrentActionState != workflow.State_STATE_SUCCESS { - return wfCtx.CurrentActionState - } - if wfCtx.GetCurrentActionIndex() == wfCtx.GetTotalNumberOfActions()-1 { - return workflow.State_STATE_SUCCESS - } - return workflow.State_STATE_RUNNING -} diff --git a/server/dbserver_workflow_test.go b/server/dbserver_workflow_test.go deleted file mode 100644 index b5475fa60..000000000 --- a/server/dbserver_workflow_test.go +++ /dev/null @@ -1,295 +0,0 @@ -package server - -import ( - "context" - "testing" - - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/tinkerbell/tink/db" - "github.com/tinkerbell/tink/db/mock" - tb "github.com/tinkerbell/tink/protos/template" - "github.com/tinkerbell/tink/protos/workflow" -) - -const ( - templateID = "e29b6444-1de7-4a69-bf25-6ea4ae869005" - hw = `{"device_1": "08:00:27:00:00:01"}` - templateData = `version: "0.1" -name: hello_world_workflow -global_timeout: 600 -tasks: - - name: "hello world" - worker: "{{.device_1}}" - actions: - - name: "hello_world" - image: hello-world - timeout: 60` -) - -func TestCreateWorkflow(t *testing.T) { - type ( - args struct { - db *mock.DB - wfTemplate, wfHardware string - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "FailedToGetTemplate": { - args: args{ - db: &mock.DB{ - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return &tb.WorkflowTemplate{ - Id: "", - Name: "", - Data: "", - }, errors.New("failed to get template") - }, - }, - wfTemplate: templateID, - wfHardware: hw, - }, - want: want{ - expectedError: true, - }, - }, - "FailedCreatingWorkflow": { - args: args{ - db: &mock.DB{ - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return &tb.WorkflowTemplate{ - Id: "", - Name: "", - Data: templateData, - }, nil - }, - CreateWorkflowFunc: func(ctx context.Context, wf db.Workflow, data string, id uuid.UUID) error { - return errors.New("failed to create a workflow") - }, - }, - wfTemplate: templateID, - wfHardware: hw, - }, - want: want{ - expectedError: true, - }, - }, - "SuccessCreatingWorkflow": { - args: args{ - db: &mock.DB{ - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return &tb.WorkflowTemplate{ - Id: "", - Name: "", - Data: templateData, - }, nil - }, - CreateWorkflowFunc: func(ctx context.Context, wf db.Workflow, data string, id uuid.UUID) error { - return nil - }, - }, - wfTemplate: templateID, - wfHardware: hw, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.CreateWorkflow(ctx, &workflow.CreateRequest{ - Hardware: tc.args.wfHardware, - Template: tc.args.wfTemplate, - }) - if err != nil { - assert.Error(t, err) - assert.Empty(t, res) - assert.True(t, tc.want.expectedError) - return - } - assert.NoError(t, err) - assert.NotEmpty(t, res) - assert.False(t, tc.want.expectedError) - }) - } -} - -func TestGetWorkflow(t *testing.T) { - type ( - args struct { - db *mock.DB - wfTemplate, wfHardware string - state workflow.State - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "SuccessGettingWorkflow": { - args: args{ - db: &mock.DB{ - GetWorkflowFunc: func(ctx context.Context, workflowID string) (db.Workflow, error) { - return db.Workflow{ - ID: workflowID, - Template: templateID, - Hardware: hw, - }, nil - }, - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*workflow.WorkflowContext, error) { - return &workflow.WorkflowContext{ - WorkflowId: wfID, - CurrentActionState: workflow.State_STATE_SUCCESS, - CurrentActionIndex: 0, - TotalNumberOfActions: 1, - }, nil - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return &tb.WorkflowTemplate{ - Id: "", - Name: "", - Data: templateData, - }, nil - }, - }, - state: workflow.State_STATE_SUCCESS, - wfTemplate: templateID, - wfHardware: hw, - }, - want: want{ - expectedError: false, - }, - }, - "WorkflowDoesNotExist": { - args: args{ - db: &mock.DB{ - GetWorkflowFunc: func(ctx context.Context, workflowID string) (db.Workflow, error) { - return db.Workflow{}, errors.New("Workflow with id " + workflowID + " does not exist") - }, - }, - }, - want: want{ - expectedError: true, - }, - }, - "GetWorkflowState": { - args: args{ - db: &mock.DB{ - GetWorkflowFunc: func(ctx context.Context, workflowID string) (db.Workflow, error) { - return db.Workflow{ - ID: workflowID, - Template: templateID, - Hardware: hw, - }, nil - }, - GetWorkflowContextsFunc: func(ctx context.Context, wfID string) (*workflow.WorkflowContext, error) { - return &workflow.WorkflowContext{ - WorkflowId: wfID, - CurrentActionState: workflow.State_STATE_SUCCESS, - CurrentActionIndex: 0, - TotalNumberOfActions: 2, - }, nil - }, - GetTemplateFunc: func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) { - return &tb.WorkflowTemplate{ - Id: "", - Name: "", - Data: templateData, - }, nil - }, - }, - state: workflow.State_STATE_RUNNING, - wfTemplate: templateID, - wfHardware: hw, - }, - want: want{ - expectedError: false, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflow(ctx, &workflow.GetRequest{ - Id: workflowID, - }) - if err != nil { - assert.Error(t, err) - assert.Empty(t, res) - assert.True(t, tc.want.expectedError) - return - } - assert.Equal(t, tc.args.state, res.State) - assert.NoError(t, err) - assert.NotEmpty(t, res) - assert.False(t, tc.want.expectedError) - }) - } -} - -func TestGetWorkflowContext(t *testing.T) { - type ( - args struct { - db *mock.DB - } - want struct { - expectedError bool - } - ) - testCases := map[string]struct { - args args - want want - }{ - "WorkflowDoesNotExist": { - args: args{ - db: &mock.DB{ - GetWorkflowContextsFunc: func(ctx context.Context, workflowID string) (*workflow.WorkflowContext, error) { - w := workflow.WorkflowContext{} - return &w, errors.New("Workflow with id " + workflowID + " does not exist") - }, - }, - }, - want: want{ - expectedError: true, - }, - }, - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer cancel() - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - s := testServer(t, tc.args.db) - res, err := s.GetWorkflowContext(ctx, &workflow.GetRequest{ - Id: workflowID, - }) - if err != nil { - assert.Error(t, err) - assert.Empty(t, res) - assert.True(t, tc.want.expectedError) - return - } - assert.NoError(t, err) - assert.NotEmpty(t, res) - assert.False(t, tc.want.expectedError) - }) - } -} diff --git a/server/kubernetes_api_workflow.go b/server/kubernetes_api_workflow.go index f16d93aa0..ba07f1d6f 100644 --- a/server/kubernetes_api_workflow.go +++ b/server/kubernetes_api_workflow.go @@ -15,6 +15,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) +const ( + errInvalidWorkflowID = "invalid workflow id" + errInvalidTaskName = "invalid task name" + errInvalidActionName = "invalid action name" + errInvalidTaskReported = "reported task name does not match the current action details" + errInvalidActionReported = "reported action name does not match the current action details" +) + func getWorkflowContext(wf v1alpha1.Workflow) *pb.WorkflowContext { return &pb.WorkflowContext{ WorkflowId: wf.Name, @@ -205,13 +213,3 @@ func (s *KubernetesBackedServer) ReportActionStatus(ctx context.Context, req *pb } return &pb.Empty{}, nil } - -// GetWorkflowData is deprecated, responding with empty values until it is removed. -func (s *KubernetesBackedServer) GetWorkflowData(_ context.Context, _ *pb.GetWorkflowDataRequest) (*pb.GetWorkflowDataResponse, error) { - return &pb.GetWorkflowDataResponse{Data: []byte("")}, nil -} - -// UpdateWorkflowData is deprecated, responding with empty values until it is removed. -func (s *KubernetesBackedServer) UpdateWorkflowData(_ context.Context, _ *pb.UpdateWorkflowDataRequest) (*pb.Empty, error) { - return &pb.Empty{}, nil -} diff --git a/server/kubernetes_unimplemented.go b/server/kubernetes_unimplemented.go deleted file mode 100644 index 861a1a9e7..000000000 --- a/server/kubernetes_unimplemented.go +++ /dev/null @@ -1,55 +0,0 @@ -package server - -import ( - "context" - - "github.com/pkg/errors" - pb "github.com/tinkerbell/tink/protos/workflow" -) - -var errNotImplemented = errors.New("not implemented") - -// CreateWorkflow will return a not implemented error. -func (s *KubernetesBackedServer) CreateWorkflow(context.Context, *pb.CreateRequest) (*pb.CreateResponse, error) { - return nil, errNotImplemented -} - -// GetWorkflow will return a not implemented error. -func (s *KubernetesBackedServer) GetWorkflow(context.Context, *pb.GetRequest) (*pb.Workflow, error) { - return nil, errNotImplemented -} - -// DeleteWorkflow will return a not implemented error. -func (s *KubernetesBackedServer) DeleteWorkflow(context.Context, *pb.GetRequest) (*pb.Empty, error) { - return nil, errNotImplemented -} - -// ListWOrkflows will return a not implemented error. -func (s *KubernetesBackedServer) ListWorkflows(*pb.Empty, pb.WorkflowService_ListWorkflowsServer) error { - return errNotImplemented -} - -// ShowWorkflowEvents will return a not implemented error. -func (s *KubernetesBackedServer) ShowWorkflowEvents(*pb.GetRequest, pb.WorkflowService_ShowWorkflowEventsServer) error { - return errNotImplemented -} - -// GetWorkflowContext will return a not implemented error. -func (s *KubernetesBackedServer) GetWorkflowContext(context.Context, *pb.GetRequest) (*pb.WorkflowContext, error) { - return nil, errNotImplemented -} - -// GetWorkflowContextList will return a not implemented error. -func (s *KubernetesBackedServer) GetWorkflowContextList(context.Context, *pb.WorkflowContextRequest) (*pb.WorkflowContextList, error) { - return nil, errNotImplemented -} - -// GetWorkflowMetadata will return a not implemented error. -func (s *KubernetesBackedServer) GetWorkflowMetadata(context.Context, *pb.GetWorkflowDataRequest) (*pb.GetWorkflowDataResponse, error) { - return nil, errNotImplemented -} - -// GetWorkflowDataVersion will return a not implemented error. -func (s *KubernetesBackedServer) GetWorkflowDataVersion(context.Context, *pb.GetWorkflowDataRequest) (*pb.GetWorkflowDataResponse, error) { - return nil, errNotImplemented -} diff --git a/tools.go b/tools.go deleted file mode 100644 index 82597fa66..000000000 --- a/tools.go +++ /dev/null @@ -1,15 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/matryer/moq" - _ "github.com/tinkerbell/lint-install" - _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" - _ "google.golang.org/protobuf/cmd/protoc-gen-go" - _ "mvdan.cc/gofumpt" - _ "sigs.k8s.io/controller-runtime/tools/setup-envtest" - _ "sigs.k8s.io/kustomize/kustomize/v4" -)