From 399b052f9ece8bcbf0a8b2fe4338b41fdd95a254 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 30 Mar 2023 08:47:29 -0400 Subject: [PATCH] bazel: add protoc codegen to //:generate target (#1554) Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/workflows/test-proto.yml | 35 - bazel/ci/BUILD.bazel | 18 + bazel/ci/proto_targets.bzl | 12 + bazel/ci/proto_targets_check.sh.in | 85 +++ bazel/proto/BUILD.bazel | 0 bazel/proto/rules.bzl | 87 +++ bootstrapper/initproto/BUILD.bazel | 8 + bootstrapper/initproto/init.pb.go | 285 ++++--- bootstrapper/initproto/init_grpc.pb.go | 105 --- debugd/service/BUILD.bazel | 8 + debugd/service/debugd.pb.go | 695 +++++++++++++----- debugd/service/debugd_grpc.pb.go | 311 -------- dev-docs/conventions.md | 6 - dev-docs/layout.md | 1 - dev-docs/workflows/build-test-run.md | 1 + disk-mapper/recoverproto/BUILD.bazel | 8 + disk-mapper/recoverproto/recover.pb.go | 194 +++-- disk-mapper/recoverproto/recover_grpc.pb.go | 107 --- joinservice/joinproto/BUILD.bazel | 8 + joinservice/joinproto/join.pb.go | 440 ++++++----- joinservice/joinproto/join_grpc.pb.go | 145 ---- keyservice/keyserviceproto/BUILD.bazel | 8 + keyservice/keyserviceproto/keyservice.pb.go | 190 +++-- .../keyserviceproto/keyservice_grpc.pb.go | 105 --- proto/Dockerfile.gen-proto | 69 -- proto/README.md | 11 - upgrade-agent/upgradeproto/BUILD.bazel | 8 + upgrade-agent/upgradeproto/upgrade.pb.go | 199 +++-- upgrade-agent/upgradeproto/upgrade_grpc.pb.go | 105 --- verify/verifyproto/BUILD.bazel | 8 + verify/verifyproto/verify.pb.go | 191 +++-- verify/verifyproto/verify_grpc.pb.go | 107 --- 32 files changed, 1756 insertions(+), 1804 deletions(-) delete mode 100644 .github/workflows/test-proto.yml create mode 100644 bazel/ci/proto_targets.bzl create mode 100644 bazel/ci/proto_targets_check.sh.in create mode 100644 bazel/proto/BUILD.bazel create mode 100644 bazel/proto/rules.bzl delete mode 100644 bootstrapper/initproto/init_grpc.pb.go delete mode 100644 debugd/service/debugd_grpc.pb.go delete mode 100644 disk-mapper/recoverproto/recover_grpc.pb.go delete mode 100644 joinservice/joinproto/join_grpc.pb.go delete mode 100644 keyservice/keyserviceproto/keyservice_grpc.pb.go delete mode 100644 proto/Dockerfile.gen-proto delete mode 100644 proto/README.md delete mode 100644 upgrade-agent/upgradeproto/upgrade_grpc.pb.go delete mode 100644 verify/verifyproto/verify_grpc.pb.go diff --git a/.github/workflows/test-proto.yml b/.github/workflows/test-proto.yml deleted file mode 100644 index c726261e0..000000000 --- a/.github/workflows/test-proto.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Proto generate check - -on: - workflow_dispatch: - push: - branches: - - main - - "release/**" - paths: - - "**.proto" - - ".github/workflows/test-proto.yml" - - "proto/Dockerfile.gen-proto" - pull_request: - paths: - - "**.proto" - - ".github/workflows/test-proto.yml" - - "proto/Dockerfile.gen-proto" - -jobs: - go-generate: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - with: - ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} - - - name: Generate proto - shell: bash - working-directory: proto - env: - DOCKER_BUILDKIT: 1 - run: | - docker build -o .. -f Dockerfile.gen-proto .. - git diff --exit-code diff --git a/bazel/ci/BUILD.bazel b/bazel/ci/BUILD.bazel index 460a6237d..0e2fd9b12 100644 --- a/bazel/ci/BUILD.bazel +++ b/bazel/ci/BUILD.bazel @@ -1,6 +1,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle") load("@com_github_ash2k_bazel_tools//multirun:def.bzl", "multirun") load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier", "buildifier_test") +load("//bazel/ci:proto_targets.bzl", "proto_targets") load("//bazel/sh:def.bzl", "noop_warn", "repo_command", "sh_template") required_tags = ["e2e"] @@ -365,6 +366,21 @@ repo_command( command = "//hack/bazel-deps-mirror", ) +sh_template( + name = "proto_targets_check", + data = [], + substitutions = { + "@@PROTO_TARGETS@@": " ".join(proto_targets()), + }, + template = "proto_targets_check.sh.in", +) + +multirun( + name = "proto_generate", + commands = proto_targets(), + jobs = 0, # execute concurrently +) + multirun( name = "tidy", commands = [ @@ -394,6 +410,7 @@ multirun( ":license_header_check", ":govulncheck", ":deps_mirror_check", + ":proto_targets_check", ] + select({ "@io_bazel_rules_go//go/platform:darwin_arm64": [ ":shellcheck_noop_warning", @@ -414,6 +431,7 @@ multirun( ":terraform_gen", "//3rdparty/bazel/com_github_medik8s_node_maintainance_operator:pull_files", ":go_generate", + ":proto_generate", ], jobs = 1, # execute sequentially visibility = ["//visibility:public"], diff --git a/bazel/ci/proto_targets.bzl b/bazel/ci/proto_targets.bzl new file mode 100644 index 000000000..a063744ca --- /dev/null +++ b/bazel/ci/proto_targets.bzl @@ -0,0 +1,12 @@ +"""Proto targets""" + +def proto_targets(): + return [ + "//joinservice/joinproto:write_generated_protos", + "//bootstrapper/initproto:write_generated_protos", + "//debugd/service:write_generated_protos", + "//disk-mapper/recoverproto:write_generated_protos", + "//keyservice/keyserviceproto:write_generated_protos", + "//upgrade-agent/upgradeproto:write_generated_protos", + "//verify/verifyproto:write_generated_protos", + ] diff --git a/bazel/ci/proto_targets_check.sh.in b/bazel/ci/proto_targets_check.sh.in new file mode 100644 index 000000000..39c0c82c8 --- /dev/null +++ b/bazel/ci/proto_targets_check.sh.in @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +###### script header ###### + +lib=$(realpath @@BASE_LIB@@) || exit 1 +stat "${lib}" >> /dev/null || exit 1 + +# shellcheck source=../sh/lib.bash +if ! source "${lib}"; then + echo "Error: could not find import" + exit 1 +fi + +protoTargets=(@@PROTO_TARGETS@@) + +cd "${BUILD_WORKSPACE_DIRECTORY}" + +###### script body ###### + +exitCode=0 + +writeGoProtoFindingsStr=$( + grep \ + -rw . \ + -e "write_go_proto_srcs(" \ + --include=*.bazel +) +readarray -t <<< "${writeGoProtoFindingsStr}" +writeGoProtoFindings=("${MAPFILE[@]}") + +echo "Checking that all proto files have a 'write_go_proto_srcs' in the BUILD.bazel file of that package..." + +protoFilesStr=$(find . -type f -name "*.proto") +readarray -t <<< "${protoFilesStr}" +protoFiles=("${MAPFILE[@]}") + +protoFilePaths=() +for protoFile in "${protoFiles[@]}"; do + protoFilePaths+=("$(dirname "${protoFile}")") +done + +writeGoProtoPaths=() +for writeGoProtoFinding in "${writeGoProtoFindings[@]}"; do + writeGoProtoPaths+=("${writeGoProtoFinding%/*}") # remove everything after the last slash +done + +protoFilePathsSorted=$(printf '%s\n' "${protoFilePaths[@]}" | sort) +writeGoProtoPathsSorted=$(printf '%s\n' "${writeGoProtoPaths[@]}" | sort) + +diff=$(diff <(echo "${protoFilePathsSorted}") <(echo "${writeGoProtoPathsSorted}") || true) # don't let diff fail + +if [[ -n ${diff} ]]; then + echo "Mismatch between proto files and 'write_go_proto_srcs' calls:" + # shellcheck disable=SC2001 + echo "${diff}" | sed -e 's/^/ /' + exitCode=1 +fi + +echo "Checking that all 'write_go_proto_srcs' calls and targets in bazel/ci/proto_targets.bzl match..." + +writeGoProtoFindingsCleaned=() +for protoFinding in "${writeGoProtoFindings[@]}"; do + findingCleaned=$( + echo "${protoFinding}" | + sed \ + -e 's$/BUILD.bazel$$' \ + -e 's/write_go_proto_srcs(/write_generated_protos/g' \ + -e 's$./$//$' + ) + writeGoProtoFindingsCleaned+=("${findingCleaned}") +done + +writeGoProtoFindingsSorted=$(printf '%s\n' "${writeGoProtoFindingsCleaned[@]}" | sort) +protoTargetsSorted=$(printf '%s\n' "${protoTargets[@]}" | sort) + +diff=$(diff <(echo "${writeGoProtoFindingsSorted}") <(echo "${protoTargetsSorted}") || true) # don't let diff fail + +if [[ -n ${diff} ]]; then + echo "Mismatch between 'write_go_proto_srcs' calls and targets listed in bazel/ci/proto_targets.bzl:" + # shellcheck disable=SC2001 + echo "${diff}" | sed -e 's/^/ /' + exitCode=1 +fi + +exit "${exitCode}" diff --git a/bazel/proto/BUILD.bazel b/bazel/proto/BUILD.bazel new file mode 100644 index 000000000..e69de29bb diff --git a/bazel/proto/rules.bzl b/bazel/proto/rules.bzl new file mode 100644 index 000000000..07e0136bf --- /dev/null +++ b/bazel/proto/rules.bzl @@ -0,0 +1,87 @@ +""" +Rules for generating Go source files from proto files. + +based on https://github.com/bazelbuild/rules_go/issues/2111#issuecomment-1355927231 +""" + +load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") +load("@io_bazel_rules_go//go:def.bzl", "GoLibrary", "go_context") +load("@io_bazel_rules_go//proto:compiler.bzl", "GoProtoCompiler") + +def _output_go_library_srcs_impl(ctx): + go = go_context(ctx) + + srcs_of_library = [] + importpath = "" + for src in ctx.attr.deps: + lib = src[GoLibrary] + go_src = go.library_to_source(go, ctx.attr, lib, False) + if importpath and lib.importpath != importpath: + fail( + "importpath of all deps must match, got {} and {}", + importpath, + lib.importpath, + ) + importpath = lib.importpath + srcs_of_library.extend(go_src.srcs) + + if len(srcs_of_library) != 1: + fail("expected exactly one src for library, got {}", len(srcs_of_library)) + + if not ctx.attr.out: + fail("must specify out for now") + + # Run a command to copy the src file to the out location. + _copy(ctx, srcs_of_library[0], ctx.outputs.out) + +def _copy(ctx, in_file, out_file): + # based on https://github.com/bazelbuild/examples/blob/main/rules/shell_command/rules.bzl + ctx.actions.run_shell( + # Input files visible to the action. + inputs = [in_file], + # Output files that must be created by the action. + outputs = [out_file], + progress_message = "Copying {} to {}".format(in_file.path, out_file.path), + arguments = [in_file.path, out_file.path], + command = """cp "$1" "$2" """, + ) + +output_go_library_srcs = rule( + implementation = _output_go_library_srcs_impl, + attrs = { + "compiler": attr.label( + providers = [GoProtoCompiler], + default = "@io_bazel_rules_go//proto:go_proto", + ), + "deps": attr.label_list( + providers = [GoLibrary], + aspects = [], + ), + "out": attr.output( + doc = ("Name of output .go file. If not specified, the file name " + + "of the generated source file will be used."), + mandatory = False, + ), + "_go_context_data": attr.label( + default = "@io_bazel_rules_go//:go_context_data", + ), + }, + toolchains = ["@io_bazel_rules_go//go:toolchain"], +) + +def write_go_proto_srcs(name, go_proto_library, src, visibility = None): + generated_src = "__generated_" + src + output_go_library_srcs( + name = name + "_generated", + deps = [go_proto_library], + out = generated_src, + visibility = ["//visibility:private"], + ) + + write_source_files( + name = name, + files = { + src: generated_src, + }, + visibility = visibility, + ) diff --git a/bootstrapper/initproto/BUILD.bazel b/bootstrapper/initproto/BUILD.bazel index c0f214620..dcf0c80e2 100644 --- a/bootstrapper/initproto/BUILD.bazel +++ b/bootstrapper/initproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "initproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/bootstrapper/initproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "init.pb.go", + go_proto_library = ":initproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/bootstrapper/initproto/init.pb.go b/bootstrapper/initproto/init.pb.go index 7908109c0..40739b2ed 100644 --- a/bootstrapper/initproto/init.pb.go +++ b/bootstrapper/initproto/init.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: init.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: bootstrapper/initproto/init.proto package initproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,29 +29,21 @@ type InitRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // repeated string autoscaling_node_groups = 1; removed - // bytes master_secret = 2; removed - KmsUri string `protobuf:"bytes,3,opt,name=kms_uri,json=kmsUri,proto3" json:"kms_uri,omitempty"` - StorageUri string `protobuf:"bytes,4,opt,name=storage_uri,json=storageUri,proto3" json:"storage_uri,omitempty"` - // string key_encryption_key_id = 5; removed - // bool use_existing_kek = 6; removed - CloudServiceAccountUri string `protobuf:"bytes,7,opt,name=cloud_service_account_uri,json=cloudServiceAccountUri,proto3" json:"cloud_service_account_uri,omitempty"` - KubernetesVersion string `protobuf:"bytes,8,opt,name=kubernetes_version,json=kubernetesVersion,proto3" json:"kubernetes_version,omitempty"` - // repeated SSHUserKey ssh_user_keys = 9; removed - // bytes salt = 10; removed - HelmDeployments []byte `protobuf:"bytes,11,opt,name=helm_deployments,json=helmDeployments,proto3" json:"helm_deployments,omitempty"` - // repeated uint32 enforced_pcrs = 12; removed - // bool enforce_idkeydigest = 13; removed - ConformanceMode bool `protobuf:"varint,14,opt,name=conformance_mode,json=conformanceMode,proto3" json:"conformance_mode,omitempty"` - KubernetesComponents []*KubernetesComponent `protobuf:"bytes,15,rep,name=kubernetes_components,json=kubernetesComponents,proto3" json:"kubernetes_components,omitempty"` - InitSecret []byte `protobuf:"bytes,16,opt,name=init_secret,json=initSecret,proto3" json:"init_secret,omitempty"` - ClusterName string `protobuf:"bytes,17,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + KmsUri string `protobuf:"bytes,3,opt,name=kms_uri,json=kmsUri,proto3" json:"kms_uri,omitempty"` + StorageUri string `protobuf:"bytes,4,opt,name=storage_uri,json=storageUri,proto3" json:"storage_uri,omitempty"` + CloudServiceAccountUri string `protobuf:"bytes,7,opt,name=cloud_service_account_uri,json=cloudServiceAccountUri,proto3" json:"cloud_service_account_uri,omitempty"` + KubernetesVersion string `protobuf:"bytes,8,opt,name=kubernetes_version,json=kubernetesVersion,proto3" json:"kubernetes_version,omitempty"` + HelmDeployments []byte `protobuf:"bytes,11,opt,name=helm_deployments,json=helmDeployments,proto3" json:"helm_deployments,omitempty"` + ConformanceMode bool `protobuf:"varint,14,opt,name=conformance_mode,json=conformanceMode,proto3" json:"conformance_mode,omitempty"` + KubernetesComponents []*KubernetesComponent `protobuf:"bytes,15,rep,name=kubernetes_components,json=kubernetesComponents,proto3" json:"kubernetes_components,omitempty"` + InitSecret []byte `protobuf:"bytes,16,opt,name=init_secret,json=initSecret,proto3" json:"init_secret,omitempty"` + ClusterName string `protobuf:"bytes,17,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` } func (x *InitRequest) Reset() { *x = InitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_init_proto_msgTypes[0] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -60,7 +56,7 @@ func (x *InitRequest) String() string { func (*InitRequest) ProtoMessage() {} func (x *InitRequest) ProtoReflect() protoreflect.Message { - mi := &file_init_proto_msgTypes[0] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73,7 +69,7 @@ func (x *InitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. func (*InitRequest) Descriptor() ([]byte, []int) { - return file_init_proto_rawDescGZIP(), []int{0} + return file_bootstrapper_initproto_init_proto_rawDescGZIP(), []int{0} } func (x *InitRequest) GetKmsUri() string { @@ -152,7 +148,7 @@ type InitResponse struct { func (x *InitResponse) Reset() { *x = InitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_init_proto_msgTypes[1] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -165,7 +161,7 @@ func (x *InitResponse) String() string { func (*InitResponse) ProtoMessage() {} func (x *InitResponse) ProtoReflect() protoreflect.Message { - mi := &file_init_proto_msgTypes[1] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -178,7 +174,7 @@ func (x *InitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. func (*InitResponse) Descriptor() ([]byte, []int) { - return file_init_proto_rawDescGZIP(), []int{1} + return file_bootstrapper_initproto_init_proto_rawDescGZIP(), []int{1} } func (x *InitResponse) GetKubeconfig() []byte { @@ -216,7 +212,7 @@ type KubernetesComponent struct { func (x *KubernetesComponent) Reset() { *x = KubernetesComponent{} if protoimpl.UnsafeEnabled { - mi := &file_init_proto_msgTypes[2] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -229,7 +225,7 @@ func (x *KubernetesComponent) String() string { func (*KubernetesComponent) ProtoMessage() {} func (x *KubernetesComponent) ProtoReflect() protoreflect.Message { - mi := &file_init_proto_msgTypes[2] + mi := &file_bootstrapper_initproto_init_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -242,7 +238,7 @@ func (x *KubernetesComponent) ProtoReflect() protoreflect.Message { // Deprecated: Use KubernetesComponent.ProtoReflect.Descriptor instead. func (*KubernetesComponent) Descriptor() ([]byte, []int) { - return file_init_proto_rawDescGZIP(), []int{2} + return file_bootstrapper_initproto_init_proto_rawDescGZIP(), []int{2} } func (x *KubernetesComponent) GetUrl() string { @@ -273,80 +269,81 @@ func (x *KubernetesComponent) GetExtract() bool { return false } -var File_init_proto protoreflect.FileDescriptor +var File_bootstrapper_initproto_init_proto protoreflect.FileDescriptor -var file_init_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x69, 0x6e, - 0x69, 0x74, 0x22, 0x9b, 0x03, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x55, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x72, 0x69, 0x12, 0x39, 0x0a, 0x19, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x16, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x2d, 0x0a, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x68, 0x65, 0x6c, 0x6d, 0x5f, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0f, 0x68, 0x65, 0x6c, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6f, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x15, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0x68, 0x0a, 0x0c, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x78, 0x0a, 0x13, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x32, 0x34, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x2d, 0x0a, 0x04, 0x49, - 0x6e, 0x69, 0x74, 0x12, 0x11, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x49, 0x6e, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, - 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var file_bootstrapper_initproto_init_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x69, + 0x6e, 0x69, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x22, 0x9b, 0x03, 0x0a, 0x0b, 0x49, 0x6e, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x6d, 0x73, + 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x55, + 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, + 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x55, 0x72, 0x69, 0x12, 0x39, 0x0a, 0x19, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x2d, + 0x0a, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x75, 0x62, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, + 0x10, 0x68, 0x65, 0x6c, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x68, 0x65, 0x6c, 0x6d, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x0c, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6b, 0x75, 0x62, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x22, 0x78, 0x0a, 0x13, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, + 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0x34, 0x0a, 0x03, 0x41, + 0x50, 0x49, 0x12, 0x2d, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x11, 0x2e, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_init_proto_rawDescOnce sync.Once - file_init_proto_rawDescData = file_init_proto_rawDesc + file_bootstrapper_initproto_init_proto_rawDescOnce sync.Once + file_bootstrapper_initproto_init_proto_rawDescData = file_bootstrapper_initproto_init_proto_rawDesc ) -func file_init_proto_rawDescGZIP() []byte { - file_init_proto_rawDescOnce.Do(func() { - file_init_proto_rawDescData = protoimpl.X.CompressGZIP(file_init_proto_rawDescData) +func file_bootstrapper_initproto_init_proto_rawDescGZIP() []byte { + file_bootstrapper_initproto_init_proto_rawDescOnce.Do(func() { + file_bootstrapper_initproto_init_proto_rawDescData = protoimpl.X.CompressGZIP(file_bootstrapper_initproto_init_proto_rawDescData) }) - return file_init_proto_rawDescData + return file_bootstrapper_initproto_init_proto_rawDescData } -var file_init_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_init_proto_goTypes = []interface{}{ +var file_bootstrapper_initproto_init_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_bootstrapper_initproto_init_proto_goTypes = []interface{}{ (*InitRequest)(nil), // 0: init.InitRequest (*InitResponse)(nil), // 1: init.InitResponse (*KubernetesComponent)(nil), // 2: init.KubernetesComponent } -var file_init_proto_depIdxs = []int32{ +var file_bootstrapper_initproto_init_proto_depIdxs = []int32{ 2, // 0: init.InitRequest.kubernetes_components:type_name -> init.KubernetesComponent 0, // 1: init.API.Init:input_type -> init.InitRequest 1, // 2: init.API.Init:output_type -> init.InitResponse @@ -357,13 +354,13 @@ var file_init_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_init_proto_init() } -func file_init_proto_init() { - if File_init_proto != nil { +func init() { file_bootstrapper_initproto_init_proto_init() } +func file_bootstrapper_initproto_init_proto_init() { + if File_bootstrapper_initproto_init_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_init_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_bootstrapper_initproto_init_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitRequest); i { case 0: return &v.state @@ -375,7 +372,7 @@ func file_init_proto_init() { return nil } } - file_init_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_bootstrapper_initproto_init_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitResponse); i { case 0: return &v.state @@ -387,7 +384,7 @@ func file_init_proto_init() { return nil } } - file_init_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_bootstrapper_initproto_init_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KubernetesComponent); i { case 0: return &v.state @@ -404,18 +401,98 @@ func file_init_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_init_proto_rawDesc, + RawDescriptor: file_bootstrapper_initproto_init_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_init_proto_goTypes, - DependencyIndexes: file_init_proto_depIdxs, - MessageInfos: file_init_proto_msgTypes, + GoTypes: file_bootstrapper_initproto_init_proto_goTypes, + DependencyIndexes: file_bootstrapper_initproto_init_proto_depIdxs, + MessageInfos: file_bootstrapper_initproto_init_proto_msgTypes, }.Build() - File_init_proto = out.File - file_init_proto_rawDesc = nil - file_init_proto_goTypes = nil - file_init_proto_depIdxs = nil + File_bootstrapper_initproto_init_proto = out.File + file_bootstrapper_initproto_init_proto_rawDesc = nil + file_bootstrapper_initproto_init_proto_goTypes = nil + file_bootstrapper_initproto_init_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// APIClient is the client API for API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIClient interface { + Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) +} + +type aPIClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIClient(cc grpc.ClientConnInterface) APIClient { + return &aPIClient{cc} +} + +func (c *aPIClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) { + out := new(InitResponse) + err := c.cc.Invoke(ctx, "/init.API/Init", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIServer is the server API for API service. +type APIServer interface { + Init(context.Context, *InitRequest) (*InitResponse, error) +} + +// UnimplementedAPIServer can be embedded to have forward compatible implementations. +type UnimplementedAPIServer struct { +} + +func (*UnimplementedAPIServer) Init(context.Context, *InitRequest) (*InitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") +} + +func RegisterAPIServer(s *grpc.Server, srv APIServer) { + s.RegisterService(&_API_serviceDesc, srv) +} + +func _API_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).Init(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/init.API/Init", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).Init(ctx, req.(*InitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _API_serviceDesc = grpc.ServiceDesc{ + ServiceName: "init.API", + HandlerType: (*APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Init", + Handler: _API_Init_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "bootstrapper/initproto/init.proto", } diff --git a/bootstrapper/initproto/init_grpc.pb.go b/bootstrapper/initproto/init_grpc.pb.go deleted file mode 100644 index 85eaaf56c..000000000 --- a/bootstrapper/initproto/init_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: init.proto - -package initproto - -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 - -// APIClient is the client API for API 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 APIClient interface { - Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) -} - -type aPIClient struct { - cc grpc.ClientConnInterface -} - -func NewAPIClient(cc grpc.ClientConnInterface) APIClient { - return &aPIClient{cc} -} - -func (c *aPIClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) { - out := new(InitResponse) - err := c.cc.Invoke(ctx, "/init.API/Init", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// APIServer is the server API for API service. -// All implementations must embed UnimplementedAPIServer -// for forward compatibility -type APIServer interface { - Init(context.Context, *InitRequest) (*InitResponse, error) - mustEmbedUnimplementedAPIServer() -} - -// UnimplementedAPIServer must be embedded to have forward compatible implementations. -type UnimplementedAPIServer struct { -} - -func (UnimplementedAPIServer) Init(context.Context, *InitRequest) (*InitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") -} -func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {} - -// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to APIServer will -// result in compilation errors. -type UnsafeAPIServer interface { - mustEmbedUnimplementedAPIServer() -} - -func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) { - s.RegisterService(&API_ServiceDesc, srv) -} - -func _API_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).Init(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/init.API/Init", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).Init(ctx, req.(*InitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// API_ServiceDesc is the grpc.ServiceDesc for API service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var API_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "init.API", - HandlerType: (*APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Init", - Handler: _API_Init_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "init.proto", -} diff --git a/debugd/service/BUILD.bazel b/debugd/service/BUILD.bazel index 89bcc0cc3..d199f8880 100644 --- a/debugd/service/BUILD.bazel +++ b/debugd/service/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "service_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/debugd/service", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "debugd.pb.go", + go_proto_library = ":service_go_proto", + visibility = ["//visibility:public"], +) diff --git a/debugd/service/debugd.pb.go b/debugd/service/debugd.pb.go index 69ac46f8b..9c4108278 100644 --- a/debugd/service/debugd.pb.go +++ b/debugd/service/debugd.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: debugd.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: debugd/service/debugd.proto package service import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -50,11 +54,11 @@ func (x SetInfoStatus) String() string { } func (SetInfoStatus) Descriptor() protoreflect.EnumDescriptor { - return file_debugd_proto_enumTypes[0].Descriptor() + return file_debugd_service_debugd_proto_enumTypes[0].Descriptor() } func (SetInfoStatus) Type() protoreflect.EnumType { - return &file_debugd_proto_enumTypes[0] + return &file_debugd_service_debugd_proto_enumTypes[0] } func (x SetInfoStatus) Number() protoreflect.EnumNumber { @@ -63,7 +67,7 @@ func (x SetInfoStatus) Number() protoreflect.EnumNumber { // Deprecated: Use SetInfoStatus.Descriptor instead. func (SetInfoStatus) EnumDescriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{0} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{0} } type UploadFilesStatus int32 @@ -105,11 +109,11 @@ func (x UploadFilesStatus) String() string { } func (UploadFilesStatus) Descriptor() protoreflect.EnumDescriptor { - return file_debugd_proto_enumTypes[1].Descriptor() + return file_debugd_service_debugd_proto_enumTypes[1].Descriptor() } func (UploadFilesStatus) Type() protoreflect.EnumType { - return &file_debugd_proto_enumTypes[1] + return &file_debugd_service_debugd_proto_enumTypes[1] } func (x UploadFilesStatus) Number() protoreflect.EnumNumber { @@ -118,7 +122,7 @@ func (x UploadFilesStatus) Number() protoreflect.EnumNumber { // Deprecated: Use UploadFilesStatus.Descriptor instead. func (UploadFilesStatus) EnumDescriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{1} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{1} } type UploadSystemdServiceUnitsStatus int32 @@ -151,11 +155,11 @@ func (x UploadSystemdServiceUnitsStatus) String() string { } func (UploadSystemdServiceUnitsStatus) Descriptor() protoreflect.EnumDescriptor { - return file_debugd_proto_enumTypes[2].Descriptor() + return file_debugd_service_debugd_proto_enumTypes[2].Descriptor() } func (UploadSystemdServiceUnitsStatus) Type() protoreflect.EnumType { - return &file_debugd_proto_enumTypes[2] + return &file_debugd_service_debugd_proto_enumTypes[2] } func (x UploadSystemdServiceUnitsStatus) Number() protoreflect.EnumNumber { @@ -164,7 +168,7 @@ func (x UploadSystemdServiceUnitsStatus) Number() protoreflect.EnumNumber { // Deprecated: Use UploadSystemdServiceUnitsStatus.Descriptor instead. func (UploadSystemdServiceUnitsStatus) EnumDescriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{2} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{2} } type SetInfoRequest struct { @@ -178,7 +182,7 @@ type SetInfoRequest struct { func (x *SetInfoRequest) Reset() { *x = SetInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[0] + mi := &file_debugd_service_debugd_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -191,7 +195,7 @@ func (x *SetInfoRequest) String() string { func (*SetInfoRequest) ProtoMessage() {} func (x *SetInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[0] + mi := &file_debugd_service_debugd_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -204,7 +208,7 @@ func (x *SetInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetInfoRequest.ProtoReflect.Descriptor instead. func (*SetInfoRequest) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{0} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{0} } func (x *SetInfoRequest) GetInfo() []*Info { @@ -225,7 +229,7 @@ type SetInfoResponse struct { func (x *SetInfoResponse) Reset() { *x = SetInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[1] + mi := &file_debugd_service_debugd_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -238,7 +242,7 @@ func (x *SetInfoResponse) String() string { func (*SetInfoResponse) ProtoMessage() {} func (x *SetInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[1] + mi := &file_debugd_service_debugd_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -251,7 +255,7 @@ func (x *SetInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetInfoResponse.ProtoReflect.Descriptor instead. func (*SetInfoResponse) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{1} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{1} } func (x *SetInfoResponse) GetStatus() SetInfoStatus { @@ -270,7 +274,7 @@ type GetInfoRequest struct { func (x *GetInfoRequest) Reset() { *x = GetInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[2] + mi := &file_debugd_service_debugd_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -283,7 +287,7 @@ func (x *GetInfoRequest) String() string { func (*GetInfoRequest) ProtoMessage() {} func (x *GetInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[2] + mi := &file_debugd_service_debugd_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -296,7 +300,7 @@ func (x *GetInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead. func (*GetInfoRequest) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{2} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{2} } type GetInfoResponse struct { @@ -310,7 +314,7 @@ type GetInfoResponse struct { func (x *GetInfoResponse) Reset() { *x = GetInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[3] + mi := &file_debugd_service_debugd_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -323,7 +327,7 @@ func (x *GetInfoResponse) String() string { func (*GetInfoResponse) ProtoMessage() {} func (x *GetInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[3] + mi := &file_debugd_service_debugd_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -336,7 +340,7 @@ func (x *GetInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead. func (*GetInfoResponse) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{3} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{3} } func (x *GetInfoResponse) GetInfo() []*Info { @@ -358,7 +362,7 @@ type Info struct { func (x *Info) Reset() { *x = Info{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[4] + mi := &file_debugd_service_debugd_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -371,7 +375,7 @@ func (x *Info) String() string { func (*Info) ProtoMessage() {} func (x *Info) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[4] + mi := &file_debugd_service_debugd_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -384,7 +388,7 @@ func (x *Info) ProtoReflect() protoreflect.Message { // Deprecated: Use Info.ProtoReflect.Descriptor instead. func (*Info) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{4} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{4} } func (x *Info) GetKey() string { @@ -410,7 +414,7 @@ type DownloadFilesRequest struct { func (x *DownloadFilesRequest) Reset() { *x = DownloadFilesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[5] + mi := &file_debugd_service_debugd_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -423,7 +427,7 @@ func (x *DownloadFilesRequest) String() string { func (*DownloadFilesRequest) ProtoMessage() {} func (x *DownloadFilesRequest) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[5] + mi := &file_debugd_service_debugd_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -436,7 +440,7 @@ func (x *DownloadFilesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DownloadFilesRequest.ProtoReflect.Descriptor instead. func (*DownloadFilesRequest) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{5} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{5} } type FileTransferMessage struct { @@ -454,7 +458,7 @@ type FileTransferMessage struct { func (x *FileTransferMessage) Reset() { *x = FileTransferMessage{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[6] + mi := &file_debugd_service_debugd_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -467,7 +471,7 @@ func (x *FileTransferMessage) String() string { func (*FileTransferMessage) ProtoMessage() {} func (x *FileTransferMessage) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[6] + mi := &file_debugd_service_debugd_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -480,7 +484,7 @@ func (x *FileTransferMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use FileTransferMessage.ProtoReflect.Descriptor instead. func (*FileTransferMessage) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{6} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{6} } func (m *FileTransferMessage) GetKind() isFileTransferMessage_Kind { @@ -509,11 +513,11 @@ type isFileTransferMessage_Kind interface { } type FileTransferMessage_Header struct { - Header *FileTransferHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` // start of transfer + Header *FileTransferHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` } type FileTransferMessage_Chunk struct { - Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"` // file content as chunks + Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"` } func (*FileTransferMessage_Header) isFileTransferMessage_Kind() {} @@ -533,7 +537,7 @@ type FileTransferHeader struct { func (x *FileTransferHeader) Reset() { *x = FileTransferHeader{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[7] + mi := &file_debugd_service_debugd_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -546,7 +550,7 @@ func (x *FileTransferHeader) String() string { func (*FileTransferHeader) ProtoMessage() {} func (x *FileTransferHeader) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[7] + mi := &file_debugd_service_debugd_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -559,7 +563,7 @@ func (x *FileTransferHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use FileTransferHeader.ProtoReflect.Descriptor instead. func (*FileTransferHeader) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{7} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{7} } func (x *FileTransferHeader) GetTargetPath() string { @@ -595,7 +599,7 @@ type Chunk struct { func (x *Chunk) Reset() { *x = Chunk{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[8] + mi := &file_debugd_service_debugd_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -608,7 +612,7 @@ func (x *Chunk) String() string { func (*Chunk) ProtoMessage() {} func (x *Chunk) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[8] + mi := &file_debugd_service_debugd_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -621,7 +625,7 @@ func (x *Chunk) ProtoReflect() protoreflect.Message { // Deprecated: Use Chunk.ProtoReflect.Descriptor instead. func (*Chunk) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{8} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{8} } func (x *Chunk) GetContent() []byte { @@ -649,7 +653,7 @@ type UploadFilesResponse struct { func (x *UploadFilesResponse) Reset() { *x = UploadFilesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[9] + mi := &file_debugd_service_debugd_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -662,7 +666,7 @@ func (x *UploadFilesResponse) String() string { func (*UploadFilesResponse) ProtoMessage() {} func (x *UploadFilesResponse) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[9] + mi := &file_debugd_service_debugd_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -675,7 +679,7 @@ func (x *UploadFilesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UploadFilesResponse.ProtoReflect.Descriptor instead. func (*UploadFilesResponse) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{9} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{9} } func (x *UploadFilesResponse) GetStatus() UploadFilesStatus { @@ -697,7 +701,7 @@ type ServiceUnit struct { func (x *ServiceUnit) Reset() { *x = ServiceUnit{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[10] + mi := &file_debugd_service_debugd_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -710,7 +714,7 @@ func (x *ServiceUnit) String() string { func (*ServiceUnit) ProtoMessage() {} func (x *ServiceUnit) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[10] + mi := &file_debugd_service_debugd_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -723,7 +727,7 @@ func (x *ServiceUnit) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceUnit.ProtoReflect.Descriptor instead. func (*ServiceUnit) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{10} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{10} } func (x *ServiceUnit) GetName() string { @@ -751,7 +755,7 @@ type UploadSystemdServiceUnitsRequest struct { func (x *UploadSystemdServiceUnitsRequest) Reset() { *x = UploadSystemdServiceUnitsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[11] + mi := &file_debugd_service_debugd_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -764,7 +768,7 @@ func (x *UploadSystemdServiceUnitsRequest) String() string { func (*UploadSystemdServiceUnitsRequest) ProtoMessage() {} func (x *UploadSystemdServiceUnitsRequest) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[11] + mi := &file_debugd_service_debugd_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -777,7 +781,7 @@ func (x *UploadSystemdServiceUnitsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UploadSystemdServiceUnitsRequest.ProtoReflect.Descriptor instead. func (*UploadSystemdServiceUnitsRequest) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{11} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{11} } func (x *UploadSystemdServiceUnitsRequest) GetUnits() []*ServiceUnit { @@ -798,7 +802,7 @@ type UploadSystemdServiceUnitsResponse struct { func (x *UploadSystemdServiceUnitsResponse) Reset() { *x = UploadSystemdServiceUnitsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_debugd_proto_msgTypes[12] + mi := &file_debugd_service_debugd_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -811,7 +815,7 @@ func (x *UploadSystemdServiceUnitsResponse) String() string { func (*UploadSystemdServiceUnitsResponse) ProtoMessage() {} func (x *UploadSystemdServiceUnitsResponse) ProtoReflect() protoreflect.Message { - mi := &file_debugd_proto_msgTypes[12] + mi := &file_debugd_service_debugd_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -824,7 +828,7 @@ func (x *UploadSystemdServiceUnitsResponse) ProtoReflect() protoreflect.Message // Deprecated: Use UploadSystemdServiceUnitsResponse.ProtoReflect.Descriptor instead. func (*UploadSystemdServiceUnitsResponse) Descriptor() ([]byte, []int) { - return file_debugd_proto_rawDescGZIP(), []int{12} + return file_debugd_service_debugd_proto_rawDescGZIP(), []int{12} } func (x *UploadSystemdServiceUnitsResponse) GetStatus() UploadSystemdServiceUnitsStatus { @@ -834,137 +838,138 @@ func (x *UploadSystemdServiceUnitsResponse) GetStatus() UploadSystemdServiceUnit return UploadSystemdServiceUnitsStatus_UPLOAD_SYSTEMD_SERVICE_UNITS_SUCCESS } -var File_debugd_proto protoreflect.FileDescriptor +var File_debugd_service_debugd_proto protoreflect.FileDescriptor -var file_debugd_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x22, 0x32, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x40, 0x0a, 0x0f, 0x53, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x10, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0x2e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x46, - 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, - 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x42, - 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1e, - 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, - 0x64, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, - 0x74, 0x22, 0x35, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x13, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x19, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 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, 0x22, 0x4d, 0x0a, 0x20, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, +var file_debugd_service_debugd_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x64, 0x22, 0x32, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x40, 0x0a, 0x0f, 0x53, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x22, 0x2e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x46, 0x69, + 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x06, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x55, 0x6e, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x22, 0x35, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x13, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, + 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 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, + 0x22, 0x4d, 0x0a, 0x20, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, + 0x64, 0x0a, 0x21, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x3f, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x4e, + 0x46, 0x4f, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, + 0x53, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, + 0x5f, 0x53, 0x45, 0x54, 0x10, 0x01, 0x2a, 0xb1, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, + 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, + 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, + 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x53, + 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x50, 0x4c, 0x4f, + 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, + 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x55, + 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x52, + 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x75, 0x0a, 0x1f, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, + 0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, + 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, + 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, + 0x01, 0x32, 0x94, 0x03, 0x0a, 0x06, 0x44, 0x65, 0x62, 0x75, 0x67, 0x64, 0x12, 0x3c, 0x0a, 0x07, + 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, + 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x18, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, + 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, - 0x22, 0x64, 0x0a, 0x21, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x3f, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x54, 0x5f, 0x49, - 0x4e, 0x46, 0x4f, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, - 0x14, 0x53, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, - 0x59, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x01, 0x2a, 0xb1, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, - 0x14, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x53, 0x55, - 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x50, 0x4c, 0x4f, 0x41, - 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x50, 0x4c, 0x4f, 0x41, - 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, - 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x50, 0x4c, - 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, - 0x59, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, - 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x5f, 0x53, 0x54, 0x41, - 0x52, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x75, 0x0a, 0x1f, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, - 0x0a, 0x24, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, - 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, 0x55, 0x50, 0x4c, 0x4f, - 0x41, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, - 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x10, 0x01, 0x32, 0x94, 0x03, 0x0a, 0x06, 0x44, 0x65, 0x62, 0x75, 0x67, 0x64, 0x12, 0x3c, 0x0a, - 0x07, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x64, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x64, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, - 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x18, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, - 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, - 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, + 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_debugd_proto_rawDescOnce sync.Once - file_debugd_proto_rawDescData = file_debugd_proto_rawDesc + file_debugd_service_debugd_proto_rawDescOnce sync.Once + file_debugd_service_debugd_proto_rawDescData = file_debugd_service_debugd_proto_rawDesc ) -func file_debugd_proto_rawDescGZIP() []byte { - file_debugd_proto_rawDescOnce.Do(func() { - file_debugd_proto_rawDescData = protoimpl.X.CompressGZIP(file_debugd_proto_rawDescData) +func file_debugd_service_debugd_proto_rawDescGZIP() []byte { + file_debugd_service_debugd_proto_rawDescOnce.Do(func() { + file_debugd_service_debugd_proto_rawDescData = protoimpl.X.CompressGZIP(file_debugd_service_debugd_proto_rawDescData) }) - return file_debugd_proto_rawDescData + return file_debugd_service_debugd_proto_rawDescData } -var file_debugd_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_debugd_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_debugd_proto_goTypes = []interface{}{ +var file_debugd_service_debugd_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_debugd_service_debugd_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_debugd_service_debugd_proto_goTypes = []interface{}{ (SetInfoStatus)(0), // 0: debugd.SetInfoStatus (UploadFilesStatus)(0), // 1: debugd.UploadFilesStatus (UploadSystemdServiceUnitsStatus)(0), // 2: debugd.UploadSystemdServiceUnitsStatus @@ -982,7 +987,7 @@ var file_debugd_proto_goTypes = []interface{}{ (*UploadSystemdServiceUnitsRequest)(nil), // 14: debugd.UploadSystemdServiceUnitsRequest (*UploadSystemdServiceUnitsResponse)(nil), // 15: debugd.UploadSystemdServiceUnitsResponse } -var file_debugd_proto_depIdxs = []int32{ +var file_debugd_service_debugd_proto_depIdxs = []int32{ 7, // 0: debugd.SetInfoRequest.info:type_name -> debugd.Info 0, // 1: debugd.SetInfoResponse.status:type_name -> debugd.SetInfoStatus 7, // 2: debugd.GetInfoResponse.info:type_name -> debugd.Info @@ -1008,13 +1013,13 @@ var file_debugd_proto_depIdxs = []int32{ 0, // [0:8] is the sub-list for field type_name } -func init() { file_debugd_proto_init() } -func file_debugd_proto_init() { - if File_debugd_proto != nil { +func init() { file_debugd_service_debugd_proto_init() } +func file_debugd_service_debugd_proto_init() { + if File_debugd_service_debugd_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_debugd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetInfoRequest); i { case 0: return &v.state @@ -1026,7 +1031,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetInfoResponse); i { case 0: return &v.state @@ -1038,7 +1043,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInfoRequest); i { case 0: return &v.state @@ -1050,7 +1055,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInfoResponse); i { case 0: return &v.state @@ -1062,7 +1067,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Info); i { case 0: return &v.state @@ -1074,7 +1079,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DownloadFilesRequest); i { case 0: return &v.state @@ -1086,7 +1091,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileTransferMessage); i { case 0: return &v.state @@ -1098,7 +1103,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileTransferHeader); i { case 0: return &v.state @@ -1110,7 +1115,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Chunk); i { case 0: return &v.state @@ -1122,7 +1127,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadFilesResponse); i { case 0: return &v.state @@ -1134,7 +1139,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceUnit); i { case 0: return &v.state @@ -1146,7 +1151,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadSystemdServiceUnitsRequest); i { case 0: return &v.state @@ -1158,7 +1163,7 @@ func file_debugd_proto_init() { return nil } } - file_debugd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_debugd_service_debugd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadSystemdServiceUnitsResponse); i { case 0: return &v.state @@ -1171,28 +1176,314 @@ func file_debugd_proto_init() { } } } - file_debugd_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_debugd_service_debugd_proto_msgTypes[6].OneofWrappers = []interface{}{ (*FileTransferMessage_Header)(nil), (*FileTransferMessage_Chunk)(nil), } - file_debugd_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_debugd_service_debugd_proto_msgTypes[7].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_debugd_proto_rawDesc, + RawDescriptor: file_debugd_service_debugd_proto_rawDesc, NumEnums: 3, NumMessages: 13, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_debugd_proto_goTypes, - DependencyIndexes: file_debugd_proto_depIdxs, - EnumInfos: file_debugd_proto_enumTypes, - MessageInfos: file_debugd_proto_msgTypes, + GoTypes: file_debugd_service_debugd_proto_goTypes, + DependencyIndexes: file_debugd_service_debugd_proto_depIdxs, + EnumInfos: file_debugd_service_debugd_proto_enumTypes, + MessageInfos: file_debugd_service_debugd_proto_msgTypes, }.Build() - File_debugd_proto = out.File - file_debugd_proto_rawDesc = nil - file_debugd_proto_goTypes = nil - file_debugd_proto_depIdxs = nil + File_debugd_service_debugd_proto = out.File + file_debugd_service_debugd_proto_rawDesc = nil + file_debugd_service_debugd_proto_goTypes = nil + file_debugd_service_debugd_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DebugdClient is the client API for Debugd service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DebugdClient interface { + SetInfo(ctx context.Context, in *SetInfoRequest, opts ...grpc.CallOption) (*SetInfoResponse, error) + GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) + UploadFiles(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadFilesClient, error) + DownloadFiles(ctx context.Context, in *DownloadFilesRequest, opts ...grpc.CallOption) (Debugd_DownloadFilesClient, error) + UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) +} + +type debugdClient struct { + cc grpc.ClientConnInterface +} + +func NewDebugdClient(cc grpc.ClientConnInterface) DebugdClient { + return &debugdClient{cc} +} + +func (c *debugdClient) SetInfo(ctx context.Context, in *SetInfoRequest, opts ...grpc.CallOption) (*SetInfoResponse, error) { + out := new(SetInfoResponse) + err := c.cc.Invoke(ctx, "/debugd.Debugd/SetInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *debugdClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { + out := new(GetInfoResponse) + err := c.cc.Invoke(ctx, "/debugd.Debugd/GetInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *debugdClient) UploadFiles(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadFilesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Debugd_serviceDesc.Streams[0], "/debugd.Debugd/UploadFiles", opts...) + if err != nil { + return nil, err + } + x := &debugdUploadFilesClient{stream} + return x, nil +} + +type Debugd_UploadFilesClient interface { + Send(*FileTransferMessage) error + CloseAndRecv() (*UploadFilesResponse, error) + grpc.ClientStream +} + +type debugdUploadFilesClient struct { + grpc.ClientStream +} + +func (x *debugdUploadFilesClient) Send(m *FileTransferMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *debugdUploadFilesClient) CloseAndRecv() (*UploadFilesResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(UploadFilesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *debugdClient) DownloadFiles(ctx context.Context, in *DownloadFilesRequest, opts ...grpc.CallOption) (Debugd_DownloadFilesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Debugd_serviceDesc.Streams[1], "/debugd.Debugd/DownloadFiles", opts...) + if err != nil { + return nil, err + } + x := &debugdDownloadFilesClient{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 Debugd_DownloadFilesClient interface { + Recv() (*FileTransferMessage, error) + grpc.ClientStream +} + +type debugdDownloadFilesClient struct { + grpc.ClientStream +} + +func (x *debugdDownloadFilesClient) Recv() (*FileTransferMessage, error) { + m := new(FileTransferMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *debugdClient) UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) { + out := new(UploadSystemdServiceUnitsResponse) + err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadSystemServiceUnits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DebugdServer is the server API for Debugd service. +type DebugdServer interface { + SetInfo(context.Context, *SetInfoRequest) (*SetInfoResponse, error) + GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) + UploadFiles(Debugd_UploadFilesServer) error + DownloadFiles(*DownloadFilesRequest, Debugd_DownloadFilesServer) error + UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) +} + +// UnimplementedDebugdServer can be embedded to have forward compatible implementations. +type UnimplementedDebugdServer struct { +} + +func (*UnimplementedDebugdServer) SetInfo(context.Context, *SetInfoRequest) (*SetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetInfo not implemented") +} +func (*UnimplementedDebugdServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") +} +func (*UnimplementedDebugdServer) UploadFiles(Debugd_UploadFilesServer) error { + return status.Errorf(codes.Unimplemented, "method UploadFiles not implemented") +} +func (*UnimplementedDebugdServer) DownloadFiles(*DownloadFilesRequest, Debugd_DownloadFilesServer) error { + return status.Errorf(codes.Unimplemented, "method DownloadFiles not implemented") +} +func (*UnimplementedDebugdServer) UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadSystemServiceUnits not implemented") +} + +func RegisterDebugdServer(s *grpc.Server, srv DebugdServer) { + s.RegisterService(&_Debugd_serviceDesc, srv) +} + +func _Debugd_SetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DebugdServer).SetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/debugd.Debugd/SetInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DebugdServer).SetInfo(ctx, req.(*SetInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Debugd_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DebugdServer).GetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/debugd.Debugd/GetInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DebugdServer).GetInfo(ctx, req.(*GetInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Debugd_UploadFiles_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(DebugdServer).UploadFiles(&debugdUploadFilesServer{stream}) +} + +type Debugd_UploadFilesServer interface { + SendAndClose(*UploadFilesResponse) error + Recv() (*FileTransferMessage, error) + grpc.ServerStream +} + +type debugdUploadFilesServer struct { + grpc.ServerStream +} + +func (x *debugdUploadFilesServer) SendAndClose(m *UploadFilesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *debugdUploadFilesServer) Recv() (*FileTransferMessage, error) { + m := new(FileTransferMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Debugd_DownloadFiles_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(DownloadFilesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DebugdServer).DownloadFiles(m, &debugdDownloadFilesServer{stream}) +} + +type Debugd_DownloadFilesServer interface { + Send(*FileTransferMessage) error + grpc.ServerStream +} + +type debugdDownloadFilesServer struct { + grpc.ServerStream +} + +func (x *debugdDownloadFilesServer) Send(m *FileTransferMessage) error { + return x.ServerStream.SendMsg(m) +} + +func _Debugd_UploadSystemServiceUnits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadSystemdServiceUnitsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DebugdServer).UploadSystemServiceUnits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/debugd.Debugd/UploadSystemServiceUnits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DebugdServer).UploadSystemServiceUnits(ctx, req.(*UploadSystemdServiceUnitsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Debugd_serviceDesc = grpc.ServiceDesc{ + ServiceName: "debugd.Debugd", + HandlerType: (*DebugdServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetInfo", + Handler: _Debugd_SetInfo_Handler, + }, + { + MethodName: "GetInfo", + Handler: _Debugd_GetInfo_Handler, + }, + { + MethodName: "UploadSystemServiceUnits", + Handler: _Debugd_UploadSystemServiceUnits_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "UploadFiles", + Handler: _Debugd_UploadFiles_Handler, + ClientStreams: true, + }, + { + StreamName: "DownloadFiles", + Handler: _Debugd_DownloadFiles_Handler, + ServerStreams: true, + }, + }, + Metadata: "debugd/service/debugd.proto", } diff --git a/debugd/service/debugd_grpc.pb.go b/debugd/service/debugd_grpc.pb.go deleted file mode 100644 index dabb6ba95..000000000 --- a/debugd/service/debugd_grpc.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: debugd.proto - -package service - -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 - -// DebugdClient is the client API for Debugd 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 DebugdClient interface { - SetInfo(ctx context.Context, in *SetInfoRequest, opts ...grpc.CallOption) (*SetInfoResponse, error) - GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) - UploadFiles(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadFilesClient, error) - DownloadFiles(ctx context.Context, in *DownloadFilesRequest, opts ...grpc.CallOption) (Debugd_DownloadFilesClient, error) - UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) -} - -type debugdClient struct { - cc grpc.ClientConnInterface -} - -func NewDebugdClient(cc grpc.ClientConnInterface) DebugdClient { - return &debugdClient{cc} -} - -func (c *debugdClient) SetInfo(ctx context.Context, in *SetInfoRequest, opts ...grpc.CallOption) (*SetInfoResponse, error) { - out := new(SetInfoResponse) - err := c.cc.Invoke(ctx, "/debugd.Debugd/SetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *debugdClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { - out := new(GetInfoResponse) - err := c.cc.Invoke(ctx, "/debugd.Debugd/GetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *debugdClient) UploadFiles(ctx context.Context, opts ...grpc.CallOption) (Debugd_UploadFilesClient, error) { - stream, err := c.cc.NewStream(ctx, &Debugd_ServiceDesc.Streams[0], "/debugd.Debugd/UploadFiles", opts...) - if err != nil { - return nil, err - } - x := &debugdUploadFilesClient{stream} - return x, nil -} - -type Debugd_UploadFilesClient interface { - Send(*FileTransferMessage) error - CloseAndRecv() (*UploadFilesResponse, error) - grpc.ClientStream -} - -type debugdUploadFilesClient struct { - grpc.ClientStream -} - -func (x *debugdUploadFilesClient) Send(m *FileTransferMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *debugdUploadFilesClient) CloseAndRecv() (*UploadFilesResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(UploadFilesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *debugdClient) DownloadFiles(ctx context.Context, in *DownloadFilesRequest, opts ...grpc.CallOption) (Debugd_DownloadFilesClient, error) { - stream, err := c.cc.NewStream(ctx, &Debugd_ServiceDesc.Streams[1], "/debugd.Debugd/DownloadFiles", opts...) - if err != nil { - return nil, err - } - x := &debugdDownloadFilesClient{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 Debugd_DownloadFilesClient interface { - Recv() (*FileTransferMessage, error) - grpc.ClientStream -} - -type debugdDownloadFilesClient struct { - grpc.ClientStream -} - -func (x *debugdDownloadFilesClient) Recv() (*FileTransferMessage, error) { - m := new(FileTransferMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *debugdClient) UploadSystemServiceUnits(ctx context.Context, in *UploadSystemdServiceUnitsRequest, opts ...grpc.CallOption) (*UploadSystemdServiceUnitsResponse, error) { - out := new(UploadSystemdServiceUnitsResponse) - err := c.cc.Invoke(ctx, "/debugd.Debugd/UploadSystemServiceUnits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DebugdServer is the server API for Debugd service. -// All implementations must embed UnimplementedDebugdServer -// for forward compatibility -type DebugdServer interface { - SetInfo(context.Context, *SetInfoRequest) (*SetInfoResponse, error) - GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) - UploadFiles(Debugd_UploadFilesServer) error - DownloadFiles(*DownloadFilesRequest, Debugd_DownloadFilesServer) error - UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) - mustEmbedUnimplementedDebugdServer() -} - -// UnimplementedDebugdServer must be embedded to have forward compatible implementations. -type UnimplementedDebugdServer struct { -} - -func (UnimplementedDebugdServer) SetInfo(context.Context, *SetInfoRequest) (*SetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetInfo not implemented") -} -func (UnimplementedDebugdServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") -} -func (UnimplementedDebugdServer) UploadFiles(Debugd_UploadFilesServer) error { - return status.Errorf(codes.Unimplemented, "method UploadFiles not implemented") -} -func (UnimplementedDebugdServer) DownloadFiles(*DownloadFilesRequest, Debugd_DownloadFilesServer) error { - return status.Errorf(codes.Unimplemented, "method DownloadFiles not implemented") -} -func (UnimplementedDebugdServer) UploadSystemServiceUnits(context.Context, *UploadSystemdServiceUnitsRequest) (*UploadSystemdServiceUnitsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadSystemServiceUnits not implemented") -} -func (UnimplementedDebugdServer) mustEmbedUnimplementedDebugdServer() {} - -// UnsafeDebugdServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DebugdServer will -// result in compilation errors. -type UnsafeDebugdServer interface { - mustEmbedUnimplementedDebugdServer() -} - -func RegisterDebugdServer(s grpc.ServiceRegistrar, srv DebugdServer) { - s.RegisterService(&Debugd_ServiceDesc, srv) -} - -func _Debugd_SetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DebugdServer).SetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/debugd.Debugd/SetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DebugdServer).SetInfo(ctx, req.(*SetInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Debugd_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DebugdServer).GetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/debugd.Debugd/GetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DebugdServer).GetInfo(ctx, req.(*GetInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Debugd_UploadFiles_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DebugdServer).UploadFiles(&debugdUploadFilesServer{stream}) -} - -type Debugd_UploadFilesServer interface { - SendAndClose(*UploadFilesResponse) error - Recv() (*FileTransferMessage, error) - grpc.ServerStream -} - -type debugdUploadFilesServer struct { - grpc.ServerStream -} - -func (x *debugdUploadFilesServer) SendAndClose(m *UploadFilesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *debugdUploadFilesServer) Recv() (*FileTransferMessage, error) { - m := new(FileTransferMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Debugd_DownloadFiles_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(DownloadFilesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(DebugdServer).DownloadFiles(m, &debugdDownloadFilesServer{stream}) -} - -type Debugd_DownloadFilesServer interface { - Send(*FileTransferMessage) error - grpc.ServerStream -} - -type debugdDownloadFilesServer struct { - grpc.ServerStream -} - -func (x *debugdDownloadFilesServer) Send(m *FileTransferMessage) error { - return x.ServerStream.SendMsg(m) -} - -func _Debugd_UploadSystemServiceUnits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UploadSystemdServiceUnitsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DebugdServer).UploadSystemServiceUnits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/debugd.Debugd/UploadSystemServiceUnits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DebugdServer).UploadSystemServiceUnits(ctx, req.(*UploadSystemdServiceUnitsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Debugd_ServiceDesc is the grpc.ServiceDesc for Debugd service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Debugd_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "debugd.Debugd", - HandlerType: (*DebugdServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SetInfo", - Handler: _Debugd_SetInfo_Handler, - }, - { - MethodName: "GetInfo", - Handler: _Debugd_GetInfo_Handler, - }, - { - MethodName: "UploadSystemServiceUnits", - Handler: _Debugd_UploadSystemServiceUnits_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "UploadFiles", - Handler: _Debugd_UploadFiles_Handler, - ClientStreams: true, - }, - { - StreamName: "DownloadFiles", - Handler: _Debugd_DownloadFiles_Handler, - ServerStreams: true, - }, - }, - Metadata: "debugd.proto", -} diff --git a/dev-docs/conventions.md b/dev-docs/conventions.md index f47ac5071..54f474044 100644 --- a/dev-docs/conventions.md +++ b/dev-docs/conventions.md @@ -47,12 +47,6 @@ This projects uses [golangci-lint](https://golangci-lint.run/) for linting. You can [install golangci-lint](https://golangci-lint.run/usage/install/#linux-and-windows) locally, but there is also a CI action to ensure compliance. -To locally run all configured linters, execute - -```sh -golangci-lint run ./... -``` - It is also recommended to use golangci-lint (and [gofumpt](https://github.com/mvdan/gofumpt) as formatter) in your IDE, by adding the recommended VS Code Settings or by [configuring it yourself](https://golangci-lint.run/usage/integrations/#editor-integration) ## Logging diff --git a/dev-docs/layout.md b/dev-docs/layout.md index a1a7d7cf6..b595d9bfe 100644 --- a/dev-docs/layout.md +++ b/dev-docs/layout.md @@ -14,7 +14,6 @@ Development components: * [3rdparty](/3rdparty): Contains the third party dependencies used by Constellation * [debugd](/debugd): Debug daemon and client * [hack](/hack): Development tools -* [proto](/proto): Proto files generator Additional repositories: diff --git a/dev-docs/workflows/build-test-run.md b/dev-docs/workflows/build-test-run.md index e30d9e285..99884df46 100644 --- a/dev-docs/workflows/build-test-run.md +++ b/dev-docs/workflows/build-test-run.md @@ -127,6 +127,7 @@ Whenever Go code is changed, you will have to run `bazel run //:tidy` to regener * `bazel test //...` - run all tests * `bazel run //:tidy` - tidy, format and generate * `bazel run //:check` - execute checks and linters +* `bazel run //:generate` - execute code generation ## Editor integration diff --git a/disk-mapper/recoverproto/BUILD.bazel b/disk-mapper/recoverproto/BUILD.bazel index a382142eb..f0b082986 100644 --- a/disk-mapper/recoverproto/BUILD.bazel +++ b/disk-mapper/recoverproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "recoverproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/disk-mapper/recoverproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "recover.pb.go", + go_proto_library = ":recoverproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/disk-mapper/recoverproto/recover.pb.go b/disk-mapper/recoverproto/recover.pb.go index de46e25c1..8556fa800 100644 --- a/disk-mapper/recoverproto/recover.pb.go +++ b/disk-mapper/recoverproto/recover.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: recover.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: disk-mapper/recoverproto/recover.proto package recoverproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,18 +29,14 @@ type RecoverMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // bytes state_disk_key = 1; removed - // bytes measurement_secret = 2; removed - // kms_uri is the URI of the KMS the recoveryserver should use to decrypt DEKs. - KmsUri string `protobuf:"bytes,3,opt,name=kms_uri,json=kmsUri,proto3" json:"kms_uri,omitempty"` - // storage_uri is the URI of the storage location the recoveryserver should use to fetch DEKs. + KmsUri string `protobuf:"bytes,3,opt,name=kms_uri,json=kmsUri,proto3" json:"kms_uri,omitempty"` StorageUri string `protobuf:"bytes,4,opt,name=storage_uri,json=storageUri,proto3" json:"storage_uri,omitempty"` } func (x *RecoverMessage) Reset() { *x = RecoverMessage{} if protoimpl.UnsafeEnabled { - mi := &file_recover_proto_msgTypes[0] + mi := &file_disk_mapper_recoverproto_recover_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +49,7 @@ func (x *RecoverMessage) String() string { func (*RecoverMessage) ProtoMessage() {} func (x *RecoverMessage) ProtoReflect() protoreflect.Message { - mi := &file_recover_proto_msgTypes[0] + mi := &file_disk_mapper_recoverproto_recover_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +62,7 @@ func (x *RecoverMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RecoverMessage.ProtoReflect.Descriptor instead. func (*RecoverMessage) Descriptor() ([]byte, []int) { - return file_recover_proto_rawDescGZIP(), []int{0} + return file_disk_mapper_recoverproto_recover_proto_rawDescGZIP(), []int{0} } func (x *RecoverMessage) GetKmsUri() string { @@ -88,7 +88,7 @@ type RecoverResponse struct { func (x *RecoverResponse) Reset() { *x = RecoverResponse{} if protoimpl.UnsafeEnabled { - mi := &file_recover_proto_msgTypes[1] + mi := &file_disk_mapper_recoverproto_recover_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +101,7 @@ func (x *RecoverResponse) String() string { func (*RecoverResponse) ProtoMessage() {} func (x *RecoverResponse) ProtoReflect() protoreflect.Message { - mi := &file_recover_proto_msgTypes[1] + mi := &file_disk_mapper_recoverproto_recover_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,50 +114,52 @@ func (x *RecoverResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RecoverResponse.ProtoReflect.Descriptor instead. func (*RecoverResponse) Descriptor() ([]byte, []int) { - return file_recover_proto_rawDescGZIP(), []int{1} + return file_disk_mapper_recoverproto_recover_proto_rawDescGZIP(), []int{1} } -var File_recover_proto protoreflect.FileDescriptor +var File_disk_mapper_recoverproto_recover_proto protoreflect.FileDescriptor -var file_recover_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, - 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x17, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x55, 0x72, 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x72, 0x69, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x4f, 0x0a, 0x03, - 0x41, 0x50, 0x49, 0x12, 0x48, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x1c, - 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x72, - 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x42, 0x5a, - 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, - 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2d, 0x6d, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_disk_mapper_recoverproto_recover_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x64, 0x69, 0x73, 0x6b, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x72, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, + 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x55, 0x72, + 0x69, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, + 0x72, 0x69, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x4f, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x48, 0x0a, 0x07, + 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x32, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x72, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_recover_proto_rawDescOnce sync.Once - file_recover_proto_rawDescData = file_recover_proto_rawDesc + file_disk_mapper_recoverproto_recover_proto_rawDescOnce sync.Once + file_disk_mapper_recoverproto_recover_proto_rawDescData = file_disk_mapper_recoverproto_recover_proto_rawDesc ) -func file_recover_proto_rawDescGZIP() []byte { - file_recover_proto_rawDescOnce.Do(func() { - file_recover_proto_rawDescData = protoimpl.X.CompressGZIP(file_recover_proto_rawDescData) +func file_disk_mapper_recoverproto_recover_proto_rawDescGZIP() []byte { + file_disk_mapper_recoverproto_recover_proto_rawDescOnce.Do(func() { + file_disk_mapper_recoverproto_recover_proto_rawDescData = protoimpl.X.CompressGZIP(file_disk_mapper_recoverproto_recover_proto_rawDescData) }) - return file_recover_proto_rawDescData + return file_disk_mapper_recoverproto_recover_proto_rawDescData } -var file_recover_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_recover_proto_goTypes = []interface{}{ +var file_disk_mapper_recoverproto_recover_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_disk_mapper_recoverproto_recover_proto_goTypes = []interface{}{ (*RecoverMessage)(nil), // 0: recoverproto.RecoverMessage (*RecoverResponse)(nil), // 1: recoverproto.RecoverResponse } -var file_recover_proto_depIdxs = []int32{ +var file_disk_mapper_recoverproto_recover_proto_depIdxs = []int32{ 0, // 0: recoverproto.API.Recover:input_type -> recoverproto.RecoverMessage 1, // 1: recoverproto.API.Recover:output_type -> recoverproto.RecoverResponse 1, // [1:2] is the sub-list for method output_type @@ -167,13 +169,13 @@ var file_recover_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_recover_proto_init() } -func file_recover_proto_init() { - if File_recover_proto != nil { +func init() { file_disk_mapper_recoverproto_recover_proto_init() } +func file_disk_mapper_recoverproto_recover_proto_init() { + if File_disk_mapper_recoverproto_recover_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_recover_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_disk_mapper_recoverproto_recover_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RecoverMessage); i { case 0: return &v.state @@ -185,7 +187,7 @@ func file_recover_proto_init() { return nil } } - file_recover_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_disk_mapper_recoverproto_recover_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RecoverResponse); i { case 0: return &v.state @@ -202,18 +204,98 @@ func file_recover_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_recover_proto_rawDesc, + RawDescriptor: file_disk_mapper_recoverproto_recover_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_recover_proto_goTypes, - DependencyIndexes: file_recover_proto_depIdxs, - MessageInfos: file_recover_proto_msgTypes, + GoTypes: file_disk_mapper_recoverproto_recover_proto_goTypes, + DependencyIndexes: file_disk_mapper_recoverproto_recover_proto_depIdxs, + MessageInfos: file_disk_mapper_recoverproto_recover_proto_msgTypes, }.Build() - File_recover_proto = out.File - file_recover_proto_rawDesc = nil - file_recover_proto_goTypes = nil - file_recover_proto_depIdxs = nil + File_disk_mapper_recoverproto_recover_proto = out.File + file_disk_mapper_recoverproto_recover_proto_rawDesc = nil + file_disk_mapper_recoverproto_recover_proto_goTypes = nil + file_disk_mapper_recoverproto_recover_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// APIClient is the client API for API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIClient interface { + Recover(ctx context.Context, in *RecoverMessage, opts ...grpc.CallOption) (*RecoverResponse, error) +} + +type aPIClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIClient(cc grpc.ClientConnInterface) APIClient { + return &aPIClient{cc} +} + +func (c *aPIClient) Recover(ctx context.Context, in *RecoverMessage, opts ...grpc.CallOption) (*RecoverResponse, error) { + out := new(RecoverResponse) + err := c.cc.Invoke(ctx, "/recoverproto.API/Recover", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIServer is the server API for API service. +type APIServer interface { + Recover(context.Context, *RecoverMessage) (*RecoverResponse, error) +} + +// UnimplementedAPIServer can be embedded to have forward compatible implementations. +type UnimplementedAPIServer struct { +} + +func (*UnimplementedAPIServer) Recover(context.Context, *RecoverMessage) (*RecoverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Recover not implemented") +} + +func RegisterAPIServer(s *grpc.Server, srv APIServer) { + s.RegisterService(&_API_serviceDesc, srv) +} + +func _API_Recover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecoverMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).Recover(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/recoverproto.API/Recover", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).Recover(ctx, req.(*RecoverMessage)) + } + return interceptor(ctx, in, info, handler) +} + +var _API_serviceDesc = grpc.ServiceDesc{ + ServiceName: "recoverproto.API", + HandlerType: (*APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Recover", + Handler: _API_Recover_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "disk-mapper/recoverproto/recover.proto", } diff --git a/disk-mapper/recoverproto/recover_grpc.pb.go b/disk-mapper/recoverproto/recover_grpc.pb.go deleted file mode 100644 index 6b0ef5fb1..000000000 --- a/disk-mapper/recoverproto/recover_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: recover.proto - -package recoverproto - -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 - -// APIClient is the client API for API 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 APIClient interface { - // Recover sends the necessary information to the recoveryserver to initiate recovery of a node. - Recover(ctx context.Context, in *RecoverMessage, opts ...grpc.CallOption) (*RecoverResponse, error) -} - -type aPIClient struct { - cc grpc.ClientConnInterface -} - -func NewAPIClient(cc grpc.ClientConnInterface) APIClient { - return &aPIClient{cc} -} - -func (c *aPIClient) Recover(ctx context.Context, in *RecoverMessage, opts ...grpc.CallOption) (*RecoverResponse, error) { - out := new(RecoverResponse) - err := c.cc.Invoke(ctx, "/recoverproto.API/Recover", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// APIServer is the server API for API service. -// All implementations must embed UnimplementedAPIServer -// for forward compatibility -type APIServer interface { - // Recover sends the necessary information to the recoveryserver to initiate recovery of a node. - Recover(context.Context, *RecoverMessage) (*RecoverResponse, error) - mustEmbedUnimplementedAPIServer() -} - -// UnimplementedAPIServer must be embedded to have forward compatible implementations. -type UnimplementedAPIServer struct { -} - -func (UnimplementedAPIServer) Recover(context.Context, *RecoverMessage) (*RecoverResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Recover not implemented") -} -func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {} - -// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to APIServer will -// result in compilation errors. -type UnsafeAPIServer interface { - mustEmbedUnimplementedAPIServer() -} - -func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) { - s.RegisterService(&API_ServiceDesc, srv) -} - -func _API_Recover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecoverMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).Recover(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/recoverproto.API/Recover", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).Recover(ctx, req.(*RecoverMessage)) - } - return interceptor(ctx, in, info, handler) -} - -// API_ServiceDesc is the grpc.ServiceDesc for API service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var API_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "recoverproto.API", - HandlerType: (*APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Recover", - Handler: _API_Recover_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "recover.proto", -} diff --git a/joinservice/joinproto/BUILD.bazel b/joinservice/joinproto/BUILD.bazel index ca4990c75..af6e014e3 100644 --- a/joinservice/joinproto/BUILD.bazel +++ b/joinservice/joinproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "joinproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/joinservice/joinproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "join.pb.go", + go_proto_library = ":joinproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/joinservice/joinproto/join.pb.go b/joinservice/joinproto/join.pb.go index 9498bec0a..c1854111e 100644 --- a/joinservice/joinproto/join.pb.go +++ b/joinservice/joinproto/join.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: join.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: joinservice/joinproto/join.proto package joinproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,18 +29,15 @@ type IssueJoinTicketRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // disk_uuid is the UUID of a node's state disk. - DiskUuid string `protobuf:"bytes,1,opt,name=disk_uuid,json=diskUuid,proto3" json:"disk_uuid,omitempty"` - // certificate_request is a certificate request for the node's kubelet certificate. + DiskUuid string `protobuf:"bytes,1,opt,name=disk_uuid,json=diskUuid,proto3" json:"disk_uuid,omitempty"` CertificateRequest []byte `protobuf:"bytes,2,opt,name=certificate_request,json=certificateRequest,proto3" json:"certificate_request,omitempty"` - // is_control_plane indicates whether the node is a control-plane node. - IsControlPlane bool `protobuf:"varint,3,opt,name=is_control_plane,json=isControlPlane,proto3" json:"is_control_plane,omitempty"` + IsControlPlane bool `protobuf:"varint,3,opt,name=is_control_plane,json=isControlPlane,proto3" json:"is_control_plane,omitempty"` } func (x *IssueJoinTicketRequest) Reset() { *x = IssueJoinTicketRequest{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[0] + mi := &file_joinservice_joinproto_join_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +50,7 @@ func (x *IssueJoinTicketRequest) String() string { func (*IssueJoinTicketRequest) ProtoMessage() {} func (x *IssueJoinTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[0] + mi := &file_joinservice_joinproto_join_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +63,7 @@ func (x *IssueJoinTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IssueJoinTicketRequest.ProtoReflect.Descriptor instead. func (*IssueJoinTicketRequest) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{0} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{0} } func (x *IssueJoinTicketRequest) GetDiskUuid() string { @@ -91,34 +92,22 @@ type IssueJoinTicketResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // state_disk_key is the key used to encrypt the state disk. - StateDiskKey []byte `protobuf:"bytes,1,opt,name=state_disk_key,json=stateDiskKey,proto3" json:"state_disk_key,omitempty"` - // measurement_salt is a salt used to derive the node's ClusterID. - // This value is persisted on the state disk. - MeasurementSalt []byte `protobuf:"bytes,2,opt,name=measurement_salt,json=measurementSalt,proto3" json:"measurement_salt,omitempty"` - // measurement_secret is a secret used to derive the node's ClusterID. - // This value is NOT persisted on the state disk. - MeasurementSecret []byte `protobuf:"bytes,3,opt,name=measurement_secret,json=measurementSecret,proto3" json:"measurement_secret,omitempty"` - // kubelet_cert is the certificate to be used by the kubelet. - KubeletCert []byte `protobuf:"bytes,4,opt,name=kubelet_cert,json=kubeletCert,proto3" json:"kubelet_cert,omitempty"` - // api_server_endpoint is the endpoint of Constellation's API server. - ApiServerEndpoint string `protobuf:"bytes,5,opt,name=api_server_endpoint,json=apiServerEndpoint,proto3" json:"api_server_endpoint,omitempty"` - // token is the Kubernetes Join Token to be used by the node to join the cluster. - Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` - // discovery_token_ca_cert_hash is a hash of the root certificate authority presented by the Kubernetes control-plane. - DiscoveryTokenCaCertHash string `protobuf:"bytes,7,opt,name=discovery_token_ca_cert_hash,json=discoveryTokenCaCertHash,proto3" json:"discovery_token_ca_cert_hash,omitempty"` - // control_plane_files is a list of control-plane certificates and keys. - ControlPlaneFiles []*ControlPlaneCertOrKey `protobuf:"bytes,8,rep,name=control_plane_files,json=controlPlaneFiles,proto3" json:"control_plane_files,omitempty"` - // kubernetes_version is the Kubernetes version to install on the node. - KubernetesVersion string `protobuf:"bytes,9,opt,name=kubernetes_version,json=kubernetesVersion,proto3" json:"kubernetes_version,omitempty"` - // kubernetes_components is a list of components to install on the node. - KubernetesComponents []*KubernetesComponent `protobuf:"bytes,10,rep,name=kubernetes_components,json=kubernetesComponents,proto3" json:"kubernetes_components,omitempty"` + StateDiskKey []byte `protobuf:"bytes,1,opt,name=state_disk_key,json=stateDiskKey,proto3" json:"state_disk_key,omitempty"` + MeasurementSalt []byte `protobuf:"bytes,2,opt,name=measurement_salt,json=measurementSalt,proto3" json:"measurement_salt,omitempty"` + MeasurementSecret []byte `protobuf:"bytes,3,opt,name=measurement_secret,json=measurementSecret,proto3" json:"measurement_secret,omitempty"` + KubeletCert []byte `protobuf:"bytes,4,opt,name=kubelet_cert,json=kubeletCert,proto3" json:"kubelet_cert,omitempty"` + ApiServerEndpoint string `protobuf:"bytes,5,opt,name=api_server_endpoint,json=apiServerEndpoint,proto3" json:"api_server_endpoint,omitempty"` + Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` + DiscoveryTokenCaCertHash string `protobuf:"bytes,7,opt,name=discovery_token_ca_cert_hash,json=discoveryTokenCaCertHash,proto3" json:"discovery_token_ca_cert_hash,omitempty"` + ControlPlaneFiles []*ControlPlaneCertOrKey `protobuf:"bytes,8,rep,name=control_plane_files,json=controlPlaneFiles,proto3" json:"control_plane_files,omitempty"` + KubernetesVersion string `protobuf:"bytes,9,opt,name=kubernetes_version,json=kubernetesVersion,proto3" json:"kubernetes_version,omitempty"` + KubernetesComponents []*KubernetesComponent `protobuf:"bytes,10,rep,name=kubernetes_components,json=kubernetesComponents,proto3" json:"kubernetes_components,omitempty"` } func (x *IssueJoinTicketResponse) Reset() { *x = IssueJoinTicketResponse{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[1] + mi := &file_joinservice_joinproto_join_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -131,7 +120,7 @@ func (x *IssueJoinTicketResponse) String() string { func (*IssueJoinTicketResponse) ProtoMessage() {} func (x *IssueJoinTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[1] + mi := &file_joinservice_joinproto_join_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -144,7 +133,7 @@ func (x *IssueJoinTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IssueJoinTicketResponse.ProtoReflect.Descriptor instead. func (*IssueJoinTicketResponse) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{1} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{1} } func (x *IssueJoinTicketResponse) GetStateDiskKey() []byte { @@ -222,16 +211,14 @@ type ControlPlaneCertOrKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // name of the certificate or key. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // data of the certificate or key. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (x *ControlPlaneCertOrKey) Reset() { *x = ControlPlaneCertOrKey{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[2] + mi := &file_joinservice_joinproto_join_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -244,7 +231,7 @@ func (x *ControlPlaneCertOrKey) String() string { func (*ControlPlaneCertOrKey) ProtoMessage() {} func (x *ControlPlaneCertOrKey) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[2] + mi := &file_joinservice_joinproto_join_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -257,7 +244,7 @@ func (x *ControlPlaneCertOrKey) ProtoReflect() protoreflect.Message { // Deprecated: Use ControlPlaneCertOrKey.ProtoReflect.Descriptor instead. func (*ControlPlaneCertOrKey) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{2} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{2} } func (x *ControlPlaneCertOrKey) GetName() string { @@ -279,14 +266,13 @@ type IssueRejoinTicketRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // disk_uuid is the UUID of a node's state disk. DiskUuid string `protobuf:"bytes,1,opt,name=disk_uuid,json=diskUuid,proto3" json:"disk_uuid,omitempty"` } func (x *IssueRejoinTicketRequest) Reset() { *x = IssueRejoinTicketRequest{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[3] + mi := &file_joinservice_joinproto_join_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +285,7 @@ func (x *IssueRejoinTicketRequest) String() string { func (*IssueRejoinTicketRequest) ProtoMessage() {} func (x *IssueRejoinTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[3] + mi := &file_joinservice_joinproto_join_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +298,7 @@ func (x *IssueRejoinTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IssueRejoinTicketRequest.ProtoReflect.Descriptor instead. func (*IssueRejoinTicketRequest) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{3} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{3} } func (x *IssueRejoinTicketRequest) GetDiskUuid() string { @@ -327,17 +313,14 @@ type IssueRejoinTicketResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // state_disk_key is the key to decrypt the state disk. - StateDiskKey []byte `protobuf:"bytes,1,opt,name=state_disk_key,json=stateDiskKey,proto3" json:"state_disk_key,omitempty"` - // measurement_secret is a secret used to derive the node's ClusterID. - // This value is NOT persisted on the state disk. + StateDiskKey []byte `protobuf:"bytes,1,opt,name=state_disk_key,json=stateDiskKey,proto3" json:"state_disk_key,omitempty"` MeasurementSecret []byte `protobuf:"bytes,2,opt,name=measurement_secret,json=measurementSecret,proto3" json:"measurement_secret,omitempty"` } func (x *IssueRejoinTicketResponse) Reset() { *x = IssueRejoinTicketResponse{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[4] + mi := &file_joinservice_joinproto_join_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -350,7 +333,7 @@ func (x *IssueRejoinTicketResponse) String() string { func (*IssueRejoinTicketResponse) ProtoMessage() {} func (x *IssueRejoinTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[4] + mi := &file_joinservice_joinproto_join_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -363,7 +346,7 @@ func (x *IssueRejoinTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IssueRejoinTicketResponse.ProtoReflect.Descriptor instead. func (*IssueRejoinTicketResponse) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{4} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{4} } func (x *IssueRejoinTicketResponse) GetStateDiskKey() []byte { @@ -380,26 +363,21 @@ func (x *IssueRejoinTicketResponse) GetMeasurementSecret() []byte { return nil } -// Discuss if we want to import the init proto instead of duplicating it type KubernetesComponent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // url to download the component from. - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - // hash of the component. - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - // install_path is the path to install the component to. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` InstallPath string `protobuf:"bytes,3,opt,name=install_path,json=installPath,proto3" json:"install_path,omitempty"` - // extract indicates whether the component is an archive and needs to be extracted. - Extract bool `protobuf:"varint,4,opt,name=extract,proto3" json:"extract,omitempty"` + Extract bool `protobuf:"varint,4,opt,name=extract,proto3" json:"extract,omitempty"` } func (x *KubernetesComponent) Reset() { *x = KubernetesComponent{} if protoimpl.UnsafeEnabled { - mi := &file_join_proto_msgTypes[5] + mi := &file_joinservice_joinproto_join_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -412,7 +390,7 @@ func (x *KubernetesComponent) String() string { func (*KubernetesComponent) ProtoMessage() {} func (x *KubernetesComponent) ProtoReflect() protoreflect.Message { - mi := &file_join_proto_msgTypes[5] + mi := &file_joinservice_joinproto_join_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -425,7 +403,7 @@ func (x *KubernetesComponent) ProtoReflect() protoreflect.Message { // Deprecated: Use KubernetesComponent.ProtoReflect.Descriptor instead. func (*KubernetesComponent) Descriptor() ([]byte, []int) { - return file_join_proto_rawDescGZIP(), []int{5} + return file_joinservice_joinproto_join_proto_rawDescGZIP(), []int{5} } func (x *KubernetesComponent) GetUrl() string { @@ -456,107 +434,109 @@ func (x *KubernetesComponent) GetExtract() bool { return false } -var File_join_proto protoreflect.FileDescriptor +var File_joinservice_joinproto_join_proto protoreflect.FileDescriptor -var file_join_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6a, 0x6f, - 0x69, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x22, 0x92, 0x04, 0x0a, 0x17, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, - 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x65, 0x61, 0x73, 0x75, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x61, - 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, - 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, - 0x43, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x61, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3e, 0x0a, 0x1c, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x61, - 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x18, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4f, 0x0a, 0x13, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x15, 0x6b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, - 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x19, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x37, 0x0a, 0x18, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, - 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x19, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, - 0x69, 0x73, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x6d, - 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x78, 0x0a, 0x13, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x4e, 0x0a, 0x0f, - 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x1c, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x11, - 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x1e, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, +var file_joinservice_joinproto_join_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6a, 0x6f, + 0x69, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x04, 0x6a, 0x6f, 0x69, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, + 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x22, 0x92, 0x04, 0x0a, 0x17, + 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, + 0x10, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6c, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6b, 0x75, 0x62, 0x65, 0x6c, + 0x65, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6b, + 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x43, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x70, + 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x3e, 0x0a, 0x1c, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x52, 0x11, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x4e, 0x0a, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, + 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x6b, 0x75, 0x62, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x43, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x37, 0x0a, 0x18, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, - 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, - 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x6a, 0x6f, - 0x69, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6a, 0x6f, 0x69, 0x6e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x22, 0x70, + 0x0a, 0x19, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x4b, 0x65, + 0x79, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x6d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x22, 0x78, 0x0a, 0x13, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x03, 0x41, + 0x50, 0x49, 0x12, 0x4e, 0x0a, 0x0f, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, + 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, + 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6a, 0x6f, 0x69, 0x6e, 0x2e, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x52, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, + 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x32, 0x2f, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x6a, 0x6f, 0x69, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_join_proto_rawDescOnce sync.Once - file_join_proto_rawDescData = file_join_proto_rawDesc + file_joinservice_joinproto_join_proto_rawDescOnce sync.Once + file_joinservice_joinproto_join_proto_rawDescData = file_joinservice_joinproto_join_proto_rawDesc ) -func file_join_proto_rawDescGZIP() []byte { - file_join_proto_rawDescOnce.Do(func() { - file_join_proto_rawDescData = protoimpl.X.CompressGZIP(file_join_proto_rawDescData) +func file_joinservice_joinproto_join_proto_rawDescGZIP() []byte { + file_joinservice_joinproto_join_proto_rawDescOnce.Do(func() { + file_joinservice_joinproto_join_proto_rawDescData = protoimpl.X.CompressGZIP(file_joinservice_joinproto_join_proto_rawDescData) }) - return file_join_proto_rawDescData + return file_joinservice_joinproto_join_proto_rawDescData } -var file_join_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_join_proto_goTypes = []interface{}{ +var file_joinservice_joinproto_join_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_joinservice_joinproto_join_proto_goTypes = []interface{}{ (*IssueJoinTicketRequest)(nil), // 0: join.IssueJoinTicketRequest (*IssueJoinTicketResponse)(nil), // 1: join.IssueJoinTicketResponse (*ControlPlaneCertOrKey)(nil), // 2: join.control_plane_cert_or_key @@ -564,7 +544,7 @@ var file_join_proto_goTypes = []interface{}{ (*IssueRejoinTicketResponse)(nil), // 4: join.IssueRejoinTicketResponse (*KubernetesComponent)(nil), // 5: join.KubernetesComponent } -var file_join_proto_depIdxs = []int32{ +var file_joinservice_joinproto_join_proto_depIdxs = []int32{ 2, // 0: join.IssueJoinTicketResponse.control_plane_files:type_name -> join.control_plane_cert_or_key 5, // 1: join.IssueJoinTicketResponse.kubernetes_components:type_name -> join.KubernetesComponent 0, // 2: join.API.IssueJoinTicket:input_type -> join.IssueJoinTicketRequest @@ -578,13 +558,13 @@ var file_join_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_join_proto_init() } -func file_join_proto_init() { - if File_join_proto != nil { +func init() { file_joinservice_joinproto_join_proto_init() } +func file_joinservice_joinproto_join_proto_init() { + if File_joinservice_joinproto_join_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_join_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IssueJoinTicketRequest); i { case 0: return &v.state @@ -596,7 +576,7 @@ func file_join_proto_init() { return nil } } - file_join_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IssueJoinTicketResponse); i { case 0: return &v.state @@ -608,7 +588,7 @@ func file_join_proto_init() { return nil } } - file_join_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ControlPlaneCertOrKey); i { case 0: return &v.state @@ -620,7 +600,7 @@ func file_join_proto_init() { return nil } } - file_join_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IssueRejoinTicketRequest); i { case 0: return &v.state @@ -632,7 +612,7 @@ func file_join_proto_init() { return nil } } - file_join_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IssueRejoinTicketResponse); i { case 0: return &v.state @@ -644,7 +624,7 @@ func file_join_proto_init() { return nil } } - file_join_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_joinservice_joinproto_join_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KubernetesComponent); i { case 0: return &v.state @@ -661,18 +641,134 @@ func file_join_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_join_proto_rawDesc, + RawDescriptor: file_joinservice_joinproto_join_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_join_proto_goTypes, - DependencyIndexes: file_join_proto_depIdxs, - MessageInfos: file_join_proto_msgTypes, + GoTypes: file_joinservice_joinproto_join_proto_goTypes, + DependencyIndexes: file_joinservice_joinproto_join_proto_depIdxs, + MessageInfos: file_joinservice_joinproto_join_proto_msgTypes, }.Build() - File_join_proto = out.File - file_join_proto_rawDesc = nil - file_join_proto_goTypes = nil - file_join_proto_depIdxs = nil + File_joinservice_joinproto_join_proto = out.File + file_joinservice_joinproto_join_proto_rawDesc = nil + file_joinservice_joinproto_join_proto_goTypes = nil + file_joinservice_joinproto_join_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// APIClient is the client API for API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIClient interface { + IssueJoinTicket(ctx context.Context, in *IssueJoinTicketRequest, opts ...grpc.CallOption) (*IssueJoinTicketResponse, error) + IssueRejoinTicket(ctx context.Context, in *IssueRejoinTicketRequest, opts ...grpc.CallOption) (*IssueRejoinTicketResponse, error) +} + +type aPIClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIClient(cc grpc.ClientConnInterface) APIClient { + return &aPIClient{cc} +} + +func (c *aPIClient) IssueJoinTicket(ctx context.Context, in *IssueJoinTicketRequest, opts ...grpc.CallOption) (*IssueJoinTicketResponse, error) { + out := new(IssueJoinTicketResponse) + err := c.cc.Invoke(ctx, "/join.API/IssueJoinTicket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aPIClient) IssueRejoinTicket(ctx context.Context, in *IssueRejoinTicketRequest, opts ...grpc.CallOption) (*IssueRejoinTicketResponse, error) { + out := new(IssueRejoinTicketResponse) + err := c.cc.Invoke(ctx, "/join.API/IssueRejoinTicket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIServer is the server API for API service. +type APIServer interface { + IssueJoinTicket(context.Context, *IssueJoinTicketRequest) (*IssueJoinTicketResponse, error) + IssueRejoinTicket(context.Context, *IssueRejoinTicketRequest) (*IssueRejoinTicketResponse, error) +} + +// UnimplementedAPIServer can be embedded to have forward compatible implementations. +type UnimplementedAPIServer struct { +} + +func (*UnimplementedAPIServer) IssueJoinTicket(context.Context, *IssueJoinTicketRequest) (*IssueJoinTicketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IssueJoinTicket not implemented") +} +func (*UnimplementedAPIServer) IssueRejoinTicket(context.Context, *IssueRejoinTicketRequest) (*IssueRejoinTicketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IssueRejoinTicket not implemented") +} + +func RegisterAPIServer(s *grpc.Server, srv APIServer) { + s.RegisterService(&_API_serviceDesc, srv) +} + +func _API_IssueJoinTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IssueJoinTicketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).IssueJoinTicket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/join.API/IssueJoinTicket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).IssueJoinTicket(ctx, req.(*IssueJoinTicketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _API_IssueRejoinTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IssueRejoinTicketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).IssueRejoinTicket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/join.API/IssueRejoinTicket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).IssueRejoinTicket(ctx, req.(*IssueRejoinTicketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _API_serviceDesc = grpc.ServiceDesc{ + ServiceName: "join.API", + HandlerType: (*APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "IssueJoinTicket", + Handler: _API_IssueJoinTicket_Handler, + }, + { + MethodName: "IssueRejoinTicket", + Handler: _API_IssueRejoinTicket_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "joinservice/joinproto/join.proto", } diff --git a/joinservice/joinproto/join_grpc.pb.go b/joinservice/joinproto/join_grpc.pb.go deleted file mode 100644 index 1ca4f53f5..000000000 --- a/joinservice/joinproto/join_grpc.pb.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: join.proto - -package joinproto - -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 - -// APIClient is the client API for API 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 APIClient interface { - // IssueJoinTicket issues a join ticket for a new node. - IssueJoinTicket(ctx context.Context, in *IssueJoinTicketRequest, opts ...grpc.CallOption) (*IssueJoinTicketResponse, error) - // IssueRejoinTicket issues a join ticket for a node that has previously joined the cluster. - IssueRejoinTicket(ctx context.Context, in *IssueRejoinTicketRequest, opts ...grpc.CallOption) (*IssueRejoinTicketResponse, error) -} - -type aPIClient struct { - cc grpc.ClientConnInterface -} - -func NewAPIClient(cc grpc.ClientConnInterface) APIClient { - return &aPIClient{cc} -} - -func (c *aPIClient) IssueJoinTicket(ctx context.Context, in *IssueJoinTicketRequest, opts ...grpc.CallOption) (*IssueJoinTicketResponse, error) { - out := new(IssueJoinTicketResponse) - err := c.cc.Invoke(ctx, "/join.API/IssueJoinTicket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aPIClient) IssueRejoinTicket(ctx context.Context, in *IssueRejoinTicketRequest, opts ...grpc.CallOption) (*IssueRejoinTicketResponse, error) { - out := new(IssueRejoinTicketResponse) - err := c.cc.Invoke(ctx, "/join.API/IssueRejoinTicket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// APIServer is the server API for API service. -// All implementations must embed UnimplementedAPIServer -// for forward compatibility -type APIServer interface { - // IssueJoinTicket issues a join ticket for a new node. - IssueJoinTicket(context.Context, *IssueJoinTicketRequest) (*IssueJoinTicketResponse, error) - // IssueRejoinTicket issues a join ticket for a node that has previously joined the cluster. - IssueRejoinTicket(context.Context, *IssueRejoinTicketRequest) (*IssueRejoinTicketResponse, error) - mustEmbedUnimplementedAPIServer() -} - -// UnimplementedAPIServer must be embedded to have forward compatible implementations. -type UnimplementedAPIServer struct { -} - -func (UnimplementedAPIServer) IssueJoinTicket(context.Context, *IssueJoinTicketRequest) (*IssueJoinTicketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IssueJoinTicket not implemented") -} -func (UnimplementedAPIServer) IssueRejoinTicket(context.Context, *IssueRejoinTicketRequest) (*IssueRejoinTicketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IssueRejoinTicket not implemented") -} -func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {} - -// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to APIServer will -// result in compilation errors. -type UnsafeAPIServer interface { - mustEmbedUnimplementedAPIServer() -} - -func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) { - s.RegisterService(&API_ServiceDesc, srv) -} - -func _API_IssueJoinTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IssueJoinTicketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).IssueJoinTicket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/join.API/IssueJoinTicket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).IssueJoinTicket(ctx, req.(*IssueJoinTicketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _API_IssueRejoinTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IssueRejoinTicketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).IssueRejoinTicket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/join.API/IssueRejoinTicket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).IssueRejoinTicket(ctx, req.(*IssueRejoinTicketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// API_ServiceDesc is the grpc.ServiceDesc for API service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var API_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "join.API", - HandlerType: (*APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IssueJoinTicket", - Handler: _API_IssueJoinTicket_Handler, - }, - { - MethodName: "IssueRejoinTicket", - Handler: _API_IssueRejoinTicket_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "join.proto", -} diff --git a/keyservice/keyserviceproto/BUILD.bazel b/keyservice/keyserviceproto/BUILD.bazel index 827b11e40..75a30eaf5 100644 --- a/keyservice/keyserviceproto/BUILD.bazel +++ b/keyservice/keyserviceproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "keyserviceproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/keyservice/keyserviceproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "keyservice.pb.go", + go_proto_library = ":keyserviceproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/keyservice/keyserviceproto/keyservice.pb.go b/keyservice/keyserviceproto/keyservice.pb.go index 971103365..1fb66809e 100644 --- a/keyservice/keyserviceproto/keyservice.pb.go +++ b/keyservice/keyserviceproto/keyservice.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: keyservice.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: keyservice/keyserviceproto/keyservice.proto package keyserviceproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -32,7 +36,7 @@ type GetDataKeyRequest struct { func (x *GetDataKeyRequest) Reset() { *x = GetDataKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_keyservice_proto_msgTypes[0] + mi := &file_keyservice_keyserviceproto_keyservice_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +49,7 @@ func (x *GetDataKeyRequest) String() string { func (*GetDataKeyRequest) ProtoMessage() {} func (x *GetDataKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyservice_proto_msgTypes[0] + mi := &file_keyservice_keyserviceproto_keyservice_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +62,7 @@ func (x *GetDataKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDataKeyRequest.ProtoReflect.Descriptor instead. func (*GetDataKeyRequest) Descriptor() ([]byte, []int) { - return file_keyservice_proto_rawDescGZIP(), []int{0} + return file_keyservice_keyserviceproto_keyservice_proto_rawDescGZIP(), []int{0} } func (x *GetDataKeyRequest) GetDataKeyId() string { @@ -86,7 +90,7 @@ type GetDataKeyResponse struct { func (x *GetDataKeyResponse) Reset() { *x = GetDataKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_keyservice_proto_msgTypes[1] + mi := &file_keyservice_keyserviceproto_keyservice_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -99,7 +103,7 @@ func (x *GetDataKeyResponse) String() string { func (*GetDataKeyResponse) ProtoMessage() {} func (x *GetDataKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyservice_proto_msgTypes[1] + mi := &file_keyservice_keyserviceproto_keyservice_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112,7 +116,7 @@ func (x *GetDataKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDataKeyResponse.ProtoReflect.Descriptor instead. func (*GetDataKeyResponse) Descriptor() ([]byte, []int) { - return file_keyservice_proto_rawDescGZIP(), []int{1} + return file_keyservice_keyserviceproto_keyservice_proto_rawDescGZIP(), []int{1} } func (x *GetDataKeyResponse) GetDataKey() []byte { @@ -122,48 +126,50 @@ func (x *GetDataKeyResponse) GetDataKey() []byte { return nil } -var File_keyservice_proto protoreflect.FileDescriptor +var File_keyservice_keyserviceproto_keyservice_proto protoreflect.FileDescriptor -var file_keyservice_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x03, 0x6b, 0x6d, 0x73, 0x22, 0x4b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0b, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x64, 0x61, - 0x74, 0x61, 0x4b, 0x65, 0x79, 0x32, 0x44, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x3d, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, - 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_keyservice_keyserviceproto_keyservice_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x65, 0x79, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x6b, + 0x6d, 0x73, 0x22, 0x4b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, + 0x74, 0x61, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, + 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, + 0x32, 0x44, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x3d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x32, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_keyservice_proto_rawDescOnce sync.Once - file_keyservice_proto_rawDescData = file_keyservice_proto_rawDesc + file_keyservice_keyserviceproto_keyservice_proto_rawDescOnce sync.Once + file_keyservice_keyserviceproto_keyservice_proto_rawDescData = file_keyservice_keyserviceproto_keyservice_proto_rawDesc ) -func file_keyservice_proto_rawDescGZIP() []byte { - file_keyservice_proto_rawDescOnce.Do(func() { - file_keyservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_keyservice_proto_rawDescData) +func file_keyservice_keyserviceproto_keyservice_proto_rawDescGZIP() []byte { + file_keyservice_keyserviceproto_keyservice_proto_rawDescOnce.Do(func() { + file_keyservice_keyserviceproto_keyservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_keyservice_keyserviceproto_keyservice_proto_rawDescData) }) - return file_keyservice_proto_rawDescData + return file_keyservice_keyserviceproto_keyservice_proto_rawDescData } -var file_keyservice_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_keyservice_proto_goTypes = []interface{}{ +var file_keyservice_keyserviceproto_keyservice_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_keyservice_keyserviceproto_keyservice_proto_goTypes = []interface{}{ (*GetDataKeyRequest)(nil), // 0: kms.GetDataKeyRequest (*GetDataKeyResponse)(nil), // 1: kms.GetDataKeyResponse } -var file_keyservice_proto_depIdxs = []int32{ +var file_keyservice_keyserviceproto_keyservice_proto_depIdxs = []int32{ 0, // 0: kms.API.GetDataKey:input_type -> kms.GetDataKeyRequest 1, // 1: kms.API.GetDataKey:output_type -> kms.GetDataKeyResponse 1, // [1:2] is the sub-list for method output_type @@ -173,13 +179,13 @@ var file_keyservice_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_keyservice_proto_init() } -func file_keyservice_proto_init() { - if File_keyservice_proto != nil { +func init() { file_keyservice_keyserviceproto_keyservice_proto_init() } +func file_keyservice_keyserviceproto_keyservice_proto_init() { + if File_keyservice_keyserviceproto_keyservice_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_keyservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_keyservice_keyserviceproto_keyservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDataKeyRequest); i { case 0: return &v.state @@ -191,7 +197,7 @@ func file_keyservice_proto_init() { return nil } } - file_keyservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_keyservice_keyserviceproto_keyservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetDataKeyResponse); i { case 0: return &v.state @@ -208,18 +214,98 @@ func file_keyservice_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_keyservice_proto_rawDesc, + RawDescriptor: file_keyservice_keyserviceproto_keyservice_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_keyservice_proto_goTypes, - DependencyIndexes: file_keyservice_proto_depIdxs, - MessageInfos: file_keyservice_proto_msgTypes, + GoTypes: file_keyservice_keyserviceproto_keyservice_proto_goTypes, + DependencyIndexes: file_keyservice_keyserviceproto_keyservice_proto_depIdxs, + MessageInfos: file_keyservice_keyserviceproto_keyservice_proto_msgTypes, }.Build() - File_keyservice_proto = out.File - file_keyservice_proto_rawDesc = nil - file_keyservice_proto_goTypes = nil - file_keyservice_proto_depIdxs = nil + File_keyservice_keyserviceproto_keyservice_proto = out.File + file_keyservice_keyserviceproto_keyservice_proto_rawDesc = nil + file_keyservice_keyserviceproto_keyservice_proto_goTypes = nil + file_keyservice_keyserviceproto_keyservice_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// APIClient is the client API for API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIClient interface { + GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error) +} + +type aPIClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIClient(cc grpc.ClientConnInterface) APIClient { + return &aPIClient{cc} +} + +func (c *aPIClient) GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error) { + out := new(GetDataKeyResponse) + err := c.cc.Invoke(ctx, "/kms.API/GetDataKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIServer is the server API for API service. +type APIServer interface { + GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error) +} + +// UnimplementedAPIServer can be embedded to have forward compatible implementations. +type UnimplementedAPIServer struct { +} + +func (*UnimplementedAPIServer) GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataKey not implemented") +} + +func RegisterAPIServer(s *grpc.Server, srv APIServer) { + s.RegisterService(&_API_serviceDesc, srv) +} + +func _API_GetDataKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).GetDataKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/kms.API/GetDataKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).GetDataKey(ctx, req.(*GetDataKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _API_serviceDesc = grpc.ServiceDesc{ + ServiceName: "kms.API", + HandlerType: (*APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDataKey", + Handler: _API_GetDataKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "keyservice/keyserviceproto/keyservice.proto", } diff --git a/keyservice/keyserviceproto/keyservice_grpc.pb.go b/keyservice/keyserviceproto/keyservice_grpc.pb.go deleted file mode 100644 index 3f55fcfe4..000000000 --- a/keyservice/keyserviceproto/keyservice_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: keyservice.proto - -package keyserviceproto - -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 - -// APIClient is the client API for API 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 APIClient interface { - GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error) -} - -type aPIClient struct { - cc grpc.ClientConnInterface -} - -func NewAPIClient(cc grpc.ClientConnInterface) APIClient { - return &aPIClient{cc} -} - -func (c *aPIClient) GetDataKey(ctx context.Context, in *GetDataKeyRequest, opts ...grpc.CallOption) (*GetDataKeyResponse, error) { - out := new(GetDataKeyResponse) - err := c.cc.Invoke(ctx, "/kms.API/GetDataKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// APIServer is the server API for API service. -// All implementations must embed UnimplementedAPIServer -// for forward compatibility -type APIServer interface { - GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error) - mustEmbedUnimplementedAPIServer() -} - -// UnimplementedAPIServer must be embedded to have forward compatible implementations. -type UnimplementedAPIServer struct { -} - -func (UnimplementedAPIServer) GetDataKey(context.Context, *GetDataKeyRequest) (*GetDataKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDataKey not implemented") -} -func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {} - -// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to APIServer will -// result in compilation errors. -type UnsafeAPIServer interface { - mustEmbedUnimplementedAPIServer() -} - -func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) { - s.RegisterService(&API_ServiceDesc, srv) -} - -func _API_GetDataKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDataKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).GetDataKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kms.API/GetDataKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).GetDataKey(ctx, req.(*GetDataKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// API_ServiceDesc is the grpc.ServiceDesc for API service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var API_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kms.API", - HandlerType: (*APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetDataKey", - Handler: _API_GetDataKey_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "keyservice.proto", -} diff --git a/proto/Dockerfile.gen-proto b/proto/Dockerfile.gen-proto deleted file mode 100644 index 539760071..000000000 --- a/proto/Dockerfile.gen-proto +++ /dev/null @@ -1,69 +0,0 @@ -FROM ubuntu:22.04@sha256:7a57c69fe1e9d5b97c5fe649849e79f2cfc3bf11d10bbd5218b4eb61716aebe6 as build - -ARG GO_VER=1.20.2 -ARG GEN_GO_VER=1.28.1 -ARG GEN_GO_GRPC_VER=1.2.0 -ARG PB_VER=21.8 - -ENV DEBIAN_FRONTEND="noninteractive" -RUN apt-get update && apt-get install -y wget tar unzip - -# Install Go -RUN wget -q https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \ - tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz && rm go${GO_VER}.linux-amd64.tar.gz -ENV PATH ${PATH}:/usr/local/go/bin:/root/go/bin - - -RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v${PB_VER}/protoc-${PB_VER}-linux-x86_64.zip && \ - unzip protoc-${PB_VER}-linux-x86_64.zip -d /root/.local && \ - cp /root/.local/bin/protoc /usr/local/bin/protoc -ENV PATH="$PATH:/root/.local/bin" - -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GEN_GO_VER} && \ - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${GEN_GO_GRPC_VER} - -# Generate code for every existing proto file - -## disk-mapper recover api -WORKDIR /disk-mapper -COPY disk-mapper/recoverproto/*.proto /disk-mapper -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## debugd service -WORKDIR /service -COPY debugd/service/*.proto /service -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## key management -WORKDIR /keyservice -COPY keyservice/keyserviceproto/*.proto /keyservice -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## join service -WORKDIR /joinservice -COPY joinservice/joinproto/*.proto /joinservice -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## verify -WORKDIR /verify -COPY verify/verifyproto/*.proto /verify -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## init -WORKDIR /init -COPY bootstrapper/initproto/*.proto /init -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -## upgrade agent -WORKDIR /upgrade-agent -COPY upgrade-agent/upgradeproto/*.proto /upgrade-agent -RUN protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto - -FROM scratch as export -COPY --from=build /disk-mapper/*.go disk-mapper/recoverproto/ -COPY --from=build /service/*.go debugd/service/ -COPY --from=build /keyservice/*.go keyservice/keyserviceproto/ -COPY --from=build /joinservice/*.go joinservice/joinproto/ -COPY --from=build /verify/*.go verify/verifyproto/ -COPY --from=build /init/*.go bootstrapper/initproto/ -COPY --from=build /upgrade-agent/*.go upgrade-agent/upgradeproto/ diff --git a/proto/README.md b/proto/README.md deleted file mode 100644 index cf062c351..000000000 --- a/proto/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Proto generation - -To generate Go source files from proto, we use docker. - -The following command will generate Go source code files in docker and save the output to the relevant directory. -Run this once every time you make any changes or additions to the `.proto` files. -Add the generated `.go` files, and any changes to the `.proto` files, to your branch before creating a PR. - -```bash -DOCKER_BUILDKIT=1 docker build -o .. -f Dockerfile.gen-proto .. -``` diff --git a/upgrade-agent/upgradeproto/BUILD.bazel b/upgrade-agent/upgradeproto/BUILD.bazel index 1cff35a9e..5c41d9514 100644 --- a/upgrade-agent/upgradeproto/BUILD.bazel +++ b/upgrade-agent/upgradeproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "upgradeproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/upgrade-agent/upgradeproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "upgrade.pb.go", + go_proto_library = ":upgradeproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/upgrade-agent/upgradeproto/upgrade.pb.go b/upgrade-agent/upgradeproto/upgrade.pb.go index 7c9ecaab2..c1f31b5b5 100644 --- a/upgrade-agent/upgradeproto/upgrade.pb.go +++ b/upgrade-agent/upgradeproto/upgrade.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: upgrade.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: upgrade-agent/upgradeproto/upgrade.proto package upgradeproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -33,7 +37,7 @@ type ExecuteUpdateRequest struct { func (x *ExecuteUpdateRequest) Reset() { *x = ExecuteUpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_upgrade_proto_msgTypes[0] + mi := &file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +50,7 @@ func (x *ExecuteUpdateRequest) String() string { func (*ExecuteUpdateRequest) ProtoMessage() {} func (x *ExecuteUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_upgrade_proto_msgTypes[0] + mi := &file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +63,7 @@ func (x *ExecuteUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteUpdateRequest.ProtoReflect.Descriptor instead. func (*ExecuteUpdateRequest) Descriptor() ([]byte, []int) { - return file_upgrade_proto_rawDescGZIP(), []int{0} + return file_upgrade_agent_upgradeproto_upgrade_proto_rawDescGZIP(), []int{0} } func (x *ExecuteUpdateRequest) GetKubeadmUrl() string { @@ -92,7 +96,7 @@ type ExecuteUpdateResponse struct { func (x *ExecuteUpdateResponse) Reset() { *x = ExecuteUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_upgrade_proto_msgTypes[1] + mi := &file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -105,7 +109,7 @@ func (x *ExecuteUpdateResponse) String() string { func (*ExecuteUpdateResponse) ProtoMessage() {} func (x *ExecuteUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_upgrade_proto_msgTypes[1] + mi := &file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -118,56 +122,57 @@ func (x *ExecuteUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteUpdateResponse.ProtoReflect.Descriptor instead. func (*ExecuteUpdateResponse) Descriptor() ([]byte, []int) { - return file_upgrade_proto_rawDescGZIP(), []int{1} + return file_upgrade_agent_upgradeproto_upgrade_proto_rawDescGZIP(), []int{1} } -var File_upgrade_proto protoreflect.FileDescriptor +var File_upgrade_agent_upgradeproto_upgrade_proto protoreflect.FileDescriptor -var file_upgrade_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x55, - 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, - 0x6d, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x19, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x5f, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, - 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x58, 0x0a, 0x06, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x75, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, +var file_upgrade_agent_upgradeproto_upgrade_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, + 0x0c, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x64, 0x6d, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x3a, 0x0a, 0x19, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x17, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x4b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x58, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x4e, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x1d, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, + 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_upgrade_proto_rawDescOnce sync.Once - file_upgrade_proto_rawDescData = file_upgrade_proto_rawDesc + file_upgrade_agent_upgradeproto_upgrade_proto_rawDescOnce sync.Once + file_upgrade_agent_upgradeproto_upgrade_proto_rawDescData = file_upgrade_agent_upgradeproto_upgrade_proto_rawDesc ) -func file_upgrade_proto_rawDescGZIP() []byte { - file_upgrade_proto_rawDescOnce.Do(func() { - file_upgrade_proto_rawDescData = protoimpl.X.CompressGZIP(file_upgrade_proto_rawDescData) +func file_upgrade_agent_upgradeproto_upgrade_proto_rawDescGZIP() []byte { + file_upgrade_agent_upgradeproto_upgrade_proto_rawDescOnce.Do(func() { + file_upgrade_agent_upgradeproto_upgrade_proto_rawDescData = protoimpl.X.CompressGZIP(file_upgrade_agent_upgradeproto_upgrade_proto_rawDescData) }) - return file_upgrade_proto_rawDescData + return file_upgrade_agent_upgradeproto_upgrade_proto_rawDescData } -var file_upgrade_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_upgrade_proto_goTypes = []interface{}{ +var file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_upgrade_agent_upgradeproto_upgrade_proto_goTypes = []interface{}{ (*ExecuteUpdateRequest)(nil), // 0: upgrade.ExecuteUpdateRequest (*ExecuteUpdateResponse)(nil), // 1: upgrade.ExecuteUpdateResponse } -var file_upgrade_proto_depIdxs = []int32{ +var file_upgrade_agent_upgradeproto_upgrade_proto_depIdxs = []int32{ 0, // 0: upgrade.Update.ExecuteUpdate:input_type -> upgrade.ExecuteUpdateRequest 1, // 1: upgrade.Update.ExecuteUpdate:output_type -> upgrade.ExecuteUpdateResponse 1, // [1:2] is the sub-list for method output_type @@ -177,13 +182,13 @@ var file_upgrade_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_upgrade_proto_init() } -func file_upgrade_proto_init() { - if File_upgrade_proto != nil { +func init() { file_upgrade_agent_upgradeproto_upgrade_proto_init() } +func file_upgrade_agent_upgradeproto_upgrade_proto_init() { + if File_upgrade_agent_upgradeproto_upgrade_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_upgrade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecuteUpdateRequest); i { case 0: return &v.state @@ -195,7 +200,7 @@ func file_upgrade_proto_init() { return nil } } - file_upgrade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecuteUpdateResponse); i { case 0: return &v.state @@ -212,18 +217,98 @@ func file_upgrade_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_upgrade_proto_rawDesc, + RawDescriptor: file_upgrade_agent_upgradeproto_upgrade_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_upgrade_proto_goTypes, - DependencyIndexes: file_upgrade_proto_depIdxs, - MessageInfos: file_upgrade_proto_msgTypes, + GoTypes: file_upgrade_agent_upgradeproto_upgrade_proto_goTypes, + DependencyIndexes: file_upgrade_agent_upgradeproto_upgrade_proto_depIdxs, + MessageInfos: file_upgrade_agent_upgradeproto_upgrade_proto_msgTypes, }.Build() - File_upgrade_proto = out.File - file_upgrade_proto_rawDesc = nil - file_upgrade_proto_goTypes = nil - file_upgrade_proto_depIdxs = nil + File_upgrade_agent_upgradeproto_upgrade_proto = out.File + file_upgrade_agent_upgradeproto_upgrade_proto_rawDesc = nil + file_upgrade_agent_upgradeproto_upgrade_proto_goTypes = nil + file_upgrade_agent_upgradeproto_upgrade_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// UpdateClient is the client API for Update service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type UpdateClient interface { + ExecuteUpdate(ctx context.Context, in *ExecuteUpdateRequest, opts ...grpc.CallOption) (*ExecuteUpdateResponse, error) +} + +type updateClient struct { + cc grpc.ClientConnInterface +} + +func NewUpdateClient(cc grpc.ClientConnInterface) UpdateClient { + return &updateClient{cc} +} + +func (c *updateClient) ExecuteUpdate(ctx context.Context, in *ExecuteUpdateRequest, opts ...grpc.CallOption) (*ExecuteUpdateResponse, error) { + out := new(ExecuteUpdateResponse) + err := c.cc.Invoke(ctx, "/upgrade.Update/ExecuteUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UpdateServer is the server API for Update service. +type UpdateServer interface { + ExecuteUpdate(context.Context, *ExecuteUpdateRequest) (*ExecuteUpdateResponse, error) +} + +// UnimplementedUpdateServer can be embedded to have forward compatible implementations. +type UnimplementedUpdateServer struct { +} + +func (*UnimplementedUpdateServer) ExecuteUpdate(context.Context, *ExecuteUpdateRequest) (*ExecuteUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecuteUpdate not implemented") +} + +func RegisterUpdateServer(s *grpc.Server, srv UpdateServer) { + s.RegisterService(&_Update_serviceDesc, srv) +} + +func _Update_ExecuteUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UpdateServer).ExecuteUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/upgrade.Update/ExecuteUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UpdateServer).ExecuteUpdate(ctx, req.(*ExecuteUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Update_serviceDesc = grpc.ServiceDesc{ + ServiceName: "upgrade.Update", + HandlerType: (*UpdateServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExecuteUpdate", + Handler: _Update_ExecuteUpdate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "upgrade-agent/upgradeproto/upgrade.proto", } diff --git a/upgrade-agent/upgradeproto/upgrade_grpc.pb.go b/upgrade-agent/upgradeproto/upgrade_grpc.pb.go deleted file mode 100644 index 5727907e5..000000000 --- a/upgrade-agent/upgradeproto/upgrade_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: upgrade.proto - -package upgradeproto - -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 - -// UpdateClient is the client API for Update 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 UpdateClient interface { - ExecuteUpdate(ctx context.Context, in *ExecuteUpdateRequest, opts ...grpc.CallOption) (*ExecuteUpdateResponse, error) -} - -type updateClient struct { - cc grpc.ClientConnInterface -} - -func NewUpdateClient(cc grpc.ClientConnInterface) UpdateClient { - return &updateClient{cc} -} - -func (c *updateClient) ExecuteUpdate(ctx context.Context, in *ExecuteUpdateRequest, opts ...grpc.CallOption) (*ExecuteUpdateResponse, error) { - out := new(ExecuteUpdateResponse) - err := c.cc.Invoke(ctx, "/upgrade.Update/ExecuteUpdate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UpdateServer is the server API for Update service. -// All implementations must embed UnimplementedUpdateServer -// for forward compatibility -type UpdateServer interface { - ExecuteUpdate(context.Context, *ExecuteUpdateRequest) (*ExecuteUpdateResponse, error) - mustEmbedUnimplementedUpdateServer() -} - -// UnimplementedUpdateServer must be embedded to have forward compatible implementations. -type UnimplementedUpdateServer struct { -} - -func (UnimplementedUpdateServer) ExecuteUpdate(context.Context, *ExecuteUpdateRequest) (*ExecuteUpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecuteUpdate not implemented") -} -func (UnimplementedUpdateServer) mustEmbedUnimplementedUpdateServer() {} - -// UnsafeUpdateServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UpdateServer will -// result in compilation errors. -type UnsafeUpdateServer interface { - mustEmbedUnimplementedUpdateServer() -} - -func RegisterUpdateServer(s grpc.ServiceRegistrar, srv UpdateServer) { - s.RegisterService(&Update_ServiceDesc, srv) -} - -func _Update_ExecuteUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExecuteUpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UpdateServer).ExecuteUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/upgrade.Update/ExecuteUpdate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UpdateServer).ExecuteUpdate(ctx, req.(*ExecuteUpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Update_ServiceDesc is the grpc.ServiceDesc for Update service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Update_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "upgrade.Update", - HandlerType: (*UpdateServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ExecuteUpdate", - Handler: _Update_ExecuteUpdate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "upgrade.proto", -} diff --git a/verify/verifyproto/BUILD.bazel b/verify/verifyproto/BUILD.bazel index fd0e65ae0..f29743315 100644 --- a/verify/verifyproto/BUILD.bazel +++ b/verify/verifyproto/BUILD.bazel @@ -1,6 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//bazel/proto:rules.bzl", "write_go_proto_srcs") proto_library( name = "verifyproto_proto", @@ -22,3 +23,10 @@ go_library( importpath = "github.com/edgelesssys/constellation/v2/verify/verifyproto", visibility = ["//visibility:public"], ) + +write_go_proto_srcs( + name = "write_generated_protos", + src = "verify.pb.go", + go_proto_library = ":verifyproto_go_proto", + visibility = ["//visibility:public"], +) diff --git a/verify/verifyproto/verify.pb.go b/verify/verifyproto/verify.pb.go index c8758244e..d4b0fad22 100644 --- a/verify/verifyproto/verify.pb.go +++ b/verify/verifyproto/verify.pb.go @@ -1,12 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 -// source: verify.proto +// protoc-gen-go v1.29.1 +// protoc v4.22.1 +// source: verify/verifyproto/verify.proto package verifyproto import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,15 +29,13 @@ type GetAttestationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // bytes user_data = 1; removed - // nonce is a random nonce to prevent replay attacks. Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` } func (x *GetAttestationRequest) Reset() { *x = GetAttestationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_verify_proto_msgTypes[0] + mi := &file_verify_verifyproto_verify_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +48,7 @@ func (x *GetAttestationRequest) String() string { func (*GetAttestationRequest) ProtoMessage() {} func (x *GetAttestationRequest) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[0] + mi := &file_verify_verifyproto_verify_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +61,7 @@ func (x *GetAttestationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAttestationRequest.ProtoReflect.Descriptor instead. func (*GetAttestationRequest) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{0} + return file_verify_verifyproto_verify_proto_rawDescGZIP(), []int{0} } func (x *GetAttestationRequest) GetNonce() []byte { @@ -74,14 +76,13 @@ type GetAttestationResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // attestation is the attestation for the given user data and nonce. Attestation []byte `protobuf:"bytes,1,opt,name=attestation,proto3" json:"attestation,omitempty"` } func (x *GetAttestationResponse) Reset() { *x = GetAttestationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_verify_proto_msgTypes[1] + mi := &file_verify_verifyproto_verify_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -94,7 +95,7 @@ func (x *GetAttestationResponse) String() string { func (*GetAttestationResponse) ProtoMessage() {} func (x *GetAttestationResponse) ProtoReflect() protoreflect.Message { - mi := &file_verify_proto_msgTypes[1] + mi := &file_verify_verifyproto_verify_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107,7 +108,7 @@ func (x *GetAttestationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAttestationResponse.ProtoReflect.Descriptor instead. func (*GetAttestationResponse) Descriptor() ([]byte, []int) { - return file_verify_proto_rawDescGZIP(), []int{1} + return file_verify_verifyproto_verify_proto_rawDescGZIP(), []int{1} } func (x *GetAttestationResponse) GetAttestation() []byte { @@ -117,47 +118,49 @@ func (x *GetAttestationResponse) GetAttestation() []byte { return nil } -var File_verify_proto protoreflect.FileDescriptor +var File_verify_verifyproto_verify_proto protoreflect.FileDescriptor -var file_verify_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0x56, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x65, 0x73, 0x73, - 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_verify_verifyproto_verify_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x06, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x56, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x4f, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x6c, + 0x65, 0x73, 0x73, 0x73, 0x79, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_verify_proto_rawDescOnce sync.Once - file_verify_proto_rawDescData = file_verify_proto_rawDesc + file_verify_verifyproto_verify_proto_rawDescOnce sync.Once + file_verify_verifyproto_verify_proto_rawDescData = file_verify_verifyproto_verify_proto_rawDesc ) -func file_verify_proto_rawDescGZIP() []byte { - file_verify_proto_rawDescOnce.Do(func() { - file_verify_proto_rawDescData = protoimpl.X.CompressGZIP(file_verify_proto_rawDescData) +func file_verify_verifyproto_verify_proto_rawDescGZIP() []byte { + file_verify_verifyproto_verify_proto_rawDescOnce.Do(func() { + file_verify_verifyproto_verify_proto_rawDescData = protoimpl.X.CompressGZIP(file_verify_verifyproto_verify_proto_rawDescData) }) - return file_verify_proto_rawDescData + return file_verify_verifyproto_verify_proto_rawDescData } -var file_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_verify_proto_goTypes = []interface{}{ +var file_verify_verifyproto_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_verify_verifyproto_verify_proto_goTypes = []interface{}{ (*GetAttestationRequest)(nil), // 0: verify.GetAttestationRequest (*GetAttestationResponse)(nil), // 1: verify.GetAttestationResponse } -var file_verify_proto_depIdxs = []int32{ +var file_verify_verifyproto_verify_proto_depIdxs = []int32{ 0, // 0: verify.API.GetAttestation:input_type -> verify.GetAttestationRequest 1, // 1: verify.API.GetAttestation:output_type -> verify.GetAttestationResponse 1, // [1:2] is the sub-list for method output_type @@ -167,13 +170,13 @@ var file_verify_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_verify_proto_init() } -func file_verify_proto_init() { - if File_verify_proto != nil { +func init() { file_verify_verifyproto_verify_proto_init() } +func file_verify_verifyproto_verify_proto_init() { + if File_verify_verifyproto_verify_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_verify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_verify_verifyproto_verify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAttestationRequest); i { case 0: return &v.state @@ -185,7 +188,7 @@ func file_verify_proto_init() { return nil } } - file_verify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_verify_verifyproto_verify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAttestationResponse); i { case 0: return &v.state @@ -202,18 +205,98 @@ func file_verify_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_verify_proto_rawDesc, + RawDescriptor: file_verify_verifyproto_verify_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_verify_proto_goTypes, - DependencyIndexes: file_verify_proto_depIdxs, - MessageInfos: file_verify_proto_msgTypes, + GoTypes: file_verify_verifyproto_verify_proto_goTypes, + DependencyIndexes: file_verify_verifyproto_verify_proto_depIdxs, + MessageInfos: file_verify_verifyproto_verify_proto_msgTypes, }.Build() - File_verify_proto = out.File - file_verify_proto_rawDesc = nil - file_verify_proto_goTypes = nil - file_verify_proto_depIdxs = nil + File_verify_verifyproto_verify_proto = out.File + file_verify_verifyproto_verify_proto_rawDesc = nil + file_verify_verifyproto_verify_proto_goTypes = nil + file_verify_verifyproto_verify_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// APIClient is the client API for API service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type APIClient interface { + GetAttestation(ctx context.Context, in *GetAttestationRequest, opts ...grpc.CallOption) (*GetAttestationResponse, error) +} + +type aPIClient struct { + cc grpc.ClientConnInterface +} + +func NewAPIClient(cc grpc.ClientConnInterface) APIClient { + return &aPIClient{cc} +} + +func (c *aPIClient) GetAttestation(ctx context.Context, in *GetAttestationRequest, opts ...grpc.CallOption) (*GetAttestationResponse, error) { + out := new(GetAttestationResponse) + err := c.cc.Invoke(ctx, "/verify.API/GetAttestation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// APIServer is the server API for API service. +type APIServer interface { + GetAttestation(context.Context, *GetAttestationRequest) (*GetAttestationResponse, error) +} + +// UnimplementedAPIServer can be embedded to have forward compatible implementations. +type UnimplementedAPIServer struct { +} + +func (*UnimplementedAPIServer) GetAttestation(context.Context, *GetAttestationRequest) (*GetAttestationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestation not implemented") +} + +func RegisterAPIServer(s *grpc.Server, srv APIServer) { + s.RegisterService(&_API_serviceDesc, srv) +} + +func _API_GetAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAttestationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).GetAttestation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/verify.API/GetAttestation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).GetAttestation(ctx, req.(*GetAttestationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _API_serviceDesc = grpc.ServiceDesc{ + ServiceName: "verify.API", + HandlerType: (*APIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAttestation", + Handler: _API_GetAttestation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "verify/verifyproto/verify.proto", } diff --git a/verify/verifyproto/verify_grpc.pb.go b/verify/verifyproto/verify_grpc.pb.go deleted file mode 100644 index f2cc5d502..000000000 --- a/verify/verifyproto/verify_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 -// source: verify.proto - -package verifyproto - -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 - -// APIClient is the client API for API 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 APIClient interface { - // GetAttestation returns an attestation for the given user data and nonce. - GetAttestation(ctx context.Context, in *GetAttestationRequest, opts ...grpc.CallOption) (*GetAttestationResponse, error) -} - -type aPIClient struct { - cc grpc.ClientConnInterface -} - -func NewAPIClient(cc grpc.ClientConnInterface) APIClient { - return &aPIClient{cc} -} - -func (c *aPIClient) GetAttestation(ctx context.Context, in *GetAttestationRequest, opts ...grpc.CallOption) (*GetAttestationResponse, error) { - out := new(GetAttestationResponse) - err := c.cc.Invoke(ctx, "/verify.API/GetAttestation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// APIServer is the server API for API service. -// All implementations must embed UnimplementedAPIServer -// for forward compatibility -type APIServer interface { - // GetAttestation returns an attestation for the given user data and nonce. - GetAttestation(context.Context, *GetAttestationRequest) (*GetAttestationResponse, error) - mustEmbedUnimplementedAPIServer() -} - -// UnimplementedAPIServer must be embedded to have forward compatible implementations. -type UnimplementedAPIServer struct { -} - -func (UnimplementedAPIServer) GetAttestation(context.Context, *GetAttestationRequest) (*GetAttestationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttestation not implemented") -} -func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {} - -// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to APIServer will -// result in compilation errors. -type UnsafeAPIServer interface { - mustEmbedUnimplementedAPIServer() -} - -func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) { - s.RegisterService(&API_ServiceDesc, srv) -} - -func _API_GetAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAttestationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(APIServer).GetAttestation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/verify.API/GetAttestation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(APIServer).GetAttestation(ctx, req.(*GetAttestationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// API_ServiceDesc is the grpc.ServiceDesc for API service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var API_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "verify.API", - HandlerType: (*APIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAttestation", - Handler: _API_GetAttestation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "verify.proto", -}